JDK-6438259 : Wrong repository ID generated by IDLJ
  • Type: Bug
  • Status: Resolved
  • Resolution: Fixed
  • Component: other-libs
  • Sub-Component: corba:idl
  • Priority: P2
  • Affected Version: 5.0
  • OS: windows_2000
  • CPU: x86
  • Submit Date: 2006-06-14
  • Updated Date: 2010-04-03
  • Resolved Date: 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 Availabitlity Release.

To download the current JDK release, click here.
Other JDK 6 JDK 7
5.0u10 b02Resolved 6u10Resolved 7Resolved
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