[java][tests] Fix/suppress unchecked warnings

Summary:
`make test` failed in some test directories, because we were getting warnings
 ```
Foo.java uses unchecked or unsafe operations.
```

This diff fixes or suppresses these warnings.

Reviewed By: skcho

Differential Revision: D20557572

fbshipit-source-id: 63ecd3dfa
master
Ezgi Çiçek 5 years ago committed by Facebook GitHub Bot
parent 4e9f34efea
commit cdb9281f1f

@ -131,6 +131,7 @@ class PurityModeled {
for (Color c : Color.values()) {}
}
@SuppressWarnings("unchecked")
void clone_pure(ArrayList<String> list) {
ArrayList<String> cloned = (ArrayList<String>) list.clone();
cloned.add(""); // no change the list

@ -294,7 +294,7 @@ public class ArrayListTest {
}
}
ArrayList<Elt> arr = new ArrayList();
ArrayList<Elt> arr = new ArrayList<Elt>();
void boolean_control_var_linear() {
for (int i = 0; i < arr.size(); i++) {

@ -28,6 +28,7 @@ class PurityModeled {
for (Color c : Color.values()) {}
}
@SuppressWarnings("unchecked")
void clone_pure(ArrayList<String> list) {
ArrayList<String> cloned = (ArrayList<String>) list.clone();
cloned.add(""); // no change the list

Loading…
Cancel
Save