[jboss-jira] [JBoss JIRA] Created: (JASSIST-123) Explicit class import support for compiler (not whole packages)
Ivan Prisiazhnyy (JIRA)
jira-events at lists.jboss.org
Thu Jun 10 08:02:38 EDT 2010
Explicit class import support for compiler (not whole packages)
---------------------------------------------------------------
Key: JASSIST-123
URL: https://jira.jboss.org/browse/JASSIST-123
Project: Javassist
Issue Type: Patch
Reporter: Ivan Prisiazhnyy
Assignee: Shigeru Chiba
This is patch for MemberResolver class for Javassist 3.12.GA
It adds support for compiler to understand importing of certain classes in packages, not the whole packages.
With this patch the following code will do its job:
ClassPool x = ClassPool.getDefault();
x.importPackage("java.io.File");
Patch it self:
*** MemberResolver.java 2010-06-10 14:38:03.000000000 +0300
***************
*** 429,445 ****
}
catch (NotFoundException e) {
classPool.recordInvalidClassName(fqName);
-
- try {
- if (pac.endsWith(orgName)) {
- CtClass cc = classPool.get(pac);
- // if the class is found,
- classPool.recordInvalidClassName(orgName);
- return cc;
- }
- } catch (NotFoundException ee) {
- classPool.recordInvalidClassName(pac);
- }
}
}
}
--- 429,434 ----
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list