[hg] main-silver: switch cache statuses to enum

  • From: Tomas Stupka < >
  • To:
  • Subject: [hg] main-silver: switch cache statuses to enum
  • Date: Thu, 04 Apr 2013 00:31:51 -0700

changeset 8b0f58afe349 in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/8b0f58afe349
description:
        switch cache statuses to enum

diffstat:

 bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueCache.java       
                         |  77 +++++----
 bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueStorage.java     
                         |  17 +-
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/CacheTest.java
                       |  56 +++---
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/StorageTest.java
                     |  12 +-
 
bugtracking/test/unit/src/org/netbeans/modules/bugtracking/issuetable/QueryTableCellRendererTest.java
 |  22 +-
 bugzilla/src/org/netbeans/modules/bugzilla/BugzillaQueryProvider.java        
                         |   4 +-
 bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaIssue.java          
                         |  14 +-
 
bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaTaskListProvider.java
                        |   4 +-
 bugzilla/src/org/netbeans/modules/bugzilla/query/BugzillaQuery.java          
                         |  10 +-
 
bugzilla/test/unit/src/org/netbeans/modules/bugzilla/TestQueryNotifyListener.java
                     |   7 +-
 jira/src/org/netbeans/modules/jira/JiraQueryProvider.java                    
                         |   4 +-
 jira/src/org/netbeans/modules/jira/issue/JiraTaskListProvider.java           
                         |   4 +-
 jira/src/org/netbeans/modules/jira/issue/NbJiraIssue.java                    
                         |  14 +-
 jira/src/org/netbeans/modules/jira/query/JiraQuery.java                      
                         |  10 +-
 14 files changed, 139 insertions(+), 116 deletions(-)

diffs (834 lines):

diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueCache.java 
b/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueCache.java
--- a/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueCache.java
+++ b/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueCache.java
@@ -44,19 +44,15 @@
 
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import javax.swing.SwingUtilities;
-import org.netbeans.modules.bugtracking.APIAccessor;
 import org.netbeans.modules.bugtracking.BugtrackingManager;
-import org.netbeans.modules.bugtracking.RepositoryImpl;
 import org.netbeans.modules.bugtracking.api.Issue;
-import org.netbeans.modules.bugtracking.api.Repository;
-import org.netbeans.modules.bugtracking.spi.IssueProvider;
 
 /**
  *
@@ -64,35 +60,48 @@
  */
 public class IssueCache<I, D> {
 
+    public enum Status {
     /**
      * No information available
      */
-    public static final int ISSUE_STATUS_UNKNOWN = 0;
+        ISSUE_STATUS_UNKNOWN(0),
     /**
      * Issue was seen
      */
-    public static final int ISSUE_STATUS_SEEN = 2;
+        ISSUE_STATUS_SEEN(2),
     /**
      * Issue wasn't seen yet
      */
-    public static final int ISSUE_STATUS_NEW = 4;
+        ISSUE_STATUS_NEW(4),
     /**
      * Issue was remotely modified since the last time it was seen
      */
-    public static final int ISSUE_STATUS_MODIFIED = 8;
+        ISSUE_STATUS_MODIFIED(8);
+        
+        /* used by IssueStorage */
+        private final int val;
+
+        private Status(int i) {
+            this.val = i;
+        }
+        int getVal() {
+            return val;
+        }
+    }
+    
     /**
      * Seen, New or Modified
      */
-    public static final int ISSUE_STATUS_ALL =
-            ISSUE_STATUS_NEW |
-            ISSUE_STATUS_MODIFIED |
-            ISSUE_STATUS_SEEN;
+    public static final EnumSet<Status> ISSUE_STATUS_ALL = EnumSet.of(
+            Status.ISSUE_STATUS_NEW,
+            Status.ISSUE_STATUS_MODIFIED,
+            Status.ISSUE_STATUS_SEEN);
     /**
      * New or modified
      */
-    public static final int ISSUE_STATUS_NOT_SEEN =
-            ISSUE_STATUS_NEW |
-            ISSUE_STATUS_MODIFIED;
+    public static final EnumSet<Status> ISSUE_STATUS_NOT_SEEN = EnumSet.of(
+            Status.ISSUE_STATUS_NEW,
+            Status.ISSUE_STATUS_MODIFIED);
 
     private static final Logger LOG = 
Logger.getLogger("org.netbeans.modules.bugtracking.ui.issue.cache.IssueCache");
     private Map<String, IssueEntry> cache;
@@ -277,7 +286,7 @@
                         }
                         storeIssue(entry);
                         entry.seen = false;
-                        entry.status= ISSUE_STATUS_MODIFIED;
+                        entry.status= Status.ISSUE_STATUS_MODIFIED;
                     } else {
                         LOG.log(Level.FINE, " issue {0} isn't changed", new 
Object[] {id}); // NOI18N
                         // keep old values
@@ -288,12 +297,12 @@
                     {
                         LOG.log(Level.FINE, " issue {0} is changed", new 
Object[] {id}); // NOI18N
                         entry.seen = false;
-                        entry.status= ISSUE_STATUS_MODIFIED;
+                        entry.status= Status.ISSUE_STATUS_MODIFIED;
                     } else {
                         LOG.log(Level.FINE, " issue {0} isn't changed", new 
Object[] {id}); // NOI18N
                         entry.seenAttributes = null;
                         entry.seen = false;
-                        entry.status= ISSUE_STATUS_NEW;
+                        entry.status= Status.ISSUE_STATUS_NEW;
                     }
                 }
             }
@@ -314,10 +323,8 @@
         }
         LOG.log(Level.FINE, "setting seen {0} for issue {1}", new Object[] 
{seen, id}); // NOI18N
         assert !SwingUtilities.isEventDispatchThread();
-        boolean oldValue;
         IssueEntry entry;
         synchronized(CACHE_LOCK) {
-            oldValue = wasSeen(id);
             entry = getCache().get(id);
             assert entry != null && entry.issue != null;
             if(seen) {
@@ -327,7 +334,7 @@
                 entry.lastUnseenStatus = entry.status;
             } else {
                 entry.seenAttributes = getLastSeenAttributes().get(id);
-                if(entry.lastUnseenStatus != ISSUE_STATUS_UNKNOWN) {
+                if(entry.lastUnseenStatus != Status.ISSUE_STATUS_UNKNOWN) {
                     entry.status = entry.lastUnseenStatus;
                     if(entry.seenAttributes == null) {
                         entry.seenAttributes = 
issueAccessor.getAttributes(entry.issue);
@@ -340,7 +347,7 @@
     }
 
     /**
-     * Determines wheter the {@link Issue} with the given id was seen or 
unseen.
+     * Determines whether the {@link Issue} with the given id was seen or 
unseen.
      *
      * @param id issue id
      * @return true if issue was seen, otherwise false
@@ -363,7 +370,7 @@
      * Returns the last seen attributes for the issue with the given id.
      *
      * @param id issue id
-     * @return last seen sttributes
+     * @return last seen attributes
      */
     public Map<String, String> getSeenAttributes(String id) {
         IssueEntry entry;
@@ -403,16 +410,16 @@
      * @see #ISSUE_STATUS_SEEN
      * @see #ISSUE_STATUS_NOT_SEEN
      */
-    public int getStatus(String id) {
+    public Status getStatus(String id) {
         synchronized(CACHE_LOCK) {
             IssueEntry entry = getCache().get(id);
             if(entry == null ) {
                 LOG.log(Level.FINE, "returning UKNOWN status for issue {0}", 
new Object[] {id}); // NOI18N
-                return ISSUE_STATUS_UNKNOWN;
+                return Status.ISSUE_STATUS_UNKNOWN;
             }
             if(entry.seen) {
                 LOG.log(Level.FINE, "returning SEEN status for issue {0}", 
new Object[] {id}); // NOI18N
-                return ISSUE_STATUS_SEEN;
+                return Status.ISSUE_STATUS_SEEN;
             }
             LOG.log(Level.FINE, "returning status {0} for issue {1}", new 
Object[] {entry.status, id}); // NOI18N
             return entry.status;
@@ -513,7 +520,7 @@
     /**
      * for testing purposes
      */
-    void setEntryValues(String id, int status, boolean seen) {
+    void setEntryValues(String id, Status status, boolean seen) {
         synchronized(CACHE_LOCK) {
             IssueEntry entry = getCache().get(id);
             assert entry != null;
@@ -525,7 +532,7 @@
     private IssueEntry createNewEntry(String id) {
         IssueEntry entry = new IssueEntry();
         entry.id = id;
-        entry.status = ISSUE_STATUS_NEW;
+        entry.status = Status.ISSUE_STATUS_NEW;
         getCache().put(id, entry);
         return entry;
     }
@@ -559,15 +566,15 @@
     class IssueEntry {
         private I issue;
         private Map<String, String> seenAttributes;
-        private int status;
+        private Status status;
         private boolean seen = false;
         private String id;
         private long lastSeenModified = -1;
-        private int lastUnseenStatus = ISSUE_STATUS_UNKNOWN;
+        private Status lastUnseenStatus = Status.ISSUE_STATUS_UNKNOWN;
 
         IssueEntry() { }
 
-        IssueEntry(I issue, String id, Map<String, String> seenAttributes, 
int status, int lastUnseenStatus, boolean seen, long lastKnownModified) {
+        IssueEntry(I issue, String id, Map<String, String> seenAttributes, 
Status status, Status lastUnseenStatus, boolean seen, long lastKnownModified) 
{
             this.issue = issue;
             this.id = id;
             this.seenAttributes = seenAttributes;
@@ -583,7 +590,7 @@
         public Map<String, String> getSeenAttributes() {
             return seenAttributes;
         }
-        public int getStatus() {
+        public Status getStatus() {
             return status;
         }
         public void setSeen(boolean seen) {
@@ -601,10 +608,10 @@
         public void setLastSeenModified(long lastKnownModified) {
             this.lastSeenModified = lastKnownModified;
         }
-        public int getLastUnseenStatus() {
+        public Status getLastUnseenStatus() {
             return lastUnseenStatus;
         }
-        public void setLastUnseenStatus(int lastUnseenStatus) {
+        public void setLastUnseenStatus(Status lastUnseenStatus) {
             this.lastUnseenStatus = lastUnseenStatus;
         }
     }
diff --git 
a/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueStorage.java 
b/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueStorage.java
--- a/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueStorage.java
+++ b/bugtracking/src/org/netbeans/modules/bugtracking/cache/IssueStorage.java
@@ -186,7 +186,7 @@
                 }
                 dos.writeBoolean(entry.wasSeen());
                 dos.writeLong(entry.getLastSeenModified());
-                dos.writeInt(entry.getLastUnseenStatus());
+                dos.writeInt(entry.getLastUnseenStatus().getVal());
                 if(entry.getSeenAttributes() != null) {
                     Map<String, String> sa = entry.getSeenAttributes();
                     for(Entry<String, String> e : sa.entrySet()) {
@@ -224,10 +224,21 @@
                 Map<String, String> m = new HashMap<String, String>();
                 boolean seen = is.readBoolean();
                 long lastModified = -1;
-                int lastStatus = IssueCache.ISSUE_STATUS_UNKNOWN;
+                IssueCache.Status lastStatus = 
IssueCache.Status.ISSUE_STATUS_UNKNOWN;
                 if(!STORAGE_VERSION.equals(STORAGE_VERSION_1_0)) {
                     lastModified = is.readLong();
-                    lastStatus = is.readInt();
+                    int i = is.readInt();
+                    for(IssueCache.Status s : IssueCache.Status.values()) {
+                        if(s.getVal() == i) {
+                            lastStatus = s;
+                            break;
+                        }
+                    }
+                    if(i != IssueCache.Status.ISSUE_STATUS_UNKNOWN.getVal() 
&& 
+                       lastStatus == IssueCache.Status.ISSUE_STATUS_UNKNOWN) 
+                    {
+                        assert false : "there is no Status value for " + i; 
// NOI18N
+                    }
                 }
                 while(true) {
                     try {
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/CacheTest.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/CacheTest.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/CacheTest.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/CacheTest.java
@@ -103,8 +103,8 @@
         // => initial status SEEN
         CTestIssue issue = cache.setIssueData("1", "1#issue1#" + 
tsBeforeRepo + "#" + tsBeforeRepo + "#v11#v21#v31");
         assertNotNull(issue);
-        int status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_SEEN, status);
+        IssueCache.Status status = cache.getStatus(issue.getID());
+        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
         Map<String, String> attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v11", "v21", "v31");
@@ -113,7 +113,7 @@
         long tsAfterRepo = System.currentTimeMillis();
         cache.setIssueData(issue, "1#issue1#" + tsBeforeRepo + "#" + 
tsAfterRepo + "#v12#v22#v32");
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_MODIFIED, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v11", "v21", "v31");
@@ -121,7 +121,7 @@
         // set SEEN TRUE => SEEN
         cache.setSeen(issue.getID(), true);
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_SEEN, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v12", "v22", "v32");
@@ -137,8 +137,8 @@
         // => initial status NEW
         CTestIssue issue = cache.setIssueData("1", "1#issue1#" + tsAfterRepo 
+ "#" + tsAfterRepo + "#v11#v21#v31");
         assertNotNull(issue);
-        int status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_NEW, status);
+        IssueCache.Status status = cache.getStatus(issue.getID());
+        assertEquals(IssueCache.Status.ISSUE_STATUS_NEW, status);
         Map<String, String> attr = cache.getSeenAttributes(issue.getID());
         assertNull(attr);
 
@@ -146,14 +146,14 @@
         Thread.sleep(10);
         cache.setIssueData(issue, "1#issue1#" + tsAfterRepo + "#" + 
System.currentTimeMillis()  + "#v12#v22#v32");
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_NEW, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_NEW, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNull(attr);
 
         // set SEEN TRUE => SEEN
         cache.setSeen(issue.getID(), true);
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_SEEN, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v12", "v22", "v32");
@@ -161,7 +161,7 @@
         // set SEEN FALSE => NEW
         cache.setSeen(issue.getID(), false);
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_NEW, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_NEW, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v12", "v22", "v32");
@@ -180,8 +180,8 @@
         // => initial status MODIFIED
         CTestIssue issue = cache.setIssueData("1", "1#issue1#" + 
tsBeforeRepo + "#" + tsAfterRepo + "#v11#v21#v31");
         assertNotNull(issue);
-        int status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_MODIFIED, status);
+        IssueCache.Status status = cache.getStatus(issue.getID());
+        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
         Map<String, String> attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);        
         assertAttributes(attr, "v11", "v21", "v31");
@@ -189,7 +189,7 @@
         // set SEEN TRUE => SEEN. attrs from the last setData
         cache.setSeen(issue.getID(), true);
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_SEEN, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v11", "v21", "v31");
@@ -198,7 +198,7 @@
         Thread.sleep(10);
         cache.setSeen(issue.getID(), false);
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_MODIFIED, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v11", "v21", "v31");
@@ -206,7 +206,7 @@
         // set SEEN TRUE => SEEN, attsr stay the same
         cache.setSeen(issue.getID(), true);
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_SEEN, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v11", "v21", "v31");
@@ -227,8 +227,8 @@
         String data = "1#issue1#" + tsBeforeRepo + "#" + tsAfterRepo + 
"#v11#v21#v31";
         CTestIssue issue = cache.setIssueData("1", data);
         assertNotNull(issue);
-        int status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_MODIFIED, status);
+        IssueCache.Status status = cache.getStatus(issue.getID());
+        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
         Map<String, String> attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v11", "v21", "v31");
@@ -236,7 +236,7 @@
         // set SEEN TRUE => SEEN. attrs from the last setData
         cache.setSeen(issue.getID(), true);
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_SEEN, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v11", "v21", "v31");
@@ -248,7 +248,7 @@
         // status is expected to be SEEN, and data the last set
         cache.setIssueData("1", data);
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_SEEN, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v11", "v21", "v31");
@@ -257,7 +257,7 @@
         Thread.sleep(10);
         cache.setSeen(issue.getID(), false);
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_MODIFIED, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v11", "v21", "v31");
@@ -285,8 +285,8 @@
         String data = "1#issue1#" + tsBeforeRepo + "#" + tsAfterRepo + 
"#v11#v21#v31";
         CTestIssue issue = cache.setIssueData("1", data);
         assertNotNull(issue);
-        int status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_MODIFIED, status);
+        IssueCache.Status status = cache.getStatus(issue.getID());
+        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
         Map<String, String> attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v11", "v21", "v31");
@@ -295,7 +295,7 @@
         tsAfterRepo = System.currentTimeMillis();
         cache.setIssueData(issue, "1#issue1#" + tsBeforeRepo + "#" + 
tsAfterRepo + "#v12#v22#v32");
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_MODIFIED, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v11", "v21", "v31");
@@ -303,7 +303,7 @@
         // set SEEN TRUE => SEEN, attrs from the last refresh
         cache.setSeen(issue.getID(), true);
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_SEEN, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v12", "v22", "v32");
@@ -318,7 +318,7 @@
         tsAfterRepo = System.currentTimeMillis();
         cache.setIssueData("1", "1#issue1#" + tsBeforeRepo + "#" + 
tsAfterRepo + "#v13#v23#v33"); // reload
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_MODIFIED, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v12", "v22", "v32");
@@ -335,8 +335,8 @@
         // => initial status SEEN
         CTestIssue issue = cache.setIssueData("1", "1#issue1#" + 
tsBeforeRepo + "#" + tsBeforeRepo + "#v11#v21#v31");
         assertNotNull(issue);
-        int status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_SEEN, status);
+        IssueCache.Status status = cache.getStatus(issue.getID());
+        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
         Map<String, String> attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v11", "v21", "v31");
@@ -345,7 +345,7 @@
         long tsAfterRepo = System.currentTimeMillis();
         cache.setIssueData(issue, "1#issue1#" + tsBeforeRepo + "#" + 
tsAfterRepo + "#v11#v21#v31");
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_MODIFIED, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_MODIFIED, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v11", "v21", "v31");
@@ -353,7 +353,7 @@
         // set SEEN TRUE => SEEN
         cache.setSeen(issue.getID(), true);
         status = cache.getStatus(issue.getID());
-        assertEquals(IssueCache.ISSUE_STATUS_SEEN, status);
+        assertEquals(IssueCache.Status.ISSUE_STATUS_SEEN, status);
         attr = cache.getSeenAttributes(issue.getID());
         assertNotNull(attr);
         assertAttributes(attr, "v11", "v21", "v31");
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/StorageTest.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/StorageTest.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/StorageTest.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/cache/StorageTest.java
@@ -117,8 +117,8 @@
 
         long lm = System.currentTimeMillis();
         IssueCache<DummyIssue, Object> cache = getCache();
-        IssueEntry ie1 = cache.new IssueEntry(i1, i1.id, attr1, -1, -1, 
false, lm);
-        IssueEntry ie2 = cache.new IssueEntry(i2, i2.id, attr2, -1, -1, 
false, lm);
+        IssueEntry ie1 = cache.new IssueEntry(i1, i1.id, attr1, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, false, lm);
+        IssueEntry ie2 = cache.new IssueEntry(i2, i2.id, attr2, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, false, lm);
         
         storage.storeIssue(url, ie1);
         storage.storeIssue(url, ie2);
@@ -127,8 +127,8 @@
         assertTrue(issues.contains(id1));
         assertTrue(issues.contains(id2));
 
-        ie1 = cache.new IssueEntry(i1, i1.id, null, -1, -1, false, lm);
-        ie2 = cache.new IssueEntry(i2, i2.id, null, -1, -1, false, lm);
+        ie1 = cache.new IssueEntry(i1, i1.id, null, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, false, lm);
+        ie2 = cache.new IssueEntry(i2, i2.id, null, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, false, lm);
         storage.readIssue(url, ie1);
         if(ie1.getSeenAttributes() == null) fail("missing issue id [" + id1 
+ "]");
         assertAttribute(ie1.getSeenAttributes(), "dummy1", "dummy3");
@@ -203,8 +203,8 @@
         
         long lm = System.currentTimeMillis();
         IssueCache<DummyIssue, Object> cache = getCache();
-        IssueEntry ie1 = cache. new IssueEntry(i1, i1.id, attr, -1, -1, 
false, lm);
-        IssueEntry ie2 = cache. new IssueEntry(i2, i2.id, attr, -1, -1, 
false, lm);
+        IssueEntry ie1 = cache. new IssueEntry(i1, i1.id, attr, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, false, lm);
+        IssueEntry ie2 = cache. new IssueEntry(i2, i2.id, attr, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, 
IssueCache.Status.ISSUE_STATUS_UNKNOWN, false, lm);
 
         storage.storeIssue(url, ie1);
         storage.storeIssue(url, ie2);
diff --git 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/issuetable/QueryTableCellRendererTest.java
 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/issuetable/QueryTableCellRendererTest.java
--- 
a/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/issuetable/QueryTableCellRendererTest.java
+++ 
b/bugtracking/test/unit/src/org/netbeans/modules/bugtracking/issuetable/QueryTableCellRendererTest.java
@@ -132,7 +132,7 @@
         IssueProperty property = new RendererNode(rendererIssue, "some 
value", rendererRepository, new ChangesProvider()).createProperty();
         rendererQuery.containsIssue = true;
         boolean selected = false;
-        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.ISSUE_STATUS_SEEN, true);
+        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.Status.ISSUE_STATUS_SEEN, true);
         TableCellStyle defaultStyle = 
QueryTableCellRenderer.getDefaultCellStyle(table, issueTable, property, 
selected, 0);
         TableCellStyle result = QueryTableCellRenderer.getCellStyle(table, 
query.getQuery(), issueTable, property, selected, 0);
         assertEquals(defaultStyle.getBackground(), result.getBackground());
@@ -145,7 +145,7 @@
         rendererIssue = new RendererIssue(rendererRepository, "");
         property = new RendererNode(rendererIssue, "some value", 
rendererRepository, new ChangesProvider()).createProperty();
         selected = true;
-        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.ISSUE_STATUS_SEEN, true);
+        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.Status.ISSUE_STATUS_SEEN, true);
         defaultStyle = QueryTableCellRenderer.getDefaultCellStyle(table, 
issueTable, property, selected, 0);
         result = QueryTableCellRenderer.getCellStyle(table, 
query.getQuery(), issueTable, property, selected, 0);
         assertEquals(defaultStyle.getBackground(), result.getBackground());
@@ -182,7 +182,7 @@
         selected = false;
         rendererIssue = new RendererIssue(rendererRepository, "changed");
         property = new RendererNode(rendererIssue, "some value", 
rendererRepository, new ChangesProvider()).createProperty();
-        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.ISSUE_STATUS_MODIFIED, false);
+        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.Status.ISSUE_STATUS_MODIFIED, false);
         result = QueryTableCellRenderer.getCellStyle(table, 
query.getQuery(), issueTable, property, selected, 0);
         defaultStyle = QueryTableCellRenderer.getDefaultCellStyle(table, 
issueTable, property, selected, 0);
         assertEquals(defaultStyle.getBackground(), result.getBackground());
@@ -196,7 +196,7 @@
         selected = true;
         rendererIssue = new RendererIssue(rendererRepository, "changed");
         property = new RendererNode(rendererIssue, "some value", 
rendererRepository, new ChangesProvider()).createProperty();
-        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.ISSUE_STATUS_MODIFIED, false);
+        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.Status.ISSUE_STATUS_MODIFIED, false);
         result = QueryTableCellRenderer.getCellStyle(table, 
query.getQuery(), issueTable, property, selected, 0);
         defaultStyle = QueryTableCellRenderer.getDefaultCellStyle(table, 
issueTable, property, selected, 0);
         assertEquals(modifiedHighlightColor, result.getBackground());
@@ -209,7 +209,7 @@
         selected = false;
         rendererIssue = new RendererIssue(rendererRepository, "");
         property = new RendererNode(rendererIssue, "some value", 
rendererRepository, new ChangesProvider()).createProperty();
-        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.ISSUE_STATUS_NEW, false);
+        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.Status.ISSUE_STATUS_NEW, false);
         result = QueryTableCellRenderer.getCellStyle(table, 
query.getQuery(), issueTable, property, selected, 0);
         defaultStyle = QueryTableCellRenderer.getDefaultCellStyle(table, 
issueTable, property, selected, 0);
         assertEquals(defaultStyle.getBackground(), result.getBackground());
@@ -223,7 +223,7 @@
         selected = true;
         rendererIssue = new RendererIssue(rendererRepository, "");
         property = new RendererNode(rendererIssue, "some value", 
rendererRepository, new ChangesProvider()).createProperty();
-        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.ISSUE_STATUS_NEW, false);
+        setEntryValues(rendererRepository, rendererIssue, 
IssueCache.Status.ISSUE_STATUS_NEW, false);
         result = QueryTableCellRenderer.getCellStyle(table, 
query.getQuery(), issueTable, property, selected, 0);
         defaultStyle = QueryTableCellRenderer.getDefaultCellStyle(table, 
issueTable, property, selected, 0);
         assertEquals(newHighlightColor, result.getBackground());
@@ -471,13 +471,13 @@
 
         @Override
         public IssueStatusProvider.Status getStatus() {
-            int s = repo.cache.getStatus(getID());
+            IssueCache.Status s = repo.cache.getStatus(getID());
             switch(s) {
-                case IssueCache.ISSUE_STATUS_NEW:
+                case ISSUE_STATUS_NEW:
                     return IssueStatusProvider.Status.NEW;
-                case IssueCache.ISSUE_STATUS_MODIFIED:
+                case ISSUE_STATUS_MODIFIED:
                     return IssueStatusProvider.Status.MODIFIED;
-                case IssueCache.ISSUE_STATUS_SEEN:
+                case ISSUE_STATUS_SEEN:
                     return IssueStatusProvider.Status.SEEN;
             }
             return null;
@@ -590,7 +590,7 @@
         }
     };
 
-    private void setEntryValues(RendererRepository repository, RendererIssue 
rendererIssue, int status, boolean seen) throws NoSuchMethodException, 
IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+    private void setEntryValues(RendererRepository repository, RendererIssue 
rendererIssue, IssueCache.Status status, boolean seen) throws 
NoSuchMethodException, IllegalAccessException, IllegalArgumentException, 
InvocationTargetException {
         IssueCache cache = repository.getLookup().lookup(IssueCache.class);
         try {
             cache.setIssueData(rendererIssue, rendererIssue); // ensure 
issue is cached
diff --git 
a/bugzilla/src/org/netbeans/modules/bugzilla/BugzillaQueryProvider.java 
b/bugzilla/src/org/netbeans/modules/bugzilla/BugzillaQueryProvider.java
--- a/bugzilla/src/org/netbeans/modules/bugzilla/BugzillaQueryProvider.java
+++ b/bugzilla/src/org/netbeans/modules/bugzilla/BugzillaQueryProvider.java
@@ -39,6 +39,8 @@
 
 import java.beans.PropertyChangeListener;
 import java.util.Collection;
+import java.util.EnumSet;
+import org.netbeans.modules.bugtracking.cache.IssueCache;
 import org.netbeans.modules.bugtracking.kenai.spi.KenaiQueryProvider;
 import org.netbeans.modules.bugtracking.kenai.spi.OwnerInfo;
 import org.netbeans.modules.bugtracking.spi.QueryController;
@@ -98,7 +100,7 @@
         return query.contains(id);
     }
 
-    public Collection<BugzillaIssue> getIssues(BugzillaQuery query, int 
includeStatus) {
+    public Collection<BugzillaIssue> getIssues(BugzillaQuery query, 
EnumSet<IssueCache.Status> includeStatus) {
         return query.getIssues(includeStatus);
     }
 
diff --git 
a/bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaIssue.java 
b/bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaIssue.java
--- a/bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaIssue.java
+++ b/bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaIssue.java
@@ -445,10 +445,10 @@
         if(wasSeen()) {
             return "";                                                       
   // NOI18N
         }
-        int status = repository.getIssueCache().getStatus(getID());
-        if(status == IssueCache.ISSUE_STATUS_NEW) {
+        IssueCache.Status status = 
repository.getIssueCache().getStatus(getID());
+        if(status == IssueCache.Status.ISSUE_STATUS_NEW) {
             return NbBundle.getMessage(BugzillaIssue.class, 
"LBL_NEW_STATUS");
-        } else if(status == IssueCache.ISSUE_STATUS_MODIFIED) {
+        } else if(status == IssueCache.Status.ISSUE_STATUS_MODIFIED) {
             List<IssueField> changedFields = new ArrayList<IssueField>();
             assert getSeenAttributes() != null;
             for (IssueField f : 
getRepository().getConfiguration().getFields()) {
@@ -1089,13 +1089,13 @@
     }
 
     public IssueStatusProvider.Status getStatus() {
-        int status = getRepository().getIssueCache().getStatus(getID());
+        IssueCache.Status status = 
getRepository().getIssueCache().getStatus(getID());
         switch(status) {
-            case IssueCache.ISSUE_STATUS_NEW:
+            case ISSUE_STATUS_NEW:
                 return IssueStatusProvider.Status.NEW;
-            case IssueCache.ISSUE_STATUS_MODIFIED:
+            case ISSUE_STATUS_MODIFIED:
                 return IssueStatusProvider.Status.MODIFIED;
-            case IssueCache.ISSUE_STATUS_SEEN:
+            case ISSUE_STATUS_SEEN:
                 return IssueStatusProvider.Status.SEEN;
         }
         return null;
diff --git 
a/bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaTaskListProvider.java
 
b/bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaTaskListProvider.java
--- 
a/bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaTaskListProvider.java
+++ 
b/bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaTaskListProvider.java
@@ -555,9 +555,9 @@
     private BugzillaIssue getIssue(final BugzillaRepository repository, 
final String issueId) {
         assert !EventQueue.isDispatchThread();
         // XXX is there a simpler way to obtain an issue?
-        int status = repository.getIssueCache().getStatus(issueId);
+        IssueCache.Status status = 
repository.getIssueCache().getStatus(issueId);
         final BugzillaIssue[] issue = new BugzillaIssue[1];
-        if (status == IssueCache.ISSUE_STATUS_UNKNOWN) { // not yet cached
+        if (status == IssueCache.Status.ISSUE_STATUS_UNKNOWN) { // not yet 
cached
             Runnable runnable = new Runnable() {
                 @Override
                 public void run() {
diff --git 
a/bugzilla/src/org/netbeans/modules/bugzilla/query/BugzillaQuery.java 
b/bugzilla/src/org/netbeans/modules/bugzilla/query/BugzillaQuery.java
--- a/bugzilla/src/org/netbeans/modules/bugzilla/query/BugzillaQuery.java
+++ b/bugzilla/src/org/netbeans/modules/bugzilla/query/BugzillaQuery.java
@@ -287,7 +287,7 @@
         return info;
     }
 
-    public int getIssueStatus(String id) {
+    public IssueCache.Status getIssueStatus(String id) {
         return repository.getIssueCache().getStatus(id);
     }
 
@@ -320,10 +320,10 @@
     }
     
     public Collection<BugzillaIssue> getIssues() {
-        return getIssues(~0);
+        return getIssues(IssueCache.ISSUE_STATUS_ALL);
     }
     
-    public Collection<BugzillaIssue> getIssues(int includeStatus) {
+    public Collection<BugzillaIssue> getIssues(EnumSet<IssueCache.Status> 
includeStatus) {
         if (issues == null) {
             return Collections.emptyList();
         }
@@ -335,8 +335,8 @@
         IssueCache<BugzillaIssue, TaskData> cache = 
repository.getIssueCache();
         List<BugzillaIssue> ret = new ArrayList<BugzillaIssue>();
         for (String id : ids) {
-            int status = getIssueStatus(id);
-            if((status & includeStatus) != 0) {
+            IssueCache.Status status = getIssueStatus(id);
+            if(includeStatus.contains(status)) {
                 ret.add(cache.getIssue(id));
             }
         }
diff --git 
a/bugzilla/test/unit/src/org/netbeans/modules/bugzilla/TestQueryNotifyListener.java
 
b/bugzilla/test/unit/src/org/netbeans/modules/bugzilla/TestQueryNotifyListener.java
--- 
a/bugzilla/test/unit/src/org/netbeans/modules/bugzilla/TestQueryNotifyListener.java
+++ 
b/bugzilla/test/unit/src/org/netbeans/modules/bugzilla/TestQueryNotifyListener.java
@@ -43,8 +43,9 @@
 package org.netbeans.modules.bugzilla;
 
 import java.util.ArrayList;
+import java.util.EnumSet;
 import java.util.List;
-import org.netbeans.modules.bugtracking.spi.IssueProvider;
+import org.netbeans.modules.bugtracking.cache.IssueCache.Status;
 import org.netbeans.modules.bugzilla.issue.BugzillaIssue;
 import org.netbeans.modules.bugzilla.query.BugzillaQuery;
 import org.netbeans.modules.bugzilla.query.QueryNotifyListener;
@@ -76,10 +77,10 @@
         finished = false;
         issues = new ArrayList<BugzillaIssue>();
     }
-    public List<BugzillaIssue> getIssues(int includeStatus) {
+    public List<BugzillaIssue> getIssues(EnumSet<Status> includeStatus) {
         List<BugzillaIssue> ret = new ArrayList<BugzillaIssue>();
         for (BugzillaIssue issue : issues) {
-            if (q == null || (q.getIssueStatus(issue.getID()) & 
includeStatus) != 0) {
+            if (q == null || 
includeStatus.contains(q.getIssueStatus(issue.getID()))) {
                 ret.add(issue);
             }
         }
diff --git a/jira/src/org/netbeans/modules/jira/JiraQueryProvider.java 
b/jira/src/org/netbeans/modules/jira/JiraQueryProvider.java
--- a/jira/src/org/netbeans/modules/jira/JiraQueryProvider.java
+++ b/jira/src/org/netbeans/modules/jira/JiraQueryProvider.java
@@ -39,6 +39,8 @@
 
 import java.beans.PropertyChangeListener;
 import java.util.Collection;
+import java.util.EnumSet;
+import org.netbeans.modules.bugtracking.cache.IssueCache;
 import org.netbeans.modules.bugtracking.kenai.spi.KenaiQueryProvider;
 import org.netbeans.modules.bugtracking.kenai.spi.OwnerInfo;
 import org.netbeans.modules.bugtracking.spi.QueryController;
@@ -98,7 +100,7 @@
         return query.contains(id);
     }
 
-    public Collection<NbJiraIssue> getIssues(JiraQuery query, int 
includeStatus) {
+    public Collection<NbJiraIssue> getIssues(JiraQuery query, 
EnumSet<IssueCache.Status> includeStatus) {
         return query.getIssues(includeStatus);
     }
 
diff --git 
a/jira/src/org/netbeans/modules/jira/issue/JiraTaskListProvider.java 
b/jira/src/org/netbeans/modules/jira/issue/JiraTaskListProvider.java
--- a/jira/src/org/netbeans/modules/jira/issue/JiraTaskListProvider.java
+++ b/jira/src/org/netbeans/modules/jira/issue/JiraTaskListProvider.java
@@ -551,9 +551,9 @@
     private NbJiraIssue getIssue(final JiraRepository repository, final 
String issueKey) {
         assert !EventQueue.isDispatchThread();
         // XXX is there a simpler way to obtain an issue?
-        int status = repository.getIssueCache().getStatus(issueKey);
+        IssueCache.Status status = 
repository.getIssueCache().getStatus(issueKey);
         final NbJiraIssue[] issue = new NbJiraIssue[1];
-        if (status == IssueCache.ISSUE_STATUS_UNKNOWN) { // not yet cached
+        if (status == IssueCache.Status.ISSUE_STATUS_UNKNOWN) { // not yet 
cached
             Runnable runnable = new Runnable() {
                 @Override
                 public void run() {
diff --git a/jira/src/org/netbeans/modules/jira/issue/NbJiraIssue.java 
b/jira/src/org/netbeans/modules/jira/issue/NbJiraIssue.java
--- a/jira/src/org/netbeans/modules/jira/issue/NbJiraIssue.java
+++ b/jira/src/org/netbeans/modules/jira/issue/NbJiraIssue.java
@@ -525,13 +525,13 @@
     }
 
     public IssueStatusProvider.Status getIssueStatus() {
-        int status = getRepository().getIssueCache().getStatus(getID());
+        IssueCache.Status status = 
getRepository().getIssueCache().getStatus(getID());
         switch(status) {
-            case IssueCache.ISSUE_STATUS_NEW:
+            case ISSUE_STATUS_NEW:
                 return IssueStatusProvider.Status.NEW;
-            case IssueCache.ISSUE_STATUS_MODIFIED:
+            case ISSUE_STATUS_MODIFIED:
                 return IssueStatusProvider.Status.MODIFIED;
-            case IssueCache.ISSUE_STATUS_SEEN:
+            case ISSUE_STATUS_SEEN:
                 return IssueStatusProvider.Status.SEEN;
         }
         return null;
@@ -928,10 +928,10 @@
         if(wasSeen()) {
             return "";                                                       
   // NOI18N
         }
-        int status = repository.getIssueCache().getStatus(getID());
-        if(status == IssueCache.ISSUE_STATUS_NEW) {
+        IssueCache.Status status = 
repository.getIssueCache().getStatus(getID());
+        if(status == IssueCache.Status.ISSUE_STATUS_NEW) {
             return NbBundle.getMessage(NbJiraIssue.class, "LBL_NEW_STATUS");
-        } else if(status == IssueCache.ISSUE_STATUS_MODIFIED) {
+        } else if(status == IssueCache.Status.ISSUE_STATUS_MODIFIED) {
             List<IssueField> changedFields = new ArrayList<IssueField>();
             Map<String, String> attr = getSeenAttributes();
             assert attr != null;
diff --git a/jira/src/org/netbeans/modules/jira/query/JiraQuery.java 
b/jira/src/org/netbeans/modules/jira/query/JiraQuery.java
--- a/jira/src/org/netbeans/modules/jira/query/JiraQuery.java
+++ b/jira/src/org/netbeans/modules/jira/query/JiraQuery.java
@@ -268,7 +268,7 @@
         return issues.contains(id);
     }
 
-    public int getIssueStatus(String id) {
+    public IssueCache.Status getIssueStatus(String id) {
         return repository.getIssueCache().getStatus(id);
     }
 
@@ -294,10 +294,10 @@
     }
 
     public Collection<NbJiraIssue> getIssues() {
-        return getIssues(~0);
+        return getIssues(IssueCache.ISSUE_STATUS_ALL);
     }
     
-    public Collection<NbJiraIssue> getIssues(int includeStatus) {
+    public Collection<NbJiraIssue> getIssues(EnumSet<IssueCache.Status> 
includeStatus) {
         if (issues == null) {
             return Collections.emptyList();
         }
@@ -309,8 +309,8 @@
         IssueCache<NbJiraIssue, TaskData> cache = repository.getIssueCache();
         List<NbJiraIssue> ret = new ArrayList<NbJiraIssue>();
         for (String id : ids) {
-            int status = getIssueStatus(id);
-            if((status & includeStatus) != 0) {
+            IssueCache.Status status = getIssueStatus(id);
+            if(includeStatus.contains(status)) {
                 ret.add(cache.getIssue(id));
             }
         }

[hg] main-silver: switch cache statuses to enum

Tomas Stupka 04/04/2013

Project Features

About this Project

ConnectedDeveloper was started in November 2009, is owned by tpavek, and has 66 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close