Updated Java to 21 and pom.xml to shade

This commit is contained in:
2024-03-19 09:40:46 +01:00
parent edcd8062bc
commit 9bb9c5669d
7 changed files with 96 additions and 93 deletions
-3
View File
@@ -3,11 +3,8 @@ package alg.ngram;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import com.sun.xml.internal.bind.v2.runtime.reflect.Lister;
import data.*;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
-2
View File
@@ -194,8 +194,6 @@ public class CorpusTab {
}
public void initialize() {
updateTooltipBehavior(0.0, 30000.0,0.0, true);
// add CSS style
corpusTabPane.getStylesheets().add("style.css");
corpusTabPane.getStyleClass().add("root");
+4 -23
View File
@@ -61,23 +61,13 @@ public final class I18N {
public static String get(final String key, final Object... args) {
ResourceBundle bundle = ResourceBundle.getBundle("message", getLocale());
String val = bundle.getString(key);
try {
return MessageFormat.format(new String(val.getBytes("ISO-8859-1"), "UTF-8"), args);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return val;
return MessageFormat.format(val, args);
}
public static String getDefaultLocaleItem(final String key, final Object... args) {
ResourceBundle bundle = ResourceBundle.getBundle("message", getDefaultLocale());
String val = bundle.getString(key);
try {
return MessageFormat.format(new String(val.getBytes("ISO-8859-1"), "UTF-8"), args);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return val;
return MessageFormat.format(val, args);
}
public static ObservableList<String> getObject(final ArrayList<String> keys, final Object... args) {
@@ -86,11 +76,7 @@ public final class I18N {
ArrayList<String> results = new ArrayList<>();
for(String key : keys){
String val = bundle.getString(key);
try {
results.add(MessageFormat.format(new String(val.getBytes("ISO-8859-1"), "UTF-8"), args));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
results.add(val);
}
return FXCollections.observableArrayList(results);
@@ -121,12 +107,7 @@ public final class I18N {
public static String getIndependent(final String key, Locale locale, final Object... args) {
ResourceBundle bundle = ResourceBundle.getBundle("message", locale);
String val = bundle.getString(key);
try {
return MessageFormat.format(new String(val.getBytes("ISO-8859-1"), "UTF-8"), args);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
return val;
return MessageFormat.format(val, args);
}
public static String getRootValue(String oldValue, ArrayList<String> nGramComputeForLetters) {
+8
View File
@@ -0,0 +1,8 @@
package gui;
public class Launcher {
public static void main(String[] args) {
GUIController.main(args);
}
}