fixing NPE in Point and minor change in java doc to ReferencePropertyDefinitions
authorAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Tue, 20 Nov 2018 15:54:25 +0000 (16:54 +0100)
committerAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Tue, 20 Nov 2018 15:54:25 +0000 (16:54 +0100)
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/location/Point.java
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/reference/ReferencePropertyDefinitions.java

index 59a22a5f57624db7c3f38651f049cdc68dbf3ce0..7231bd64c175ad45aad3b02298a247221dfb6884 100644 (file)
@@ -40,7 +40,6 @@ import org.hibernate.search.annotations.Spatial;
 import org.hibernate.search.annotations.SpatialMode;
 
 import eu.etaxonomy.cdm.common.CdmUtils;
-import eu.etaxonomy.cdm.model.occurrence.DerivedUnit;
 import eu.etaxonomy.cdm.strategy.parser.location.CoordinateConverter;
 import eu.etaxonomy.cdm.strategy.parser.location.CoordinateConverter.ConversionResults;
 import eu.etaxonomy.cdm.validation.Level2;
@@ -480,7 +479,7 @@ public class Point implements Cloneable, Serializable {
 
     public static Double parseLatitude(String string) throws ParseException{
         try{
-            if (string == null){
+            if (string == null || string.isEmpty()){
                 return null;
             }
             string = setCurrentDoubleSeparator(string);
@@ -508,7 +507,7 @@ public class Point implements Cloneable, Serializable {
 
     public static Double parseLongitude(String string) throws ParseException{
         try {
-            if (string == null){
+            if (string == null || string.isEmpty()){
                 return null;
             }
             string = setCurrentDoubleSeparator(string);
index 8246f08249c0dcd18c32e4304d24c453016dc816..6098ba4a3d5a8824e71bc4bfb717c3c129d81ca2 100644 (file)
@@ -12,7 +12,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 /**
- * This class contains provides the set of applicable  {@link Reference} fields per {@link ReferenceType}
+ * This class provides the set of applicable  {@link Reference} fields per {@link ReferenceType}
  * together with the type specific name of the getter.
  * <p>
  * All this information can in principle be generically retrieved from the reference interfaces. Creating and applying annotations