-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CORBA boolean type unions do not generate compilable code from idlj #64
Comments
The link below shows the fix (1.14 - 1.26) |
Signed-off-by: David Marina <David.Marina@esa.int>
The generated code is compile clean now for me. Although there remains a problem within the read method of the helper class. If the boolean discriminator is false, then a BAD_OPERATION exception is thrown. But instead, the value should be set to a default value. Otherwise, this IDL definition would be meaningless if the discriminator always needs to be true? |
Different bug. Look at: |
Thanks referencing the relevant bug! |
Closing for the statement in #64 (comment) |
This bug has been reported on JDK some time ago:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4504275
The java code generated from an idl union where the switch is the boolean type
will not compile with javac. The following example IDL will compile java code
with idlj, but when we run the java code through javac it fails with syntax
errors.
--- example IDL follows --------------
module xyz
{
union LongTypeOpt switch (boolean) {
case TRUE: long value;
};
};
A fix is available for JDK:
https://www.programcreek.com/java-api-examples/?code=jboss/openjdk-orb/openjdk-orb-master/src/share/classes/com/sun/tools/corba/se/idl/toJavaPortable/UnionGen.java
look at:
private void writeVerifyDefault()
{
...
if (Util.javaName(utype).equals ("boolean")) {
...
}
...
}
The text was updated successfully, but these errors were encountered: