Skip to content

Commit

Permalink
fix: use string instead of package so that package need not exist for…
Browse files Browse the repository at this point in the history
… migration to work
  • Loading branch information
rhwood committed Feb 11, 2020
1 parent 5bc4226 commit 3b88410
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions java/src/jmri/server/json/JsonServerPreferences.java
Expand Up @@ -37,8 +37,10 @@ public JsonServerPreferences(String fileName) {
Preferences sharedPreferences = ProfileUtils.getPreferences(activeProfile, getClass(), true);
migrate = sharedPreferences.get(PORT, null) == null;
if (migrate) {
Package old = Package.getPackage("jmri.jmris.json");
Preferences oldPreferences = JmriPreferencesProvider.getPreferences(activeProfile, old, true);
// method is deprecated to discourage use, not for removal
// using to allow migration from old package to new package
@SuppressWarnings("deprecation")
Preferences oldPreferences = JmriPreferencesProvider.getPreferences(activeProfile, "jmri.jmris.json", true);
readPreferences(oldPreferences);
}
readPreferences(sharedPreferences);
Expand Down

0 comments on commit 3b88410

Please sign in to comment.