Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
2.1
-
None
-
None
-
Operating System: Solaris
Platform: Sun
-
15831
Description
I have some NullPointerExceptions in my log file because of this line:
final String readCommandLine() throws IOException {
return inReader.readLine().trim();
}
Wouldn't it be much smarter:
final String readCommandLine() throws IOException {
String line = inReader.readLine();
if (null == line)
return null;
else
return line.trim();
}
I don't think it breaks any code this way.