Issue 4793: attribute exceptions (java-rtf) Source: Oracle (Mr. Ken Cavanaugh, nobody) Nature: Uncategorized Issue Severity: Summary: The CCM (ptc/01-11-03) has added exceptions to attributes. The IDL to Java mapping needs to be updated to reflect this addition. Also, the mapping currently says essentially nothing about the mapping of exceptions on operations or attributes in any context. Proposed revised text: In section 1.13.2, replace the paragraph The mapped Java class contains abstract method definitions that correspond to the operations and attributes defined on the value type in IDL. with The mapped Java class contains abstract method definitions that correspond to the operations and attributes defined on the value type in IDL. Attributes are mapped in the same way as in interfaces, to modifer and accessor methods. Exceptions are mapped as follows: 1. If an operation raises exceptions, then the corresponding Java method must throw Java exceptions corresponding to the listed IDL exceptions. 2. If a readonly attribute raises exceptions, then the Java read accessor method must throw Java exceptions corresponding to the listed IDL exceptions. 3. If an attribute has a getRaises clause, the the Java accessor method must throw Java exceptions corresponding to the listed IDL exceptions. 4. If an attribute has a setRaises clause, the the Java modifier method must throw Java exceptions corresponding to the listed IDL exceptions. In section 1.12.1, replace the third paragraph with the following two paragraphs: The Java operations interface contains the mapped operation signatures. If an operation raises exceptions, then the corresponding Java method must throw Java exceptions corresponding to the listed IDL exceptions. The Java signature interface extends the operations interface, the (mapped) base org.omg.CORBA.Object, as well as org.omg.portable.IDLEntity. Methods can be invoked on the signature interface. Interface inheritance expressed in IDL is reflected in both the Java signature interface and operations interface hierarchies. In section 1.12.1, insert after the sixth paragraph: Attribute exceptions are mapped as follows: 1. If a readonly attribute raises exceptions, then the Java read accessor method must throw Java exceptions corresponding to the listed IDL exceptions. 2. If an attribute has a getRaises clause, the the Java accessor method must throw Java exceptions corresponding to the IDL exceptions listed in the getRaises clause. 3. If an attribute has a setRaises clause, the the Java modifier method must throw Java exceptions corresponding to the IDL exceptions listed in the setRaises clause. Resolution: Incoporate the revised text and close the issue Revised Text: In section 1.13.2, replace the paragraph The mapped Java class contains abstract method definitions that correspond to the operations and attributes defined on the value type in IDL. with The mapped Java class contains abstract method definitions that correspond to the operations and attributes defined on the value type in IDL. Attributes are mapped in the same way as in interfaces, to modifer and accessor methods. Exceptions are mapped as follows: If an operation raises exceptions, then the corresponding Java method must throw Java exceptions corresponding to the listed IDL exceptions. If a readonly attribute raises exceptions, then the Java read accessor method must throw Java exceptions corresponding to the listed IDL exceptions. If an attribute has a getRaises clause, the the Java accessor method must throw Java exceptions corresponding to the listed IDL exceptions. If an attribute has a setRaises clause, the the Java modifier method must throw Java exceptions corresponding to the listed IDL exceptions. In section 1.12.1, replace the third paragraph with the following two paragraphs: The Java operations interface contains the mapped operation signatures. If an operation raises exceptions, then the corresponding Java method must throw Java exceptions corresponding to the listed IDL exceptions. The Java signature interface extends the operations interface, the (mapped) base org.omg.CORBA.Object, as well as org.omg.portable.IDLEntity. Methods can be invoked on the signature interface. Interface inheritance expressed in IDL is reflected in both the Java signature interface and operations interface hierarchies. In section 1.12.1, insert after the sixth paragraph: Attribute exceptions are mapped as follows: If a readonly attribute raises exceptions, then the Java read accessor method must throw Java exceptions corresponding to the listed IDL exceptions. If an attribute has a getRaises clause, the the Java accessor method must throw Java exceptions corresponding to the IDL exceptions listed in the getRaises clause. If an attribute has a setRaises clause, the the Java modifier method must throw Java exceptions corresponding to the IDL exceptions listed in the setRaises clause. Actions taken: December 18, 2001: received issue May 13, 2002: closed issue Discussion: End of Annotations:===== Date: Mon, 17 Dec 2001 15:53:31 -0800 (PST) From: Ken Cavanaugh Reply-To: Ken Cavanaugh Subject: New Java RTF issue: attribute exceptions To: issues@omg.org Cc: java-rtf@omg.org MIME-Version: 1.0 Content-MD5: 5rl2qzuh8gNsLTJrqFpU/w== X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.3.5 SunOS 5.7 sun4u sparc Content-Type: TEXT/plain; charset=us-ascii X-UIDL: S]\d9V>)e90^dd9_4:!! Status: RO The CCM (ptc/01-11-03) has added exceptions to attributes. The IDL to Java mapping needs to be updated to reflect this addition. Also, the mapping currently says essentially nothing about the mapping of exceptions on operations or attributes in any context. Proposed revised text: In section 1.13.2, replace the paragraph The mapped Java class contains abstract method definitions that correspond to the operations and attributes defined on the value type in IDL. with The mapped Java class contains abstract method definitions that correspond to the operations and attributes defined on the value type in IDL. Attributes are mapped in the same way as in interfaces, to modifer and accessor methods. Exceptions are mapped as follows: 1. If an operation raises exceptions, then the corresponding Java method must throw Java exceptions corresponding to the listed IDL exceptions. 2. If a readonly attribute raises exceptions, then the Java read accessor method must throw Java exceptions corresponding to the listed IDL exceptions. 3. If an attribute has a getRaises clause, the the Java accessor method must throw Java exceptions corresponding to the listed IDL exceptions. 4. If an attribute has a setRaises clause, the the Java modifier method must throw Java exceptions corresponding to the listed IDL exceptions. In section 1.12.1, replace the third paragraph with the following two paragraphs: The Java operations interface contains the mapped operation signatures. If an operation raises exceptions, then the corresponding Java method must throw Java exceptions corresponding to the listed IDL exceptions. The Java signature interface extends the operations interface, the (mapped) base org.omg.CORBA.Object, as well as org.omg.portable.IDLEntity. Methods can be invoked on the signature interface. Interface inheritance expressed in IDL is reflected in both the Java signature interface and operations interface hierarchies. In section 1.12.1, insert after the sixth paragraph: Attribute exceptions are mapped as follows: 1. If a readonly attribute raises exceptions, then the Java read accessor method must throw Java exceptions corresponding to the listed IDL exceptions. 2. If an attribute has a getRaises clause, the the Java accessor method must throw Java exceptions corresponding to the IDL exceptions listed in the getRaises clause. 3. If an attribute has a setRaises clause, the the Java modifier method must throw Java exceptions corresponding to the IDL exceptions listed in the setRaises clause. Ken.