Author: pwang
Date: 2011-05-25 12:57:53 -0700 (Wed, 25 May 2011)
New Revision: 25534

Modified:
   
cytoscape/trunk/application/src/main/java/cytoscape/plugin/DownloadableInfo.java
Log:
Bug fixed:  "SNAPSHOT" in Cytoscape version number break the plugin manager 

Modified: 
cytoscape/trunk/application/src/main/java/cytoscape/plugin/DownloadableInfo.java
===================================================================
--- 
cytoscape/trunk/application/src/main/java/cytoscape/plugin/DownloadableInfo.java
    2011-05-25 18:09:41 UTC (rev 25533)
+++ 
cytoscape/trunk/application/src/main/java/cytoscape/plugin/DownloadableInfo.java
    2011-05-25 19:57:53 UTC (rev 25534)
@@ -413,8 +413,15 @@
 
   private boolean compareVersions(String[] v1, String[] v2) {
     if (v1.length != v2.length) return false;
-  
-    for (int i = 0; i < v1.length; i++) {
+      
+    for (int i = 0; i < v1.length; i++) {      
+       // Remove ".SNAPSHOT in versiopn number if any 
+       v1[i] = v1[i].toUpperCase();
+       int idx = v1[i].indexOf("SNAPSHOT");
+       if (idx >0){
+               v1[i] = v1[i].substring(0, idx-1);
+       }
+       
       if (Integer.valueOf(v1[i]).intValue() != Integer.valueOf(
           v2[i]).intValue())
         return false;

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to