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>
<groupId>net.sf.jopt-simple</groupId>
<artifactId>jopt-simple</artifactId>
<version>4.6</version>
<version>4.8</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

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

View File

@ -29,7 +29,7 @@ public class EventBus
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)

34
pom.xml
View File

@ -65,7 +65,9 @@
<properties>
<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>
</properties>
@ -73,7 +75,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
@ -91,7 +93,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.14.8</version>
<version>1.16.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
@ -116,12 +118,28 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.13</version>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<source>1.7</source>
<target>1.7</target>
<ignores>
<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>
</plugin>
<!-- OSS Parent 9 uses 2.7, 2.10+ is broken anyway -->

View File

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

View File

@ -1,5 +1,6 @@
package net.md_5.bungee;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelFuture;
@ -11,7 +12,6 @@ import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Objects;
import java.util.Queue;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
@ -79,7 +79,7 @@ public class BungeeServerInfo implements ServerInfo
@Override
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

View File

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

View File

@ -1,5 +1,6 @@
package net.md_5.bungee;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import io.netty.bootstrap.Bootstrap;
@ -15,7 +16,6 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
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
if ( getServer() != null && Objects.equals( getServer().getInfo(), target ) )
if ( getServer() != null && Objects.equal( getServer().getInfo(), target ) )
{
sendMessage( bungee.getTranslation( "already_connected" ) );
return;

View File

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