diff options
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java index 470ed02841..335abe1b5b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java @@ -45,6 +45,8 @@ package org.eclipse.jgit.treewalk; +import static java.nio.charset.StandardCharsets.UTF_8; + import java.io.IOException; import java.nio.ByteBuffer; import java.nio.CharBuffer; @@ -182,7 +184,7 @@ public abstract class AbstractTreeIterator { if (prefix != null && prefix.length() > 0) { final ByteBuffer b; - b = Constants.CHARSET.encode(CharBuffer.wrap(prefix)); + b = UTF_8.encode(CharBuffer.wrap(prefix)); pathLen = b.limit(); path = new byte[Math.max(DEFAULT_PATH_SIZE, pathLen + 1)]; b.get(path, 0, pathLen); |