Browse Source

弃用BASE64Decoder

huangct 8 years ago
parent
commit
f5b4dc212a

+ 3 - 4
src/main/java/com/uas/platform/b2b/service/impl/SOAPConsoleServiceImpl.java

@@ -13,8 +13,6 @@ import com.uas.sso.common.encrypt.base64.Base64;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.ui.ModelMap;
-import sun.misc.BASE64Decoder;
-
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -1201,9 +1199,10 @@ public class SOAPConsoleServiceImpl implements SOAPConsoleService {
         byte[] b = null;
         String result = null;
         if (s != null) {
-            BASE64Decoder decoder = new BASE64Decoder();
+            //BASE64Decoder decoder = new BASE64Decoder();
             try {
-                b = decoder.decodeBuffer(s);
+                //b = decoder.decodeBuffer(s);
+                b = Base64.decode(s);
                 result = new String(b, "GB2312");
             } catch (Exception e) {
                 e.printStackTrace();