diff --git a/src/main/java/org/caosdb/server/query/POV.java b/src/main/java/org/caosdb/server/query/POV.java index ae1ac7055fd7734c8e8e1911c011cd528ab118bb..3b26fecd17d446d0c8233f7033c7c67a0413406e 100644 --- a/src/main/java/org/caosdb/server/query/POV.java +++ b/src/main/java/org/caosdb/server/query/POV.java @@ -23,7 +23,6 @@ package org.caosdb.server.query; import static java.sql.Types.DOUBLE; -import static java.sql.Types.INTEGER; import static java.sql.Types.VARCHAR; import static org.caosdb.server.database.DatabaseUtils.bytes2UTF8; @@ -216,8 +215,8 @@ public class POV implements EntityFilterInterface { } final long t1 = System.currentTimeMillis(); // Add type-converted substitutes for ints/doubles. - final Integer vIntSubst = (this.vDouble != null && this.vDouble % 1 == 0) - ? (int) Math.rint(this.vDouble) : null; + final Integer vIntSubst = + (this.vDouble != null && this.vDouble % 1 == 0) ? (int) Math.rint(this.vDouble) : null; final Double vDoubleSubst = (this.vInt != null) ? (double) this.vInt : null; try { @@ -507,8 +506,8 @@ public class POV implements EntityFilterInterface { /** Return the Int value, which may be null. */ public Integer getVInt() { - if (this.vInt != null){ - return vInt.clone(); + if (this.vInt != null) { + return Integer.valueOf(vInt); } return null; } @@ -516,17 +515,14 @@ public class POV implements EntityFilterInterface { /** Return the Double value, which may be null. */ public Double getVDouble() { if (this.vDouble != null) { - return this.vDouble.clone(); + return Double.valueOf(vDouble); } return null; } /** Return the Datetime value, which may be null. */ public DateTimeInterface getVDatetime() { - if (this.vDatetime != null) { - return DateTimeFactory2.valueOf(this.vDatetime.toDateTimeString()); - } - return null; + return this.vDatetime; } public String getAggregate() {