Created On: 15 February 2011
Problem:
- Product Name: VisiBroker for Java
- Product Version: 3.4, 8.0
- Product Component: idl2java
- Platform/OS Version: All
>>> [exec] ModuleName.idl: 103:duplicate definition of none (previously defined on line 87)
// ModuleName.idl
module ModuleName {
enum Enumeration1 {
none,
A,
B
};
enum Enumeration2 {
none,
C,
D
};
};
Resolution:
There was a change in IDL compiler since VisiBroker v4.5, where Enumeration names are now only accessible within their container scope.
For example:
Given the above IDL, name1 inside x::myEnum can be referred to as x::name1 but NOT x::myEnum::name1.
From the IDL (ie. ModuleName.idl), the ānoneā is being declared twice under ModuleNameās context that explains why the āduplicate definition of noneā error occurs if you use with any VisiBroker version later than 4.5.
In the earlier version of VisiBroker (ie. 3.4), the above issue wonāt occurs as the ānoneā is accessible via either ModuleName::Enumeration1::none or ModuleName::Enumeration2::none separately.
Please refer to the release notes for more details:
VisiBroker for Java 4.5.1 release notes
For example:
// IDL
module x {
enum myEnum { name1, name2, name3 };
};
Given the above IDL, name1 inside x::myEnum can be referred to as x::name1 but NOT x::myEnum::name1.
From the IDL (ie. ModuleName.idl), the ānoneā is being declared twice under ModuleNameās context that explains why the āduplicate definition of noneā error occurs if you use with any VisiBroker version later than 4.5.
In the earlier version of VisiBroker (ie. 3.4), the above issue wonāt occurs as the ānoneā is accessible via either ModuleName::Enumeration1::none or ModuleName::Enumeration2::none separately.
Please refer to the release notes for more details:
VisiBroker for Java 4.5.1 release notes
Incident #2493679
#Security
#VisiBroker