You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ch...@apache.org on 2017/05/24 18:41:34 UTC

[46/50] [abbrv] commons-imaging git commit: Another local variable we can inline

Another local variable we can inline

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/imaging/trunk@1795461 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/commons-imaging/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-imaging/commit/cfeff184
Tree: http://git-wip-us.apache.org/repos/asf/commons-imaging/tree/cfeff184
Diff: http://git-wip-us.apache.org/repos/asf/commons-imaging/diff/cfeff184

Branch: refs/heads/master
Commit: cfeff18434fbe5075bbeed5b8dff2e974cf0980d
Parents: 2e8379b
Author: Benedikt Ritter <br...@apache.org>
Authored: Wed May 17 21:29:54 2017 +0000
Committer: Benedikt Ritter <br...@apache.org>
Committed: Wed May 17 21:29:54 2017 +0000

----------------------------------------------------------------------
 src/main/java/org/apache/commons/imaging/Imaging.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-imaging/blob/cfeff184/src/main/java/org/apache/commons/imaging/Imaging.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/imaging/Imaging.java b/src/main/java/org/apache/commons/imaging/Imaging.java
index 3fbb2c9..b42bce1 100644
--- a/src/main/java/org/apache/commons/imaging/Imaging.java
+++ b/src/main/java/org/apache/commons/imaging/Imaging.java
@@ -170,10 +170,8 @@ public final class Imaging {
         String normalizedFilename = filename.toLowerCase(Locale.ENGLISH);
 
         for (final ImageParser imageParser : ImageParser.getAllImageParsers()) {
-            final String[] exts = imageParser.getAcceptedExtensions();
-
-            for (final String ext : exts) {
-                if (normalizedFilename.endsWith(ext.toLowerCase(Locale.ENGLISH))) {
+            for (final String extension : imageParser.getAcceptedExtensions()) {
+                if (normalizedFilename.endsWith(extension.toLowerCase(Locale.ENGLISH))) {
                     return true;
                 }
             }