смена ключей багов на численнные.
This commit is contained in:
2025-12-16 02:32:20 +03:00
parent f104335bfe
commit 6da9698285
19 changed files with 81 additions and 47 deletions

View File

@@ -1,7 +1,7 @@
package _VisualDVM.ComponentsServer.BugReport;
import Common.CommonConstants;
import Common.Database.Objects.DBObject;
import Common.Database.Objects.rDBObject;
import Common.Database.Objects.riDBObject;
import Common.Utils.TextLog;
import Common.Utils.Utils_;
import Common.Utils.Vector_;
@@ -18,10 +18,7 @@ import java.io.File;
import java.nio.file.Paths;
import java.util.Date;
import java.util.Vector;
public class BugReport extends rDBObject {
//---
@Description("DEFAULT '-1'")
public int id_ = CommonConstants.Nan;
public class BugReport extends riDBObject {
//---
public String project_version = "";
public long visualiser_version = -1;
@@ -43,13 +40,17 @@ public class BugReport extends rDBObject {
public File owner = null;
@Description("IGNORE")
public byte[] packed_archive = null;
//--
public long date = 0;
public long change_date;
//--
public BugReport() {
}
public BugReport(BugReport src) {
this.SynchronizeFields(src);
}
public BugReport(String sender_name_in, String sender_address_in, String description_in, String version_in) {
genName();
id = CommonConstants.Nan;
sender_name = sender_name_in;
sender_address = sender_address_in;
project_version = version_in;
@@ -67,7 +68,6 @@ public class BugReport extends rDBObject {
public void SynchronizeFields(DBObject src) {
super.SynchronizeFields(src);
BugReport b = (BugReport) src;
id_ = b.id_;
change_date = b.change_date;
description = b.description;
comment = b.comment;
@@ -82,11 +82,16 @@ public class BugReport extends rDBObject {
descriptionAdditionDraft = b.descriptionAdditionDraft;
commentAdditionDraft = b.commentAdditionDraft;
owner = b.owner;
change_date = b.change_date;
}
//--
public File getArchiveFile() {
return Paths.get(System.getProperty("user.dir"), "Bugs", id + ".zip").toFile();
public File getHome() {
return Utils_.getFile(System.getProperty("user.dir"), "BugReports", String.valueOf(id));
}
public File getArchiveFile() {
return new File(getHome(),id + ".zip");
}
//--
public String getDescriptionHeader() {
if (description != null) {
String[] data = description.split("\n");