Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues
Bug 974 - Cannot find symbol in interface body when struct out param has same name as defining module
Summary: Cannot find symbol in interface body when struct out param has same name as d...
Status: RESOLVED FIXED
Alias: None
Product: JacORB
Classification: Unclassified
Component: IDL compiler (show other bugs)
Version: 3.4 beta
Hardware: All All
: P5 major
Assignee: Mailinglist to track bugs
URL:
Depends on:
Blocks:
 
Reported: 2014-01-03 08:50 UTC by Frank Wilson
Modified: 2014-01-06 15:50 UTC (History)
1 user (show)

See Also:


Attachments
Valid IDL test case file, which causes the error condition to occur (400 bytes, text/plain)
2014-01-03 08:50 UTC, Frank Wilson
Details

Note You need to log in before you can comment on or make changes to this bug.
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