kinow commented on a change in pull request #116:
URL: https://github.com/apache/commons-imaging/pull/116#discussion_r670141981
##########
File path: src/main/java/org/apache/commons/imaging/Imaging.java
##########
@@ -735,32 +737,35 @@ public static ImageInfo getImageInfo(final File file)
throws ImageReadException,
return getImageInfo(file, null);
}
- private static ImageInfo getImageInfo(final ByteSource byteSource, final
Map<String, Object> params)
- throws ImageReadException, IOException {
- return getImageParser(byteSource).getImageInfo(byteSource, params);
+ // See getImageParser
+ @SuppressWarnings("unchecked")
+ private static ImageInfo getImageInfo(final ByteSource byteSource, final
ImagingParameters params) throws ImageReadException, IOException {
+ return Imaging.getImageParser(byteSource).getImageInfo(byteSource,
params);
}
- private static ImageParser getImageParser(final ByteSource byteSource)
- throws ImageReadException, IOException {
+ // TODO: We have no way of knowing whether the returned ImageParser will
accept the ImagingParameters,
+ // even if we specified generic types for the static methods.
Review comment:
Not sure if there's a better way of changing this method...
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]