These field should likely be final to prevent users from reassigning them.
And maybe rt should also be private (or be completely removed) because having two fields providing the same instance might be irritating.
Also note that RuntimeUtils should have an explicit private constructor because it currently has a public default constructor.
Thanks, though if the loaded field is not exposed anymore, would it make sense to remove it? And additionally not swallow any exceptions in the static initializer, as pointed out in #28?
The
RuntimeUtils
class has the public fieldsrt
andloaded
: https://github.com/shannah/Java-Objective-C-Bridge/blob/473221aeef8f12ca9a659d899f3ca7092aed27ef/src/main/java/ca/weblite/objc/RuntimeUtils.java#L51 https://github.com/shannah/Java-Objective-C-Bridge/blob/473221aeef8f12ca9a659d899f3ca7092aed27ef/src/main/java/ca/weblite/objc/RuntimeUtils.java#L58These field should likely be
final
to prevent users from reassigning them. And maybert
should also be private (or be completely removed) because having two fields providing the same instance might be irritating.Also note that
RuntimeUtils
should have an explicit private constructor because it currently has a public default constructor.