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 171590 Details for
Bug 316385
Change to taglib resolver construction is breaking OEPE
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Adds sorting of delegates in AbstractDelegatingFactory so that non-OSS (adopter) delegates are always accessed first.
patch.txt (text/plain), 2.29 KB, created by
Cameron Bateman
on 2010-06-09 19:26:29 EDT
(
hide
)
Description:
Adds sorting of delegates in AbstractDelegatingFactory so that non-OSS (adopter) delegates are always accessed first.
Filename:
MIME Type:
Creator:
Cameron Bateman
Created:
2010-06-09 19:26:29 EDT
Size:
2.29 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jst.jsf.common >Index: src/org/eclipse/jst/jsf/context/AbstractDelegatingFactory.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsf/components/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/context/AbstractDelegatingFactory.java,v >retrieving revision 1.4 >diff -u -r1.4 AbstractDelegatingFactory.java >--- src/org/eclipse/jst/jsf/context/AbstractDelegatingFactory.java 5 May 2009 23:00:29 -0000 1.4 >+++ src/org/eclipse/jst/jsf/context/AbstractDelegatingFactory.java 9 Jun 2010 23:25:02 -0000 >@@ -15,6 +15,7 @@ > import java.util.ArrayList; > import java.util.Arrays; > import java.util.Collections; >+import java.util.Comparator; > import java.util.List; > import java.util.concurrent.CopyOnWriteArrayList; > >@@ -61,7 +62,44 @@ > { > if (isValidDelegate(delegate)) > { >- _delegates.addIfAbsent(delegate); >+ synchronized(_delegates) >+ { >+ _delegates.addIfAbsent(delegate); >+ if (_delegates.size() > 1) >+ { >+ List<IAdaptable> delegates = new ArrayList<IAdaptable>(_delegates); >+ >+ Collections.sort(delegates, new Comparator() >+ { >+ public int compare(Object delegate1, Object delegate2) >+ { >+ final Class<?> clazz1 = delegate1.getClass(); >+ final Class<?> clazz2 = delegate2.getClass(); >+ >+ Package package1 = clazz1.getPackage(); >+ Package package2 = clazz2.getPackage(); >+ boolean package1IsOSS = package1.getName().startsWith("org.eclipse.jst"); //$NON-NLS-1$ >+ boolean package2IsOSS = package2.getName().startsWith("org.eclipse.jst"); //$NON-NLS-1$ >+ >+ if (package1IsOSS && !package2IsOSS) >+ { >+ // sort the oss one after the non-oss one >+ return 1; >+ } >+ else if (!package1IsOSS && package2IsOSS) >+ { >+ return -1; >+ } >+ >+ // otherwise they are either both oss or both non-oss, so just >+ // sort canonically by name. >+ return clazz1.getName().compareTo(clazz2.getName()); >+ } >+ }); >+ _delegates.clear(); >+ _delegates.addAll(delegates); >+ } >+ } > } > } >
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 316385
: 171590