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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed May 30 17:21:36 BST 2012


Author: whalley
Date: Wed May 30 17:21:36 2012
New Revision: 1545

Log:
fix for comments without a : in  them

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

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/PlainFormatter.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/PlainFormatter.java	Wed May 30 16:18:46 2012	(r1544)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/PlainFormatter.java	Wed May 30 17:21:36 2012	(r1545)
@@ -151,7 +151,9 @@
                 s.append(store[0][i]);
                 for (int ny=2; ny<=d.getYAxes().size(); ny++ ) {
                     if(!store[ny-1][i].equals(store[0][i])){
-                        s.append(" " + store[ny-1][i].substring(store[ny-1][i].indexOf(":")));
+                        if(store[ny-1][i].indexOf(":")>0){
+                            s.append(" " + store[ny-1][i].substring(store[ny-1][i].indexOf(":")));
+                        }
                     }
                 }
                 s.append("\n");


More information about the HepData-svn mailing list