j2sNative clean-up. Fixes problem with second try of sequence fetching
[jalview.git] / src / jalview / datamodel / DBRefSource.java
index c1e1741..2f94884 100755 (executable)
@@ -91,7 +91,9 @@ public class DBRefSource
        public static int getSourceKey(String name) {
                  for (int i = 0; i < MASK_COUNT; i++) {
                          if (name.equals(allSources[i]))
-                               return 1<<i;
+        {
+          return 1<<i;
+        }
                  }
                  return 0;       
          }
@@ -139,42 +141,6 @@ public class DBRefSource
        return ((PRIMARY_SOURCES_MASK & getSourceKey(source)) != 0);
     }
 
-
-//  public static String[] allSourcesFromReflection;
-//
-//  public static String[] allSources()
-//
-//  {
-//    /**
-//     * @j2sNative
-//     * 
-//     *            return C$.allTypes;
-//     * 
-//     */
-//
-//    {
-//      if (allSourcesFromReflection == null)
-//      {
-//        List<String> src = new ArrayList<>();
-//        for (Field f : DBRefSource.class.getFields())
-//        {
-//          if (String.class.equals(f.getType()))
-//          {
-//            try
-//            {
-//              src.add((String) f.get(null));
-//            } catch (Exception x)
-//            {
-//              x.printStackTrace();
-//            }
-//          }
-//        }
-//        allSourcesFromReflection = src.toArray(new String[0]);
-//      }
-//      return allSourcesFromReflection;
-//    }
-//  }
-
   public static boolean isPrimaryCandidate(String ucversion) { 
     // tricky - this test really needs to search the sequence's set of dbrefs to
     // see if there is a primary reference that derived this reference.