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 2020/01/25 16:59:09 UTC

[commons-compress] branch master updated: Add missing annotations.

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 0c39f38  Add missing annotations.
0c39f38 is described below

commit 0c39f381dcf15e15c5334c8cc44e100c0e32083c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sat Jan 25 11:59:05 2020 -0500

    Add missing annotations.
---
 .../org/apache/commons/compress/archivers/examples/Archiver.java    | 6 ++++++
 .../org/apache/commons/compress/archivers/sevenz/SevenZFile.java    | 3 +++
 src/main/java/org/apache/commons/compress/utils/Charsets.java       | 6 ++++++
 .../java/org/apache/commons/compress/archivers/SevenZTestCase.java  | 1 +
 4 files changed, 16 insertions(+)

diff --git a/src/main/java/org/apache/commons/compress/archivers/examples/Archiver.java b/src/main/java/org/apache/commons/compress/archivers/examples/Archiver.java
index a47d8fe..4632752 100644
--- a/src/main/java/org/apache/commons/compress/archivers/examples/Archiver.java
+++ b/src/main/java/org/apache/commons/compress/archivers/examples/Archiver.java
@@ -206,10 +206,12 @@ public class Archiver {
     public void create(final ArchiveOutputStream target, File directory)
         throws IOException, ArchiveException {
         create(directory, new ArchiveEntryCreator() {
+            @Override
             public ArchiveEntry create(File f, String entryName) throws IOException {
                 return target.createArchiveEntry(f, entryName);
             }
         }, new ArchiveEntryConsumer() {
+            @Override
             public void accept(File source, ArchiveEntry e) throws IOException {
                 target.putArchiveEntry(e);
                 if (!e.isDirectory()) {
@@ -220,6 +222,7 @@ public class Archiver {
                 target.closeArchiveEntry();
             }
         }, new Finisher() {
+            @Override
             public void finish() throws IOException {
                 target.finish();
             }
@@ -236,10 +239,12 @@ public class Archiver {
      */
     public void create(final SevenZOutputFile target, File directory) throws IOException {
         create(directory, new ArchiveEntryCreator() {
+            @Override
             public ArchiveEntry create(File f, String entryName) throws IOException {
                 return target.createArchiveEntry(f, entryName);
             }
         }, new ArchiveEntryConsumer() {
+            @Override
             public void accept(File source, ArchiveEntry e) throws IOException {
                 target.putArchiveEntry(e);
                 if (!e.isDirectory()) {
@@ -256,6 +261,7 @@ public class Archiver {
                 target.closeArchiveEntry();
             }
         }, new Finisher() {
+            @Override
             public void finish() throws IOException {
                 target.finish();
             }
diff --git a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
index 1e1b263..713211a 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/SevenZFile.java
@@ -140,6 +140,7 @@ public class SevenZFile implements Closeable {
      * @throws IOException if reading the archive fails
      * @deprecated use the char[]-arg version for the password instead
      */
+    @Deprecated
     public SevenZFile(final File fileName, final byte[] password) throws IOException {
         this(Files.newByteChannel(fileName.toPath(), EnumSet.of(StandardOpenOption.READ)),
                 fileName.getAbsolutePath(), password, true, SevenZFileOptions.DEFAULT);
@@ -298,6 +299,7 @@ public class SevenZFile implements Closeable {
      * @since 1.13
      * @deprecated use the char[]-arg version for the password instead
      */
+    @Deprecated
     public SevenZFile(final SeekableByteChannel channel,
                       final byte[] password) throws IOException {
         this(channel, DEFAULT_FILE_NAME, password);
@@ -319,6 +321,7 @@ public class SevenZFile implements Closeable {
      * @since 1.13
      * @deprecated use the char[]-arg version for the password instead
      */
+    @Deprecated
     public SevenZFile(final SeekableByteChannel channel, String fileName,
                       final byte[] password) throws IOException {
         this(channel, fileName, password, false, SevenZFileOptions.DEFAULT);
diff --git a/src/main/java/org/apache/commons/compress/utils/Charsets.java b/src/main/java/org/apache/commons/compress/utils/Charsets.java
index 9f5240a..7f5d0bf 100644
--- a/src/main/java/org/apache/commons/compress/utils/Charsets.java
+++ b/src/main/java/org/apache/commons/compress/utils/Charsets.java
@@ -97,6 +97,7 @@ public class Charsets {
      * @see <a href="https://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
      * @deprecated replaced by {@link StandardCharsets} in Java 7
      */
+    @Deprecated
     public static final Charset ISO_8859_1 = StandardCharsets.ISO_8859_1;
 
     /**
@@ -110,6 +111,7 @@ public class Charsets {
      * @see <a href="https://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
      * @deprecated replaced by {@link StandardCharsets} in Java 7
      */
+    @Deprecated
     public static final Charset US_ASCII = StandardCharsets.US_ASCII;
 
     /**
@@ -124,6 +126,7 @@ public class Charsets {
      * @see <a href="https://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
      * @deprecated replaced by {@link StandardCharsets} in Java 7
      */
+    @Deprecated
     public static final Charset UTF_16 = StandardCharsets.UTF_16;
 
     /**
@@ -137,6 +140,7 @@ public class Charsets {
      * @see <a href="https://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
      * @deprecated replaced by {@link StandardCharsets} in Java 7
      */
+    @Deprecated
     public static final Charset UTF_16BE = StandardCharsets.UTF_16BE;
 
     /**
@@ -150,6 +154,7 @@ public class Charsets {
      * @see <a href="https://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
      * @deprecated replaced by {@link StandardCharsets} in Java 7
      */
+    @Deprecated
     public static final Charset UTF_16LE = StandardCharsets.UTF_16LE;
 
     /**
@@ -163,5 +168,6 @@ public class Charsets {
      * @see <a href="https://docs.oracle.com/javase/6/docs/api/java/nio/charset/Charset.html">Standard charsets</a>
      * @deprecated replaced by {@link StandardCharsets} in Java 7
      */
+    @Deprecated
     public static final Charset UTF_8 = StandardCharsets.UTF_8;
 }
diff --git a/src/test/java/org/apache/commons/compress/archivers/SevenZTestCase.java b/src/test/java/org/apache/commons/compress/archivers/SevenZTestCase.java
index 0b5bd95..9f33978 100644
--- a/src/test/java/org/apache/commons/compress/archivers/SevenZTestCase.java
+++ b/src/test/java/org/apache/commons/compress/archivers/SevenZTestCase.java
@@ -44,6 +44,7 @@ public class SevenZTestCase extends AbstractTestCase {
         file2 = getFile("test2.xml");
     }
 
+    @Override
     @Before
     public void setUp() throws Exception {
         super.setUp();