JDK-6438259 : Wrong repository ID generated by IDLJ
  • Type: Bug
  • Component: other-libs
  • Sub-Component: corba:idl
  • Affected Version: 5.0
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2006-06-14
  • Updated: 2010-04-03
  • Resolved: 2006-09-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6 JDK 7 Other
5.0u10,OpenJDK6Fixed 6u10Fixed 7Fixed OpenJDK6Fixed
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
18-08-2006

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.
11-08-2006