You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/05/24 20:49:41 UTC
[commons-compress] branch master updated: Use Objects#requireNonNull()
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
The following commit(s) were added to refs/heads/master by this push:
new ecfad3c7 Use Objects#requireNonNull()
ecfad3c7 is described below
commit ecfad3c75410b2c222b0408addab4184e4aef534
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue May 24 16:49:33 2022 -0400
Use Objects#requireNonNull()
---
.../compress/harmony/unpack200/bytecode/ConstantValueAttribute.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/ConstantValueAttribute.java b/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/ConstantValueAttribute.java
index bf747508..8f321c0b 100644
--- a/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/ConstantValueAttribute.java
+++ b/src/main/java/org/apache/commons/compress/harmony/unpack200/bytecode/ConstantValueAttribute.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;
/**
* An {@link Attribute} representing a constant.
@@ -36,10 +37,7 @@ public class ConstantValueAttribute extends Attribute {
public ConstantValueAttribute(final ClassFileEntry entry) {
super(attributeName);
- if (entry == null) {
- throw new NullPointerException();
- }
- this.entry = entry;
+ this.entry = Objects.requireNonNull(entry, "entry");
}
@Override