mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-30 23:14:52 +00:00
java 9 compliance
- base64, bytearrtohex, installed fonts, xml sax parser
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.helpers;
|
||||
|
||||
import com.jpexs.decompiler.flash.AppResources;
|
||||
@@ -50,6 +51,7 @@ import java.net.URLConnection;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Base64;
|
||||
import java.util.BitSet;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
@@ -60,7 +62,6 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Class with helper method
|
||||
@@ -884,11 +885,7 @@ public class Helper {
|
||||
}
|
||||
try {
|
||||
f.setAccessible(true);
|
||||
f.setAccessible(true);
|
||||
|
||||
Field modifiersField = Field.class.getDeclaredField("modifiers");
|
||||
modifiersField.setAccessible(true);
|
||||
modifiersField.setInt(f, f.getModifiers() & ~Modifier.FINAL);
|
||||
|
||||
Object v = f.get(obj);
|
||||
if (v != null) {
|
||||
try {
|
||||
@@ -911,7 +908,7 @@ public class Helper {
|
||||
|
||||
f.set(obj, null);
|
||||
}
|
||||
}
|
||||
} catch (UnsupportedOperationException | SecurityException | IllegalArgumentException | IllegalAccessException ex) {
|
||||
throw new Error(ex);
|
||||
}
|
||||
}
|
||||
@@ -1423,11 +1420,11 @@ public class Helper {
|
||||
}
|
||||
|
||||
public static String byteArrayToBase64String(byte[] data) {
|
||||
public static String byteArrayToBase64String(byte[] data) {
|
||||
return Base64.getEncoder().encodeToString(data);
|
||||
}
|
||||
|
||||
public static byte[] base64StringToByteArray(String base64) {
|
||||
public static byte[] base64StringToByteArray(String base64) {
|
||||
return Base64.getDecoder().decode(base64);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user