United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6438259 : Wrong repository ID generated by IDLJ

Details
Type:
Bug
Submit Date:
2006-06-14
Status:
Resolved
Updated Date:
2010-04-03
Project Name:
JDK
Resolved Date:
2006-09-29
Component:
other-libs
OS:
windows_2000
Sub-Component:
corba:idl
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
5.0u10 (b02)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
FULL PRODUCT VERSION :
Any Java 1.5 version

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]

A DESCRIPTION OF THE PROBLEM :
IDLJ generates wrong repository ID for structs defined in IDL

For this IDL definition:
***
module com {
  module lhs {
    module ccb {
      module soi {
      	module types {
  struct LocaleI
  {
    string language;
    string country;
    string variant;
  };
					};
				};
			};
		};
};
  
***

The following repository ID will be generated:
***
private static String  _id = "IDL:com/lhs/ccb/soi/types/LocaleI/LocaleI:1.0";
***

The "LocaleI" is repeated here two times - this is wrong.
IDLJ from the Java 1.4 generates the following repository ID (the correct one):
private static String  _id = "IDL:com/lhs/ccb/soi/types/LocaleI:1.0";


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Put this into a file "test.idl"
***
module com {
  module lhs {
    module ccb {
      module soi {
      	module types {
  struct LocaleI
  {
    string language;
    string country;
    string variant;
  };
					};
				};
			};
		};
};
***

2. Execute:
idlj -fAll test.idl


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The generated class LocaleIHelper should contains the following repository ID:

private static String  _id = "IDL:com/lhs/ccb/soi/types/LocaleI:1.0";

If I generate Java classes with IDLJ from Java 1.4 it generates this exactly this repository ID.
If I use idl2cpp compiler from TAO orb it generates C++ classes with this repository ID.
ACTUAL -
IDLJ  generates:

private static String  _id = "IDL:com/lhs/ccb/soi/types/LocaleI/LocaleI:1.0";


REPRODUCIBILITY :
This bug can be reproduced always.

Release Regression From : 1.4.2
The above release value was the last known release where this 
bug was not reproducible. Since then there has been a regression.

                                    

Comments
SUGGESTED FIX

http://jpsesvr.sfbay.sun.com:8080/ctetools/CodeStore/1916/webrev/webrev.html
                                     
2006-08-18
EVALUATION

entry.repositoryID ().ID () is returning an incorrect string.
Some logic in the com.sun.tools.corba.se.idl.Parser class could 
be at fault. To investigate further.
                                     
2006-08-11



Hardware and Software, Engineered to Work Together