What steps will reproduce the problem?
Create a not signed applet with this code inside (for example init-method):
--------------
String jsonString ="{"+
"'date' : '1.1.1955',"+
"'numbers' : [1,2,3,4,5,6,7,8,9],"+
"}";
GsonBuilder gb = new GsonBuilder();
gb.setDateFormat("dd.MM.yyyy");
Gson gson = gb.create();
Data data = gson.fromJson(jsonString, Data.class);
--------------
class Data {
public Date date;
public int [] numbers;
public Data() {}
... getter and setter...
}
--------------
What is the expected output?
No security exceptions within an applet.
What do you see instead?
Security Exception, because reflection is used with "setAccessible".
What version of the product are you using? On what operating system?
Gson 2.2.2., Applet Java 1.7, Applet using JNLP.
Please provide any additional information below.
Code should work in an applet without any additional privilege.
Original issue reported on code.google.com by uhenni...@googlemail.com on 27 Dec 2012 at 1:11
Original issue reported on code.google.com by
uhenni...@googlemail.com
on 27 Dec 2012 at 1:11