another check on parsing lat/long
This commit is contained in:
parent
363bc89550
commit
16c1ecef11
|
@ -157,8 +157,9 @@ public class ConvertToServiceModel {
|
|||
List<String> latList = mapFields.get("Latitudine Centroide");
|
||||
if(latList!=null && latList.size()>0){
|
||||
try {
|
||||
if(!latList.get(0).isEmpty()) {
|
||||
Double centroidLat = Double.parseDouble(latList.get(0));
|
||||
String theLat = latList.get(0);
|
||||
if(theLat!=null && !theLat.isEmpty()) {
|
||||
Double centroidLat = Double.parseDouble(theLat);
|
||||
concessione.setCentroidLat(centroidLat);
|
||||
}
|
||||
}catch (Exception e) {
|
||||
|
@ -169,8 +170,9 @@ public class ConvertToServiceModel {
|
|||
List<String> longList = mapFields.get("Longitudine Centroide");
|
||||
if(longList!=null && longList.size()>0){
|
||||
try {
|
||||
if(!longList.get(0).isEmpty()) {
|
||||
Double centroidLong = Double.parseDouble(longList.get(0));
|
||||
String theLong = longList.get(0);
|
||||
if(theLong!=null && !theLong.isEmpty()) {
|
||||
Double centroidLong = Double.parseDouble(theLong);
|
||||
concessione.setCentroidLong(centroidLong);
|
||||
}
|
||||
}catch (Exception e) {
|
||||
|
|
Loading…
Reference in New Issue