HADOOP-9908. Fix NPE when versioninfo properties file is missing. Contributed by Todd Lipcon.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1520333 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ec135d560b
commit
e8f6f74025
@ -363,6 +363,8 @@ Release 2.3.0 - UNRELEASED
|
|||||||
HADOOP-9909. org.apache.hadoop.fs.Stat should permit other LANG.
|
HADOOP-9909. org.apache.hadoop.fs.Stat should permit other LANG.
|
||||||
(Shinichi Yamashita via Andrew Wang)
|
(Shinichi Yamashita via Andrew Wang)
|
||||||
|
|
||||||
|
HADOOP-9908. Fix NPE when versioninfo properties file is missing (todd)
|
||||||
|
|
||||||
Release 2.1.1-beta - UNRELEASED
|
Release 2.1.1-beta - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -48,6 +48,9 @@ protected VersionInfo(String component) {
|
|||||||
try {
|
try {
|
||||||
InputStream is = Thread.currentThread().getContextClassLoader()
|
InputStream is = Thread.currentThread().getContextClassLoader()
|
||||||
.getResourceAsStream(versionInfoFile);
|
.getResourceAsStream(versionInfoFile);
|
||||||
|
if (is == null) {
|
||||||
|
throw new IOException("Resource not found");
|
||||||
|
}
|
||||||
info.load(is);
|
info.load(is);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
LogFactory.getLog(getClass()).warn("Could not read '" +
|
LogFactory.getLog(getClass()).warn("Could not read '" +
|
||||||
|
Loading…
Reference in New Issue
Block a user