Issue 3801: policy_type should map to a Java int. (java-rtf) Source: Oracle (Mr. Masood (Max) Mortazavi, nobody) Nature: Uncategorized Issue Severity: Summary: It appears that there's an error in the OMG specification ptc/00-01-08 OMG IDL to Java Language Mapping. In the mapping for ORB as given in the org.omg.CORBA.ORB in section 1.19.10, the IDL signature Policy create_policy( in PolicyType type, in any val ) raises (PolicyError); has been mapped to public Policy create_policy(short policy_type, Any val) throws org.omg.CORBA.PolicyError However, note that in formal/99-10-07, as in elsewhere, it's clearly stated that PolicyType is unsigned long 4.9.1 Definition of Policy Object typedef unsigned long PolicyType; // Basic IDL definition interface Policy { readonly attribute PolicyType policy_type; Policy copy(); void destroy(); }; and that the Java mapping for unsigned long is an "int" not a "short," as erroneously implied in 1.19.10 of ptc/00-01-08. I believe this is an error in the ptc/00-01-08 OMG IDL to Java Language Mapping that needs to be cleared. Resolution: closed issue, editorial change Revised Text: Actions taken: August 29, 2000: received issue April 17, 2001: closed issue Discussion: End of Annotations:===== Sender: Masood.Mortazavi@eng.sun.com Message-ID: <39ACA4BE.310C6136@eng.sun.com> Date: Tue, 29 Aug 2000 23:07:58 -0700 From: Max Mortazavi X-Mailer: Mozilla 4.51 [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: issues@omg.org, java-rtf@omg.org Subject: policy_type should map to a Java int. Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: VU~!!EITd95;M!!Dlo!! It appears that there's an error in the OMG specification ptc/00-01-08 OMG IDL to Java Language Mapping. In the mapping for ORB as given in the org.omg.CORBA.ORB in section 1.19.10, the IDL signature Policy create_policy( in PolicyType type, in any val ) raises (PolicyError); has been mapped to public Policy create_policy(short policy_type, Any val) throws org.omg.CORBA.PolicyError However, note that in formal/99-10-07, as in elsewhere, it's clearly stated that PolicyType is unsigned long 4.9.1 Definition of Policy Object typedef unsigned long PolicyType; // Basic IDL definition interface Policy { readonly attribute PolicyType policy_type; Policy copy(); void destroy(); }; and that the Java mapping for unsigned long is an "int" not a "short," as erroneously implied in 1.19.10 of ptc/00-01-08. I believe this is an error in the ptc/00-01-08 OMG IDL to Java Language Mapping that needs to be cleared. M. Mortazavi Date: Wed, 30 Aug 2000 09:25:40 -0400 From: Mary Leland Organization: HP EIAL X-Mailer: Mozilla 4.73 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Max Mortazavi Cc: issues@omg.org, java-rtf@omg.org, juergen@omg.org Subject: Re: policy_type should map to a Java int. References: <39ACA4BE.310C6136@eng.sun.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: jkFe9b)H!!h!2e9/FX!! Max, Isn't this a duplicate of Issue 2823? See http://cgi.omg.org/issues/java-rtf.html#Issue2823 . Thanks, -- Mary Leland Chair, IDL to Java RTF Max Mortazavi wrote: > > It appears that there's an error in the OMG specification ptc/00-01-08 > OMG IDL to Java Language Mapping. In the mapping for ORB as given in the > org.omg.CORBA.ORB in section 1.19.10, the IDL signature > > Policy create_policy( > in PolicyType type, > in any val > ) raises (PolicyError); > > has been mapped to > > public Policy create_policy(short policy_type, Any val) > throws org.omg.CORBA.PolicyError > > However, note that in formal/99-10-07, as in elsewhere, it's clearly > stated that PolicyType is unsigned long > > 4.9.1 Definition of Policy Object > > typedef unsigned long PolicyType; > // Basic IDL definition > interface Policy { > readonly attribute PolicyType policy_type; > Policy copy(); > void destroy(); > }; > > and that the Java mapping for unsigned long is an "int" not a > "short," as erroneously implied in 1.19.10 of ptc/00-01-08. > > I believe this is an error in the ptc/00-01-08 OMG IDL to Java Language > Mapping that needs to be cleared. > > M. Mortazavi Date: Tue, 10 Oct 2000 13:31:41 -0400 From: Mary Leland X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Java RTF , Andrew Watson , Juergen Boldt Subject: Issues 2823, 3801, and 3819 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-UIDL: UAjd94:4e97G~!!+$%"! IDL to Java RTF Members, Andrew, & Juergen, I believe that these issues (appended below) are all editorial: the source code zip file has the correct code, and the chapter states that the source code zip file is "the authoritative statement of the specification because it contains the actual Java code." If no one objects, I'll ask Juergen to mark these as "Closed, Editorial," and I will make the necessary changes in the Mapping Chapter. Thanks, Mary ----------------------------------------------------- Issue 2823: Java mapping for PolicyType... formal-99-07-53 (IDL to Java Language Mapping Specification) has the following method signature in ORB (page 1-83): public Policy create_policy(short policy_type, Any val) throws org.omg.CORBA.PolicyError whereas formal-98-12-01 (CORBA) has PolicyType defined as (page 4-20): typedef unsigned long PolicyType; Thus, shouldn't the Java mapping be?: public Policy create_policy(int policy_type, Any val) throws org.omg.CORBA.PolicyError ----------------------------------------------------- Issue 3801: policy_type should map to a Java int. policy_type should map to a Java int. It appears that there's an error in the OMG specification ptc/00-01-08 OMG IDL to Java Language Mapping. In the mapping for ORB as given in the org.omg.CORBA.ORB in section 1.19.10, the IDL signature Policy create_policy( in PolicyType type, in any val ) raises (PolicyError); has been mapped to public Policy create_policy(short policy_type, Any val) throws org.omg.CORBA.PolicyError However, note that in formal/99-10-07, as in elsewhere, it's clearly stated that PolicyType is unsigned long 4.9.1 Definition of Policy Object typedef unsigned long PolicyType; // Basic IDL definition interface Policy { readonly attribute PolicyType policy_type; Policy copy(); void destroy(); }; and that the Java mapping for unsigned long is an "int" not a "short," as erroneously implied in 1.19.10 of ptc/00-01-08. I believe this is an error in the ptc/00-01-08 OMG IDL to Java Language Mapping that needs to be cleared. ----------------------------------------------------- Issue 3819: Issues with Java mapping of Typecode In the IDL to Java spec (ptc/00-01-08) there are several minor editorial errors in the Java mapping for Typecode: 1. p. 74 the example has class TypeCode extends IDLEntity However, IDLEntity is an interface, so this must be implements, not extends. 2. p. 75 the declaration public abstract short member_visibility( long index ) should be public abstract short member_visibility( int index ) since the IDL for member_visibility has a long argument, and IDL long type maps to int in Java. 3. Throughout class Typecode on pp. 74-75, TypeCodePackage.BadKind and TypeCodePackage.Bounds are illegal java. The exception names must either be fully qualified or unqualified with appropriate import statements.