File tree Expand file tree Collapse file tree
library/utilities/src/main/java/it/geosolutions/imageio/utilities Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131import org .w3c .dom .Node ;
3232
3333import javax .imageio .IIOException ;
34+ import javax .imageio .ImageIO ;
3435import javax .imageio .ImageReadParam ;
3536import javax .imageio .ImageReader ;
3637import javax .imageio .ImageTypeSpecifier ;
@@ -498,15 +499,15 @@ public static boolean replaceProvider(
498499 if (providerClassName .equalsIgnoreCase (customProviderName )) {
499500 custom = provider ;
500501 }
501- if (standard !=null && custom !=null ){
502- if (ImageReaderSpi .class .isAssignableFrom (standard .getClass ()))
503- return registry .setOrdering (ImageReaderSpi .class , (ImageReaderSpi )custom ,(ImageReaderSpi ) standard );
504- else
505- return registry .setOrdering (ImageWriterSpi .class , (ImageWriterSpi )custom ,(ImageWriterSpi ) standard );
506- }
507502 }
508503 }
509504 }
505+ if (standard !=null && custom !=null ){
506+ if (ImageReaderSpi .class .isAssignableFrom (standard .getClass ()))
507+ return registry .setOrdering (ImageReaderSpi .class , (ImageReaderSpi )custom ,(ImageReaderSpi ) standard );
508+ else
509+ return registry .setOrdering (ImageWriterSpi .class , (ImageWriterSpi )custom ,(ImageWriterSpi ) standard );
510+ }
510511
511512 //we did not find them
512513 return false ;
You can’t perform that action at this time.
0 commit comments