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



##########
File path: 
pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/Policies.java
##########
@@ -241,18 +241,16 @@ public String toString() {
     }
 
 
-    private static final long MAX_BUNDLES = ((long) 1) << 32;
-
     public static BundlesData getBundles(int numBundles) {
-        if (numBundles <= 0 || numBundles > MAX_BUNDLES) {
+        if (numBundles <= 0) {

Review comment:
       It should be only affected by the comparison of the values. I remove the 
comparison between the int value and long value. 
   But I still wonder why we use a 'long' to represent the max size of the 
bundles? 

##########
File path: pulsar-common/src/main/resources/findbugsExclude.xml
##########
@@ -0,0 +1,81 @@
+<!--
+
+    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.nar.FileUtils"/>
+        <Method name="deleteFilesInDirectory"/>
+        <Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"/>
+    </Match>
+
+    <Match>
+        <Class 
name="org.apache.pulsar.common.policies.data.FunctionStats$FunctionInstanceStats$FunctionInstanceStatsData"/>
+        <Bug pattern="EQ_OVERRIDING_EQUALS_NOT_SYMMETRIC"/>
+    </Match>
+
+    <Match>
+        <Class 
name="org.apache.pulsar.common.util.collections.ConcurrentBitSet"/>
+        <Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS"/>
+    </Match>
+
+    <Match>
+        <Class 
name="org.apache.pulsar.common.util.collections.ConcurrentBitSetRecyclable"/>
+        <Bug pattern="EQ_DOESNT_OVERRIDE_EQUALS"/>
+    </Match>
+
+    <Match>
+        <Class 
name="org.apache.pulsar.common.util.NamespaceBundleStatsComparator"/>
+        <Bug pattern="SE_COMPARATOR_SHOULD_BE_SERIALIZABLE"/>
+    </Match>
+
+    <Match>

Review comment:
       I clean most of the bugs. But there has still some bugs marked excluded 
by me. Because it will cause almost 130 bugs and it will need to change a lot 
of files across different modules. 
   Can I fix them in other PRs?




----------------------------------------------------------------
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:
[email protected]


Reply via email to