summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2018-03-08 09:44:01 +0900
committerMatthias Sohn <matthias.sohn@sap.com>2018-03-11 22:46:52 +0100
commitf07b60239c3e3bca7c75705c678dd32a12047e09 (patch)
treecb8e5e3f5b494852a334551ee03d22b5d3377988 /org.eclipse.jgit.pgm
parent62bc48df60bc852f4f93a721b1599232133ad289 (diff)
downloadjgit-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.pgm')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java4
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java4
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java4
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java6
4 files changed, 9 insertions, 9 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
index 81aeef8cdd..0bc80f7d31 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
@@ -43,7 +43,7 @@
package org.eclipse.jgit.pgm;
-import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.eclipse.jgit.lib.Constants.CHARSET;
import java.io.BufferedReader;
import java.io.IOException;
@@ -151,7 +151,7 @@ public class CommandCatalog {
final BufferedReader cIn;
try {
final InputStream in = cUrl.openStream();
- cIn = new BufferedReader(new InputStreamReader(in, UTF_8));
+ cIn = new BufferedReader(new InputStreamReader(in, CHARSET));
} catch (IOException err) {
// If we cannot read from the service list, go to the next.
//
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
index a376bc098d..75612be753 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
@@ -44,7 +44,7 @@
package org.eclipse.jgit.pgm;
-import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.eclipse.jgit.lib.Constants.CHARSET;
import java.io.File;
import java.io.IOException;
@@ -217,7 +217,7 @@ public class Main {
}
PrintWriter createErrorWriter() {
- return new PrintWriter(new OutputStreamWriter(System.err, UTF_8));
+ return new PrintWriter(new OutputStreamWriter(System.err, CHARSET));
}
private void execute(final String[] argv) throws Exception {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java
index 248eaac8ad..575a122158 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java
@@ -43,7 +43,7 @@
package org.eclipse.jgit.pgm.debug;
-import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.eclipse.jgit.lib.Constants.CHARSET;
import static org.eclipse.jgit.lib.Constants.HEAD;
import static org.eclipse.jgit.lib.Constants.MASTER;
import static org.eclipse.jgit.lib.Constants.R_HEADS;
@@ -154,7 +154,7 @@ class BenchmarkReftable extends TextBuiltin {
throws IOException, FileNotFoundException {
RefList.Builder<Ref> list = new RefList.Builder<>();
try (BufferedReader br = new BufferedReader(new InputStreamReader(
- new FileInputStream(lsRemotePath), UTF_8))) {
+ new FileInputStream(lsRemotePath), CHARSET))) {
Ref last = null;
String line;
while ((line = br.readLine()) != null) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java
index 6cbc1b082b..c5ea028be8 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java
@@ -43,7 +43,7 @@
package org.eclipse.jgit.pgm.debug;
-import static java.nio.charset.StandardCharsets.UTF_8;
+import static org.eclipse.jgit.lib.Constants.CHARSET;
import static org.eclipse.jgit.lib.Constants.HEAD;
import static org.eclipse.jgit.lib.Constants.MASTER;
import static org.eclipse.jgit.lib.Constants.R_HEADS;
@@ -192,7 +192,7 @@ class WriteReftable extends TextBuiltin {
static List<Ref> readRefs(String inputFile) throws IOException {
List<Ref> refs = new ArrayList<>();
try (BufferedReader br = new BufferedReader(
- new InputStreamReader(new FileInputStream(inputFile), UTF_8))) {
+ new InputStreamReader(new FileInputStream(inputFile), CHARSET))) {
String line;
while ((line = br.readLine()) != null) {
ObjectId id = ObjectId.fromString(line.substring(0, 40));
@@ -227,7 +227,7 @@ class WriteReftable extends TextBuiltin {
List<LogEntry> log = new ArrayList<>();
try (BufferedReader br = new BufferedReader(
- new InputStreamReader(new FileInputStream(logPath), UTF_8))) {
+ new InputStreamReader(new FileInputStream(logPath), CHARSET))) {
@SuppressWarnings("nls")
Pattern pattern = Pattern.compile("([^,]+)" // 1: ref
+ ",([0-9]+(?:[.][0-9]+)?)" // 2: time