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 2023/10/28 11:50:46 UTC
(commons-compress) branch master updated (404a9bab -> e102fe72)
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git
from 404a9bab Drop spotbugs check from default Maven goal (passes locally oddly but not on GH)
new 42ed09ee Null-guard Lister.main(String[]) for programmatic invocation
new 7aea9c1a Javadoc
new e102fe72 Null-guard Lister.main(String[]) for programmatic invocation
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../apache/commons/compress/archivers/Lister.java | 4 +-
.../harmony/unpack200/AttributeLayout.java | 151 +++++++++++++++++++++
2 files changed, 154 insertions(+), 1 deletion(-)
(commons-compress) 03/03: Null-guard Lister.main(String[]) for programmatic invocation
Posted by gg...@apache.org.
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 e102fe72885e009f20b7fdb027ab91d490773492
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Oct 28 07:48:46 2023 -0400
Null-guard Lister.main(String[]) for programmatic invocation
---
src/main/java/org/apache/commons/compress/archivers/Lister.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/compress/archivers/Lister.java b/src/main/java/org/apache/commons/compress/archivers/Lister.java
index a66a742c..7e358e71 100644
--- a/src/main/java/org/apache/commons/compress/archivers/Lister.java
+++ b/src/main/java/org/apache/commons/compress/archivers/Lister.java
@@ -109,7 +109,7 @@ public final class Lister {
* @throws IOException an I/O exception.
*/
public static void main(final String[] args) throws ArchiveException, IOException {
- if (args != null && args.length == 0) {
+ if (args == null || args.length == 0) {
usage();
return;
}
(commons-compress) 02/03: Javadoc
Posted by gg...@apache.org.
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 7aea9c1a6861dd09a96d3ab07013e98d3d85aeaf
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Oct 28 07:47:41 2023 -0400
Javadoc
---
.../harmony/unpack200/AttributeLayout.java | 151 +++++++++++++++++++++
1 file changed, 151 insertions(+)
diff --git a/src/main/java/org/apache/commons/compress/harmony/unpack200/AttributeLayout.java b/src/main/java/org/apache/commons/compress/harmony/unpack200/AttributeLayout.java
index 2ef90b2e..dd6fefd3 100644
--- a/src/main/java/org/apache/commons/compress/harmony/unpack200/AttributeLayout.java
+++ b/src/main/java/org/apache/commons/compress/harmony/unpack200/AttributeLayout.java
@@ -25,42 +25,193 @@ import org.apache.commons.compress.harmony.unpack200.bytecode.ClassFileEntry;
*/
public class AttributeLayout implements IMatcher {
+ /**
+ * {@value}
+ */
public static final String ACC_ABSTRACT = "ACC_ABSTRACT"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ACC_ANNOTATION = "ACC_ANNOTATION"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ACC_ENUM = "ACC_ENUM"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ACC_FINAL = "ACC_FINAL"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ACC_INTERFACE = "ACC_INTERFACE"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ACC_NATIVE = "ACC_NATIVE"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ACC_PRIVATE = "ACC_PRIVATE"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ACC_PROTECTED = "ACC_PROTECTED"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ACC_PUBLIC = "ACC_PUBLIC"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ACC_STATIC = "ACC_STATIC"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ACC_STRICT = "ACC_STRICT"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ACC_SYNCHRONIZED = "ACC_SYNCHRONIZED"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ACC_SYNTHETIC = "ACC_SYNTHETIC"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ACC_TRANSIENT = "ACC_TRANSIENT"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ACC_VOLATILE = "ACC_VOLATILE"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_ANNOTATION_DEFAULT = "AnnotationDefault"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_CLASS_FILE_VERSION = "class-file version"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_CODE = "Code"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_CONSTANT_VALUE = "ConstantValue"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_DEPRECATED = "Deprecated"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_ENCLOSING_METHOD = "EnclosingMethod"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_EXCEPTIONS = "Exceptions"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_INNER_CLASSES = "InnerClasses"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_LINE_NUMBER_TABLE = "LineNumberTable"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_LOCAL_VARIABLE_TABLE = "LocalVariableTable"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_LOCAL_VARIABLE_TYPE_TABLE = "LocalVariableTypeTable"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_RUNTIME_INVISIBLE_ANNOTATIONS = "RuntimeInvisibleAnnotations"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS = "RuntimeInvisibleParameterAnnotations"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_RUNTIME_VISIBLE_ANNOTATIONS = "RuntimeVisibleAnnotations"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS = "RuntimeVisibleParameterAnnotations"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_SIGNATURE = "Signature"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final String ATTRIBUTE_SOURCE_FILE = "SourceFile"; //$NON-NLS-1$
+
+ /**
+ * {@value}
+ */
public static final int CONTEXT_CLASS = 0;
+
+ /**
+ * {@value}
+ */
public static final int CONTEXT_CODE = 3;
+
+ /**
+ * {@value}
+ */
public static final int CONTEXT_FIELD = 1;
+
+ /**
+ * {@value}
+ */
public static final int CONTEXT_METHOD = 2;
+
+ /**
+ * {@value}
+ */
public static final String[] contextNames = {"Class", "Field", "Method", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
"Code",}; //$NON-NLS-1$
(commons-compress) 01/03: Null-guard Lister.main(String[]) for programmatic invocation
Posted by gg...@apache.org.
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 42ed09eec6a9accb103202576af5b285d774073a
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Oct 28 07:47:35 2023 -0400
Null-guard Lister.main(String[]) for programmatic invocation
---
src/main/java/org/apache/commons/compress/archivers/Lister.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/main/java/org/apache/commons/compress/archivers/Lister.java b/src/main/java/org/apache/commons/compress/archivers/Lister.java
index 74dc25fa..a66a742c 100644
--- a/src/main/java/org/apache/commons/compress/archivers/Lister.java
+++ b/src/main/java/org/apache/commons/compress/archivers/Lister.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.util.Enumeration;
+import java.util.Objects;
import org.apache.commons.compress.archivers.sevenz.SevenZFile;
import org.apache.commons.compress.archivers.tar.TarFile;
@@ -112,6 +113,7 @@ public final class Lister {
usage();
return;
}
+ Objects.requireNonNull(args[0], "args[0]");
System.out.println("Analysing " + args[0]);
final File f = new File(args[0]);
if (!f.isFile()) {