Add unit tests. Make DbStore handle cases where the bug type or category
[cfb.git] / prod / net / jaekl / cfb / xml / messages / BugPattern.java
index e8e381c55410cd0bb1f16752a1751c5ad40f05a1..1493ac6381b43c66d1999ddd55bc6c68bd2318d9 100644 (file)
@@ -16,6 +16,8 @@ public class BugPattern extends ParseResult {
        static final String[] INTERNAL = { SHORT, LONG, DETAILS };
        static final Object[][] EXTERNAL = {  };
        
+       public static final BugPattern UNKNOWN = new BugPattern(-2); 
+       
        String m_type;
        String m_short;
        String m_long;
@@ -25,9 +27,15 @@ public class BugPattern extends ParseResult {
        public BugPattern() 
        {
                super(TAG, INTERNAL, EXTERNAL);
+               m_id = (-1);
                m_type = m_short = m_long = m_details = "";
        }
        
+       BugPattern(long id) {
+               this();
+               m_id = id;
+       }
+       
        public String getType() { return m_type; }
        public String getShort() { return m_short; }
        public String getLong() { return m_long; }