Merge HADOOP-10248. Property name should be included in the exception where property value is null. Contributed by Akira AJISAKA.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1560907 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f3136cd6b9
commit
ad41e7a1c9
|
@ -260,6 +260,9 @@ Release 2.3.0 - UNRELEASED
|
||||||
HADOOP-10132. RPC#stopProxy() should log the class of proxy when IllegalArgumentException
|
HADOOP-10132. RPC#stopProxy() should log the class of proxy when IllegalArgumentException
|
||||||
is encountered (Ted yu via umamahesh)
|
is encountered (Ted yu via umamahesh)
|
||||||
|
|
||||||
|
HADOOP-10248. Property name should be included in the exception where property value
|
||||||
|
is null (Akira AJISAKA via umamahesh)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HADOOP-10142. Avoid groups lookup for unprivileged users such as "dr.who"
|
HADOOP-10142. Avoid groups lookup for unprivileged users such as "dr.who"
|
||||||
|
|
|
@ -957,7 +957,7 @@ public class Configuration implements Iterable<Map.Entry<String,String>>,
|
||||||
"Property name must not be null");
|
"Property name must not be null");
|
||||||
Preconditions.checkArgument(
|
Preconditions.checkArgument(
|
||||||
value != null,
|
value != null,
|
||||||
"Property value must not be null");
|
"The value of property " + name + " must not be null");
|
||||||
DeprecationContext deprecations = deprecationContext.get();
|
DeprecationContext deprecations = deprecationContext.get();
|
||||||
if (deprecations.getDeprecatedKeyMap().isEmpty()) {
|
if (deprecations.getDeprecatedKeyMap().isEmpty()) {
|
||||||
getProps();
|
getProps();
|
||||||
|
|
|
@ -1162,6 +1162,8 @@ public class TestConfiguration extends TestCase {
|
||||||
fail("Should throw an IllegalArgumentException exception ");
|
fail("Should throw an IllegalArgumentException exception ");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
assertTrue(e instanceof IllegalArgumentException);
|
assertTrue(e instanceof IllegalArgumentException);
|
||||||
|
assertEquals(e.getMessage(),
|
||||||
|
"The value of property testClassName must not be null");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1172,6 +1174,7 @@ public class TestConfiguration extends TestCase {
|
||||||
fail("Should throw an IllegalArgumentException exception ");
|
fail("Should throw an IllegalArgumentException exception ");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
assertTrue(e instanceof IllegalArgumentException);
|
assertTrue(e instanceof IllegalArgumentException);
|
||||||
|
assertEquals(e.getMessage(), "Property name must not be null");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue