Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse2018-03-08 00:44:01 +0000
committerMatthias Sohn2018-03-11 21:46:52 +0000
commitf07b60239c3e3bca7c75705c678dd32a12047e09 (patch)
treecb8e5e3f5b494852a334551ee03d22b5d3377988 /org.eclipse.jgit.archive
parent62bc48df60bc852f4f93a721b1599232133ad289 (diff)
downloadjgit-f07b60239c3e3bca7c75705c678dd32a12047e09.tar.gz
jgit-f07b60239c3e3bca7c75705c678dd32a12047e09.tar.xz
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')
-rw-r--r--org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java7
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;

Back to the top