Update depend versions, limit use of most Java 1.7 APIs.

This commit is contained in:
md_5 2015-02-08 13:07:41 +11:00
parent 2b49358bea
commit 7c1f232e85
9 changed files with 39 additions and 22 deletions

View File

@ -32,7 +32,7 @@
<dependency> <dependency>
<groupId>net.sf.jopt-simple</groupId> <groupId>net.sf.jopt-simple</groupId>
<artifactId>jopt-simple</artifactId> <artifactId>jopt-simple</artifactId>
<version>4.6</version> <version>4.8</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -22,12 +22,11 @@
<dependency> <dependency>
<groupId>com.google.code.gson</groupId> <groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId> <artifactId>gson</artifactId>
<version>2.3</version> <version>2.3.1</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>

View File

@ -29,7 +29,7 @@ public class EventBus
public EventBus(Logger logger) public EventBus(Logger logger)
{ {
this.logger = ( logger == null ) ? Logger.getGlobal() : logger; this.logger = ( logger == null ) ? Logger.getLogger( Logger.GLOBAL_LOGGER_NAME ) : logger;
} }
public void post(Object event) public void post(Object event)

34
pom.xml
View File

@ -65,7 +65,9 @@
<properties> <properties>
<build.number>unknown</build.number> <build.number>unknown</build.number>
<netty.version>4.0.23.Final</netty.version> <netty.version>4.0.25.Final</netty.version>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
@ -73,7 +75,7 @@
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.11</version> <version>4.12</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -91,7 +93,7 @@
<dependency> <dependency>
<groupId>org.projectlombok</groupId> <groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<version>1.14.8</version> <version>1.16.0</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>
@ -116,12 +118,28 @@
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>animal-sniffer-maven-plugin</artifactId>
<version>2.5.1</version> <version>1.13</version>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration> <configuration>
<source>1.7</source> <ignores>
<target>1.7</target> <ignore>java.lang.ClassLoader</ignore>
<ignore>java.lang.Throwable</ignore>
<ignore>java.util.Locale</ignore>
</ignores>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java16</artifactId>
<version>1.1</version>
</signature>
</configuration> </configuration>
</plugin> </plugin>
<!-- OSS Parent 9 uses 2.7, 2.10+ is broken anyway --> <!-- OSS Parent 9 uses 2.7, 2.10+ is broken anyway -->

View File

@ -65,13 +65,13 @@
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
<version>5.1.32</version> <version>5.1.34</version>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.javassist</groupId> <groupId>org.javassist</groupId>
<artifactId>javassist</artifactId> <artifactId>javassist</artifactId>
<version>3.18.2-GA</version> <version>3.19.0-GA</version>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -1,5 +1,6 @@
package net.md_5.bungee; package net.md_5.bungee;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import io.netty.bootstrap.Bootstrap; import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelFuture;
@ -11,7 +12,6 @@ import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.Objects;
import java.util.Queue; import java.util.Queue;
import lombok.Getter; import lombok.Getter;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -79,7 +79,7 @@ public class BungeeServerInfo implements ServerInfo
@Override @Override
public boolean equals(Object obj) public boolean equals(Object obj)
{ {
return ( obj instanceof ServerInfo ) && Objects.equals( getAddress(), ( (ServerInfo) obj ).getAddress() ); return ( obj instanceof ServerInfo ) && Objects.equal( getAddress(), ( (ServerInfo) obj ).getAddress() );
} }
@Override @Override

View File

@ -1,9 +1,9 @@
package net.md_5.bungee; package net.md_5.bungee;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator; import io.netty.buffer.ByteBufAllocator;
import java.util.Objects;
import java.util.Queue; import java.util.Queue;
import java.util.Set; import java.util.Set;
import lombok.Getter; import lombok.Getter;
@ -265,7 +265,7 @@ public class ServerConnector extends PacketHandler
public void handle(Kick kick) throws Exception public void handle(Kick kick) throws Exception
{ {
ServerInfo def = bungee.getServerInfo( user.getPendingConnection().getListener().getFallbackServer() ); ServerInfo def = bungee.getServerInfo( user.getPendingConnection().getListener().getFallbackServer() );
if ( Objects.equals( target, def ) ) if ( Objects.equal( target, def ) )
{ {
def = null; def = null;
} }

View File

@ -1,5 +1,6 @@
package net.md_5.bungee; package net.md_5.bungee;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import io.netty.bootstrap.Bootstrap; import io.netty.bootstrap.Bootstrap;
@ -15,7 +16,6 @@ import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.logging.Level; import java.util.logging.Level;
@ -228,7 +228,7 @@ public final class UserConnection implements ProxiedPlayer
final BungeeServerInfo target = (BungeeServerInfo) event.getTarget(); // Update in case the event changed target final BungeeServerInfo target = (BungeeServerInfo) event.getTarget(); // Update in case the event changed target
if ( getServer() != null && Objects.equals( getServer().getInfo(), target ) ) if ( getServer() != null && Objects.equal( getServer().getInfo(), target ) )
{ {
sendMessage( bungee.getTranslation( "already_connected" ) ); sendMessage( bungee.getTranslation( "already_connected" ) );
return; return;

View File

@ -1,9 +1,9 @@
package net.md_5.bungee.connection; package net.md_5.bungee.connection;
import com.google.common.base.Objects;
import com.google.common.io.ByteArrayDataOutput; import com.google.common.io.ByteArrayDataOutput;
import com.google.common.io.ByteStreams; import com.google.common.io.ByteStreams;
import java.io.DataInput; import java.io.DataInput;
import java.util.Objects;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator; import io.netty.buffer.ByteBufAllocator;
import io.netty.buffer.Unpooled; import io.netty.buffer.Unpooled;
@ -458,7 +458,7 @@ public class DownstreamBridge extends PacketHandler
public void handle(Kick kick) throws Exception public void handle(Kick kick) throws Exception
{ {
ServerInfo def = bungee.getServerInfo( con.getPendingConnection().getListener().getFallbackServer() ); ServerInfo def = bungee.getServerInfo( con.getPendingConnection().getListener().getFallbackServer() );
if ( Objects.equals( server.getInfo(), def ) ) if ( Objects.equal( server.getInfo(), def ) )
{ {
def = null; def = null;
} }