kinow commented on a change in pull request #5: Proposal for a patch for 
Imaging-159 using a POJO
URL: https://github.com/apache/commons-imaging/pull/5#discussion_r370988701
 
 

 ##########
 File path: src/main/java/org/apache/commons/imaging/ImageParser.java
 ##########
 @@ -954,13 +938,12 @@ protected final boolean canAcceptExtension(final String 
filename) {
      * @param params A valid Map object, or a null.
      * @return A valid instance of an implementation of a 
IBufferedImageFactory.
      */
-    protected BufferedImageFactory getBufferedImageFactory(final Map<String, 
Object> params) {
-        if (params == null) {
+    protected BufferedImageFactory getBufferedImageFactory(final 
ImagingParameters params) {
+        if (params == null || params.isBufferedImageFactoryPresent() == false) 
{
             return new SimpleBufferedImageFactory();
         }
 
-        final BufferedImageFactory result = (BufferedImageFactory) params
-                .get(ImagingConstants.BUFFERED_IMAGE_FACTORY);
+        final BufferedImageFactory result = params.getBufferedImageFactory();
 
 Review comment:
   Uh, really strange. Perhaps if it were the class only, not the instance, 
then I think it'd be fine.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to