You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Sean Qiu (JIRA)" <ji...@apache.org> on 2007/04/18 10:23:15 UTC
[jira] Created: (HARMONY-3685) [classlib][tools] missing method of
com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
[classlib][tools] missing method of com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
--------------------------------------------------------------------------------------------------------------
Key: HARMONY-3685
URL: https://issues.apache.org/jira/browse/HARMONY-3685
Project: Harmony
Issue Type: Bug
Components: Classlib
Environment: Windows XP
Reporter: Sean Qiu
public class Test extends TestCase {
public void test_main() throws Exception {
File toolsJar = new File(System.getProperty("java.home"),
"../lib/tools.jar");
URLClassLoader loader = new URLClassLoader(
new URL[] { toolsJar.toURL() });
Class mainClass = loader.loadClass("com.sun.tools.javac.Main");
StringWriter out = new StringWriter();
Method compile = mainClass.getMethod("compile", new Class[] {
String[].class, PrintWriter.class });
Integer result = (Integer) compile.invoke(null, new Object[] {
new String[0], new PrintWriter(out) });
assertEquals(new Integer(2), result);
}
}
====== Result ======
RI: pass
Harmony: throw java.lang.NoSuchMethodException: com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-3685) [classlib][tools] missing method of
com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Qiu updated HARMONY-3685:
------------------------------
Attachment: (was: harmony-3685.diff)
> [classlib][tools] missing method of com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
> --------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-3685
> URL: https://issues.apache.org/jira/browse/HARMONY-3685
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP
> Reporter: Sean Qiu
>
> public class Test extends TestCase {
> public void test_main() throws Exception {
> File toolsJar = new File(System.getProperty("java.home"),
> "../lib/tools.jar");
> URLClassLoader loader = new URLClassLoader(
> new URL[] { toolsJar.toURL() });
> Class mainClass = loader.loadClass("com.sun.tools.javac.Main");
> StringWriter out = new StringWriter();
> Method compile = mainClass.getMethod("compile", new Class[] {
> String[].class, PrintWriter.class });
> Integer result = (Integer) compile.invoke(null, new Object[] {
> new String[0], new PrintWriter(out) });
> assertEquals(new Integer(2), result);
> }
> }
> ====== Result ======
> RI: pass
> Harmony: throw java.lang.NoSuchMethodException: com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (HARMONY-3685) [classlib][tools] missing method of
com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paulex Yang reassigned HARMONY-3685:
------------------------------------
Assignee: Paulex Yang
> [classlib][tools] missing method of com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
> --------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-3685
> URL: https://issues.apache.org/jira/browse/HARMONY-3685
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP
> Reporter: Sean Qiu
> Assigned To: Paulex Yang
> Attachments: harmony-3685.diff
>
>
> public class Test extends TestCase {
> public void test_main() throws Exception {
> File toolsJar = new File(System.getProperty("java.home"),
> "../lib/tools.jar");
> URLClassLoader loader = new URLClassLoader(
> new URL[] { toolsJar.toURL() });
> Class mainClass = loader.loadClass("com.sun.tools.javac.Main");
> StringWriter out = new StringWriter();
> Method compile = mainClass.getMethod("compile", new Class[] {
> String[].class, PrintWriter.class });
> Integer result = (Integer) compile.invoke(null, new Object[] {
> new String[0], new PrintWriter(out) });
> assertEquals(new Integer(2), result);
> }
> }
> ====== Result ======
> RI: pass
> Harmony: throw java.lang.NoSuchMethodException: com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-3685) [classlib][tools] missing method
of com.sun.tools.javac.Main.compile([Ljava.lang.String;,
java.io.PrintWriter)
Posted by "Sean Qiu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492462 ]
Sean Qiu commented on HARMONY-3685:
-----------------------------------
This problem is resolved.
Verified by Sean.
Thanks for your help. Paulex and Kelvin.
> [classlib][tools] missing method of com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
> --------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-3685
> URL: https://issues.apache.org/jira/browse/HARMONY-3685
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP
> Reporter: Sean Qiu
> Assigned To: Paulex Yang
> Attachments: harmony-3685.diff, harmony-3685.zip
>
>
> public class Test extends TestCase {
> public void test_main() throws Exception {
> File toolsJar = new File(System.getProperty("java.home"),
> "../lib/tools.jar");
> URLClassLoader loader = new URLClassLoader(
> new URL[] { toolsJar.toURL() });
> Class mainClass = loader.loadClass("com.sun.tools.javac.Main");
> StringWriter out = new StringWriter();
> Method compile = mainClass.getMethod("compile", new Class[] {
> String[].class, PrintWriter.class });
> Integer result = (Integer) compile.invoke(null, new Object[] {
> new String[0], new PrintWriter(out) });
> assertEquals(new Integer(2), result);
> }
> }
> ====== Result ======
> RI: pass
> Harmony: throw java.lang.NoSuchMethodException: com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-3685) [classlib][tools] missing method of
com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
Posted by "Kelvin Ye (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kelvin Ye updated HARMONY-3685:
-------------------------------
Attachment: harmony-3685.diff
Would you please try this patch: harmony-3685.diff? Thanks very much!
> [classlib][tools] missing method of com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
> --------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-3685
> URL: https://issues.apache.org/jira/browse/HARMONY-3685
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP
> Reporter: Sean Qiu
> Attachments: harmony-3685.diff
>
>
> public class Test extends TestCase {
> public void test_main() throws Exception {
> File toolsJar = new File(System.getProperty("java.home"),
> "../lib/tools.jar");
> URLClassLoader loader = new URLClassLoader(
> new URL[] { toolsJar.toURL() });
> Class mainClass = loader.loadClass("com.sun.tools.javac.Main");
> StringWriter out = new StringWriter();
> Method compile = mainClass.getMethod("compile", new Class[] {
> String[].class, PrintWriter.class });
> Integer result = (Integer) compile.invoke(null, new Object[] {
> new String[0], new PrintWriter(out) });
> assertEquals(new Integer(2), result);
> }
> }
> ====== Result ======
> RI: pass
> Harmony: throw java.lang.NoSuchMethodException: com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-3685) [classlib][tools] missing method of
com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paulex Yang closed HARMONY-3685.
--------------------------------
Verified by Sean.
> [classlib][tools] missing method of com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
> --------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-3685
> URL: https://issues.apache.org/jira/browse/HARMONY-3685
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP
> Reporter: Sean Qiu
> Assigned To: Paulex Yang
> Attachments: harmony-3685.diff, harmony-3685.zip
>
>
> public class Test extends TestCase {
> public void test_main() throws Exception {
> File toolsJar = new File(System.getProperty("java.home"),
> "../lib/tools.jar");
> URLClassLoader loader = new URLClassLoader(
> new URL[] { toolsJar.toURL() });
> Class mainClass = loader.loadClass("com.sun.tools.javac.Main");
> StringWriter out = new StringWriter();
> Method compile = mainClass.getMethod("compile", new Class[] {
> String[].class, PrintWriter.class });
> Integer result = (Integer) compile.invoke(null, new Object[] {
> new String[0], new PrintWriter(out) });
> assertEquals(new Integer(2), result);
> }
> }
> ====== Result ======
> RI: pass
> Harmony: throw java.lang.NoSuchMethodException: com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HARMONY-3685) [classlib][tools] missing method of
com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paulex Yang resolved HARMONY-3685.
----------------------------------
Resolution: Fixed
Kelvin, patch applied at revision r532653 with modifications, I had some concerns on test package - com.sun.tests.tools., I'm not sure it's right thing for us to create a new package started with "com.sun", further it doesn't comply with Harmony's test naming conventions[1], so I merged the testcase to o.a.h.tests.tools.javac.MainTest. Thanks a lot for this enhancement.
Sean, please verify, thanks.
[1] http://harmony.apache.org/subcomponents/classlibrary/pkgnaming.html
> [classlib][tools] missing method of com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
> --------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-3685
> URL: https://issues.apache.org/jira/browse/HARMONY-3685
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP
> Reporter: Sean Qiu
> Assigned To: Paulex Yang
> Attachments: harmony-3685.diff, harmony-3685.zip
>
>
> public class Test extends TestCase {
> public void test_main() throws Exception {
> File toolsJar = new File(System.getProperty("java.home"),
> "../lib/tools.jar");
> URLClassLoader loader = new URLClassLoader(
> new URL[] { toolsJar.toURL() });
> Class mainClass = loader.loadClass("com.sun.tools.javac.Main");
> StringWriter out = new StringWriter();
> Method compile = mainClass.getMethod("compile", new Class[] {
> String[].class, PrintWriter.class });
> Integer result = (Integer) compile.invoke(null, new Object[] {
> new String[0], new PrintWriter(out) });
> assertEquals(new Integer(2), result);
> }
> }
> ====== Result ======
> RI: pass
> Harmony: throw java.lang.NoSuchMethodException: com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-3685) [classlib][tools] missing method of
com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
Posted by "Kelvin Ye (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kelvin Ye updated HARMONY-3685:
-------------------------------
Attachment: harmony-3685.zip
Paulex, you are right. Please see my latest patch harmony-3685.zip. I also add testcases. Thanks very much!
> [classlib][tools] missing method of com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
> --------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-3685
> URL: https://issues.apache.org/jira/browse/HARMONY-3685
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP
> Reporter: Sean Qiu
> Assigned To: Paulex Yang
> Attachments: harmony-3685.diff, harmony-3685.zip
>
>
> public class Test extends TestCase {
> public void test_main() throws Exception {
> File toolsJar = new File(System.getProperty("java.home"),
> "../lib/tools.jar");
> URLClassLoader loader = new URLClassLoader(
> new URL[] { toolsJar.toURL() });
> Class mainClass = loader.loadClass("com.sun.tools.javac.Main");
> StringWriter out = new StringWriter();
> Method compile = mainClass.getMethod("compile", new Class[] {
> String[].class, PrintWriter.class });
> Integer result = (Integer) compile.invoke(null, new Object[] {
> new String[0], new PrintWriter(out) });
> assertEquals(new Integer(2), result);
> }
> }
> ====== Result ======
> RI: pass
> Harmony: throw java.lang.NoSuchMethodException: com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HARMONY-3685) [classlib][tools] missing method
of com.sun.tools.javac.Main.compile([Ljava.lang.String;,
java.io.PrintWriter)
Posted by "Paulex Yang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12490889 ]
Paulex Yang commented on HARMONY-3685:
--------------------------------------
Kelvin, thanks for looking at this, but I had some concern on this patch. Seems the original one parameter main in Compiler.java uses CONSOLE_ENCODING to construct stdout/err, but after applying the patch, the default system encoding is used instead, I'm not sure if this is the right thing to do. How do you think?
> [classlib][tools] missing method of com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
> --------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-3685
> URL: https://issues.apache.org/jira/browse/HARMONY-3685
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP
> Reporter: Sean Qiu
> Assigned To: Paulex Yang
> Attachments: harmony-3685.diff
>
>
> public class Test extends TestCase {
> public void test_main() throws Exception {
> File toolsJar = new File(System.getProperty("java.home"),
> "../lib/tools.jar");
> URLClassLoader loader = new URLClassLoader(
> new URL[] { toolsJar.toURL() });
> Class mainClass = loader.loadClass("com.sun.tools.javac.Main");
> StringWriter out = new StringWriter();
> Method compile = mainClass.getMethod("compile", new Class[] {
> String[].class, PrintWriter.class });
> Integer result = (Integer) compile.invoke(null, new Object[] {
> new String[0], new PrintWriter(out) });
> assertEquals(new Integer(2), result);
> }
> }
> ====== Result ======
> RI: pass
> Harmony: throw java.lang.NoSuchMethodException: com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-3685) [classlib][tools] missing method of
com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
Posted by "Kelvin Ye (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-3685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kelvin Ye updated HARMONY-3685:
-------------------------------
Attachment: harmony-3685.diff
> [classlib][tools] missing method of com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
> --------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-3685
> URL: https://issues.apache.org/jira/browse/HARMONY-3685
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Environment: Windows XP
> Reporter: Sean Qiu
> Attachments: harmony-3685.diff
>
>
> public class Test extends TestCase {
> public void test_main() throws Exception {
> File toolsJar = new File(System.getProperty("java.home"),
> "../lib/tools.jar");
> URLClassLoader loader = new URLClassLoader(
> new URL[] { toolsJar.toURL() });
> Class mainClass = loader.loadClass("com.sun.tools.javac.Main");
> StringWriter out = new StringWriter();
> Method compile = mainClass.getMethod("compile", new Class[] {
> String[].class, PrintWriter.class });
> Integer result = (Integer) compile.invoke(null, new Object[] {
> new String[0], new PrintWriter(out) });
> assertEquals(new Integer(2), result);
> }
> }
> ====== Result ======
> RI: pass
> Harmony: throw java.lang.NoSuchMethodException: com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.