Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.6.0
-
None
-
Reviewed
Description
This code will reproduce the issue:
new TaskAttemptID().toString();
The issue is that the default constructor leaves the type null. The get() in CharTaskTypesMaps.getRepresentingCharacter() then throws an NPE on the null type key.
The simplest solution would be to only call the get() on line 288 of TaskID.java if type is not null and return some other literal otherwise. Since no part of the code is tripping on the NPE, what we choose for the literal shouldn't matter. How about "x"?