kinow commented on a change in pull request #116:
URL: https://github.com/apache/commons-imaging/pull/116#discussion_r785353011
##########
File path: src/main/java/org/apache/commons/imaging/ImageParser.java
##########
@@ -955,18 +944,15 @@ protected BufferedImageFactory
getBufferedImageFactory(final Map<String, Object>
/**
* A utility method to search a params specification and determine
- * whether it contains the ImagingConstants.PARAM_KEY_STRICT
- * specification. Intended
+ * whether it contains the parameters contain the strict flag. Intended
* for internal use by ImageParser implementations.
*
- * @param params A valid Map object (or a null).
+ * @param params optional parameters.
* @return If the params specify strict format compliance, true;
* otherwise, false.
+ * @param <T> type of parameters used by this image parser
*/
- public static boolean isStrict(final Map<String, Object> params) {
- if (params == null ||
!params.containsKey(ImagingConstants.PARAM_KEY_STRICT)) {
- return false;
- }
- return ((Boolean)
params.get(ImagingConstants.PARAM_KEY_STRICT)).booleanValue();
+ public static <T extends ImagingParameters> boolean isStrict(final T
params) {
+ return params.isStrict();
Review comment:
Done!
--
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]