Created
August 20, 2015 07:55
-
-
Save jsyeo/7fd641de62807dc50f83 to your computer and use it in GitHub Desktop.
Type Erasure of Generic Method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
Rectangle r = new Rectangle(); | |
vulnerableDrawShape(r); | |
} | |
static <T extends Shape> void vulnerableDrawShape(T shape) { | |
} | |
} | |
class Rectangle extends Shape { | |
} | |
class Circle extends Shape { | |
} | |
class Shape { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment