commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject commons-io git commit: [io] use non-short-circuit operator
Date Sat, 03 Nov 2018 04:34:08 GMT
Repository: commons-io
Updated Branches:
  refs/heads/master 769842a21 -> 3ad22fe3d


[io] use non-short-circuit operator

This should have identical semantics but is less confusing to read.


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

Branch: refs/heads/master
Commit: 3ad22fe3d689781a76a92908d0bbc119b2c68892
Parents: 769842a
Author: Eitan Adler <lists@eitanadler.com>
Authored: Fri Nov 2 21:21:18 2018 -0700
Committer: Eitan Adler <lists@eitanadler.com>
Committed: Fri Nov 2 21:21:18 2018 -0700

----------------------------------------------------------------------
 .../org/apache/commons/io/input/compatibility/XmlStreamReader.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-io/blob/3ad22fe3/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReader.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReader.java
b/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReader.java
index 5442315..fe417ba 100644
--- a/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReader.java
+++ b/src/test/java/org/apache/commons/io/input/compatibility/XmlStreamReader.java
@@ -510,7 +510,7 @@ public class XmlStreamReader extends Reader {
             final String bomEnc, final String xmlGuessEnc, final String xmlEnc, final InputStream
is,
             final boolean lenient) throws IOException {
         String encoding;
-        if (lenient & xmlEnc != null) {
+        if (lenient && (xmlEnc != null)) {
             encoding = xmlEnc;
         } else {
             final boolean appXml = isAppXml(cTMime);


Mime
View raw message