mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-13455 do not mark Base64 as deprecated
This commit is contained in:
@@ -16,9 +16,8 @@
|
||||
package com.intellij.util;
|
||||
|
||||
/**
|
||||
* @deprecated Please use java.util.Base64
|
||||
* DEPRECATED, please use java.util.Base64
|
||||
*/
|
||||
@Deprecated
|
||||
public class Base64 {
|
||||
private Base64() { }
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -16,7 +16,7 @@
|
||||
package com.intellij.openapi.diagnostic;
|
||||
|
||||
import com.intellij.openapi.vfs.CharsetToolkit;
|
||||
import com.intellij.util.Base64Converter;
|
||||
import com.intellij.util.Base64;
|
||||
import com.intellij.util.ExceptionUtil;
|
||||
import com.intellij.util.PathUtilRt;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -66,7 +66,7 @@ public class Attachment {
|
||||
|
||||
@NotNull
|
||||
public String getEncodedBytes() {
|
||||
return Base64Converter.encode(myBytes);
|
||||
return Base64.encode(myBytes);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
* @deprecated Please use java.util.Base64
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@Deprecated
|
||||
public class Base64Converter {
|
||||
private static final char[] alphabet = {
|
||||
|
||||
@@ -18,7 +18,7 @@ package com.intellij.util.io;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.CharsetToolkit;
|
||||
import com.intellij.util.Base64Converter;
|
||||
import com.intellij.util.Base64;
|
||||
import com.intellij.util.ThreeState;
|
||||
import gnu.trove.TIntArrayList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -260,7 +260,7 @@ public class URLUtil {
|
||||
try {
|
||||
String content = matcher.group(4);
|
||||
return ";base64".equalsIgnoreCase(matcher.group(3))
|
||||
? Base64Converter.decode(content.getBytes(CharsetToolkit.UTF8_CHARSET))
|
||||
? Base64.decode(content)
|
||||
: content.getBytes(CharsetToolkit.UTF8_CHARSET);
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
|
||||
+4
-3
@@ -20,8 +20,9 @@ import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vfs.CharsetToolkit;
|
||||
import com.intellij.util.ArrayUtilRt;
|
||||
import com.intellij.util.Base64Converter;
|
||||
import com.intellij.util.Base64;
|
||||
import com.intellij.util.PathUtilRt;
|
||||
import com.intellij.util.io.ZipUtil;
|
||||
|
||||
@@ -325,7 +326,7 @@ public abstract class AbstractJavaFxPackager {
|
||||
}
|
||||
|
||||
private String getKeypass(boolean selfSigning) {
|
||||
return selfSigning ? "keypass" : Base64Converter.decode(getKeypass());
|
||||
return selfSigning ? "keypass" : new String(Base64.decode(getKeypass()), CharsetToolkit.UTF8_CHARSET);
|
||||
}
|
||||
|
||||
private String getKeystore(boolean selfSigning) {
|
||||
@@ -333,7 +334,7 @@ public abstract class AbstractJavaFxPackager {
|
||||
}
|
||||
|
||||
private String getStorepass(boolean selfSigning) {
|
||||
return selfSigning ? "storepass" : Base64Converter.decode(getStorepass());
|
||||
return selfSigning ? "storepass" : new String(Base64.decode(getStorepass()), CharsetToolkit.UTF8_CHARSET);
|
||||
}
|
||||
|
||||
public abstract String getKeypass();
|
||||
|
||||
Reference in New Issue
Block a user