1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-08-20 04:31:55 +02:00

list and address deprecations in java

This commit is contained in:
soloturn
2023-09-30 17:28:46 +02:00
parent 9c2404ec26
commit ba51d7b569
4 changed files with 5 additions and 3 deletions

View File

@@ -79,6 +79,8 @@ publishing {
tasks.withType<JavaCompile> { tasks.withType<JavaCompile> {
options.encoding = "UTF-8" options.encoding = "UTF-8"
val compilerArgs = options.compilerArgs
compilerArgs.addAll(listOf("-Xlint:deprecation"))
} }
tasks.test { tasks.test {

View File

@@ -98,7 +98,7 @@ public class ContextMenuMouseListener extends MouseAdapter {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (e.getModifiers() == InputEvent.BUTTON3_MASK) { if (e.getModifiersEx() == InputEvent.BUTTON3_DOWN_MASK) {
if (!(e.getSource() instanceof JTextComponent)) { if (!(e.getSource() instanceof JTextComponent)) {
return; return;
} }

View File

@@ -63,7 +63,7 @@ class HistoryMenuMouseListener extends MouseAdapter {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (e.getModifiers() == InputEvent.BUTTON3_MASK) { if (e.getModifiersEx() == InputEvent.BUTTON3_DOWN_MASK) {
if (!(e.getSource() instanceof JTable)) { if (!(e.getSource() instanceof JTable)) {
return; return;
} }

View File

@@ -61,7 +61,7 @@ class QueueMenuMouseListener extends MouseAdapter {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (e.getModifiers() == InputEvent.BUTTON3_MASK) { if (e.getModifiersEx() == InputEvent.BUTTON3_DOWN_MASK) {
if (!(e.getSource() instanceof JList)) { if (!(e.getSource() instanceof JList)) {
return; return;
} }