shannah/Java-Objective-C-Bridge

`RuntimeUtils.rt` and `initialized` field should be final (and private / removed?)

Closed this issue · 1 comments

The RuntimeUtils class has the public fields rt and loaded:

public static Runtime rt = Runtime.INSTANCE;

public static boolean loaded = false;

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?