diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2021-07-02 17:45:30 +0100 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2021-07-02 17:45:30 +0100 |
commit | 3f95bbed736a2d709f63eaac03d40252ba7dbdf4 (patch) | |
tree | c59191653bfe42ace3176b64898226759344c6f5 /platform/android/java/lib/src/org | |
parent | 710effdaad907cfa615a5a7d0439b67c16f1e6a6 (diff) |
Remove redundant explicit types in Godot Java code
Diffstat (limited to 'platform/android/java/lib/src/org')
5 files changed, 8 insertions, 8 deletions
diff --git a/platform/android/java/lib/src/org/godotengine/godot/Godot.java b/platform/android/java/lib/src/org/godotengine/godot/Godot.java index 52a8ddbd0f..163adbfde3 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/Godot.java +++ b/platform/android/java/lib/src/org/godotengine/godot/Godot.java @@ -532,7 +532,7 @@ public class Godot extends Fragment implements SensorEventListener, IDownloaderC String main_pack_md5 = null; String main_pack_key = null; - List<String> new_args = new LinkedList<String>(); + List<String> new_args = new LinkedList<>(); for (int i = 0; i < command_line.length; i++) { boolean has_extra = i < command_line.length - 1; diff --git a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java index 8407b4570e..071872dff8 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java +++ b/platform/android/java/lib/src/org/godotengine/godot/GodotIO.java @@ -321,8 +321,8 @@ public class GodotIO { am = p_activity.getAssets(); activity = p_activity; //streams = new HashMap<Integer, AssetData>(); - streams = new SparseArray<AssetData>(); - dirs = new SparseArray<AssetDir>(); + streams = new SparseArray<>(); + dirs = new SparseArray<>(); } ///////////////////////// diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java index 9c9592f66b..e8dcc5a4bc 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java +++ b/platform/android/java/lib/src/org/godotengine/godot/input/GodotInputHandler.java @@ -60,7 +60,7 @@ public class GodotInputHandler implements InputDeviceListener { private final String tag = this.getClass().getSimpleName(); private final SparseIntArray mJoystickIds = new SparseIntArray(4); - private final SparseArray<Joystick> mJoysticksDevices = new SparseArray<Joystick>(4); + private final SparseArray<Joystick> mJoysticksDevices = new SparseArray<>(4); public GodotInputHandler(GodotRenderView godotView) { mRenderView = godotView; @@ -329,7 +329,7 @@ public class GodotInputHandler implements InputDeviceListener { //Helps with creating new joypad mappings. Log.i(tag, "=== New Input Device: " + joystick.name); - Set<Integer> already = new HashSet<Integer>(); + Set<Integer> already = new HashSet<>(); for (InputDevice.MotionRange range : device.getMotionRanges()) { boolean isJoystick = range.isFromSource(InputDevice.SOURCE_JOYSTICK); boolean isGamepad = range.isFromSource(InputDevice.SOURCE_GAMEPAD); diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/InputManagerV16.java b/platform/android/java/lib/src/org/godotengine/godot/input/InputManagerV16.java index 61828dccae..0dbc13c77b 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/input/InputManagerV16.java +++ b/platform/android/java/lib/src/org/godotengine/godot/input/InputManagerV16.java @@ -34,7 +34,7 @@ public class InputManagerV16 implements InputManagerCompat { public InputManagerV16(Context context) { mInputManager = (InputManager)context.getSystemService(Context.INPUT_SERVICE); - mListeners = new HashMap<InputManagerCompat.InputDeviceListener, V16InputDeviceListener>(); + mListeners = new HashMap<>(); } @Override diff --git a/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java b/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java index 095fa9bd2a..bff90d7ce9 100644 --- a/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java +++ b/platform/android/java/lib/src/org/godotengine/godot/input/Joystick.java @@ -41,12 +41,12 @@ import java.util.List; class Joystick { int device_id; String name; - List<Integer> axes = new ArrayList<Integer>(); + List<Integer> axes = new ArrayList<>(); protected boolean hasAxisHat = false; /* * Keep track of values so we can prevent flooding the engine with useless events. */ - protected final SparseArray<Float> axesValues = new SparseArray<Float>(4); + protected final SparseArray<Float> axesValues = new SparseArray<>(4); protected int hatX; protected int hatY; } |