Skip to content

Instantly share code, notes, and snippets.

@jsyeo
Created August 20, 2015 07:56
Show Gist options
  • Save jsyeo/df9dcb96561d91422e71 to your computer and use it in GitHub Desktop.
Save jsyeo/df9dcb96561d91422e71 to your computer and use it in GitHub Desktop.
Type Erasure of Bounded Type Parameter
public class Main {
public static void main(String[] args) {
MyClass<Integer> c = new MyClass<Integer>();
c.vulnerableMethod(42);
}
}
class MyClass<T extends Comparable> {
void vulnerableMethod(T t) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment