Kaynağa Gözat

HADOOP-12514. Make static fields in GenericTestUtils for assertExceptionContains() package-private and final. (Mingliang Liu via stevel)

Steve Loughran 9 yıl önce
ebeveyn
işleme
a04b16970b

+ 4 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -919,6 +919,10 @@ Release 2.8.0 - UNRELEASED
     HADOOP-12472. Make GenericTestUtils.assertExceptionContains robust.
     (Steve Loughran via jing9)
 
+    HADOOP-12514. Make static fields in GenericTestUtils for
+    assertExceptionContains() package-private and final.
+    (Mingliang Liu via stevel)
+
     HADOOP-12520. Use XInclude in hadoop-azure test configuration to isolate
     Azure Storage account keys for service integration tests. (cnauroth)
 

+ 3 - 4
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/test/GenericTestUtils.java

@@ -143,11 +143,10 @@ public abstract class GenericTestUtils {
         Joiner.on(",").join(found));
   }
 
-  protected static String E_NULL_THROWABLE = "Null Throwable";
-  protected static String E_NULL_THROWABLE_STRING =
+  static final String E_NULL_THROWABLE = "Null Throwable";
+  static final String E_NULL_THROWABLE_STRING =
       "Null Throwable.toString() value";
-  protected static String E_UNEXPECTED_EXCEPTION =
-      "but got unexpected exception";
+  static final String E_UNEXPECTED_EXCEPTION = "but got unexpected exception";
 
   /**
    * Assert that an exception's <code>toString()</code> value