Opened 16 years ago

Last modified 11 years ago

#257 new defect

IZ1704: Unsupported property setters throw InvalidArgumentException

Reported by: templedf Owned by:
Priority: low Milestone:
Component: sge Version: 6.0u2
Severity: Keywords: drmaa


[Imported from gridengine issuezilla]

        Issue #:      1704             Platform:     All      Reporter: templedf (templedf)
       Component:     gridengine          OS:        All
     Subcomponent:    drmaa            Version:      6.0u2       CC:    None defined
        Status:       NEW              Priority:     P4
      Resolution:                     Issue type:    DEFECT
                                   Target milestone: ---
      Assigned to:    templedf (templedf)
      QA Contact:     templedf
       * Summary:     Unsupported property setters throw InvalidArgumentException
   Status whiteboard:

     Issue 1704 blocks:
   Votes for issue 1704:

   Opened: Mon Jul 11 04:48:00 -0700 2005 

The setter for an unsupported property will throw InvalidArgumentException when
called, instead of UnsupportedAttributeException as indicated in the spec.  The
reason is that the underlying C binding overloads the
DRMAA_ERRNO_INVALID_ARGUMENT error code to indicate invalid job template,
invalid attribute value argument, and unsupported attribute.  (In reality, it
doesn't check that the attribute value argument is valid, i.e. not null, but it
should!)  Because of this overloading, the Java language binding can't tell the
difference among the errors.
In practice, the Java language binding knows that it's passing in a valid job
template, so a work-around would be to rely on the fact that the C binding
doesn't do parameter checking and assume that DRMAA_ERRNO_INVALID_ARGUMENT means
the attribute is unsupported.  That work-around is only valid, however, until
someone fixes the C binding.  (I haven't tested it, but it looks like the C
binding will segfault if passed a bogus attribute value argument!)

Change History (0)

Note: See TracTickets for help on using tickets.