Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6239354
Votes 0
Synopsis ORB.create_value_tc() does not set TypeCode.concrete_base variable properly
Category idl:orb
Reported Against
Release Fixed mustang(b98)
State 10-Fix Delivered, bug
Priority: 3-Medium
Related Bugs 6237166
Submit Date 11-MAR-2005
Description
Method ORB.create_value_tc creates TypeCode but does not set variable TypeCode.concrete_base properly. Method concrete_base_type() of new created instance returns null instead of specified concrete base type.

Example:
----------------------------------------------------------------------
import org.omg.CORBA.*;

public class Tester {


    public static void main(String [] args) throws Exception {
        String name = "name";
        String id = "id";
        ORB orb = ORB.init(args, null);
        TypeCode concrete_base = orb.create_abstract_interface_tc(id,name);
        TypeCode tc = orb.create_value_tc(id, name, (short) 0, concrete_base, 
                    new ValueMember[0]);
        System.out.println("Expected: " + concrete_base);
        System.out.println("Returned: " + tc.concrete_base_type());
    }
}
Result:

Expected:   xxxxx@xxxxx   =
abstractInterface name...
Returned: null
-------------------------------------------------------------------------

It seems, that the problem can be in com/sun/corba/se/impl/corba/TypeCodeImpl.java: 
        ....
	public TypeCodeImpl(ORB orb,
                        int creationKind,
                        String id,
                        String name,
                        short type_modifier,
                        TypeCode concrete_base,
                        ValueMember[] members) {
           ...
            if (_concrete_base != null) {
                ^^^^^^^^^^
		should it be concrete_base instead?

                _concrete_base = convertToNative(_orb, concrete_base);
            }
	   ...

Please note, that JCK test api/org_omg/CORBA/ORBTest (doTest25) will fail due to this bug (but only after fixing JCK bug #6239328).


  xxxxx@xxxxx   2005-03-11 10:28:21 GMT
Work Around
N/A
Evaluation
The fix in the description looks good.
Posted Date : 2006-08-12 08:50:12.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang