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

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

commit fe2cb6a8ecb9e29363a3e2290158b29b59d495e5
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Dec 8 11:12:36 2022 -0500

    Use Java Objects class
    
    Use final parameter
---
 .../compress/harmony/unpack200/bytecode/SourceFileAttribute.java   | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git 
a/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/SourceFileAttribute.java
 
b/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/SourceFileAttribute.java
index a9b995e8..ffbaa2c1 100644
--- 
a/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/SourceFileAttribute.java
+++ 
b/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/SourceFileAttribute.java
@@ -18,6 +18,7 @@ package 
org.apache.commons.compress.harmony.unpack200.bytecode;
 
 import java.io.DataOutputStream;
 import java.io.IOException;
+import java.util.Objects;
 
 /**
  * Source file class file attribute
@@ -49,11 +50,7 @@ public class SourceFileAttribute extends Attribute {
             return false;
         }
         final SourceFileAttribute other = (SourceFileAttribute) obj;
-        if (name == null) {
-            if (other.name != null) {
-                return false;
-            }
-        } else if (!name.equals(other.name)) {
+        if (!Objects.equals(name, other.name)) {
             return false;
         }
         return true;

Reply via email to