Fixed a couple of small bugs.

This commit is contained in:
Kristian S. Stangeland 2012-10-17 01:19:06 +02:00
parent 4cd5d04cae
commit 3a8a4d15cf
8 changed files with 31 additions and 7 deletions

View File

@ -73,6 +73,15 @@
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<threshold>High</threshold>
<effort>Default</effort>
</configuration>
</plugin>
</plugins>
</build>
<profiles>

View File

@ -74,9 +74,24 @@
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<threshold>High</threshold>
<effort>Default</effort>
</configuration>
</plugin>
</plugins>
</reporting>
<profiles>
<profile>
<id>release-sign-artifacts</id>

View File

@ -95,8 +95,8 @@ public class AsyncMarker implements Serializable, Comparable<AsyncMarker> {
private Object processingLock = new Object();
// Used to identify the asynchronous worker
private AsyncListenerHandler listenerHandler;
private int workerID;
private transient AsyncListenerHandler listenerHandler;
private transient int workerID;
// Determine if Minecraft processes this packet asynchronously
private static Method isMinecraftAsync;

View File

@ -33,7 +33,7 @@ public class ListeningWhitelist {
/**
* A whitelist with no packets - indicates that the listener shouldn't observe any packets.
*/
public static ListeningWhitelist EMPTY_WHITELIST = new ListeningWhitelist(ListenerPriority.LOW);
public static final ListeningWhitelist EMPTY_WHITELIST = new ListeningWhitelist(ListenerPriority.LOW);
private ListenerPriority priority;
private Set<Integer> whitelist;

View File

@ -40,7 +40,7 @@ public class PacketConstructor {
* <p>
* Remember to call withPacket().
*/
public static PacketConstructor DEFAULT = new PacketConstructor(null);
public static final PacketConstructor DEFAULT = new PacketConstructor(null);
// The constructor method that's actually responsible for creating the packet
private Constructor<?> constructorMethod;

View File

@ -36,7 +36,7 @@ public class FuzzyReflection {
/**
* Matches a Minecraft object.
*/
public static String MINECRAFT_OBJECT = "net\\.minecraft(\\.\\w+)+";
public static final String MINECRAFT_OBJECT = "net\\.minecraft(\\.\\w+)+";
// The class we're actually representing
private Class<?> source;

View File

@ -42,7 +42,7 @@ public class CollectionGenerator implements InstanceProvider {
/**
* Shared instance of this generator.
*/
public static CollectionGenerator INSTANCE = new CollectionGenerator();
public static final CollectionGenerator INSTANCE = new CollectionGenerator();
@Override
public Object create(@Nullable Class<?> type) {

View File

@ -35,7 +35,7 @@ public class DefaultInstances {
/**
* Standard default instance provider.
*/
public static DefaultInstances DEFAULT = DefaultInstances.fromArray(
public static final DefaultInstances DEFAULT = DefaultInstances.fromArray(
PrimitiveGenerator.INSTANCE, CollectionGenerator.INSTANCE);
/**