Skip to content

Instantly share code, notes, and snippets.

@dotkebi
Last active March 20, 2016 12:46
Show Gist options
  • Save dotkebi/5f17eb1f0e105b7deb58 to your computer and use it in GitHub Desktop.
Save dotkebi/5f17eb1f0e105b7deb58 to your computer and use it in GitHub Desktop.
java unchecked warning
List<MyObject> arrayList = new ArrayList<>();
if (resultMap.get("key") instanceof List) {
List list = (List) resultMap.get("key");
for (Object item : list) {
if (item instanceof MyObject) {
arrayList.add((MyObject) item);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment