1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-09 10:19:41 +02:00

Add errorprone check and fix found errors

Adds gradle-errorprone-plugin 0.0.8, requires Gradle 2.6.
This commit is contained in:
Florian Schmaus 2015-09-13 18:12:33 +02:00
parent 8096da43e0
commit d728204890
23 changed files with 64 additions and 44 deletions

View file

@ -170,7 +170,7 @@ public class SmackIntegrationTestFramework {
return testRunResult;
}
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "Finally"})
private void runTests(Set<Class<? extends AbstractSmackIntTest>> classes)
throws NoResponseException, NotConnectedException, InterruptedException {
for (Class<? extends AbstractSmackIntTest> testClass : classes) {

View file

@ -33,7 +33,12 @@ public class ResultSyncPoint<R, E extends Exception> {
if (exception != null) {
throw exception;
}
wait(timeout);
final long deadline = System.currentTimeMillis() + timeout;
while (result == null && exception == null) {
final long now = System.currentTimeMillis();
if (now > deadline) break;
wait(deadline - now);
}
}
if (result != null) {
return result;