Refactoring AppSettings

Hi,

I’ve got this very simple problem and a proposition. Basically refactoring AppSettings.

Problem:
Maintaining global application settings & user settings separately. In different files. Whereas the global application settings would really have nothing to do with JME. But JME has nice handling of property files through AppSettings.java which I would like to use. And it is usable right now as well, just avoid generating the defaults. But hygiene! :smile:

Proposition:
Strip AppSettings of these generic property file handling stuff (saving, loading, reading…) and instead let AppSettings extend this newly founded utility class. Maybe not a very common use case but not a big change either and totally non-breaking one.

The original code I’m speaking of:

My recollection is that AppSettings is just using Java Preferences API… which you can use directly. No utility class needed really?

Yes it uses Preferences API. But it doesn’t expose it. And the format it produces is not the same. AppSettings has a nice way of handling types.

And it also uses Properties straight. That is where the types get in the game. And that is why it doesn’t expose anything except the HashMap that it is.