Skip to content

Commit 7d1f370

Browse files
committed
Fixed findingBugs
1 parent 9083eab commit 7d1f370

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

hadoop-hdds/client/dev-support/findbugsExcludeFile.xml

+12
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,16 @@
1919
<Class name="org.apache.hadoop.hdds.scm.storage.ByteArrayReader"></Class>
2020
<Bug pattern="EI_EXPOSE_REP2" /> <!-- "Deep copy byte[] has bad impact on performance" -->
2121
</Match>
22+
<Match>
23+
<Class name="org.apache.hadoop.hdds.scm.storage.DummyBlockInputStreamWithRetry"/>
24+
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT" />
25+
</Match>
26+
<Match>
27+
<Class name="org.apache.hadoop.hdds.scm.storage.TestBlockInputStream"/>
28+
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT" />
29+
</Match>
30+
<Match>
31+
<Class name="org.apache.hadoop.ozone.client.io.TestBlockInputStreamFactoryImpl"/>
32+
<Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT" />
33+
</Match>
2234
</FindBugsFilter>

hadoop-hdds/client/src/test/java/org/apache/hadoop/hdds/scm/storage/DummyBlockInputStreamWithRetry.java

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
* A dummy BlockInputStream with pipeline refresh function to mock read
4141
* block call to DN.
4242
*/
43-
@SuppressWarnings("java:S2201")
4443
final class DummyBlockInputStreamWithRetry
4544
extends DummyBlockInputStream {
4645

hadoop-hdds/client/src/test/java/org/apache/hadoop/hdds/scm/storage/TestBlockInputStream.java

-2
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,6 @@ public void testRefreshPipelineFunction() throws Exception {
293293

294294
@ParameterizedTest
295295
@MethodSource("exceptionsTriggersRefresh")
296-
@SuppressWarnings("java:S2201")
297296
void refreshesPipelineOnReadFailure(IOException ex) throws Exception {
298297
// GIVEN
299298
Pipeline pipeline = MockPipeline.createSingleNodePipeline();
@@ -407,7 +406,6 @@ public void testReadNotRetriedOnOtherException(IOException ex)
407406

408407
@ParameterizedTest
409408
@MethodSource("exceptionsTriggersRefresh")
410-
@SuppressWarnings("java:S2201")
411409
public void testRefreshOnReadFailureAfterUnbuffer(IOException ex)
412410
throws Exception {
413411
// GIVEN

hadoop-hdds/client/src/test/java/org/apache/hadoop/ozone/client/io/TestBlockInputStreamFactoryImpl.java

-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public class TestBlockInputStreamFactoryImpl {
5151
private OzoneConfiguration conf = new OzoneConfiguration();
5252

5353
@Test
54-
@SuppressWarnings("java:S2201")
5554
public void testNonECGivesBlockInputStream() throws IOException {
5655
BlockInputStreamFactory factory = new BlockInputStreamFactoryImpl();
5756
ReplicationConfig repConfig =

0 commit comments

Comments
 (0)