eclipse-ee4j / orb

Eclipse ORB is a CORBA orb for use in Jakarta EE and GlassFish and other projects that still need an ORB.
https://projects.eclipse.org/projects/ee4j.orb
Other
24 stars 24 forks source link

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

Open glassfishrobot opened 12 years ago

glassfishrobot commented 12 years ago

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 commented 6 years ago
glassfishrobot commented 12 years ago

@glassfishrobot Commented Reported by knightspace

glassfishrobot commented 7 years ago

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