EVALUATION
The structure of the error message is indicative of this entry in the resource file:
compiler.err.error.reading.file=\
error reading {0}; {1}
Searching for the compiler sources for "error.reading.file" reveals 5 instances.
In all cases, the usage is within catch (IOException e) { ... }
In 4/5 cases, the second arg is e.getLocalizedMessage(). In the last case, the second arg is simply e.
Since e cannot be null, we must have a case where e.getLocalizedMessage() is null.
The default impl of getLocalizedMessage() returns getMessage().
As a result, in all cases, it is suggested that e.getLocalizedMessage() is used if not null, and e is used if e.getLocalizedMessage() is null.
|