Merge pull request #20 from Xephi/master

Up
This commit is contained in:
Gabriele C. 2015-07-13 20:45:13 +02:00
commit 97841863fa
3 changed files with 24 additions and 25 deletions

View File

@ -17,8 +17,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Change Compiler Version (JDK) HERE! --> <!-- Change Compiler Version (JDK) HERE! -->
<maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.target>1.6</maven.compiler.target>
<!-- Change MC Version HERE! --> <!-- Change MC Version HERE! -->
<bukkitVersion>1.8.7-R0.1-SNAPSHOT</bukkitVersion> <bukkitVersion>1.8.7-R0.1-SNAPSHOT</bukkitVersion>
@ -183,7 +183,7 @@
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
<version>5.1.35</version> <version>5.1.36</version>
</dependency> </dependency>
<!-- SQLite Library --> <!-- SQLite Library -->

View File

@ -3,7 +3,6 @@ package fr.xephi.authme;
import java.io.File; import java.io.File;
import java.util.List; import java.util.List;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.Future; import java.util.concurrent.Future;
@ -45,7 +44,7 @@ public class DataManager {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (null); return (null);
} }
} }

View File

@ -3,7 +3,6 @@ package fr.xephi.authme.datasource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.Future; import java.util.concurrent.Future;
@ -29,7 +28,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (false); return (false);
} }
} }
@ -45,7 +44,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return null; return null;
} }
} }
@ -61,7 +60,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (false); return (false);
} }
} }
@ -77,7 +76,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (false); return (false);
} }
} }
@ -93,7 +92,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (false); return (false);
} }
} }
@ -109,7 +108,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (0); return (0);
} }
} }
@ -125,7 +124,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (new ArrayList<String>()); return (new ArrayList<String>());
} }
} }
@ -141,7 +140,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (false); return (false);
} }
} }
@ -157,7 +156,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (false); return (false);
} }
} }
@ -173,7 +172,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (0); return (0);
} }
} }
@ -189,7 +188,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (new ArrayList<String>()); return (new ArrayList<String>());
} }
} }
@ -205,7 +204,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (new ArrayList<String>()); return (new ArrayList<String>());
} }
} }
@ -221,7 +220,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (new ArrayList<String>()); return (new ArrayList<String>());
} }
} }
@ -237,7 +236,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (false); return (false);
} }
} }
@ -253,7 +252,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (false); return (false);
} }
} }
@ -295,7 +294,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (false); return (false);
} }
} }
@ -344,13 +343,14 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (0); return (0);
} }
} }
@Override @Override
public synchronized void updateName(final String oldone, final String newone) { public synchronized void updateName(final String oldone,
final String newone) {
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
@ -371,7 +371,7 @@ public class DatabaseCalls implements DataSource {
}); });
try { try {
return result.get(); return result.get();
} catch (InterruptedException | ExecutionException e) { } catch (Exception e) {
return (new ArrayList<PlayerAuth>()); return (new ArrayList<PlayerAuth>());
} }
} }