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

UnixLoginModule missing curly braces after 'if', causing NullPointerException

XMLWordPrintable

    • beta
    • generic
    • generic

      code looks like this. notice the missing brackets after line 117, and before 126.

         117 if (ss.getGroups() != null && ss.getGroups().length > 0)
         118 unixGroups = ss.getGroups();
         119 for (int i = 0; i < unixGroups.length; i++) {
         120 UnixNumericGroupPrincipal ngp =
         121 new UnixNumericGroupPrincipal
         122 (unixGroups[i], false);
         123 if (!ngp.getName().equals(GIDPrincipal.getName()))
         124 supplementaryGroups.add(ngp);
         125 }
         126 if (debug) {
         127 System.out.println("\t\t[UnixLoginModule]: " +
         128 "succeeded importing info: ");
         129 System.out.println("\t\t\tuid = " + ss.getUid());
         130 System.out.println("\t\t\tgid = " + ss.getGid());
         131 unixGroups = ss.getGroups();
         132 for (int i = 0; i < unixGroups.length; i++) {
         133 System.out.println("\t\t\tsupp gid = " + unixGroups[
      i]);
         134 }
         135 }

            claisunw Charlie Lai (Inactive)
            claisunw Charlie Lai (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: