From 02d4b9621c245018b3dfef1037e0da70b27c77f7 Mon Sep 17 00:00:00 2001 From: lhumphrey Date: Fri, 29 Sep 2023 14:05:35 -0400 Subject: [PATCH] In src/Core/avtas/map/graphics/MapGraphicsList.java: Removed deprecated method getLength(). In src/Core/avtas/swing/IntegerWrapModel.java: Java does autoboxing/unboxing between int and Integer, so using to convert int i to an Integer is unnecessary and deprecated. --- .../src/Core/avtas/map/graphics/MapGraphicsList.java | 8 -------- OpenAMASE/src/Core/avtas/swing/IntegerWrapModel.java | 12 ++++++------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/OpenAMASE/src/Core/avtas/map/graphics/MapGraphicsList.java b/OpenAMASE/src/Core/avtas/map/graphics/MapGraphicsList.java index 587c2ec..269c53d 100644 --- a/OpenAMASE/src/Core/avtas/map/graphics/MapGraphicsList.java +++ b/OpenAMASE/src/Core/avtas/map/graphics/MapGraphicsList.java @@ -109,14 +109,6 @@ public void setPainter(Painter painter) { super.setPainter(painter); } - /** - * @deprecated Use {@link #size() } instead. - * @return length of the internalList - */ - public int getLength() { - return internalList.size(); - } - /** * Returns all of the graphics that intersect the given screen location in the * current projection. diff --git a/OpenAMASE/src/Core/avtas/swing/IntegerWrapModel.java b/OpenAMASE/src/Core/avtas/swing/IntegerWrapModel.java index 69e5248..010d3ea 100644 --- a/OpenAMASE/src/Core/avtas/swing/IntegerWrapModel.java +++ b/OpenAMASE/src/Core/avtas/swing/IntegerWrapModel.java @@ -37,19 +37,19 @@ public IntegerWrapModel(int val, int min, int max, int interval) { this.max = max; this.interval = interval; - setValue( new Integer(val)); + setValue(val); } public Object getPreviousValue() { if (val - interval >= min) - return new Integer(val-interval); - else return new Integer(max-interval); + return (val - interval); + else return (max - interval); } public Object getNextValue() { if (val + interval < max) - return new Integer(val + interval); - else return new Integer(min); + return (val + interval); + else return min; } public void setValue(Object o) { @@ -60,7 +60,7 @@ public void setValue(Object o) { } public Object getValue() { - return new Integer(val); + return val; } }