commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chtom...@apache.org
Subject [46/50] [abbrv] commons-imaging git commit: Another local variable we can inline
Date Wed, 24 May 2017 18:41:34 GMT
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 <britter@apache.org>
Authored: Wed May 17 21:29:54 2017 +0000
Committer: Benedikt Ritter <britter@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;
                 }
             }


Mime
View raw message