3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-09-08 13:52:50 +02:00

Remove unnecessary synchronising

Dieser Commit ist enthalten in:
Myles 2017-05-22 13:38:22 +01:00
Ursprung 21eb824395
Commit ce286cf322
2 geänderte Dateien mit 12 neuen und 16 gelöschten Zeilen

Datei anzeigen

@ -37,14 +37,12 @@ public class BukkitViaInjector implements ViaInjector {
// Inject the list // Inject the list
List wrapper = new ListWrapper((List) value) { List wrapper = new ListWrapper((List) value) {
@Override @Override
public synchronized void handleAdd(Object o) { public void handleAdd(Object o) {
synchronized (this) { if (o instanceof ChannelFuture) {
if (o instanceof ChannelFuture) { try {
try { injectChannelFuture((ChannelFuture) o);
injectChannelFuture((ChannelFuture) o); } catch (Exception e) {
} catch (Exception e) { e.printStackTrace();
e.printStackTrace();
}
} }
} }
} }

Datei anzeigen

@ -36,14 +36,12 @@ public class SpongeViaInjector implements ViaInjector {
// Inject the list // Inject the list
List wrapper = new ListWrapper((List) value) { List wrapper = new ListWrapper((List) value) {
@Override @Override
public synchronized void handleAdd(Object o) { public void handleAdd(Object o) {
synchronized (this) { if (o instanceof ChannelFuture) {
if (o instanceof ChannelFuture) { try {
try { injectChannelFuture((ChannelFuture) o);
injectChannelFuture((ChannelFuture) o); } catch (Exception e) {
} catch (Exception e) { e.printStackTrace();
e.printStackTrace();
}
} }
} }
} }