Skip to content
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

The code generated from idlj (Helper classes) uses Double-checked locking #12

Open
glassfishrobot opened this issue May 3, 2012 · 3 comments

Comments

@glassfishrobot
Copy link

We are using idlj (version 3.2) to generate java files. The Helper classes use Double-checked locking for the type() which can be unsafe.

Our fix right now is to modify the code after idlj has done it's job, would it be possible to have it generate different code?

(Am I even creating a case in the correct project)

Example of the generated code is:
private static org.omg.CORBA.TypeCode __typeCode = null;
private static boolean __active = false;
synchronized public static org.omg.CORBA.TypeCode type ()
{
if (__typeCode == null)
{
synchronized (org.omg.CORBA.TypeCode.class)
{
if (__typeCode == null)
{
if (__active)

{ return org.omg.CORBA.ORB.init().create_recursive_tc ( _id ); }

__active = true;
....

Environment

w7-vs2010-64
IDL-to-Java compiler (portable), version "3.2"

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Reported by knightspace

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA GLASSFISH_CORBA-12

@glassfishrobot
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant