Menu

#1720 enumerateQualifierTypes shouldn't require a class name

closed-fixed
5
2009-12-15
2009-09-23
No

When you invoke the enumerateQualifierTypes method with a CIMObjectPath with a valid namespace and a null object name, an error is thrown by the client code. This operation shouldn't do any validation on the specified object name parameter because the CIM-XML method EnumerateQualifiers doesn't take a class name parameter.

There is a comment in CIMClientXML_HelperImpl.java which I think is valid (and this checking should be removed):

1338 : ebak 1.1 String className = pPath.getObjectName();
1339 : if (className == null) throw new WBEMException(WBEMException.CIM_ERR_INVALID_PARAMETER,
1340 : "null class name");
1341 : // TODO Proposal: There is no need to require the path to be a class
1342 : // path for this operation. Remove the above two lines.

Discussion

  • Dave Blaschke

    Dave Blaschke - 2009-09-24
    • assigned_to: nobody --> raman_arora
     
  • Ramandeep Arora

    Ramandeep Arora - 2009-09-29

    Patch sent for community review. During a 2 week period any
    exploiter may comment on the patch, request changes or turn it
    down completely (with good reason).
    For the time being the patch is part of the "Experimental" branch
    in CVS.

     
  • Ramandeep Arora

    Ramandeep Arora - 2009-09-29
    • status: open --> open-fixed
     
  • Ramandeep Arora

    Ramandeep Arora - 2009-09-30

    Patch against HEAD

     
  • Ramandeep Arora

    Ramandeep Arora - 2009-09-30

    There are four APIs directly related to CIMQualifierType enumerateQualifierTypes, deleteQualifierType , getQualifierType and setQualifierType .

    We do need class name in all these APIs except enumerateQualifierTypes.

    Reason being :-We need name of Qualifier one way or other.The constructor of CIMQualifierType stores name from ObjectPath .. which is extracted using cimqualifierType().getObjectpath().getObjectname()

    If we create (set) / delete / get any qualifier.. .we need its name ... ie name using which server can uniquely identify qualifier in namespace...making className as a requirement.

    On the other hand enumerateQualifierTypes lists all qualifiers in current namespace. So we dont need name of qualifier to identify it . (as list contains all of them) 

    Hence enumerateQualifierTypes is the only API which doesnt need class name.

    Removed misguiding comments from other APIs.

     
  • Dave Blaschke

    Dave Blaschke - 2009-10-19

    The community review is completed and we received no substantial critisism. Therefore the patch has been approved and merged into the "HEAD" branch. The next release will pick it up.

     
  • Dave Blaschke

    Dave Blaschke - 2009-10-19
    • status: open-fixed --> pending-fixed
     
  • Dave Blaschke

    Dave Blaschke - 2009-12-15
    • status: pending-fixed --> closed-fixed
     
  • Dave Blaschke

    Dave Blaschke - 2009-12-15

    The patch was picked up by release 2.1.3 and will be closed.

     

Log in to post a comment.