From ce286cf322f820e1f80d2da654a0e6c83ea5115a Mon Sep 17 00:00:00 2001 From: Myles Date: Mon, 22 May 2017 13:38:22 +0100 Subject: [PATCH] Remove unnecessary synchronising --- .../bukkit/platform/BukkitViaInjector.java | 14 ++++++-------- .../sponge/platform/SpongeViaInjector.java | 14 ++++++-------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/platform/BukkitViaInjector.java b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/platform/BukkitViaInjector.java index 3025e18c1..29631778a 100644 --- a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/platform/BukkitViaInjector.java +++ b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/platform/BukkitViaInjector.java @@ -37,14 +37,12 @@ public class BukkitViaInjector implements ViaInjector { // Inject the list List wrapper = new ListWrapper((List) value) { @Override - public synchronized void handleAdd(Object o) { - synchronized (this) { - if (o instanceof ChannelFuture) { - try { - injectChannelFuture((ChannelFuture) o); - } catch (Exception e) { - e.printStackTrace(); - } + public void handleAdd(Object o) { + if (o instanceof ChannelFuture) { + try { + injectChannelFuture((ChannelFuture) o); + } catch (Exception e) { + e.printStackTrace(); } } } diff --git a/sponge/src/main/java/us/myles/ViaVersion/sponge/platform/SpongeViaInjector.java b/sponge/src/main/java/us/myles/ViaVersion/sponge/platform/SpongeViaInjector.java index a6ee44359..530eefadf 100644 --- a/sponge/src/main/java/us/myles/ViaVersion/sponge/platform/SpongeViaInjector.java +++ b/sponge/src/main/java/us/myles/ViaVersion/sponge/platform/SpongeViaInjector.java @@ -36,14 +36,12 @@ public class SpongeViaInjector implements ViaInjector { // Inject the list List wrapper = new ListWrapper((List) value) { @Override - public synchronized void handleAdd(Object o) { - synchronized (this) { - if (o instanceof ChannelFuture) { - try { - injectChannelFuture((ChannelFuture) o); - } catch (Exception e) { - e.printStackTrace(); - } + public void handleAdd(Object o) { + if (o instanceof ChannelFuture) { + try { + injectChannelFuture((ChannelFuture) o); + } catch (Exception e) { + e.printStackTrace(); } } }