mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
revert to use encodeHexString (Guava also has difference, so, revert as before)
This commit is contained in:
@@ -8,13 +8,13 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.JarFileSystem;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Base64;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -76,7 +76,7 @@ public class RequiredLibrariesInfo {
|
||||
md5.update(file.contentsToByteArray());
|
||||
final byte[] digest = md5.digest();
|
||||
|
||||
return Base64.getEncoder().encodeToString(digest);
|
||||
return new String(Hex.encodeHex(digest));
|
||||
}
|
||||
catch (Exception e) {
|
||||
return null;
|
||||
|
||||
@@ -24,5 +24,6 @@
|
||||
<orderEntry type="module" module-name="intellij.platform.vcs.tests" scope="TEST" />
|
||||
<orderEntry type="library" scope="TEST" name="XStream" level="project" />
|
||||
<orderEntry type="library" name="miglayout-swing" level="project" />
|
||||
<orderEntry type="library" name="commons-codec" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -11,6 +11,7 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.vcs.log.Hash;
|
||||
import com.intellij.vcs.log.VcsLogObjectsFactory;
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.zmlx.hg4idea.HgNameWithHashInfo;
|
||||
@@ -104,7 +105,7 @@ public class HgRepositoryReader {
|
||||
public String readCurrentRevision() {
|
||||
if (!isDirStateInfoAvailable()) return null;
|
||||
try {
|
||||
return Base64.getEncoder().encodeToString(readHashBytesFromFile(myDirStateFile));
|
||||
return Hex.encodeHexString(readHashBytesFromFile(myDirStateFile));
|
||||
}
|
||||
catch (IOException e) {
|
||||
// dirState exists if not fresh, if we could not load dirState info repository must be corrupted
|
||||
|
||||
Reference in New Issue
Block a user