diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2018-09-29 14:39:56 +0900 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-06-19 10:43:01 +0200 |
commit | f18b5010fcf750e6949e53dca292db9f2b4dc57d (patch) | |
tree | d3c7db6a7e4f5d6bbb48fae9e483545f52a7d761 /org.eclipse.jgit.archive | |
parent | 9387288a8612eb9e9478c5ecfe4b1351a0ed4717 (diff) | |
download | jgit-f18b5010fcf750e6949e53dca292db9f2b4dc57d.tar.gz jgit-f18b5010fcf750e6949e53dca292db9f2b4dc57d.zip |
Deprecate Constants.CHARACTER_ENCODING in favor of StandardCharsets.UTF_8
Change-Id: I621ba174235a6fb56236e54d24bce704bb5afb28
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.archive')
-rw-r--r-- | org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java index 9ed60d941a..aee80d8307 100644 --- a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java +++ b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java @@ -42,7 +42,7 @@ */ package org.eclipse.jgit.archive; -import static org.eclipse.jgit.lib.Constants.CHARACTER_ENCODING; +import static java.nio.charset.StandardCharsets.UTF_8; import java.io.IOException; import java.io.OutputStream; @@ -85,7 +85,7 @@ public final class TarFormat extends BaseFormat implements public ArchiveOutputStream createArchiveOutputStream(OutputStream s, Map<String, Object> o) throws IOException { TarArchiveOutputStream out = new TarArchiveOutputStream(s, - CHARACTER_ENCODING); + UTF_8.name()); out.setLongFileMode(TarArchiveOutputStream.LONGFILE_POSIX); out.setBigNumberMode(TarArchiveOutputStream.BIGNUMBER_POSIX); return applyFormatOptions(out, o); @@ -99,8 +99,7 @@ public final class TarFormat extends BaseFormat implements if (mode == FileMode.SYMLINK) { final TarArchiveEntry entry = new TarArchiveEntry( path, TarConstants.LF_SYMLINK); - entry.setLinkName(new String( - loader.getCachedBytes(100), CHARACTER_ENCODING)); + entry.setLinkName(new String(loader.getCachedBytes(100), UTF_8)); out.putArchiveEntry(entry); out.closeArchiveEntry(); return; |