You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/12/23 20:04:39 UTC

[GitHub] [pulsar] sijie commented on a change in pull request #9016: Enable spotbugs check in the module pulsar-common

sijie commented on a change in pull request #9016:
URL: https://github.com/apache/pulsar/pull/9016#discussion_r548191499



##########
File path: pulsar-common/src/main/resources/findbugsExclude.xml
##########
@@ -0,0 +1,126 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<FindBugsFilter>
+    <Match>
+        <Class name="org.apache.pulsar.PulsarVersion"/>
+    </Match>
+
+    <Match>
+        <Class name="~org\.apache\.pulsar\.shaded\.com\.google\.protobuf.*"/>
+    </Match>
+
+    <Match>
+        <Class name="~org\.apache\.pulsar\.common\.api\.proto.*"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.common.api.raw.RawMessageImpl"/>
+        <Method name="getKeyBytes"/>
+        <Bug pattern="DM_DEFAULT_ENCODING"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.policies.data.loadbalancer.ResourceUsage"/>
+        <Method name="compareTo"/>
+        <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS"/>

Review comment:
       I think we need to fix the bugs introduced by this.

##########
File path: pulsar-common/src/main/resources/findbugsExclude.xml
##########
@@ -0,0 +1,126 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<FindBugsFilter>
+    <Match>
+        <Class name="org.apache.pulsar.PulsarVersion"/>
+    </Match>
+
+    <Match>
+        <Class name="~org\.apache\.pulsar\.shaded\.com\.google\.protobuf.*"/>
+    </Match>
+
+    <Match>
+        <Class name="~org\.apache\.pulsar\.common\.api\.proto.*"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.common.api.raw.RawMessageImpl"/>
+        <Method name="getKeyBytes"/>
+        <Bug pattern="DM_DEFAULT_ENCODING"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.policies.data.loadbalancer.ResourceUsage"/>
+        <Method name="compareTo"/>
+        <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.common.nar.FileUtils"/>
+        <Method name="deleteFilesInDirectory"/>
+        <Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.common.nar.NarClassLoader"/>
+        <Method name="getServiceImplementation"/>
+        <Bug pattern="DM_DEFAULT_ENCODING"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.common.policies.data.Policies"/>
+        <Method name="getBundles"/>
+        <Bug pattern="INT_BAD_COMPARISON_WITH_INT_VALUE"/>

Review comment:
       I think we need to fix the bugs introduced by this.

##########
File path: pulsar-common/src/main/resources/findbugsExclude.xml
##########
@@ -0,0 +1,126 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<FindBugsFilter>
+    <Match>
+        <Class name="org.apache.pulsar.PulsarVersion"/>
+    </Match>
+
+    <Match>
+        <Class name="~org\.apache\.pulsar\.shaded\.com\.google\.protobuf.*"/>
+    </Match>
+
+    <Match>
+        <Class name="~org\.apache\.pulsar\.common\.api\.proto.*"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.common.api.raw.RawMessageImpl"/>
+        <Method name="getKeyBytes"/>
+        <Bug pattern="DM_DEFAULT_ENCODING"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.policies.data.loadbalancer.ResourceUsage"/>
+        <Method name="compareTo"/>
+        <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.common.nar.FileUtils"/>
+        <Method name="deleteFilesInDirectory"/>
+        <Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.common.nar.NarClassLoader"/>
+        <Method name="getServiceImplementation"/>
+        <Bug pattern="DM_DEFAULT_ENCODING"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.common.policies.data.Policies"/>
+        <Method name="getBundles"/>
+        <Bug pattern="INT_BAD_COMPARISON_WITH_INT_VALUE"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.common.nar.NarClassLoader"/>
+        <Method name="getFromArchive"/>
+        <Bug pattern="DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED"/>

Review comment:
       I think we need to fix the bugs introduced by this.

##########
File path: pulsar-common/src/main/resources/findbugsExclude.xml
##########
@@ -0,0 +1,126 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<FindBugsFilter>
+    <Match>
+        <Class name="org.apache.pulsar.PulsarVersion"/>
+    </Match>
+
+    <Match>
+        <Class name="~org\.apache\.pulsar\.shaded\.com\.google\.protobuf.*"/>
+    </Match>
+
+    <Match>
+        <Class name="~org\.apache\.pulsar\.common\.api\.proto.*"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.common.api.raw.RawMessageImpl"/>
+        <Method name="getKeyBytes"/>
+        <Bug pattern="DM_DEFAULT_ENCODING"/>

Review comment:
       I think we need to fix the bugs introduced by this.

##########
File path: pulsar-common/src/main/resources/findbugsExclude.xml
##########
@@ -0,0 +1,126 @@
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<FindBugsFilter>
+    <Match>
+        <Class name="org.apache.pulsar.PulsarVersion"/>
+    </Match>
+
+    <Match>
+        <Class name="~org\.apache\.pulsar\.shaded\.com\.google\.protobuf.*"/>
+    </Match>
+
+    <Match>
+        <Class name="~org\.apache\.pulsar\.common\.api\.proto.*"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.common.api.raw.RawMessageImpl"/>
+        <Method name="getKeyBytes"/>
+        <Bug pattern="DM_DEFAULT_ENCODING"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.policies.data.loadbalancer.ResourceUsage"/>
+        <Method name="compareTo"/>
+        <Bug pattern="EQ_COMPARETO_USE_OBJECT_EQUALS"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.common.nar.FileUtils"/>
+        <Method name="deleteFilesInDirectory"/>
+        <Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
+    </Match>
+
+    <Match>
+        <Class name="org.apache.pulsar.common.nar.NarClassLoader"/>
+        <Method name="getServiceImplementation"/>
+        <Bug pattern="DM_DEFAULT_ENCODING"/>

Review comment:
       I think we need to fix the bugs introduced by this.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org