mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-06 09:28:47 +00:00
Turkish locale toLowerCase I problem fix (causing not loading main window because of icon names conversion, etc.)
This commit is contained in:
@@ -22,6 +22,7 @@ All notable changes to this project will be documented in this file.
|
||||
- AS1/2: break on the end of for..in loop
|
||||
- AS1/2: Export selection dialog did not allow to select script export formats and/or export script at all
|
||||
- AS3 P-code - HAS_OPTIONAL flag in AVM2 code displayed twice
|
||||
- Turkish locale toLowerCase I problem fix - causing not loading main window at all
|
||||
|
||||
## [11.0.0] - 2018-01-17
|
||||
### Added
|
||||
|
||||
3
src/com/jpexs/browsers/cache/CacheEntry.java
vendored
3
src/com/jpexs/browsers/cache/CacheEntry.java
vendored
@@ -19,6 +19,7 @@ package com.jpexs.browsers.cache;
|
||||
import com.jpexs.helpers.LimitedInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.zip.InflaterInputStream;
|
||||
@@ -102,7 +103,7 @@ public abstract class CacheEntry {
|
||||
return null;
|
||||
}
|
||||
for (String k : m.keySet()) {
|
||||
if (k.toLowerCase().equals(header.toLowerCase())) {
|
||||
if (k.toLowerCase(Locale.ENGLISH).equals(header.toLowerCase(Locale.ENGLISH))) {
|
||||
return m.get(k);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -154,7 +155,7 @@ public class ChromeCache implements CacheImplementation {
|
||||
OSId id = OSId.UNIX;
|
||||
String osName = AccessController.doPrivileged(doGetOSName);
|
||||
if (osName != null) {
|
||||
if (osName.toLowerCase().startsWith("mac os x")) {
|
||||
if (osName.toLowerCase(Locale.ENGLISH).startsWith("mac os x")) {
|
||||
id = OSId.OSX;
|
||||
} else if (osName.contains("Windows")) {
|
||||
id = OSId.WINDOWS;
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -93,9 +94,9 @@ public class HttpResponseInfo {
|
||||
for (String h : headers) {
|
||||
if (h.contains(":")) {
|
||||
String[] keyval = h.split(":");
|
||||
String key = keyval[0].trim().toLowerCase();
|
||||
String key = keyval[0].trim().toLowerCase(Locale.ENGLISH);
|
||||
String val = keyval[1].trim();
|
||||
if (header.toLowerCase().equals(key)) {
|
||||
if (header.toLowerCase(Locale.ENGLISH).equals(key)) {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -97,7 +98,7 @@ public class FirefoxCache implements CacheImplementation {
|
||||
OSId id = OSId.UNIX;
|
||||
String osName = AccessController.doPrivileged(doGetOSName);
|
||||
if (osName != null) {
|
||||
if (osName.toLowerCase().startsWith("mac os x")) {
|
||||
if (osName.toLowerCase(Locale.ENGLISH).startsWith("mac os x")) {
|
||||
id = OSId.OSX;
|
||||
} else if (osName.contains("Windows")) {
|
||||
id = OSId.WINDOWS;
|
||||
|
||||
@@ -774,7 +774,7 @@ public class CommandLineArgumentParser {
|
||||
while (true) {
|
||||
nextParamOriginal = args.pop();
|
||||
if (nextParamOriginal != null) {
|
||||
nextParam = nextParamOriginal.toLowerCase();
|
||||
nextParam = nextParamOriginal.toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
if (nextParam == null) {
|
||||
nextParam = "";
|
||||
@@ -1025,7 +1025,7 @@ public class CommandLineArgumentParser {
|
||||
cp = new String[]{cp[0], "1"};
|
||||
}
|
||||
|
||||
Field field = fields.get(cp[0].toLowerCase());
|
||||
Field field = fields.get(cp[0].toLowerCase(Locale.ENGLISH));
|
||||
ConfigurationItem<?> item = ConfigurationItem.getItem(field);
|
||||
String stringValue = cp[1];
|
||||
Class<?> type = ConfigurationItem.getConfigurationFieldType(field);
|
||||
@@ -1078,7 +1078,7 @@ public class CommandLineArgumentParser {
|
||||
}
|
||||
|
||||
Boolean bValue = null;
|
||||
value = value.toLowerCase();
|
||||
value = value.toLowerCase(Locale.ENGLISH);
|
||||
if (value.equals("0") || value.equals("false") || value.equals("no") || value.equals("off")) {
|
||||
bValue = false;
|
||||
}
|
||||
@@ -1139,7 +1139,7 @@ public class CommandLineArgumentParser {
|
||||
File stdOutFile = null;
|
||||
File swfFile = null;
|
||||
while (!args.isEmpty()) {
|
||||
String paramName = args.pop().toLowerCase();
|
||||
String paramName = args.pop().toLowerCase(Locale.ENGLISH);
|
||||
switch (paramName) {
|
||||
case "-outfile":
|
||||
if (args.empty()) {
|
||||
@@ -1188,7 +1188,7 @@ public class CommandLineArgumentParser {
|
||||
File swfFile = null;
|
||||
|
||||
while (!args.empty()) {
|
||||
String paramName = args.pop().toLowerCase();
|
||||
String paramName = args.pop().toLowerCase(Locale.ENGLISH);
|
||||
if (processedParams.contains(paramName)) {
|
||||
System.err.println("Parameter " + paramName + " can appear only once.");
|
||||
}
|
||||
@@ -1333,7 +1333,7 @@ public class CommandLineArgumentParser {
|
||||
File valueFile = null;
|
||||
|
||||
while (!args.empty()) {
|
||||
String paramName = args.pop().toLowerCase();
|
||||
String paramName = args.pop().toLowerCase(Locale.ENGLISH);
|
||||
if (processedParams.contains(paramName)) {
|
||||
System.err.println("Parameter " + paramName + " can appear only once.");
|
||||
}
|
||||
@@ -1540,7 +1540,7 @@ public class CommandLineArgumentParser {
|
||||
File swfFile = null;
|
||||
File outFile = null;
|
||||
while (!args.empty()) {
|
||||
String paramName = args.pop().toLowerCase();
|
||||
String paramName = args.pop().toLowerCase(Locale.ENGLISH);
|
||||
if (processedParams.contains(paramName)) {
|
||||
System.err.println("Parameter " + paramName + " can appear only once.");
|
||||
}
|
||||
@@ -1914,7 +1914,7 @@ public class CommandLineArgumentParser {
|
||||
}
|
||||
|
||||
private static void parseDebugTool(Stack<String> args) {
|
||||
String cmd = args.pop().toLowerCase();
|
||||
String cmd = args.pop().toLowerCase(Locale.ENGLISH);
|
||||
switch (cmd) {
|
||||
case "findtag": {
|
||||
String folder = args.pop();
|
||||
@@ -2026,7 +2026,7 @@ public class CommandLineArgumentParser {
|
||||
}
|
||||
|
||||
private static void parseCompareResources(Stack<String> args) {
|
||||
String revision = args.pop().toLowerCase();
|
||||
String revision = args.pop().toLowerCase(Locale.ENGLISH);
|
||||
String revision2 = null;
|
||||
if (!args.isEmpty()) {
|
||||
revision2 = args.pop();
|
||||
@@ -2102,7 +2102,7 @@ public class CommandLineArgumentParser {
|
||||
handler = new ConsoleAbortRetryIgnoreHandler(AbortRetryIgnoreHandler.UNDEFINED, 0);
|
||||
}
|
||||
|
||||
String exportFormatString = args.pop().toLowerCase();
|
||||
String exportFormatString = args.pop().toLowerCase(Locale.ENGLISH);
|
||||
List<String> exportFormats = Arrays.asList(exportFormatString.split(","));
|
||||
long startTime = System.currentTimeMillis();
|
||||
|
||||
@@ -2399,7 +2399,7 @@ public class CommandLineArgumentParser {
|
||||
outFile = Path.combine(outFile, exportFormat);
|
||||
};
|
||||
|
||||
String outFileName = inFile.getName().toLowerCase().endsWith(".swf") ? inFile.getName().substring(0, inFile.getName().length() - 3) + exportFormat : inFile.getName();
|
||||
String outFileName = inFile.getName().toLowerCase(Locale.ENGLISH).endsWith(".swf") ? inFile.getName().substring(0, inFile.getName().length() - 3) + exportFormat : inFile.getName();
|
||||
outFile = Path.combine(outFile, outFileName);
|
||||
XFLExportSettings settings = new XFLExportSettings();
|
||||
settings.compressed = compressed;
|
||||
@@ -2495,7 +2495,7 @@ public class CommandLineArgumentParser {
|
||||
SWFCompression compression = SWFCompression.ZLIB;
|
||||
String compressionString = !args.isEmpty() ? args.pop() : null;
|
||||
if (compressionString != null) {
|
||||
switch (compressionString.toLowerCase()) {
|
||||
switch (compressionString.toLowerCase(Locale.ENGLISH)) {
|
||||
case "zlib":
|
||||
compression = SWFCompression.ZLIB;
|
||||
break;
|
||||
@@ -2598,7 +2598,7 @@ public class CommandLineArgumentParser {
|
||||
boolean noCheck = false;
|
||||
String output = null;
|
||||
|
||||
if (args.size() > 0 && args.peek().toLowerCase().equals("-o")) {
|
||||
if (args.size() > 0 && args.peek().toLowerCase(Locale.ENGLISH).equals("-o")) {
|
||||
args.pop();
|
||||
if (args.size() < 1) {
|
||||
badArguments("extract");
|
||||
@@ -2606,13 +2606,13 @@ public class CommandLineArgumentParser {
|
||||
output = args.pop();
|
||||
}
|
||||
|
||||
if (args.size() > 0 && args.peek().toLowerCase().equals("nocheck")) {
|
||||
if (args.size() > 0 && args.peek().toLowerCase(Locale.ENGLISH).equals("nocheck")) {
|
||||
noCheck = true;
|
||||
args.pop();
|
||||
}
|
||||
|
||||
if (args.size() > 0) {
|
||||
String modeStr = args.pop().toLowerCase();
|
||||
String modeStr = args.pop().toLowerCase(Locale.ENGLISH);
|
||||
switch (modeStr) {
|
||||
case "biggest":
|
||||
mode = SearchMode.BIGGEST;
|
||||
@@ -2766,7 +2766,7 @@ public class CommandLineArgumentParser {
|
||||
|
||||
String renameTypeStr = args.pop();
|
||||
RenameType renameType;
|
||||
switch (renameTypeStr.toLowerCase()) {
|
||||
switch (renameTypeStr.toLowerCase(Locale.ENGLISH)) {
|
||||
case "typenumber":
|
||||
renameType = RenameType.TYPENUMBER;
|
||||
break;
|
||||
@@ -2813,7 +2813,7 @@ public class CommandLineArgumentParser {
|
||||
badArguments("format");
|
||||
}
|
||||
String[] parts = fmt.split(":");
|
||||
ret.put(parts[0].toLowerCase(), parts[1].toLowerCase());
|
||||
ret.put(parts[0].toLowerCase(Locale.ENGLISH), parts[1].toLowerCase(Locale.ENGLISH));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@@ -2960,7 +2960,7 @@ public class CommandLineArgumentParser {
|
||||
} else if (characterTag instanceof SoundTag) {
|
||||
SoundTag st = (SoundTag) characterTag;
|
||||
int soundFormat = SoundFormat.FORMAT_UNCOMPRESSED_LITTLE_ENDIAN;
|
||||
if (repFile.toLowerCase().endsWith(".mp3")) {
|
||||
if (repFile.toLowerCase(Locale.ENGLISH).endsWith(".mp3")) {
|
||||
soundFormat = SoundFormat.FORMAT_MP3;
|
||||
}
|
||||
boolean ok = st.setSound(new ByteArrayInputStream(data), soundFormat);
|
||||
@@ -3051,7 +3051,7 @@ public class CommandLineArgumentParser {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int res = ImageImporter.getImageTagType(args.peek().toLowerCase());
|
||||
int res = ImageImporter.getImageTagType(args.peek().toLowerCase(Locale.ENGLISH));
|
||||
if (res != 0) {
|
||||
args.pop();
|
||||
}
|
||||
@@ -3187,7 +3187,7 @@ public class CommandLineArgumentParser {
|
||||
try {
|
||||
try (FileInputStream is = new FileInputStream(inFile)) {
|
||||
SWF swf = new SWF(is, Configuration.parallelSpeedUp.get());
|
||||
String arg = args.pop().toLowerCase();
|
||||
String arg = args.pop().toLowerCase(Locale.ENGLISH);
|
||||
if (arg.equals("pack")) {
|
||||
swf.packCharacterIds();
|
||||
} else if (arg.equals("sort")) {
|
||||
@@ -3259,7 +3259,7 @@ public class CommandLineArgumentParser {
|
||||
}
|
||||
|
||||
CharacterTag characterTag = swf.getCharacter(characterId);
|
||||
String targetType = args.pop().toLowerCase();
|
||||
String targetType = args.pop().toLowerCase(Locale.ENGLISH);
|
||||
if (characterTag instanceof ImageTag) {
|
||||
int format = ImageImporter.getImageTagType(targetType);
|
||||
ImageTag imageTag = (ImageTag) characterTag;
|
||||
@@ -3916,7 +3916,7 @@ public class CommandLineArgumentParser {
|
||||
swf = new SWF(fis, Configuration.parallelSpeedUp.get());
|
||||
fis.close();
|
||||
String outSwd = outfile;
|
||||
if (outSwd.toLowerCase().endsWith(".swf")) {
|
||||
if (outSwd.toLowerCase(Locale.ENGLISH).endsWith(".swf")) {
|
||||
outSwd = outSwd.substring(0, outSwd.length() - 4) + ".swd";
|
||||
} else {
|
||||
outSwd = outSwd + ".swd";
|
||||
@@ -3968,7 +3968,7 @@ public class CommandLineArgumentParser {
|
||||
}
|
||||
|
||||
private static FilenameFilter getSwfFilter() {
|
||||
return (File dir, String name) -> name.toLowerCase().endsWith(".swf");
|
||||
return (File dir, String name) -> name.toLowerCase(Locale.ENGLISH).endsWith(".swf");
|
||||
}
|
||||
|
||||
private static <E extends Enum> E enumFromStr(String str, Class<E> cls) {
|
||||
@@ -3977,7 +3977,7 @@ public class CommandLineArgumentParser {
|
||||
return vals[0];
|
||||
}
|
||||
for (E e : vals) {
|
||||
if (e.toString().toLowerCase().replace("_", "").equals(str.toLowerCase().replace("_", ""))) {
|
||||
if (e.toString().toLowerCase(Locale.ENGLISH).replace("_", "").equals(str.toLowerCase(Locale.ENGLISH).replace("_", ""))) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.jpexs.decompiler.flash.console;
|
||||
|
||||
import com.jpexs.decompiler.flash.AbortRetryIgnoreHandler;
|
||||
import java.util.Locale;
|
||||
import java.util.Scanner;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
@@ -57,7 +58,7 @@ public class ConsoleAbortRetryIgnoreHandler implements AbortRetryIgnoreHandler {
|
||||
do {
|
||||
System.out.print("Select action: (A)bort, (R)Retry, (I)Ignore:");
|
||||
String n = sc.nextLine();
|
||||
switch (n.toLowerCase()) {
|
||||
switch (n.toLowerCase(Locale.ENGLISH)) {
|
||||
case "a":
|
||||
return AbortRetryIgnoreHandler.ABORT;
|
||||
case "r":
|
||||
|
||||
@@ -54,6 +54,7 @@ import java.awt.FlowLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JComboBox;
|
||||
@@ -168,7 +169,7 @@ public class ExportDialog extends AppDialog {
|
||||
int selIndex = combos[i].getSelectedIndex();
|
||||
Class c = optionClasses[i];
|
||||
Object[] vals = c.getEnumConstants();
|
||||
String key = optionNames[i] + "." + vals[selIndex].toString().toLowerCase();
|
||||
String key = optionNames[i] + "." + vals[selIndex].toString().toLowerCase(Locale.ENGLISH);
|
||||
if (i > 0) {
|
||||
cfg.append(",");
|
||||
}
|
||||
@@ -276,7 +277,7 @@ public class ExportDialog extends AppDialog {
|
||||
int itemIndex = -1;
|
||||
for (int j = 0; j < vals.length; j++) {
|
||||
|
||||
String key = optionNames[i] + "." + vals[j].toString().toLowerCase();
|
||||
String key = optionNames[i] + "." + vals[j].toString().toLowerCase(Locale.ENGLISH);
|
||||
if (exportFormats.contains(key)) {
|
||||
itemIndex = j;
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ public class Main {
|
||||
}
|
||||
if (instrSWF != null) {
|
||||
String swfFileName = fTempFile.getAbsolutePath();
|
||||
if (swfFileName.toLowerCase().endsWith(".swf")) {
|
||||
if (swfFileName.toLowerCase(Locale.ENGLISH).endsWith(".swf")) {
|
||||
swfFileName = swfFileName.substring(0, swfFileName.length() - 4) + ".swd";
|
||||
} else {
|
||||
swfFileName = swfFileName + ".swd";
|
||||
@@ -806,7 +806,7 @@ public class Main {
|
||||
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
String name = f.getName().toLowerCase();
|
||||
String name = f.getName().toLowerCase(Locale.ENGLISH);
|
||||
for (String ext : supportedExtensions) {
|
||||
if (name.endsWith(ext)) {
|
||||
return true;
|
||||
@@ -825,7 +825,7 @@ public class Main {
|
||||
FileFilter swfFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().toLowerCase().endsWith(".swf")) || (f.isDirectory());
|
||||
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".swf")) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -838,7 +838,7 @@ public class Main {
|
||||
FileFilter gfxFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().toLowerCase().endsWith(".gfx")) || (f.isDirectory());
|
||||
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".gfx")) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1354,7 +1354,7 @@ public class Main {
|
||||
FileFilter swfFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().toLowerCase().endsWith(".swf")) || (f.isDirectory());
|
||||
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".swf")) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1366,7 +1366,7 @@ public class Main {
|
||||
FileFilter gfxFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().toLowerCase().endsWith(".gfx")) || (f.isDirectory());
|
||||
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".gfx")) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1405,7 +1405,7 @@ public class Main {
|
||||
FileFilter exeFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().toLowerCase().endsWith(fext)) || (f.isDirectory());
|
||||
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(fext)) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1431,13 +1431,13 @@ public class Main {
|
||||
try {
|
||||
String fileName = file.getAbsolutePath();
|
||||
if (selFilter == swfFilter) {
|
||||
if (!fileName.toLowerCase().endsWith(extension)) {
|
||||
if (!fileName.toLowerCase(Locale.ENGLISH).endsWith(extension)) {
|
||||
fileName += extension;
|
||||
}
|
||||
swf.gfx = false;
|
||||
}
|
||||
if (selFilter == gfxFilter) {
|
||||
if (!fileName.toLowerCase().endsWith(".gfx")) {
|
||||
if (!fileName.toLowerCase(Locale.ENGLISH).endsWith(".gfx")) {
|
||||
fileName += ".gfx";
|
||||
}
|
||||
swf.gfx = true;
|
||||
@@ -1465,7 +1465,7 @@ public class Main {
|
||||
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
String name = f.getName().toLowerCase();
|
||||
String name = f.getName().toLowerCase(Locale.ENGLISH);
|
||||
for (String ext : supportedExtensions) {
|
||||
if (name.endsWith(ext)) {
|
||||
return true;
|
||||
@@ -1484,7 +1484,7 @@ public class Main {
|
||||
FileFilter swfFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().toLowerCase().endsWith(".swf")) || (f.isDirectory());
|
||||
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".swf")) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1497,7 +1497,7 @@ public class Main {
|
||||
FileFilter swcFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().toLowerCase().endsWith(".swc")) || (f.isDirectory());
|
||||
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".swc")) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1510,7 +1510,7 @@ public class Main {
|
||||
FileFilter gfxFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().toLowerCase().endsWith(".gfx")) || (f.isDirectory());
|
||||
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".gfx")) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1523,7 +1523,7 @@ public class Main {
|
||||
FileFilter iggyFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().toLowerCase().endsWith(".iggy")) || (f.isDirectory());
|
||||
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".iggy")) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1536,7 +1536,7 @@ public class Main {
|
||||
FileFilter zipFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().toLowerCase().endsWith(".zip")) || (f.isDirectory());
|
||||
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".zip")) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -193,6 +193,7 @@ import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Random;
|
||||
@@ -2108,7 +2109,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
FileFilter f = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return f.isDirectory() || (f.getName().toLowerCase().endsWith(".fla"));
|
||||
return f.isDirectory() || (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".fla"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2125,7 +2126,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
f = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return f.isDirectory() || (f.getName().toLowerCase().endsWith(".xfl"));
|
||||
return f.isDirectory() || (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".xfl"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2761,7 +2762,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
File selfile = Helper.fixDialogFile(selectedFile);
|
||||
DefineSoundTag ds = (DefineSoundTag) item;
|
||||
int soundFormat = SoundFormat.FORMAT_UNCOMPRESSED_LITTLE_ENDIAN;
|
||||
if (selfile.getName().toLowerCase().endsWith(".mp3")) {
|
||||
if (selfile.getName().toLowerCase(Locale.ENGLISH).endsWith(".mp3")) {
|
||||
soundFormat = SoundFormat.FORMAT_MP3;
|
||||
}
|
||||
|
||||
@@ -2969,7 +2970,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
if (f.isDirectory()) {
|
||||
return true;
|
||||
}
|
||||
String fileName = f.getName().toLowerCase();
|
||||
String fileName = f.getName().toLowerCase(Locale.ENGLISH);
|
||||
for (String ext : extensions) {
|
||||
if (fileName.endsWith(ext)) {
|
||||
return true;
|
||||
|
||||
@@ -27,6 +27,7 @@ import com.jpexs.decompiler.flash.treeitems.AS3ClassTreeItem;
|
||||
import com.jpexs.decompiler.graph.DottedChain;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import javax.swing.event.TreeModelEvent;
|
||||
import javax.swing.event.TreeModelListener;
|
||||
import javax.swing.tree.TreeModel;
|
||||
@@ -80,11 +81,11 @@ public class ClassesListTreeModel extends AS3ClassTreeItem implements TreeModel
|
||||
getSwf().getFlexMainClass(ignoredClasses, ignoredNss);
|
||||
}
|
||||
|
||||
filter = (filter == null || filter.isEmpty()) ? null : filter.toLowerCase();
|
||||
filter = (filter == null || filter.isEmpty()) ? null : filter.toLowerCase(Locale.ENGLISH);
|
||||
loop:
|
||||
for (ScriptPack item : list) {
|
||||
if (filter != null) {
|
||||
if (!item.getClassPath().toString().toLowerCase().contains(filter)) {
|
||||
if (!item.getClassPath().toString().toLowerCase(Locale.ENGLISH).contains(filter)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.swing.BoxLayout;
|
||||
@@ -402,7 +403,7 @@ public class ProxyFrame extends AppFrame implements CatchedListener, MouseListen
|
||||
FileFilter swfFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().toLowerCase().endsWith(extension)) || (f.isDirectory());
|
||||
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(extension)) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -473,7 +474,7 @@ public class ProxyFrame extends AppFrame implements CatchedListener, MouseListen
|
||||
FileFilter swfFilter = new FileFilter() {
|
||||
@Override
|
||||
public boolean accept(File f) {
|
||||
return (f.getName().toLowerCase().endsWith(extension)) || (f.isDirectory());
|
||||
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(extension)) || (f.isDirectory());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -121,6 +121,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JTree;
|
||||
@@ -146,7 +147,7 @@ public class TagTree extends JTree {
|
||||
ICONS = new HashMap<>();
|
||||
for (TreeNodeType treeNodeType : TreeNodeType.values()) {
|
||||
if (treeNodeType != TreeNodeType.UNKNOWN && treeNodeType != TreeNodeType.SHOW_FRAME) {
|
||||
String tagTypeStr = treeNodeType.toString().toLowerCase().replace("_", "");
|
||||
String tagTypeStr = treeNodeType.toString().toLowerCase(Locale.ENGLISH).replace("_", "");
|
||||
ICONS.put(treeNodeType, View.getIcon(tagTypeStr + "16"));
|
||||
}
|
||||
}
|
||||
@@ -206,7 +207,7 @@ public class TagTree extends JTree {
|
||||
FolderItem si = (FolderItem) val;
|
||||
if (!TagTreeRoot.FOLDER_ROOT.equals(si.getName())) {
|
||||
String itemName = "folder" + si.getName();
|
||||
setIcon(View.getIcon(itemName.toLowerCase() + "16"));
|
||||
setIcon(View.getIcon(itemName.toLowerCase(Locale.ENGLISH) + "16"));
|
||||
}
|
||||
} else {
|
||||
setIcon(ICONS.get(type));
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.sun.jna.platform.win32.WinDef.DWORD;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user