[HepData-svn] r1908 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Nov 10 16:47:13 GMT 2015


Author: whalley
Date: Tue Nov 10 16:47:13 2015
New Revision: 1908

Log:
fix case with no dscomment but a location

Modified:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayDatasetLocation.java

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayDatasetLocation.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayDatasetLocation.java	Tue Nov 10 16:34:07 2015	(r1907)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DisplayDatasetLocation.java	Tue Nov 10 16:47:13 2015	(r1908)
@@ -16,6 +16,7 @@
             StringBuffer b = new StringBuffer();
 //            writer.element("p class='datasetcomment'");
             for (String comment : _dataset.getComments()){
+              if(comment != null){
                 if(comment.startsWith("Location")){
                     comment = comment.replace("Location:", "");
                     comment = comment.replace(">", ">");
@@ -35,6 +36,7 @@
                         else {comment = "";}
                     }
                 }
+              }
             }
             String bs = b.toString();
             int ls=bs.length();


More information about the HepData-svn mailing list