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-bsf.git


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

commit aa757ef41eb3423771df86c1bbd79ecac1f6d472
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jul 5 09:15:20 2026 -0400

    Flip null test
---
 samples/calc/TestCalc.java                                 |  2 +-
 .../org/apache/bsf/util/event/generator/ByteUtility.java   | 14 +++++++-------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/samples/calc/TestCalc.java b/samples/calc/TestCalc.java
index 2e70faf..dc818ec 100644
--- a/samples/calc/TestCalc.java
+++ b/samples/calc/TestCalc.java
@@ -37,7 +37,7 @@ public class TestCalc extends Frame {
 
      System.out.println("exception: " + e.getMessage());
      Throwable oe= e.getTargetException();
-     if(null != oe) System.out.println("\nOriginal Exception:"+ 
oe.getMessage());
+     if(oe != null) System.out.println("\nOriginal Exception:"+ 
oe.getMessage());
               e.printStackTrace();
 
     }
diff --git a/src/main/java/org/apache/bsf/util/event/generator/ByteUtility.java 
b/src/main/java/org/apache/bsf/util/event/generator/ByteUtility.java
index 5f40015..2036da9 100644
--- a/src/main/java/org/apache/bsf/util/event/generator/ByteUtility.java
+++ b/src/main/java/org/apache/bsf/util/event/generator/ByteUtility.java
@@ -24,7 +24,7 @@ package org.apache.bsf.util.event.generator;
  */
 public class ByteUtility {
     public static byte[] addBytes(byte[] array, final byte[] value) {
-        if (null != array) {
+        if (array != null) {
             final byte[] newarray = new byte[array.length + value.length];
             System.arraycopy(array, 0, newarray, 0, array.length);
             System.arraycopy(value, 0, newarray, array.length, value.length);
@@ -36,7 +36,7 @@ public class ByteUtility {
     }
 
     public static byte[] addBytes(byte[] array, final byte value) {
-        if (null != array) {
+        if (array != null) {
             final byte[] newarray = new byte[array.length + 1];
             System.arraycopy(array, 0, newarray, 0, array.length);
             newarray[newarray.length - 1] = value;
@@ -49,7 +49,7 @@ public class ByteUtility {
     }
 
     public static byte[] addBytes(byte[] array, final int value) {
-        if (null != array) {
+        if (array != null) {
             final byte[] newarray = new byte[array.length + 3];
             System.arraycopy(array, 0, newarray, 0, array.length);
             newarray[newarray.length - 3] = (byte) ((value >> 16) & 0xFF);
@@ -66,7 +66,7 @@ public class ByteUtility {
     }
 
     public static byte[] addBytes(byte[] array, final long value) {
-        if (null != array) {
+        if (array != null) {
             final byte[] newarray = new byte[array.length + 4];
             System.arraycopy(array, 0, newarray, 0, array.length);
             newarray[newarray.length - 4] = (byte) ((value >> 24) & 0xFF);
@@ -85,8 +85,8 @@ public class ByteUtility {
     }
 
     public static byte[] addBytes(byte[] array, final String value) {
-        if (null != value) {
-            if (null != array) {
+        if (value != null) {
+            if (array != null) {
                 final byte[] newarray = new byte[array.length + 
value.length()];
                 System.arraycopy(array, 0, newarray, 0, array.length);
                 System.arraycopy(value.getBytes(), 0, newarray, array.length, 
value.length());
@@ -99,7 +99,7 @@ public class ByteUtility {
     }
 
     public static byte[] addBytes(byte[] array, final short value) {
-        if (null != array) {
+        if (array != null) {
             final byte[] newarray = new byte[array.length + 2];
             System.arraycopy(array, 0, newarray, 0, array.length);
             newarray[newarray.length - 2] = (byte) ((value >> 8) & 0xFF);

Reply via email to