|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
[janino-dev] [jira] Created: (JANINO-110) Fully Qualified .class access fails to compileFully Qualified .class access fails to compile
---------------------------------------------- Key: JANINO-110 URL: http://jira.codehaus.org/browse/JANINO-110 Project: Janino Issue Type: Bug Reporter: Matt Fowles Assignee: Arno Unkrig The following unit test will fail to compile. If the return value is changed to simply "SelfRef.class" everything works fine. public void testAccessingCompilingClass() throws Exception { SimpleCompiler sc = new SimpleCompiler(); sc.cook("package test.simple;" + "public class SelfRef {" + " public Class getSelf() {" + " return test.simple.SelfRef.class;" + " }" + "}" ); Class self = sc.getClassLoader().loadClass("test.simple.SelfRef"); Method m = self.getDeclaredMethod("getSelf", null); Object inst = self.newInstance(); Class res = (Class)m.invoke(inst, null); assertEquals(self, res); } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[janino-dev] [jira] Updated: (JANINO-110) Fully Qualified .class access fails to compile[ http://jira.codehaus.org/browse/JANINO-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matt Fowles updated JANINO-110: ------------------------------- Attachment: classnames.patch This patch fixes the issue and adds a test for it to EvaluatorTest.java It also factors some of the duplicated code in UnitCompiler.java into helper methods, which I did while coming to understand the code and the problem better. > Fully Qualified .class access fails to compile > ---------------------------------------------- > > Key: JANINO-110 > URL: http://jira.codehaus.org/browse/JANINO-110 > Project: Janino > Issue Type: Bug > Reporter: Matt Fowles > Assignee: Arno Unkrig > Attachments: classnames.patch > > > The following unit test will fail to compile. If the return value is changed to simply "SelfRef.class" everything works fine. > public void testAccessingCompilingClass() throws Exception { > SimpleCompiler sc = new SimpleCompiler(); > sc.cook("package test.simple;" + > "public class SelfRef {" + > " public Class getSelf() {" + > " return test.simple.SelfRef.class;" + > " }" + > "}" > ); > Class self = sc.getClassLoader().loadClass("test.simple.SelfRef"); > Method m = self.getDeclaredMethod("getSelf", null); > > Object inst = self.newInstance(); > Class res = (Class)m.invoke(inst, null); > assertEquals(self, res); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[janino-dev] [jira] Commented: (JANINO-110) Fully Qualified .class access fails to compile[ http://jira.codehaus.org/browse/JANINO-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=134993#action_134993 ] Arno Unkrig commented on JANINO-110: ------------------------------------ That patch will go into the next release of JANINO. > Fully Qualified .class access fails to compile > ---------------------------------------------- > > Key: JANINO-110 > URL: http://jira.codehaus.org/browse/JANINO-110 > Project: Janino > Issue Type: Bug > Reporter: Matt Fowles > Assignee: Arno Unkrig > Attachments: classnames.patch > > > The following unit test will fail to compile. If the return value is changed to simply "SelfRef.class" everything works fine. > public void testAccessingCompilingClass() throws Exception { > SimpleCompiler sc = new SimpleCompiler(); > sc.cook("package test.simple;" + > "public class SelfRef {" + > " public Class getSelf() {" + > " return test.simple.SelfRef.class;" + > " }" + > "}" > ); > Class self = sc.getClassLoader().loadClass("test.simple.SelfRef"); > Method m = self.getDeclaredMethod("getSelf", null); > > Object inst = self.newInstance(); > Class res = (Class)m.invoke(inst, null); > assertEquals(self, res); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[janino-dev] [jira] Resolved: (JANINO-110) Fully Qualified .class access fails to compile[ http://jira.codehaus.org/browse/JANINO-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matt Fowles resolved JANINO-110. -------------------------------- Resolution: Fixed > Fully Qualified .class access fails to compile > ---------------------------------------------- > > Key: JANINO-110 > URL: http://jira.codehaus.org/browse/JANINO-110 > Project: Janino > Issue Type: Bug > Reporter: Matt Fowles > Assignee: Arno Unkrig > Attachments: classnames.patch > > > The following unit test will fail to compile. If the return value is changed to simply "SelfRef.class" everything works fine. > public void testAccessingCompilingClass() throws Exception { > SimpleCompiler sc = new SimpleCompiler(); > sc.cook("package test.simple;" + > "public class SelfRef {" + > " public Class getSelf() {" + > " return test.simple.SelfRef.class;" + > " }" + > "}" > ); > Class self = sc.getClassLoader().loadClass("test.simple.SelfRef"); > Method m = self.getDeclaredMethod("getSelf", null); > > Object inst = self.newInstance(); > Class res = (Class)m.invoke(inst, null); > assertEquals(self, res); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[janino-dev] [jira] Commented: (JANINO-110) Fully Qualified .class access fails to compile[ http://jira.codehaus.org/browse/JANINO-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=138761#action_138761 ] Matt Fowles commented on JANINO-110: ------------------------------------ Arno, I do not have the ability to close this issue. I think my login to Jira does not have the power. You can consider this closed. > Fully Qualified .class access fails to compile > ---------------------------------------------- > > Key: JANINO-110 > URL: http://jira.codehaus.org/browse/JANINO-110 > Project: Janino > Issue Type: Bug > Reporter: Matt Fowles > Assignee: Arno Unkrig > Attachments: classnames.patch > > > The following unit test will fail to compile. If the return value is changed to simply "SelfRef.class" everything works fine. > public void testAccessingCompilingClass() throws Exception { > SimpleCompiler sc = new SimpleCompiler(); > sc.cook("package test.simple;" + > "public class SelfRef {" + > " public Class getSelf() {" + > " return test.simple.SelfRef.class;" + > " }" + > "}" > ); > Class self = sc.getClassLoader().loadClass("test.simple.SelfRef"); > Method m = self.getDeclaredMethod("getSelf", null); > > Object inst = self.newInstance(); > Class res = (Class)m.invoke(inst, null); > assertEquals(self, res); > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free Forum Powered by Nabble | Forum Help |