From 5f78dfdb2d1c2cbd1de737b572a8b7150ce47536 Mon Sep 17 00:00:00 2001 From: FuzzingTeam Date: Sun, 23 Oct 2022 17:36:56 +0530 Subject: [PATCH] Reverted HadoopIllegalArgumentException to IllegalArgumentException --- .../apache/hadoop/io/erasurecode/rawcoder/DecodingState.java | 2 +- .../java/org/apache/hadoop/io/erasurecode/TestCoderBase.java | 5 ++--- .../io/erasurecode/rawcoder/TestDecodingValidator.java | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/DecodingState.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/DecodingState.java index 8440b898968..4b693a4a3fb 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/DecodingState.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/erasurecode/rawcoder/DecodingState.java @@ -39,7 +39,7 @@ class DecodingState { T[] outputs) { if (inputs.length != decoder.getNumParityUnits() + decoder.getNumDataUnits()) { - throw new HadoopIllegalArgumentException("Invalid inputs length"); + throw new IllegalArgumentException("Invalid inputs length"); } if (erasedIndexes.length != outputs.length) { diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/erasurecode/TestCoderBase.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/erasurecode/TestCoderBase.java index 91a34debb68..e304a8014d2 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/erasurecode/TestCoderBase.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/erasurecode/TestCoderBase.java @@ -17,7 +17,6 @@ */ package org.apache.hadoop.io.erasurecode; -import org.apache.hadoop.HadoopIllegalArgumentException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.io.erasurecode.BufferAllocator.SimpleBufferAllocator; import org.apache.hadoop.io.erasurecode.BufferAllocator.SlicedBufferAllocator; @@ -229,7 +228,7 @@ public abstract class TestCoderBase { toEraseChunks[idx ++] = dataChunks[erasedDataIndexes[i]]; dataChunks[erasedDataIndexes[i]] = null; } else { - throw new HadoopIllegalArgumentException( + throw new IllegalArgumentException( "The erased index is out of bound: erasedDataIndex=" + erasedDataIndexes[i]); } @@ -240,7 +239,7 @@ public abstract class TestCoderBase { toEraseChunks[idx ++] = parityChunks[erasedParityIndexes[i]]; parityChunks[erasedParityIndexes[i]] = null; } else { - throw new HadoopIllegalArgumentException( + throw new IllegalArgumentException( "The erased index is out of bound: erasedParityIndex=" + erasedParityIndexes[i]); } diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/erasurecode/rawcoder/TestDecodingValidator.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/erasurecode/rawcoder/TestDecodingValidator.java index af2563e4106..008b9296d43 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/erasurecode/rawcoder/TestDecodingValidator.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/io/erasurecode/rawcoder/TestDecodingValidator.java @@ -127,7 +127,7 @@ public class TestDecodingValidator extends TestRawCoderBase { // decode try { backupAndEraseChunks(clonedDataChunks, parityChunks); - } catch (HadoopIllegalArgumentException e) { + } catch (IllegalArgumentException e) { String expected = "The erased index is out of bound"; Assume.assumeTrue(expected, !e.toString().contains(expected)); } @@ -219,7 +219,7 @@ public class TestDecodingValidator extends TestRawCoderBase { // decode try { backupAndEraseChunks(clonedDataChunks, parityChunks); - } catch (HadoopIllegalArgumentException e) { + } catch (IllegalArgumentException e) { String expected = "The erased index is out of bound"; Assume.assumeTrue(expected, !e.toString().contains(expected)); }