Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 151121 Details for
Bug 293992
[validation] JSPBatchValidator is taking substantially longer when needed taglibs are not on class path
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fix Patch
293992_TaglibHelper_Long_Running_time.txt (text/plain), 3.41 KB, created by
Ian Tewksbury
on 2009-11-02 16:08:17 EST
(
hide
)
Description:
Fix Patch
Filename:
MIME Type:
Creator:
Ian Tewksbury
Created:
2009-11-02 16:08:17 EST
Size:
3.41 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.jsp.core >Index: src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelper.java >=================================================================== >RCS file: /cvsroot/webtools/sourceediting/plugins/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelper.java,v >retrieving revision 1.23.2.1.6.2 >diff -u -r1.23.2.1.6.2 TaglibHelper.java >--- src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelper.java 28 Aug 2009 05:22:16 -0000 1.23.2.1.6.2 >+++ src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelper.java 2 Nov 2009 21:11:17 -0000 >@@ -94,12 +94,22 @@ > private Map fTranslationProblems = null; > private Set fContainerEntries = null; > private IJavaProject fJavaProject; >+ >+ /** >+ * A cache of class names that the class loader could not find. >+ * Because the TaglibHelper is destroyed and recreated whenever >+ * the classpath changes this cache will not become stale when the >+ * classpath changes. >+ * See Bug 293992. >+ */ >+ private Set fNotFoundClasses = null; > > public TaglibHelper(IProject project) { > setProject(project); > fProjectEntries = new HashSet(); > fContainerEntries = new HashSet(); > fTranslationProblems = new HashMap(); >+ fNotFoundClasses = new HashSet(); > } > > private boolean isIterationTag(TLDElementDeclaration elementDecl, IStructuredDocument document, ITextRegionCollection customTag, List problems) { >@@ -109,11 +119,19 @@ > > Class tagClass; > try { >- tagClass = Class.forName(className, true, getClassloader()); >- if (tagClass != null) { >- return IterationTag.class.isInstance(tagClass.newInstance()); >- } >+ /* check to be sure the class name is not one that can not currently be found on >+ * the class path. >+ */ >+ if(!fNotFoundClasses.contains(className)) { >+ tagClass = Class.forName(className, true, getClassloader()); >+ if (tagClass != null) { >+ return IterationTag.class.isInstance(tagClass.newInstance()); >+ } >+ } > } catch (ClassNotFoundException e) { >+ //the class could not be found so add it to the cache >+ fNotFoundClasses.add(className); >+ > Object createdProblem = createJSPProblem(document, customTag, IJSPProblem.TagClassNotFound, JSPCoreMessages.TaglibHelper_3, className, true); > if (createdProblem != null) > problems.add(createdProblem); >@@ -341,11 +359,15 @@ > > Class teiClass = null; > try { >- /* >- * JDT could tell us about it, but loading and calling it would >- * still take time >+ /* check to be sure the class name is not one that can not currently be found on >+ * the class path. > */ >- teiClass = Class.forName(teiClassname, true, loader); >+ if(!fNotFoundClasses.contains(teiClassname)) { >+ /* JDT could tell us about it, but loading and calling it would >+ * still take time >+ */ >+ teiClass = Class.forName(teiClassname, true, loader); >+ } > if (teiClass != null) { > Object teiObject = teiClass.newInstance(); > if (TagExtraInfo.class.isInstance(teiObject)) { >@@ -389,6 +411,9 @@ > } > } > catch (ClassNotFoundException e) { >+ //the class could not be found so add it to the cache >+ fNotFoundClasses.add(teiClassname); >+ > Object createdProblem = createJSPProblem(document, customTag, IJSPProblem.TEIClassNotFound, JSPCoreMessages.TaglibHelper_0, teiClassname, true); > if (createdProblem != null) { > problems.add(createdProblem);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 293992
: 151121