]> source.dussan.org Git - jgit.git/commitdiff
Constants: remove deprecated #CHARSET and #CHARACTER_ENCODING 96/1200396/2
authorMatthias Sohn <matthias.sohn@sap.com>
Fri, 30 Aug 2024 15:28:57 +0000 (17:28 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 3 Sep 2024 14:11:03 +0000 (16:11 +0200)
Change-Id: If2d3c1a96560e0bc5e352bdbcab4c191cbed1a42

org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java

index 8599bf7dbc9c73e8821a28eeed45723f6609be57..3eb35be79a03aef742839fd6ae60103f516c2876 100644 (file)
@@ -15,7 +15,6 @@ package org.eclipse.jgit.lib;
 import static java.nio.charset.StandardCharsets.UTF_8;
 
 import java.nio.ByteBuffer;
-import java.nio.charset.Charset;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.text.MessageFormat;
@@ -203,24 +202,6 @@ public final class Constants {
         */
        public static final byte[] PACK_SIGNATURE = { 'P', 'A', 'C', 'K' };
 
-       /**
-        * Native character encoding for commit messages, file names...
-        *
-        * @deprecated Use {@link java.nio.charset.StandardCharsets#UTF_8} directly
-        *             instead.
-        */
-       @Deprecated
-       public static final Charset CHARSET;
-
-       /**
-        * Native character encoding for commit messages, file names...
-        *
-        * @deprecated Use {@link java.nio.charset.StandardCharsets#UTF_8} directly
-        *             instead.
-        */
-       @Deprecated
-       public static final String CHARACTER_ENCODING;
-
        /** Default main branch name */
        public static final String MASTER = "master";
 
@@ -745,13 +726,12 @@ public final class Constants {
        }
 
        /**
-        * Convert a string to a byte array in the standard character encoding.
+        * Convert a string to a byte array in the standard character encoding UTF8.
         *
         * @param str
         *            the string to convert. May contain any Unicode characters.
         * @return a byte array representing the requested string, encoded using the
         *         default character encoding (UTF-8).
-        * @see #CHARACTER_ENCODING
         */
        public static byte[] encode(String str) {
                final ByteBuffer bb = UTF_8.encode(str);
@@ -770,8 +750,6 @@ public final class Constants {
        static {
                if (OBJECT_ID_LENGTH != newMessageDigest().getDigestLength())
                        throw new LinkageError(JGitText.get().incorrectOBJECT_ID_LENGTH);
-               CHARSET = UTF_8;
-               CHARACTER_ENCODING = UTF_8.name();
        }
 
        /** name of the file containing the commit msg for a merge commit */