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

NullPointerException in URLPermission.hashCode()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 8
    • 8
    • core-libs
    • None
    • b115
    • Verified

    Description

      Mistake in the operator precdence causes NPE using test shown below:

      import java.net.URLPermission;
      import java.security.PermissionCollection;
      import java.security.Permissions;

      public class Test {
          public static void main(String[] args) {
              PermissionCollection perms = new Permissions();
              perms.add(new URLPermission("http:*", "*:*"));
              System.out.println(perms);
          }
      }

      Attachments

        Activity

          People

            michaelm Michael McMahon
            michaelm Michael McMahon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: