LUCENE-2510: remove unchecked cast :-) It's much easier!

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene2510@1365030 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Uwe Schindler 2012-07-24 13:03:27 +00:00
parent 6e966079b1
commit 75b3fe9c81
1 changed files with 1 additions and 3 deletions

View File

@ -56,9 +56,7 @@ public final class AnalysisSPILoader<S extends AbstractAnalysisFactory> {
// them used instead of others
if (!services.containsKey(name)) {
assert checkServiceName(name);
@SuppressWarnings("unchecked")
final Class<? extends S> sclazz = (Class<? extends S>) service.getClass();
services.put(name, sclazz);
services.put(name, service.getClass().asSubclass(clazz));
}
}
this.services = Collections.unmodifiableMap(services);