Bladeren bron

修改bug复现程度和严重程度的枚举值

MengyangDuan 4 jaren geleden
bovenliggende
commit
cef66c3c0f

+ 1 - 1
src/main/java/edu/nju/model/BugRecurrent.java

@@ -1,7 +1,7 @@
 package edu.nju.model;
 
 public enum BugRecurrent {
-    其他(0),无规律复现(1),小概率复现(2),大概率复现(3),必现(4);
+    未知(0),其他(1),无规律复现(2),小概率复现(3),大概率复现(4),必现(5);
     private int id;
 
     BugRecurrent(int id) {

+ 1 - 5
src/main/java/edu/nju/model/BugSeverity.java

@@ -1,7 +1,7 @@
 package edu.nju.model;
 
 public enum BugSeverity {
-    待定(0),较轻(1),一般(2),严重(3),紧急(4);
+    其他(0),待定(1),较轻(2),一般(3),严重(4),紧急(5);
 
     private int id;
 
@@ -22,8 +22,4 @@ public enum BugSeverity {
         return null;
     }
 
-    public static void main(String[] args) {
-        BugSeverity bugSeveritsy=BugSeverity.getValue(2);
-        System.out.println(bugSeveritsy.toString());
-    }
 }

+ 1 - 1
src/main/java/edu/nju/service/AnalyzeService.java

@@ -140,7 +140,7 @@ public class AnalyzeService {
 				Bug bug=bugMap.get(bugMirror.getId());
 				BugHistory bugHistory=hdao.findByid(bugMirror.getId());
 				if(bug!=null&&bugHistory!=null){
-					BugSeverity bugSeveritsy=BugSeverity.getValue(2);
+					BugSeverity bugSeveritsy=BugSeverity.getValue(bug.getSeverity());
 					String bugSeverity=bugSeveritsy.toString();
 					BugScore bugScore=bsdao.findById(bug.getId());
 					int score=bugScore==null?0:bugScore.getGrade();