[HepData-svn] r1851 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Fri Mar 27 16:09:41 GMT 2015


Author: whalley
Date: Fri Mar 27 16:09:40 2015
New Revision: 1851

Log:
fix loop over for RedId

Modified:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/JsonFormatter.java

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/JsonFormatter.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/JsonFormatter.java	Fri Mar 27 15:38:19 2015	(r1850)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/JsonFormatter.java	Fri Mar 27 16:09:40 2015	(r1851)
@@ -34,8 +34,8 @@
         if(p.getInspireId() != null ) { ids[1]=p.getInspireId().toString(); } else { ids[1]=""; } 
         if(p.getRedId() != null ) { ids[2]=p.getRedId().toString(); } else { ids[2]=""; } 
         
-        for (int i=0; i<descs.length-1; i++){
-            for(int j=0; j<ids.length-1; j++){
+        for (int i=0; i<descs.length; i++){
+            for(int j=0; j<ids.length; j++){
                 String descfile = "/home/hepdata/resource/" +ids[j] + "/" + descs[i];
                 String linkfile = "/home/hepdata/resource/" +ids[j] + "/" + links[i];
                 File testdesc = new File(descfile);
@@ -61,7 +61,7 @@
             }
         }
 
-        for (int j=0; j<ids.length-1; j++){
+        for (int j=0; j<ids.length; j++){
             String insertfile = "/home/hepdata/resource/" +ids[j] + "/insert.html";
             File testinsert = new File(insertfile);
             String insert="";


More information about the HepData-svn mailing list