Opened 14 years ago

Last modified 9 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
Cc:

Description

[Imported from gridengine issuezilla http://gridengine.sunsource.net/issues/show_bug.cgi?id=1704]

        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
          URL:
       * Summary:     Unsupported property setters throw InvalidArgumentException
   Status whiteboard:
      Attachments:

     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.