2
0
mirror of https://github.com/proxiodev/RedisBungee.git synced 2024-12-23 10:38:01 +00:00

fix cache issues

This commit is contained in:
Tux 2016-02-28 01:15:43 -05:00
parent 546ee7566d
commit 3d24d4a161

View File

@ -3,6 +3,7 @@ package com.imaginarycode.minecraft.redisbungee;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.net.InetAddresses;
import com.google.common.util.concurrent.UncheckedExecutionException;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
@ -68,7 +69,9 @@ public class DataManager implements Listener {
}
}
});
} catch (ExecutionException e) {
} catch (ExecutionException | UncheckedExecutionException e) {
if (e.getCause() instanceof NullPointerException && e.getCause().getMessage().equals("user not found"))
return null; // HACK
plugin.getLogger().log(Level.SEVERE, "Unable to get server", e);
throw new RuntimeException("Unable to get server for " + uuid, e);
}
@ -89,7 +92,7 @@ public class DataManager implements Listener {
}
}
});
} catch (ExecutionException e) {
} catch (ExecutionException | UncheckedExecutionException e) {
if (e.getCause() instanceof NullPointerException && e.getCause().getMessage().equals("user not found"))
return null; // HACK
plugin.getLogger().log(Level.SEVERE, "Unable to get proxy", e);
@ -115,7 +118,7 @@ public class DataManager implements Listener {
}
}
});
} catch (ExecutionException e) {
} catch (ExecutionException | UncheckedExecutionException e) {
if (e.getCause() instanceof NullPointerException && e.getCause().getMessage().equals("user not found"))
return null; // HACK
plugin.getLogger().log(Level.SEVERE, "Unable to get IP", e);