警告我被加密一些文字,爲我所用BASE64Encoder
訪問限制在BASE64Encoder
String encryptedValue = new BASE64Encoder().encode(encVal);
但我得到一個警告
The constructor 'BASE64Encoder()' is not API (restriction on required library 'C:\Program Files (x86)\Java\jdk1.8.0_45\jre\lib\rt.jar')
The method 'CharacterEncoder.encode(byte[])' is not API (restriction on required library 'C:\Program Files (x86)\Java\jdk1.8.0_45\jre\lib\rt.jar')
Access restriction: The type 'BASE64Encoder' is not API (restriction on required library 'C:\Program Files (x86)\Java\jdk1.8.0_45\jre\lib\rt.jar')
我可以@SuppressWarnings("restriction")
禁止這種警告。但我想知道爲什麼我得到這個警告。它會在以後造成問題嗎?