Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve unchecked type casting in Chunk and ChunkRepository #247

Open
notjuanortiz opened this issue Jan 26, 2021 · 0 comments
Open

Resolve unchecked type casting in Chunk and ChunkRepository #247

notjuanortiz opened this issue Jan 26, 2021 · 0 comments

Comments

@notjuanortiz
Copy link
Contributor

> Task :compileJava
/home/travis/build/luna-rs/luna/src/main/java/io/luna/game/model/chunk/Chunk.java:83: warning: [unchecked] unchecked cast
        return (Stream<E>) getAll(type).stream();
                                              ^
  required: Stream<E>
  found:    Stream<Entity>
  where E is a type-variable:
    E extends Entity declared in method <E>stream(EntityType)
/home/travis/build/luna-rs/luna/src/main/java/io/luna/game/model/chunk/Chunk.java:94: warning: [unchecked] unchecked cast
        return (Iterator<E>) getAll(type).iterator();
                                                  ^
  required: Iterator<E>
  found:    Iterator<Entity>
  where E is a type-variable:
    E extends Entity declared in method <E>iterator(EntityType)
/home/travis/build/luna-rs/luna/src/main/java/io/luna/game/model/chunk/ChunkRepository.java:70: warning: [unchecked] unchecked cast
        return (Set<E>) entities.get(type);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant