Skip to content

Replace general get/put/remove metadata calls with typed versions#1250

Merged
tobiasdiez merged 1 commit into
JabRef:masterfrom
tobiasdiez:groupAutomatic
Apr 20, 2016
Merged

Replace general get/put/remove metadata calls with typed versions#1250
tobiasdiez merged 1 commit into
JabRef:masterfrom
tobiasdiez:groupAutomatic

Conversation

@tobiasdiez

Copy link
Copy Markdown
Member

Also removed support of legacy user-specific file paths (serialized with a @ symbol). JabRef stopped writing this format over 3 years ago (according to https://sourceforge.net/p/jabref/bugs/1153/).

  • Change in CHANGELOG.md described
  • Tests created for changes
  • Screenshots added (for bigger UI changes)

@tobiasdiez tobiasdiez added component: cleanup-ops status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Apr 19, 2016
try {
defaults.put(USER_FILE_DIR_IND_LEGACY, Globals.FILE_FIELD + Globals.DIR_SUFFIX + '-' + get(DEFAULT_OWNER) + '@' + InetAddress.getLocalHost().getHostName()); // Legacy setting name - was a bug: @ not allowed inside BibTeX comment text. Retained for backward comp.
defaults.put(USER_FILE_DIR_INDIVIDUAL, Globals.FILE_FIELD + Globals.DIR_SUFFIX + '-' + get(DEFAULT_OWNER) + '-' + InetAddress.getLocalHost().getHostName()); // Valid setting name
return get(DEFAULT_OWNER) + '-' + InetAddress.getLocalHost().getHostName();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you remove the user file dir individual default values?

@tobiasdiez tobiasdiez Apr 20, 2016

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

USER_FILE_DIR_INDIVIDUAL was never a real preference and only used as a key to some other preference, i.e. the code read pref.get(pref.get(USER_FILE_DIR_INDIVIDUAL)) before and now takes the form pref.get(pref.getUser()). Moreover, USER_FILE_DIR_INDIVIDUAL was never set and so stayed at the default value.

@simonharrer

Copy link
Copy Markdown
Contributor

LGTM

@tobiasdiez tobiasdiez merged commit 863a9fc into JabRef:master Apr 20, 2016
@tobiasdiez tobiasdiez deleted the groupAutomatic branch April 20, 2016 18:33
@hsvia hsvia mentioned this pull request Nov 12, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: cleanup-ops status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants