At Sun, 2 Dec 2001 15:19:05 -0800 (PST),
Craig R. McClanahan <[EMAIL PROTECTED]> wrote:
> I looked at this option a little bit a while back, and have only one
> concern -- multiple threads trying to compile at the same time.  Ant tasks
> generally assume that they don't need to worry about thread safety issues,
> so we need to review this code carefully. (Of course, this issue applies
> even more so to the "new" Javac entry point in 1.4 -- it writes error
> messages to System.out).

Well, I refered org.apache.tools.ant.taskdefs.compilers.Javac13.java

            Class c = Class.forName ("com.sun.tools.javac.Main");
            Object compiler = c.newInstance ();
            Method compile = c.getMethod ("compile",
                new Class [] {(new String [] {}).getClass ()});
            int result = ((Integer) compile.invoke
                          (compiler, new Object[] {cmd.getArguments()})) .intVal
ue ();

So, above code shows that compiler output messages to System.out. Some
of other compilers are same as Jikes13.java. They are thread-unsafe.
They should be locked.
----
Takashi Okamoto

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to