AllenCoder / google-gson

Automatically exported from code.google.com/p/google-gson
0 stars 0 forks source link

Don't call setAccessible(true) unless necessary #344

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Calling setAccessible() is not necessary for public methods. And it fails for 
Applets. We shouldn't be calling this method unless necessary.

http://groups.google.com/group/google-gson/browse_thread/thread/81b22381038fee91
/67360feb039533f7?show_docid=67360feb039533f7

Original issue reported on code.google.com by limpbizkit on 10 Jul 2011 at 8:06

GoogleCodeExporter commented 9 years ago
setAccessible and isAcessible doesn't check wether target is effectively 
accessible. It just return or set a flag to suppress access check which require 
a too permissive permission. Serialiazing should implies to work only with 
public members so it may even be not needed in majority of case.

It fails for Applets and for any jvm launched with a security manager (shared 
hosting java environment).

Original comment by corte...@gmail.com on 31 May 2013 at 6:40

GoogleCodeExporter commented 9 years ago
It also fails for me when launching with Web Start.

Original comment by bryanw...@gmail.com on 16 Jun 2013 at 12:03