minor fix on time series (when unit value is empty)

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/grsf-publisher-ws@144059 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2017-02-22 10:19:44 +00:00
parent ea16b0efff
commit f8e19fc73c
1 changed files with 2 additions and 1 deletions

View File

@ -64,7 +64,8 @@ public class TimeSeriesBean<T, T1> implements Comparable<TimeSeriesBean<T, T1>>{
@Override
public String toString() {
if(this.unit != null && !this.unit.getClass().equals(Void.class)) // e.g., catches and landings
if(this.unit != null && !this.unit.getClass().equals(Void.class)
&& !this.unit.toString().isEmpty()) // e.g., catches and landings
return year + "-" + value + "-" + unit;
else
return year + "-" + value;