Issue 3818: Operations signatures include throws clauses on system exceptions. (java-rtf) Source: Oracle (Mr. Ken Cavanaugh, nobody) Nature: Uncategorized Issue Severity: Summary: There are several places in the IDL to Java mapping spec (ptc/00-01-08) where operations signatures include throws clauses on system exceptions. Since system exceptions are unchecked Java exceptions, they need never be declared in operation signatures. As normal Java practice only declares checked exceptions, the throws clauses for unchecked exceptions should be removed. I have found this problem in the following places in the spec: p. 58-61 various methods throw DATA_CONVERSION, MARSHAL, and BAD_OPERATION p. 85 get_value_def throws BAD_PARAM p. 122 _invoke(...) throws SystemException Resolution: see below Revised Text: Remove the "throws" clause from the following places in the chapter, and from the corresponding places in the source code: Section 1.16 class Any abstract public void read_value( org.omg.CORBA.portable.InputStream is, org.omg.CORBA.TypeCode t) throws org.omg.CORBA.MARSHAL; abstract public short extract_short() throws org.omg.CORBA.BAD_OPERATION; abstract public int extract_long() throws org.omg.CORBA.BAD_OPERATION; abstract public long extract_longlong() throws org.omg.CORBA.BAD_OPERATION; abstract public short extract_ushort() throws org.omg.CORBA.BAD_OPERATION; abstract public int extract_ulong() throws org.omg.CORBA.BAD_OPERATION; abstract public long extract_ulonglong() throws org.omg.CORBA.BAD_OPERATION; abstract public float extract_float() throws org.omg.CORBA.BAD_OPERATION; abstract public double extract_double() throws org.omg.CORBA.BAD_OPERATION; abstract public boolean extract_boolean() throws org.omg.CORBA.BAD_OPERATION; abstract public char extract_char() throws org.omg.CORBA.BAD_OPERATION; abstract public void insert_char(char c) throws org.omg.CORBA.DATA_CONVERSION; abstract public char extract_wchar() throws org.omg.CORBA.BAD_OPERATION; abstract public byte extract_octet() throws org.omg.CORBA.BAD_OPERATION; abstract public org.omg.CORBA.Any extract_any() throws org.omg.CORBA.BAD_OPERATION; abstract public org.omg.CORBA.Object extract_Object() throws org.omg.CORBA.BAD_OPERATION; abstract public java.io.Serializable extract_Value() throws org.omg.CORBA.BAD_OPERATION; abstract public void insert_Value( java.io.Serializable v, org.omg.CORBA.TypeCode t) throws org.omg.CORBA.MARSHAL; abstract public void insert_Object( org.omg.CORBA.Object obj, org.omg.CORBA.TypeCode t).1 throws org.omg.CORBA.BAD_PARAM; abstract public String extract_string() throws org.omg.CORBA.BAD_OPERATION; abstract public void insert_string(String s) throws org.omg.CORBA.DATA_CONVERSION, org.omg.CORBA.MARSHAL; abstract public String extract_wstring() throws org.omg.CORBA.BAD_OPERATION; abstract public void insert_wstring(String s) throws org.omg.CORBA.MARSHAL; abstract public org.omg.CORBA.TypeCode extract_TypeCode() throws org.omg.CORBA.BAD_OPERATION; public org.omg.CORBA.Principal extract_Principal() throws org.omg.CORBA.BAD_OPERATION public org.omg.CORBA.portable.Streamable extract_Streamable() throws org.omg.CORBA.BAD_INV_ORDER public void insert_fixed( java.math.BigDecimal value, org.omg.CORBA.TypeCode type) throws org.omg.CORBA.BAD_INV_ORDER Section 19.10 package org.omg.CORBA_2_3; public abstract class ORB extends org.omg.CORBA.ORB { public org.omg.CORBA.Object get_value_def( String repid) throws org.omg.CORBA.BAD_PARAM Section 21.5.4 public interface InvokeHandler { OutputStream _invoke( String method, InputStream is, ResponseHandler handler) throws org.omg.CORBA.SystemException; Actions taken: September 8, 2000: received issue February 27, 2001: closed issue Discussion: End of Annotations:===== Date: Fri, 8 Sep 2000 17:19:36 -0700 (PDT) From: Ken Cavanaugh Reply-To: Ken Cavanaugh Subject: IDL to Java RTF issue To: issues@omg.org Cc: Ken.Cavanaugh@eng.sun.com MIME-Version: 1.0 Content-MD5: Izw8Wr7ueG8YKFLFsgJP7A== X-Mailer: dtmail 1.3.0 @(#)CDE Version 1.3.4p_5 SunOS 5.7 sun4u sparc Content-Type: TEXT/plain; charset=us-ascii X-UIDL: k:-!!!VXd9Y(;e9(p/e9 There are several places in the IDL to Java mapping spec (ptc/00-01-08) where operations signatures include throws clauses on system exceptions. Since system exceptions are unchecked Java exceptions, they need never be declared in operation signatures. As normal Java practice only declares checked exceptions, the throws clauses for unchecked exceptions should be removed. I have found this problem in the following places in the spec: p. 58-61 various methods throw DATA_CONVERSION, MARSHAL, and BAD_OPERATION p. 85 get_value_def throws BAD_PARAM p. 122 _invoke(...) throws SystemException