Skip to content

Commit 593f389

Browse files
committed
Fixed findingbugs
1 parent 4d837b0 commit 593f389

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

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

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

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,15 @@ public void testRefreshPipelineFunction() throws Exception {
293293

294294
@ParameterizedTest
295295
@MethodSource("exceptionsTriggersRefresh")
296+
@SuppressWarnings("java:S1854")
296297
void refreshesPipelineOnReadFailure(IOException ex) throws Exception {
297298
// GIVEN
298299
Pipeline pipeline = MockPipeline.createSingleNodePipeline();
299300
BlockLocationInfo blockLocationInfo = mock(BlockLocationInfo.class);
300-
doReturn(pipeline).when(blockLocationInfo).getPipeline();
301301
Pipeline newPipeline = MockPipeline.createSingleNodePipeline();
302302
BlockLocationInfo newBlockLocationInfo = mock(BlockLocationInfo.class);
303303

304+
doReturn(pipeline).when(blockLocationInfo).getPipeline();
304305
testRefreshesPipelineOnReadFailure(ex, blockLocationInfo,
305306
id -> newBlockLocationInfo);
306307

@@ -406,6 +407,7 @@ public void testReadNotRetriedOnOtherException(IOException ex)
406407

407408
@ParameterizedTest
408409
@MethodSource("exceptionsTriggersRefresh")
410+
@SuppressWarnings("java:S1854")
409411
public void testRefreshOnReadFailureAfterUnbuffer(IOException ex)
410412
throws Exception {
411413
// 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,6 +51,7 @@ public class TestBlockInputStreamFactoryImpl {
5151
private OzoneConfiguration conf = new OzoneConfiguration();
5252

5353
@Test
54+
@SuppressWarnings("java:S1854")
5455
public void testNonECGivesBlockInputStream() throws IOException {
5556
BlockInputStreamFactory factory = new BlockInputStreamFactoryImpl();
5657
ReplicationConfig repConfig =

0 commit comments

Comments
 (0)