Setting Final Fields

17 views
Skip to first unread message

Brian Voter

unread,
Jun 2, 2016, 5:01:58 PM6/2/16
to yamlbeans-users
Hi, I am wondering if there is any way to allow the YamlReader to set final fields in a configuration class. Since I never want to alter the object after it is loaded, it seems most convenient to set its fields as final. 

Of course, this fails with an IllegalAccessException since the field is final.

Any way around this?

Cheers!

Nate

unread,
Jun 3, 2016, 7:31:08 AM6/3/16
to yamlbea...@googlegroups.com
Try with the latest, I committed always calling setAccessible.

Cheers,
-Nate

--
--
You received this message because you are subscribed to the "yamlbeans-users" group:
http://groups.google.com/group/yamlbeans-users

---
You received this message because you are subscribed to the Google Groups "yamlbeans-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yamlbeans-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages