beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject [1/2] incubator-beam git commit: [BEAM-927] Fix findbugs and re-enable Maven plugin in JmsIO
Date Tue, 13 Dec 2016 18:15:47 GMT
Repository: incubator-beam
Updated Branches:
  refs/heads/master e776d1d70 -> 91d71d47e


[BEAM-927] Fix findbugs and re-enable Maven plugin in JmsIO


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/c1fe7603
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/c1fe7603
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/c1fe7603

Branch: refs/heads/master
Commit: c1fe760303ac4a69427aafbb40f8796c414daff9
Parents: e776d1d
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Thu Nov 17 13:19:42 2016 +0100
Committer: Davor Bonaci <davor@google.com>
Committed: Tue Dec 13 10:15:30 2016 -0800

----------------------------------------------------------------------
 .../src/main/resources/beam/findbugs-filter.xml  | 19 +++++++++++++++++++
 sdks/java/io/jms/pom.xml                         | 13 -------------
 .../org/apache/beam/sdk/io/jms/JmsRecord.java    |  8 +++++---
 3 files changed, 24 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/c1fe7603/sdks/java/build-tools/src/main/resources/beam/findbugs-filter.xml
----------------------------------------------------------------------
diff --git a/sdks/java/build-tools/src/main/resources/beam/findbugs-filter.xml b/sdks/java/build-tools/src/main/resources/beam/findbugs-filter.xml
index adfe2dd..a696aeb 100644
--- a/sdks/java/build-tools/src/main/resources/beam/findbugs-filter.xml
+++ b/sdks/java/build-tools/src/main/resources/beam/findbugs-filter.xml
@@ -44,6 +44,25 @@
   </Match>
 
   <Match>
+    <Class name="org.apache.beam.sdk.io.jms.JmsRecord"/>
+    <Field name="jmsDestination"/>
+    <Bug pattern="SE_BAD_FIELD"/>
+    <!--
+    JMS destination is serializable according to the JMS spec even if it doesn't implement
+    Serializable.
+     -->
+  </Match>
+  <Match>
+    <Class name="org.apache.beam.sdk.io.jms.JmsRecord"/>
+    <Field name="jmsReplyTo"/>
+    <Bug pattern="SE_BAD_FIELD"/>
+    <!--
+    JMS ReplyTo destination is serializable according to the JMS spec even if it doesn't
implement
+    Serializable.
+     -->
+  </Match>
+
+  <Match>
     <Class name="org.apache.beam.sdk.coders.InstantCoder$LexicographicLongConverter"/>
     <Bug pattern="HE_INHERITS_EQUALS_USE_HASHCODE"/>
     <!-- Converter overrides .equals() to add documentation but does not change behavior
-->

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/c1fe7603/sdks/java/io/jms/pom.xml
----------------------------------------------------------------------
diff --git a/sdks/java/io/jms/pom.xml b/sdks/java/io/jms/pom.xml
index aedba9e..93916e7 100644
--- a/sdks/java/io/jms/pom.xml
+++ b/sdks/java/io/jms/pom.xml
@@ -37,19 +37,6 @@
   </properties>
 
   <build>
-    <pluginManagement>
-      <plugins>
-        <!-- BEAM-927 -->
-        <plugin>
-          <groupId>org.codehaus.mojo</groupId>
-          <artifactId>findbugs-maven-plugin</artifactId>
-          <configuration>
-            <skip>true</skip>
-          </configuration>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/c1fe7603/sdks/java/io/jms/src/main/java/org/apache/beam/sdk/io/jms/JmsRecord.java
----------------------------------------------------------------------
diff --git a/sdks/java/io/jms/src/main/java/org/apache/beam/sdk/io/jms/JmsRecord.java b/sdks/java/io/jms/src/main/java/org/apache/beam/sdk/io/jms/JmsRecord.java
index 65a9189..15a1109 100644
--- a/sdks/java/io/jms/src/main/java/org/apache/beam/sdk/io/jms/JmsRecord.java
+++ b/sdks/java/io/jms/src/main/java/org/apache/beam/sdk/io/jms/JmsRecord.java
@@ -20,6 +20,8 @@ package org.apache.beam.sdk.io.jms;
 import java.io.Serializable;
 import java.util.Map;
 import java.util.Objects;
+
+import javax.annotation.Nullable;
 import javax.jms.Destination;
 
 /**
@@ -31,7 +33,7 @@ public class JmsRecord implements Serializable {
   private final String jmsMessageID;
   private final long jmsTimestamp;
   private final String jmsCorrelationID;
-  private final Destination jmsReplyTo;
+  @Nullable private final Destination jmsReplyTo;
   private final Destination jmsDestination;
   private final int jmsDeliveryMode;
   private final boolean jmsRedelivered;
@@ -45,7 +47,7 @@ public class JmsRecord implements Serializable {
       String jmsMessageID,
       long jmsTimestamp,
       String jmsCorrelationID,
-      Destination jmsReplyTo,
+      @Nullable Destination jmsReplyTo,
       Destination jmsDestination,
       int jmsDeliveryMode,
       boolean jmsRedelivered,
@@ -80,7 +82,7 @@ public class JmsRecord implements Serializable {
     return jmsCorrelationID;
   }
 
-  public Destination getJmsReplyTo() {
+  public @Nullable Destination getJmsReplyTo() {
     return jmsReplyTo;
   }
 


Mime
View raw message