Browse Source

Remove deprecated ArchiveCommand#putEntry method

Use #putEntry(Closeable, ObjectId, String, FileMode, ObjectLoader)}
instead.

Change-Id: I2c58c07da00c6033c583eb2dc6c3a0889661f5f5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-5.0
Matthias Sohn 7 years ago
parent
commit
653b31a903
  1. 9
      org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java
  2. 9
      org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/Tbz2Format.java
  3. 9
      org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TgzFormat.java
  4. 9
      org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TxzFormat.java
  5. 9
      org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java
  6. 5
      org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ArchiveCommandTest.java
  7. 24
      org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java

9
org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java

@ -88,15 +88,6 @@ public final class TarFormat extends BaseFormat implements
return applyFormatOptions(out, o); return applyFormatOptions(out, o);
} }
/** {@inheritDoc} */
@Deprecated
@Override
public void putEntry(ArchiveOutputStream out,
String path, FileMode mode, ObjectLoader loader)
throws IOException {
putEntry(out, null, path, mode,loader);
}
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public void putEntry(ArchiveOutputStream out, public void putEntry(ArchiveOutputStream out,

9
org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/Tbz2Format.java

@ -82,15 +82,6 @@ public final class Tbz2Format extends BaseFormat implements
return tarFormat.createArchiveOutputStream(out, o); return tarFormat.createArchiveOutputStream(out, o);
} }
/** {@inheritDoc} */
@Deprecated
@Override
public void putEntry(ArchiveOutputStream out,
String path, FileMode mode, ObjectLoader loader)
throws IOException {
putEntry(out, null, path, mode,loader);
}
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public void putEntry(ArchiveOutputStream out, public void putEntry(ArchiveOutputStream out,

9
org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TgzFormat.java

@ -82,15 +82,6 @@ public final class TgzFormat extends BaseFormat implements
return tarFormat.createArchiveOutputStream(out, o); return tarFormat.createArchiveOutputStream(out, o);
} }
/** {@inheritDoc} */
@Deprecated
@Override
public void putEntry(ArchiveOutputStream out,
String path, FileMode mode, ObjectLoader loader)
throws IOException {
putEntry(out, null, path, mode,loader);
}
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public void putEntry(ArchiveOutputStream out, public void putEntry(ArchiveOutputStream out,

9
org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TxzFormat.java

@ -82,15 +82,6 @@ public final class TxzFormat extends BaseFormat implements
return tarFormat.createArchiveOutputStream(out, o); return tarFormat.createArchiveOutputStream(out, o);
} }
/** {@inheritDoc} */
@Deprecated
@Override
public void putEntry(ArchiveOutputStream out,
String path, FileMode mode, ObjectLoader loader)
throws IOException {
putEntry(out, null, path, mode,loader);
}
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public void putEntry(ArchiveOutputStream out, public void putEntry(ArchiveOutputStream out,

9
org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java

@ -83,15 +83,6 @@ public final class ZipFormat extends BaseFormat implements
return applyFormatOptions(new ZipArchiveOutputStream(s), o); return applyFormatOptions(new ZipArchiveOutputStream(s), o);
} }
/** {@inheritDoc} */
@Deprecated
@Override
public void putEntry(ArchiveOutputStream out,
String path, FileMode mode, ObjectLoader loader)
throws IOException {
putEntry(out, null, path, mode,loader);
}
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public void putEntry(ArchiveOutputStream out, public void putEntry(ArchiveOutputStream out,

5
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ArchiveCommandTest.java

@ -228,11 +228,6 @@ public class ArchiveCommandTest extends RepositoryTestCase {
return new MockOutputStream(); return new MockOutputStream();
} }
@Override
public void putEntry(MockOutputStream out, String path, FileMode mode, ObjectLoader loader) {
putEntry(out, null, path, mode, loader);
}
@Override @Override
public void putEntry(MockOutputStream out, ObjectId tree, String path, FileMode mode, ObjectLoader loader) { public void putEntry(MockOutputStream out, ObjectId tree, String path, FileMode mode, ObjectLoader loader) {
String content = mode != FileMode.TREE ? new String(loader.getBytes()) : null; String content = mode != FileMode.TREE ? new String(loader.getBytes()) : null;

24
org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java

@ -152,30 +152,6 @@ public class ArchiveCommand extends GitCommand<OutputStream> {
T createArchiveOutputStream(OutputStream s, Map<String, Object> o) T createArchiveOutputStream(OutputStream s, Map<String, Object> o)
throws IOException; throws IOException;
/**
* Write an entry to an archive.
*
* @param out
* archive object from createArchiveOutputStream
* @param path
* full filename relative to the root of the archive (with
* trailing '/' for directories)
* @param mode
* mode (for example FileMode.REGULAR_FILE or
* FileMode.SYMLINK)
* @param loader
* blob object with data for this entry (null for
* directories)
* @throws IOException
* thrown by the underlying output stream for I/O errors
* @deprecated use
* {@link #putEntry(Closeable, ObjectId, String, FileMode, ObjectLoader)}
* instead
*/
@Deprecated
void putEntry(T out, String path, FileMode mode,
ObjectLoader loader) throws IOException;
/** /**
* Write an entry to an archive. * Write an entry to an archive.
* *

Loading…
Cancel
Save