Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8277224

sun.security.pkcs.PKCS9Attributes.toString() throws NPE

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b25
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Since the JDK-8242151 fix, some array elements of the PKCS9Attribute.PKCS9_OIDS array are null.

        PKCS9Attributes.toString() doesn't take this into account.

        java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "key" is null
                at java.base/java.util.Hashtable.get(Hashtable.java:381)
                at java.base/sun.security.pkcs.PKCS9Attributes.getAttribute(PKCS9Attributes.java:262)
                at java.base/sun.security.pkcs.PKCS9Attributes.toString(PKCS9Attributes.java:331)
                at java.base/java.lang.StringConcatHelper.stringOf(StringConcatHelper.java:453)
                at java.base/java.lang.StringConcatHelper.simpleConcat(StringConcatHelper.java:408)
                at NonStandardNames.main(NonStandardNames.java:66)
                at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
                at java.base/java.lang.reflect.Method.invoke(Method.java:577)
                at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
                at java.base/java.lang.Thread.run(Thread.java:833)

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                coffeys Sean Coffey
                Reporter:
                coffeys Sean Coffey
                Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: