diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2018-03-08 09:44:01 +0900 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2018-03-11 22:46:52 +0100 |
commit | f07b60239c3e3bca7c75705c678dd32a12047e09 (patch) | |
tree | cb8e5e3f5b494852a334551ee03d22b5d3377988 /org.eclipse.jgit.archive/src/org/eclipse/jgit/archive | |
parent | 62bc48df60bc852f4f93a721b1599232133ad289 (diff) | |
download | jgit-f07b60239c3e3bca7c75705c678dd32a12047e09.tar.gz jgit-f07b60239c3e3bca7c75705c678dd32a12047e09.zip |
Consistently use Constants.CHARSET rather than StandardCharsets.UTF_8
Change-Id: I6714fc3666e1bced22abba94ceb700477349586e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.archive/src/org/eclipse/jgit/archive')
-rw-r--r-- | org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java | 7 |
1 files changed, 5 insertions, 2 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 9379f022e0..9ed60d941a 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,6 +42,8 @@ */ package org.eclipse.jgit.archive; +import static org.eclipse.jgit.lib.Constants.CHARACTER_ENCODING; + import java.io.IOException; import java.io.OutputStream; import java.text.MessageFormat; @@ -82,7 +84,8 @@ public final class TarFormat extends BaseFormat implements @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s, Map<String, Object> o) throws IOException { - TarArchiveOutputStream out = new TarArchiveOutputStream(s, "UTF-8"); //$NON-NLS-1$ + TarArchiveOutputStream out = new TarArchiveOutputStream(s, + CHARACTER_ENCODING); out.setLongFileMode(TarArchiveOutputStream.LONGFILE_POSIX); out.setBigNumberMode(TarArchiveOutputStream.BIGNUMBER_POSIX); return applyFormatOptions(out, o); @@ -97,7 +100,7 @@ public final class TarFormat extends BaseFormat implements final TarArchiveEntry entry = new TarArchiveEntry( path, TarConstants.LF_SYMLINK); entry.setLinkName(new String( - loader.getCachedBytes(100), "UTF-8")); //$NON-NLS-1$ + loader.getCachedBytes(100), CHARACTER_ENCODING)); out.putArchiveEntry(entry); out.closeArchiveEntry(); return; |