You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by le...@apache.org on 2019/07/30 17:08:34 UTC

[incubator-druid] branch master updated: Spotbugs fix DM_NUMBER_CTOR (#8072)

This is an automated email from the ASF dual-hosted git repository.

leventov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 0f8c902  Spotbugs fix DM_NUMBER_CTOR (#8072)
0f8c902 is described below

commit 0f8c902e94aca8c55fd8b10d74398f6528b357e0
Author: Fokko Driesprong <fo...@apache.org>
AuthorDate: Tue Jul 30 19:08:27 2019 +0200

    Spotbugs fix DM_NUMBER_CTOR (#8072)
---
 codestyle/spotbugs-exclude.xml                                        | 1 -
 .../main/java/org/apache/druid/data/input/influx/InfluxParser.java    | 4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/codestyle/spotbugs-exclude.xml b/codestyle/spotbugs-exclude.xml
index ca9fb08..fe8a6de 100644
--- a/codestyle/spotbugs-exclude.xml
+++ b/codestyle/spotbugs-exclude.xml
@@ -37,7 +37,6 @@
     <Bug pattern="DC_DOUBLECHECK"/>
     <Bug pattern="DM_BOXED_PRIMITIVE_FOR_PARSING"/>
     <Bug pattern="DM_EXIT"/>
-    <Bug pattern="DM_NUMBER_CTOR"/>
     <Bug pattern="DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED"/>
     <Bug pattern="EI_EXPOSE_REP"/>
     <Bug pattern="EI_EXPOSE_REP2"/>
diff --git a/extensions-contrib/influx-extensions/src/main/java/org/apache/druid/data/input/influx/InfluxParser.java b/extensions-contrib/influx-extensions/src/main/java/org/apache/druid/data/input/influx/InfluxParser.java
index a14e5e1..42fca8b 100644
--- a/extensions-contrib/influx-extensions/src/main/java/org/apache/druid/data/input/influx/InfluxParser.java
+++ b/extensions-contrib/influx-extensions/src/main/java/org/apache/druid/data/input/influx/InfluxParser.java
@@ -124,7 +124,7 @@ public class InfluxParser implements Parser<String, Object>
   private Object parseNumber(String raw)
   {
     if (raw.endsWith("i")) {
-      return new Long(raw.substring(0, raw.length() - 1));
+      return Long.valueOf(raw.substring(0, raw.length() - 1));
     }
 
     return new Double(raw);
@@ -161,7 +161,7 @@ public class InfluxParser implements Parser<String, Object>
       dest.put(TIMESTAMP_KEY, 0L);
     } else {
       timestamp = timestamp.substring(0, timestamp.length() - 6);
-      long timestampMillis = new Long(timestamp);
+      final long timestampMillis = Long.valueOf(timestamp);
       dest.put(TIMESTAMP_KEY, timestampMillis);
     }
   }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org