mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Use correct find class in ExtentTraverser (#2649)
use correct find class in ExtentTraverser
This commit is contained in:
parent
c10f58ac95
commit
2dee197f2b
@ -51,11 +51,10 @@ public class ExtentTraverser<T extends Extent> {
|
|||||||
return last;
|
return last;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public <U> U findAndGet(Class<U> clazz) {
|
public <U extends Extent> U findAndGet(Class<U> clazz) {
|
||||||
ExtentTraverser<Extent> traverser = find(clazz);
|
ExtentTraverser<U> traverser = find(clazz);
|
||||||
return (traverser != null) ? (U) traverser.get() : null;
|
return (traverser != null) ? traverser.get() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
Loading…
Reference in New Issue
Block a user