This is an automated email from the ASF dual-hosted git repository.

garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git


The following commit(s) were added to refs/heads/master by this push:
     new cbb171396 Flip null test
cbb171396 is described below

commit cbb1713962a8f798463965979595c9956fbb09be
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jul 5 09:49:36 2026 -0400

    Flip null test
---
 .../org/apache/commons/compress/harmony/unpack200/IcTuple.java | 10 +++++-----
 .../commons/compress/harmony/unpack200/bytecode/ByteCode.java  |  2 +-
 .../compress/harmony/unpack200/bytecode/ClassConstantPool.java |  2 +-
 .../compress/harmony/unpack200/bytecode/OperandManager.java    |  6 +++---
 .../apache/commons/compress/harmony/unpack200/BcBandsTest.java |  2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/compress/harmony/unpack200/IcTuple.java 
b/src/main/java/org/apache/commons/compress/harmony/unpack200/IcTuple.java
index 7d102d7bd..4bcf4f058 100644
--- a/src/main/java/org/apache/commons/compress/harmony/unpack200/IcTuple.java
+++ b/src/main/java/org/apache/commons/compress/harmony/unpack200/IcTuple.java
@@ -109,10 +109,10 @@ public IcTuple(final String C, final int F, final String 
C2, final String N, fin
         this.c2Index = c2Index;
         this.nIndex = nIndex;
         this.tIndex = tIndex;
-        if (null == N) {
+        if (N == null) {
             predictSimple = true;
         }
-        if (null == C2) {
+        if (C2 == null) {
             predictOuter = true;
         }
         initializeClassStrings();
@@ -303,7 +303,7 @@ public String[] innerBreakAtDollar(final String className) {
 
     private boolean isAllDigits(final String nameString) {
         // Answer true if the receiver is all digits; otherwise answer false.
-        if (null == nameString) {
+        if (nameString == null) {
             return false;
         }
         for (int index = 0; index < nameString.length(); index++) {
@@ -349,8 +349,8 @@ public boolean nestedExplicitFlagSet() {
      * @return true if the strings are equal or both null.
      */
     public boolean nullSafeEquals(final String stringOne, final String 
stringTwo) {
-        if (null == stringOne) {
-            return null == stringTwo;
+        if (stringOne == null) {
+            return stringTwo == null;
         }
         return stringOne.equals(stringTwo);
     }
diff --git 
a/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/ByteCode.java
 
b/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/ByteCode.java
index 46af1a84a..472f5a1ba 100644
--- 
a/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/ByteCode.java
+++ 
b/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/ByteCode.java
@@ -43,7 +43,7 @@ public class ByteCode extends ClassFileEntry {
     public static ByteCode getByteCode(final int opcode) {
         final int byteOpcode = 0xFF & opcode;
         if (ByteCodeForm.get(byteOpcode).hasNoOperand()) {
-            if (null == noArgByteCodes[byteOpcode]) {
+            if (noArgByteCodes[byteOpcode] == null) {
                 noArgByteCodes[byteOpcode] = new ByteCode(byteOpcode);
             }
             return noArgByteCodes[byteOpcode];
diff --git 
a/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/ClassConstantPool.java
 
b/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/ClassConstantPool.java
index 6800b5e8d..a62b2c406 100644
--- 
a/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/ClassConstantPool.java
+++ 
b/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/ClassConstantPool.java
@@ -186,7 +186,7 @@ public int indexOf(final ClassFileEntry entry) {
         if (!resolved) {
             throw new IllegalStateException("Constant pool is not yet 
resolved; this does not make any sense");
         }
-        if (null == indexCache) {
+        if (indexCache == null) {
             throw new IllegalStateException("Index cache is not initialized.");
         }
         final Integer entryIndex = indexCache.get(entry);
diff --git 
a/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/OperandManager.java
 
b/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/OperandManager.java
index 33a77476b..e29986d66 100644
--- 
a/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/OperandManager.java
+++ 
b/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/OperandManager.java
@@ -138,7 +138,7 @@ public OperandManager(final int[] bcCaseCount, final int[] 
bcCaseValue, final in
      * @return the current class.
      */
     public String getCurrentClass() {
-        if (null == currentClass) {
+        if (currentClass == null) {
             throw new IllegalStateException("Current class not set yet");
         }
         return currentClass;
@@ -150,7 +150,7 @@ public String getCurrentClass() {
      * @return the new class.
      */
     public String getNewClass() {
-        if (null == newClass) {
+        if (newClass == null) {
             throw new IllegalStateException("New class not set yet");
         }
         return newClass;
@@ -162,7 +162,7 @@ public String getNewClass() {
      * @return the super class.
      */
     public String getSuperClass() {
-        if (null == superClass) {
+        if (superClass == null) {
             throw new IllegalStateException("SuperClass not set yet");
         }
         return superClass;
diff --git 
a/src/test/java/org/apache/commons/compress/harmony/unpack200/BcBandsTest.java 
b/src/test/java/org/apache/commons/compress/harmony/unpack200/BcBandsTest.java
index a43455e55..43f0fc2a9 100644
--- 
a/src/test/java/org/apache/commons/compress/harmony/unpack200/BcBandsTest.java
+++ 
b/src/test/java/org/apache/commons/compress/harmony/unpack200/BcBandsTest.java
@@ -243,7 +243,7 @@ public SegmentConstantPool getConstantPool() {
 
         @Override
         protected CpBands getCpBands() {
-            if (null == cpBands) {
+            if (cpBands == null) {
                 cpBands = new MockCpBands(this);
             }
             return cpBands;

Reply via email to