summaryrefslogtreecommitdiff
path: root/NET
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-13 01:37:09 -0800
committerFuwn <[email protected]>2026-02-13 01:38:24 -0800
commite98bc1e3da07fa47cfff74b71d4d3faed489d7a2 (patch)
treefa2f2c3a8a4c580584d45187e57a30fee7ae60fe /NET
parentInitial commit (diff)
downloadworldsplayer-e98bc1e3da07fa47cfff74b71d4d3faed489d7a2.tar.xz
worldsplayer-e98bc1e3da07fa47cfff74b71d4d3faed489d7a2.zip
fix: Decompilation artifact repairs for Java 11 compilation
- Duplicate variable declarations in switch-case branches (AvMenu, ServerInputStream, netData, AnimatedAction) - Ambiguous null constructor calls requiring explicit casts (ExpireDialog, PosableShape) - Deprecated getPeer() replaced with isDisplayable() (PolledDialog) - Decompiler $assertionsDisabled artifact removed (BackgroundLoader) - Missing null-safety on unboxing (BooleanFieldEditorDialog) - Raw generic types parameterized (ShallowEnumeration) - Raw Enumeration cast added (Shape)
Diffstat (limited to 'NET')
-rw-r--r--NET/worlds/console/AvMenu.java6
-rw-r--r--NET/worlds/console/ExpireDialog.java2
-rw-r--r--NET/worlds/console/PolledDialog.java2
-rw-r--r--NET/worlds/network/ServerInputStream.java2
-rw-r--r--NET/worlds/network/netData.java2
-rw-r--r--NET/worlds/scape/AnimatedAction.java2
-rw-r--r--NET/worlds/scape/BackgroundLoader.java2
-rw-r--r--NET/worlds/scape/BooleanFieldEditorDialog.java4
-rw-r--r--NET/worlds/scape/PosableShape.java2
-rw-r--r--NET/worlds/scape/ShallowEnumeration.java4
-rw-r--r--NET/worlds/scape/Shape.java2
11 files changed, 16 insertions, 14 deletions
diff --git a/NET/worlds/console/AvMenu.java b/NET/worlds/console/AvMenu.java
index e406673..99d3484 100644
--- a/NET/worlds/console/AvMenu.java
+++ b/NET/worlds/console/AvMenu.java
@@ -371,7 +371,7 @@ public class AvMenu extends Menu implements AvatarDialogCallback {
result = findIndex(headTypes, bodyType);
return result < 0 ? 0 : result;
case 1:
- int p = str.lastIndexOf("NS");
+ p = str.lastIndexOf("NS");
if (p >= 0) {
result = "qhd0DHQ".indexOf(str.charAt(p + 2));
}
@@ -379,7 +379,7 @@ public class AvMenu extends Menu implements AvatarDialogCallback {
return result < 0 ? 3 : result;
case 2:
int head = str.lastIndexOf("NS");
- int p = str.lastIndexOf("DgT");
+ p = str.lastIndexOf("DgT");
if (p > head) {
p += 3;
@@ -412,7 +412,7 @@ public class AvMenu extends Menu implements AvatarDialogCallback {
return result < 0 ? 0 : result;
default:
- int p = PosableShape.getMatPosition(str, "fabcdeOVKY".charAt(index - 3));
+ p = PosableShape.getMatPosition(str, "fabcdeOVKY".charAt(index - 3));
if (p >= 0 && str.charAt(p) == 'C' && str.charAt(p + 1) == '_') {
char letter = str.charAt(p + 2);
if (letter >= 'A' && letter <= 'Z') {
diff --git a/NET/worlds/console/ExpireDialog.java b/NET/worlds/console/ExpireDialog.java
index 7b1f80f..82a3cb1 100644
--- a/NET/worlds/console/ExpireDialog.java
+++ b/NET/worlds/console/ExpireDialog.java
@@ -16,7 +16,7 @@ class ExpireDialog extends Dialog {
private static Font font = new Font(Console.message("ButtonFont"), 0, 12);
public ExpireDialog(Date expireDate) {
- super(null, GammaFrame.getDefaultTitle(), false);
+ super((Dialog)null, GammaFrame.getDefaultTitle(), false);
this.setLayout(new BorderLayout(15, 15));
this.add("Center", new MultiLineLabel(Console.message("beta-expired") + DateFormat.getDateTimeInstance().format(expireDate), 20, 20));
this.button = new Button(Console.message("OK"));
diff --git a/NET/worlds/console/PolledDialog.java b/NET/worlds/console/PolledDialog.java
index 0f26bc0..0586ddd 100644
--- a/NET/worlds/console/PolledDialog.java
+++ b/NET/worlds/console/PolledDialog.java
@@ -124,7 +124,7 @@ public abstract class PolledDialog extends Dialog implements MainCallback, Dialo
if (this.toBeDisposed) {
this.setVisible(false);
this.parent.requestFocus();
- if (this.getPeer() != null) {
+ if (this.isDisplayable()) {
this.dispose();
}
diff --git a/NET/worlds/network/ServerInputStream.java b/NET/worlds/network/ServerInputStream.java
index bfca04e..74ba8bc 100644
--- a/NET/worlds/network/ServerInputStream.java
+++ b/NET/worlds/network/ServerInputStream.java
@@ -231,7 +231,7 @@ public class ServerInputStream extends FilterInputStream {
throw new UTFDataFormatException();
}
- int char2 = this.readUnsignedByte();
+ char2 = this.readUnsignedByte();
int char3 = this.readUnsignedByte();
if ((char2 & 192) != 128 || (char3 & 192) != 128) {
throw new UTFDataFormatException();
diff --git a/NET/worlds/network/netData.java b/NET/worlds/network/netData.java
index c3375a3..79e8e7b 100644
--- a/NET/worlds/network/netData.java
+++ b/NET/worlds/network/netData.java
@@ -87,7 +87,7 @@ class netData {
throw new UTFDataFormatException();
}
- int char2 = this.getByte() & 255;
+ char2 = this.getByte() & 255;
int char3 = this.getByte() & 255;
if ((char2 & 192) != 128 || (char3 & 192) != 128) {
throw new UTFDataFormatException();
diff --git a/NET/worlds/scape/AnimatedAction.java b/NET/worlds/scape/AnimatedAction.java
index 95e6d23..bb05fd0 100644
--- a/NET/worlds/scape/AnimatedAction.java
+++ b/NET/worlds/scape/AnimatedAction.java
@@ -146,7 +146,7 @@ public class AnimatedAction implements AnimatedActionCallback, TimerCallback {
this.motionComplete(0);
break;
case 8:
- Console c = Console.getActive();
+ c = Console.getActive();
if (c instanceof DefaultConsole) {
Pilot p = Pilot.getActive();
p.setOutsideCameraMode(this._oldMode, this._oldSpeed);
diff --git a/NET/worlds/scape/BackgroundLoader.java b/NET/worlds/scape/BackgroundLoader.java
index 8f337a0..576570a 100644
--- a/NET/worlds/scape/BackgroundLoader.java
+++ b/NET/worlds/scape/BackgroundLoader.java
@@ -46,7 +46,7 @@ public class BackgroundLoader implements MainCallback, Runnable {
@Override
public void run() {
- if ($assertionsDisabled || Thread.currentThread() == this.asyncLoaderThread) {
+ if (Thread.currentThread() == this.asyncLoaderThread) {
while (true) {
BackgroundLoaderElement ele = this.asyncLoadQueue.getItem();
ele.asyncLoad();
diff --git a/NET/worlds/scape/BooleanFieldEditorDialog.java b/NET/worlds/scape/BooleanFieldEditorDialog.java
index ea661ca..ad0f6c9 100644
--- a/NET/worlds/scape/BooleanFieldEditorDialog.java
+++ b/NET/worlds/scape/BooleanFieldEditorDialog.java
@@ -11,7 +11,9 @@ class BooleanFieldEditorDialog extends CheckboxEditorDialog {
@Override
protected int getValue() {
- return this.property.get() ? 1 : 0;
+ Boolean value = (Boolean) this.property.get();
+
+ return (value != null && value) ? 1 : 0;
}
@Override
diff --git a/NET/worlds/scape/PosableShape.java b/NET/worlds/scape/PosableShape.java
index 7ed5610..d3caafe 100644
--- a/NET/worlds/scape/PosableShape.java
+++ b/NET/worlds/scape/PosableShape.java
@@ -65,7 +65,7 @@ public class PosableShape extends Shape implements FrameHandler, Prerenderable,
};
private Hashtable<Object, Vector<Object>> actions;
private int scanPos;
- private static Material origMat = new Material(null);
+ private static Material origMat = new Material((Texture)null);
public static String base64 = "-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+";
private static String[] permittedList = ServerTableManager.instance().getTable("permittedList");
private static String[] faceList = ServerTableManager.instance().getTable("faceList");
diff --git a/NET/worlds/scape/ShallowEnumeration.java b/NET/worlds/scape/ShallowEnumeration.java
index ac8fbc3..1f144a3 100644
--- a/NET/worlds/scape/ShallowEnumeration.java
+++ b/NET/worlds/scape/ShallowEnumeration.java
@@ -2,7 +2,7 @@ package NET.worlds.scape;
import java.util.Vector;
-public class ShallowEnumeration extends DeepEnumeration {
+public class ShallowEnumeration extends DeepEnumeration<Object> {
public ShallowEnumeration(SuperRoot o) {
this.roots.addElement(o);
o.getChildren(this);
@@ -27,7 +27,7 @@ public class ShallowEnumeration extends DeepEnumeration {
assert this.nextValue != null;
} else if (!this.vectors.isEmpty()) {
- this.currentVector = (Vector<K>)this.vectors.elementAt(this.vectors.size() - 1);
+ this.currentVector = (Vector<Object>)this.vectors.elementAt(this.vectors.size() - 1);
this.currentIndex = this.currentVector.size() - 1;
this.vectors.removeElementAt(this.vectors.size() - 1);
this.getNextElement();
diff --git a/NET/worlds/scape/Shape.java b/NET/worlds/scape/Shape.java
index 597b404..aa252b1 100644
--- a/NET/worlds/scape/Shape.java
+++ b/NET/worlds/scape/Shape.java
@@ -421,7 +421,7 @@ public class Shape extends WObject implements MainCallback, Animatable, MouseDow
}
}
- e = detachList.elements();
+ e = (Enumeration)detachList.elements();
while (e.hasMoreElements()) {
((WObject)e.nextElement()).detach();