Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues

Bug 974

Summary: Cannot find symbol in interface body when struct out param has same name as defining module
Product: JacORB Reporter: Frank Wilson <frank>
Component: IDL compilerAssignee: Mailinglist to track bugs <jacorb-bugs>
Status: RESOLVED FIXED    
Severity: major CC: jacorb
Priority: P5    
Version: 3.4 beta   
Hardware: All   
OS: All   
Attachments: Valid IDL test case file, which causes the error condition to occur

Description Frank Wilson 2014-01-03 08:50:54 UTC
Created attachment 428 [details]
Valid IDL test case file, which causes the error condition to occur

When an interface function has a struct out param with the same name as the struct's defining module an aliasing problem will occur in JacORB's output.

In the interface function stub body JacORB will try to reference the struct's holder class in the module's java package. However, package name is aliased by the struct out parameter which has the same name in the IDL.

This causes a cannot find symbol error when JacORB attempts to compile its own stubs to byte code.

The error looks like this when the JacORB compile is invoked by idlj-maven-plugin.

[ERROR] /jacorb_bug_test_case/target/generated-sources/test/moduleAlias/_ModuleAliasMgr_IStub.java:[37,36] error: cannot find symbol
[ERROR] symbol:   variable ModuleAlias_THelper
[ERROR] location: variable moduleAlias of type ModuleAlias_THolder
[ERROR] /jacorb_bug_test_case/target/generated-sources/test/moduleAlias/_ModuleAliasMgr_IStub.java:[51,24] error: cannot find symbol
Comment 1 Frank Wilson 2014-01-03 08:53:13 UTC
Confirmed this bug affects all released version from 3.0 to 3.3 and also latest source built from master.
Comment 2 Nick Cross 2014-01-06 15:50:45 UTC
Escaped parameter argument if it clashes with an enclosing module. Fixed by SHA 51be20d7fcc8a601cfa4212a16a79a793602f899