авторедакция упоминаний старых ключей багов на новые в комментах и описаниях
This commit is contained in:
3
.idea/workspace.xml
generated
3
.idea/workspace.xml
generated
@@ -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" />
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user