авторедакция упоминаний старых ключей багов на новые в комментах и описаниях

This commit is contained in:
2025-12-15 22:27:46 +03:00
parent 7bb4531c1b
commit f104335bfe
2 changed files with 21 additions and 3 deletions

3
.idea/workspace.xml generated
View File

@@ -9,9 +9,6 @@
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportsDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportsDatabase.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Global.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Global.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadAllBugReportsArchives.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadAllBugReportsArchives.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadBugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadBugReport.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -79,6 +79,7 @@ public class BugReportsDatabase extends SQLiteDatabase {
for (BugReport bugReport: sortedBugs){
bugReport.id_ = i;
++i;
//--
Update(bugReport);
}
//--
@@ -111,5 +112,25 @@ public class BugReportsDatabase extends SQLiteDatabase {
}
}
//--
//упоминания других багов.
for (BugReport bugReport: sortedBugs){
//--
Vector<String> mentioned_keys = new Vector<>();
for (String id: bugReports.Data.keySet()){
if ((bugReport.description.contains(id) || bugReport.comment.contains(id)) && !mentioned_keys.contains(id)){
mentioned_keys.add(id);
}
}
//--
for (String id: mentioned_keys){
BugReport owner = bugReports.get(id);
if (owner!=null) {
bugReport.comment = bugReport.comment.replace(id, String.valueOf(owner.id_));
bugReport.description = bugReport.description.replace(id, String.valueOf(owner.id_));
Update(bugReport);
}
}
}
}
}