Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

eliminating condition that changes the lastFactory reference within a…

… single call
  • Loading branch information...
1 parent 73f4794 commit 47b5f68b6f927121ec7ed4f89baccf4672d54d39 jdeolive committed
8 modules/unsupported/process/src/main/java/org/geotools/process/
@@ -112,8 +112,12 @@ public static void removeProcessFactory(ProcessFactory factory) {
* @return ProcessFactory capable of creating an instanceof the named process
public static synchronized ProcessFactory createProcessFactory(Name name){
- if( lastFactory != null && lastFactory.getNames().contains(name)){
- return lastFactory;
+ //store a local reference to last factory, since it could change if this method is called
+ //within the factories getNames() method, which could happen if a factory delegates in some
+ // way
+ ProcessFactory last = lastFactory;
+ if( last != null && last.getNames().contains(name)){
+ return last;
for( ProcessFactory factory : getProcessFactories() ) {
if(factory.getNames().contains(name)) {

0 comments on commit 47b5f68

Please sign in to comment.
Something went wrong with that request. Please try again.