src/java.base/share/classes/java/util/Locale.java

Print this page
rev 16815 : imported patch 8176853

@@ -2694,10 +2694,11 @@
          * @throws NullPointerException if <code>attribute</code> is null
          * @throws IllformedLocaleException if <code>attribute</code> is ill-formed
          * @see #setExtension(char, String)
          */
         public Builder removeUnicodeLocaleAttribute(String attribute) {
+            Objects.requireNonNull(attribute);
             try {
                 localeBuilder.removeUnicodeLocaleAttribute(attribute);
             } catch (LocaleSyntaxException e) {
                 throw new IllformedLocaleException(e.getMessage(), e.getErrorIndex());
             }