Fixed a couple of bugs discovered by FindBugs.
Dieser Commit ist enthalten in:
Ursprung
bf443be0d3
Commit
9b0fe540c2
@ -96,6 +96,9 @@ public class PacketContainer implements Serializable {
|
|||||||
andThen(new Function<BuilderParameters, Cloner>() {
|
andThen(new Function<BuilderParameters, Cloner>() {
|
||||||
@Override
|
@Override
|
||||||
public Cloner apply(@Nullable BuilderParameters param) {
|
public Cloner apply(@Nullable BuilderParameters param) {
|
||||||
|
if (param == null)
|
||||||
|
throw new IllegalArgumentException("Cannot be NULL.");
|
||||||
|
|
||||||
return new FieldCloner(param.getAggregateCloner(), param.getInstanceProvider()) {{
|
return new FieldCloner(param.getAggregateCloner(), param.getInstanceProvider()) {{
|
||||||
// Use a default writer with no concept of cloning
|
// Use a default writer with no concept of cloning
|
||||||
writer = new ObjectWriter();
|
writer = new ObjectWriter();
|
||||||
|
@ -54,7 +54,7 @@ public class NetworkObjectInjector extends PlayerInjector {
|
|||||||
private ClassLoader classLoader;
|
private ClassLoader classLoader;
|
||||||
|
|
||||||
// Shared callback filter - avoid creating a new class every time
|
// Shared callback filter - avoid creating a new class every time
|
||||||
private static CallbackFilter callbackFilter;
|
private volatile static CallbackFilter callbackFilter;
|
||||||
|
|
||||||
// Temporary player factory
|
// Temporary player factory
|
||||||
private static volatile TemporaryPlayerFactory tempPlayerFactory;
|
private static volatile TemporaryPlayerFactory tempPlayerFactory;
|
||||||
|
@ -349,7 +349,7 @@ public class SpigotPacketInjector implements SpigotPacketListener {
|
|||||||
public Object packetQueued(Object networkManager, Object connection, Object packet) {
|
public Object packetQueued(Object networkManager, Object connection, Object packet) {
|
||||||
Integer id = invoker.getPacketID(packet);
|
Integer id = invoker.getPacketID(packet);
|
||||||
|
|
||||||
if (id != null & queuedFilters.contains(id)) {
|
if (id != null && queuedFilters.contains(id)) {
|
||||||
// Check for ignored packets
|
// Check for ignored packets
|
||||||
if (ignoredPackets.remove(packet)) {
|
if (ignoredPackets.remove(packet)) {
|
||||||
return packet;
|
return packet;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren