Remove deprecations for JDK 17
This commit is contained in:
parent
2f7cff63c2
commit
35613f01da
12 changed files with 22 additions and 18 deletions
1
pom.xml
1
pom.xml
|
@ -365,6 +365,7 @@
|
|||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
|
|
@ -44,7 +44,7 @@ public class GlobalHotKeys
|
|||
|
||||
//CTRL + O
|
||||
//open resource
|
||||
if ((e.getKeyCode() == KeyEvent.VK_O) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
||||
if ((e.getKeyCode() == KeyEvent.VK_O) && ((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||
{
|
||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||
|
||||
|
@ -62,7 +62,7 @@ public class GlobalHotKeys
|
|||
|
||||
//CTRL + N
|
||||
//new workspace
|
||||
else if ((e.getKeyCode() == KeyEvent.VK_N) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
||||
else if ((e.getKeyCode() == KeyEvent.VK_N) && ((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||
{
|
||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||
BytecodeViewer.resetWorkspace(true);
|
||||
|
@ -70,7 +70,7 @@ public class GlobalHotKeys
|
|||
|
||||
//CTRL + T
|
||||
//compile
|
||||
else if ((e.getKeyCode() == KeyEvent.VK_T) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
||||
else if ((e.getKeyCode() == KeyEvent.VK_T) && ((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||
{
|
||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||
Thread t = new Thread(() -> BytecodeViewer.compile(true, false), "Compile");
|
||||
|
@ -79,7 +79,7 @@ public class GlobalHotKeys
|
|||
|
||||
//CTRL + R
|
||||
//Run remote code
|
||||
else if ((e.getKeyCode() == KeyEvent.VK_R) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
||||
else if ((e.getKeyCode() == KeyEvent.VK_R) && ((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||
{
|
||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class GlobalHotKeys
|
|||
|
||||
//CTRL + S
|
||||
//Export resources
|
||||
else if ((e.getKeyCode() == KeyEvent.VK_S) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
||||
else if ((e.getKeyCode() == KeyEvent.VK_S) && ((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||
{
|
||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||
|
||||
|
@ -137,7 +137,7 @@ public class GlobalHotKeys
|
|||
|
||||
//CTRL + W
|
||||
//close active resource (currently opened tab)
|
||||
else if ((e.getKeyCode() == KeyEvent.VK_W) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
||||
else if ((e.getKeyCode() == KeyEvent.VK_W) && ((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||
{
|
||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||
|
||||
|
@ -147,7 +147,7 @@ public class GlobalHotKeys
|
|||
|
||||
//CTRL + L
|
||||
//open last opened resource
|
||||
else if ((e.getKeyCode() == KeyEvent.VK_L) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
||||
else if ((e.getKeyCode() == KeyEvent.VK_L) && ((e.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||
{
|
||||
Configuration.lastHotKeyExecuted = System.currentTimeMillis();
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ public class ExtendedJOptionPane
|
|||
else
|
||||
dialog.setLocationRelativeTo(BytecodeViewer.viewer);
|
||||
|
||||
dialog.show();
|
||||
dialog.setVisible(true);
|
||||
dialog.dispose();
|
||||
|
||||
return dialog;
|
||||
|
|
|
@ -82,7 +82,7 @@ public class SearchableJTextArea extends JTextArea
|
|||
|
||||
addKeyListener(new PressKeyListener(keyEvent ->
|
||||
{
|
||||
if ((keyEvent.getKeyCode() == KeyEvent.VK_F) && ((keyEvent.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
||||
if ((keyEvent.getKeyCode() == KeyEvent.VK_F) && ((keyEvent.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||
searchInput.requestFocus();
|
||||
|
||||
GlobalHotKeys.keyPressed(keyEvent);
|
||||
|
|
|
@ -108,10 +108,10 @@ public class SearchableRSyntaxTextArea extends RSyntaxTextArea
|
|||
|
||||
addKeyListener(new PressKeyListener(keyEvent ->
|
||||
{
|
||||
if ((keyEvent.getKeyCode() == KeyEvent.VK_F) && ((keyEvent.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
||||
if ((keyEvent.getKeyCode() == KeyEvent.VK_F) && ((keyEvent.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||
searchInput.requestFocus();
|
||||
|
||||
if (onCtrlS != null && (keyEvent.getKeyCode() == KeyEvent.VK_S) && ((keyEvent.getModifiers() & KeyEvent.CTRL_MASK) != 0))
|
||||
if (onCtrlS != null && (keyEvent.getKeyCode() == KeyEvent.VK_S) && ((keyEvent.getModifiersEx() & KeyEvent.CTRL_DOWN_MASK) != 0))
|
||||
{
|
||||
onCtrlS.run();
|
||||
return;
|
||||
|
|
|
@ -101,7 +101,7 @@ public class TabbedPane extends JPanel
|
|||
exitButton.setComponentPopupMenu(rightClickMenu);
|
||||
exitButton.addMouseListener(new MouseClickedListener(e ->
|
||||
{
|
||||
if (e.getModifiers() != InputEvent.ALT_MASK || System.currentTimeMillis() - lastMouseClick < 100)
|
||||
if (e.getModifiersEx() != InputEvent.ALT_DOWN_MASK || System.currentTimeMillis() - lastMouseClick < 100)
|
||||
return;
|
||||
|
||||
lastMouseClick = System.currentTimeMillis();
|
||||
|
|
|
@ -299,7 +299,7 @@ public class EZInjection extends Plugin
|
|||
if(kit != null)
|
||||
kit.setVisible(true);
|
||||
|
||||
m2.invoke(classNode.getClass().newInstance(), (Object[]) new String[1]);
|
||||
m2.invoke(classNode.getClass().getDeclaredConstructor().newInstance(), (Object[]) new String[1]);
|
||||
|
||||
print("Finished running " + invokeMethodInformation);
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class CompiledJavaPluginLaunchStrategy implements PluginLaunchStrategy {
|
|||
}
|
||||
|
||||
LoadingClassLoader cl = new LoadingClassLoader(pdata, set);
|
||||
Plugin p = cl.pluginKlass.newInstance();
|
||||
Plugin p = cl.pluginKlass.getDeclaredConstructor().newInstance();
|
||||
LoadedPluginData npdata = new LoadedPluginData(pdata, cl, p);
|
||||
loaded.add(npdata);
|
||||
|
||||
|
@ -197,4 +197,4 @@ public class CompiledJavaPluginLaunchStrategy implements PluginLaunchStrategy {
|
|||
return pluginKlass;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,6 +51,6 @@ public class JavaPluginLaunchStrategy implements PluginLaunchStrategy
|
|||
);
|
||||
|
||||
//create a new instance of the class
|
||||
return (Plugin) clazz.newInstance();
|
||||
return (Plugin) clazz.getDeclaredConstructor().newInstance();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,6 +84,7 @@ public enum TranslatedStrings
|
|||
PLEASE_SEND_THIS_ERROR_LOG_TO,
|
||||
PLEASE_SEND_RESOURCES,
|
||||
ONE_PLUGIN_AT_A_TIME,
|
||||
ILLEGAL_ACCESS_ERROR,
|
||||
|
||||
|
||||
YES,
|
||||
|
|
|
@ -263,6 +263,7 @@
|
|||
"PLEASE_SEND_THIS_ERROR_LOG_TO": "Please send this error log to",
|
||||
"PLEASE_SEND_RESOURCES": "If you hold appropriate legal rights to the relevant class/jar/apk file please include that as well.",
|
||||
"ONE_PLUGIN_AT_A_TIME": "There is currently another plugin running right now, please wait for that to finish executing.",
|
||||
"ILLEGAL_ACCESS_ERROR": "Please use Java 15 or older to do this.",
|
||||
|
||||
|
||||
"FILES": "Files",
|
||||
|
|
|
@ -255,5 +255,6 @@
|
|||
"CLOSE_TAB": "Tab schließen",
|
||||
"PLEASE_SEND_THIS_ERROR_LOG_TO": "Bitte senden Sie dieses Fehlerprotokoll an",
|
||||
"PLEASE_SEND_RESOURCES": "Wenn Sie entsprechende gesetzliche Rechte an der jeweiligen Klasse besitzen",
|
||||
"MIN_SDK_VERSION": "Minimale SDK-Version"
|
||||
"MIN_SDK_VERSION": "Minimale SDK-Version",
|
||||
"ILLEGAL_ACCESS_ERROR": "Bitte benutzen Sie Java 15 oder älter, um dies zu tun."
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue