You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/05/04 20:03:57 UTC

svn commit: r771380 - /incubator/pivot/trunk/wtk/src/pivot/wtkx/WTKXSerializer.java

Author: tvolkert
Date: Mon May  4 18:03:57 2009
New Revision: 771380

URL: http://svn.apache.org/viewvc?rev=771380&view=rev
Log:
Made WTKXSerializer#bind(Object) work for applets that bind to public fields

Modified:
    incubator/pivot/trunk/wtk/src/pivot/wtkx/WTKXSerializer.java

Modified: incubator/pivot/trunk/wtk/src/pivot/wtkx/WTKXSerializer.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/pivot/wtkx/WTKXSerializer.java?rev=771380&r1=771379&r2=771380&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/pivot/wtkx/WTKXSerializer.java (original)
+++ incubator/pivot/trunk/wtk/src/pivot/wtkx/WTKXSerializer.java Mon May  4 18:03:57 2009
@@ -967,7 +967,12 @@
 
                 // Set the resource into the field
                 if (!field.isAccessible()) {
-                    field.setAccessible(true);
+                    try {
+                        field.setAccessible(true);
+                    } catch (Exception ex) {
+                        // No-op; the callers might have used public fields, in
+                        // which case we don't need to make them accessible
+                    }
                 }
 
                 try {
@@ -999,7 +1004,12 @@
 
                 // Set the value into the field
                 if (!field.isAccessible()) {
-                    field.setAccessible(true);
+                    try {
+                        field.setAccessible(true);
+                    } catch (Exception ex) {
+                        // No-op; the callers might have used public fields, in
+                        // which case we don't need to make them accessible
+                    }
                 }
 
                 try {