IBM Support

IJ03256: JAVAX.SECURITY.AUTH.SUBJECT.TOSTRING() THROWS NPE

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: subject.toString() must not throw
    NullPointerException regardless of the state of subject
    .
    Stack Trace: Exception in thread "main"
    java.lang.NullPointerException
            at
    javax.security.auth.Subject.toString(Subject.java:1076)
            at
    javax.security.auth.Subject.toString(Subject.java:1036)
            at TestSubjectNPE.main(TestSubjectNPE.java:9)
    .
    

Local fix

Problem summary

  • javax.security.auth.Subject.toString() throws NPE
    subject.toString() must not throw NullPointerException
    regardless of the state of subject
    Test that replicates problem:
    -----------------
    import java.util.Set;
    import javax.security.auth.Subject;
    public class TestSubjectNPE {
      public static void main(final String<OSB><CSB> args) {
        final Subject subject = new Subject();
        final Set<Object> set = subject.getPrivateCredentials();
        set.add(null);// is not prohibited by an API specification
    of Set or
        subject.toString();// bug: NullPointerException
      }
    }
    -----------------
    The exception throw is:
    -----------------
    Exception in thread "main" java.lang.NullPointerException
            at
    javax.security.auth.Subject.toString(Subject.java:1076)
            at
    javax.security.auth.Subject.toString(Subject.java:1036)
            at TestSubjectNPE.main(TestSubjectNPE.java:9)
    

Problem conclusion

  • Integrate fix https://bugs.openjdk.java.net/browse/JDK-8015081
    The corresponding RTC Problem Report is 136554.
    Platform affected: All platforms.
    JVMs affected: 6.0, 6.26, 7.0, 7.27, 8.0.
    The fix will be available in 7.0.10.20, 7.1.4.20, 8.0.3.11
    .
    This APAR will be fixed in the following Java Releases:
       8    SR5 FP10  (8.0.5.10)
       7 R1 SR4 FP20  (7.1.4.20)
       7    SR10 FP20 (7.0.10.20)
    .
    Contact your IBM Product's Service Team for these Service
    Refreshes and Fix Packs.
    For those running stand-alone, information about the available
    Service Refreshes and Fix Packs can be found at:
               https://www.ibm.com/developerworks/java/jdk/
    

Temporary fix

Comments

APAR Information

  • APAR number

    IJ03256

  • Reported component name

    SECURITY

  • Reported component ID

    620700125

  • Reported release

    270

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2018-01-12

  • Closed date

    2018-01-15

  • Last modified date

    2018-01-15

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    SECURITY

  • Fixed component ID

    620700125

Applicable component levels

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"270","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
07 December 2020