glassfish
  1. glassfish
  2. GLASSFISH-5339

"update-file-user" fails when "-- groups" option is not specified.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 9.1peur2
    • Fix Version/s: 9.1.1_dev
    • Component/s: admin
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      5,339
    • Status Whiteboard:
      Hide

      as911-na

      Show
      as911-na

      Description

      "update-file-user" fails when "-- group" option is not specified.

      ----------------------------------
      asadmin> update-file-user hoge
      Please enter the file user password>
      Please enter the file user password again>
      CLI137 Command update-file-user failed.
      ----------------------------------

      The cause is the 3 line of the following codes and Glassfish throws a NullPointerException.

      When "-- groups" option is not specified, "arr" is null.

      ----------------------------------
      1: private boolean isBelogsTo(Object[] arr, Object objectToCheck)
      2:

      { 3: for(int i=0; i<arr.length; i++) 4: if(objectToCheck.equals(arr[i])) 5: return true; 6: return false; 7: }

      ----------------------------------

      It completes by following codes.
      ----------------------------------
      1: private boolean isBelogsTo(Object[] arr, Object objectToCheck)
      2: {
      if(arr == null)

      { return false; }

      3: for(int i=0; i<arr.length; i++)
      4: if(objectToCheck.equals(arr[i]))
      5: return true;
      6: return false;
      7: }
      ----------------------------------

        Activity

        Hide
        km added a comment -

        Good catch. Thanks. Do you want this fixed on GlassFish 2.1?

        Show
        km added a comment - Good catch. Thanks. Do you want this fixed on GlassFish 2.1?
        Hide
        kawasima added a comment -

        Yes, I do.

        Show
        kawasima added a comment - Yes, I do.
        Hide
        km added a comment -

        Nandini, please take care of this. I think this has been fixed for v3. If that's
        the case, please adjust the target milestone to V2 and see if you have cycles to
        fix it there.

        Show
        km added a comment - Nandini, please take care of this. I think this has been fixed for v3. If that's the case, please adjust the target milestone to V2 and see if you have cycles to fix it there.
        Hide
        ne110415 added a comment -

        ..

        Show
        ne110415 added a comment - ..
        Hide
        sanandal added a comment -

        "Reclassifying as P4 because this issue is not deemed "must fix" for this v2.1
        release whose primary release driver is SailFin.
        This issue will be scrubbed after this release and will be given the right
        priority for the next release."

        Show
        sanandal added a comment - "Reclassifying as P4 because this issue is not deemed "must fix" for this v2.1 release whose primary release driver is SailFin. This issue will be scrubbed after this release and will be given the right priority for the next release."
        Hide
        Dies Koper added a comment -

        Confirmed that problem does not occur on V3 (the offending code is gone too).
        Fixed in V2.1-next: added null-check as kawasima suggested.

        Checking in mbeans/src/java/com/sun/enterprise/admin/mbeans/AuthRealmMBean.java;
        /cvs/glassfish/admin/mbeans/src/java/com/sun/enterprise/admin/mbeans/AuthRealmMB
        ean.java,v <-- Aut
        hRealmMBean.java
        new revision: 1.6.6.1; previous revision: 1.6
        done

        Show
        Dies Koper added a comment - Confirmed that problem does not occur on V3 (the offending code is gone too). Fixed in V2.1-next: added null-check as kawasima suggested. Checking in mbeans/src/java/com/sun/enterprise/admin/mbeans/AuthRealmMBean.java; /cvs/glassfish/admin/mbeans/src/java/com/sun/enterprise/admin/mbeans/AuthRealmMB ean.java,v <-- Aut hRealmMBean.java new revision: 1.6.6.1; previous revision: 1.6 done

          People

          • Assignee:
            ne110415
            Reporter:
            kawasima
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: