if (count > 1) {
throw new IllegalStateException(
"slim3-xxx.jar files are duplicate in the classpath.");
}
} catch (IOException e) {
throw new WrapRuntimeException(e);
}
try {
Enumeration<URL> resources =
Thread
.currentThread()
.getContextClassLoader()
.getResources(
ApiProxy.class.getName().replace('.', '/')
+ ".class");
int count = 0;
while (resources.hasMoreElements()) {
resources.nextElement();
count++;
}
if (count > 1) {
throw new IllegalStateException(
"appengine-api-1.0-sdk-xxx.jar files are duplicate in the classpath.");
}
} catch (IOException e) {
throw new WrapRuntimeException(e);
}
}
}