Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract SettingsHelper from SearchHelper #3130

Merged
merged 2 commits into from
May 5, 2020

Conversation

idodeclare
Copy link
Contributor

Hello,

Please consider for integration this patch to extract SettingsHelper from SearchHelper. This is from open PR #2732 and is a pre-requisite to a number of ready features, including search context and directory #LinesLOC.

Thank you.

@coveralls
Copy link

coveralls commented Apr 28, 2020

Pull Request Test Coverage Report for Build 5120

  • 1 of 48 (2.08%) changed or added relevant lines in 2 files are covered.
  • 30 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.04%) to 73.43%

Changes Missing Coverage Covered Lines Changed/Added Lines %
opengrok-indexer/src/main/java/org/opengrok/indexer/web/SearchHelper.java 1 9 11.11%
opengrok-indexer/src/main/java/org/opengrok/indexer/search/SettingsHelper.java 0 39 0.0%
Files with Coverage Reduction New Missed Lines %
opengrok-indexer/src/main/java/org/opengrok/indexer/web/SearchHelper.java 1 30.09%
plugins/src/main/java/opengrok/auth/plugin/ldap/LdapFacade.java 29 30.77%
Totals Coverage Status
Change from base Build 5114: -0.04%
Covered Lines: 37541
Relevant Lines: 51125

💛 - Coveralls

}

String k = projectName != null ? projectName : "";
return mappedAnalysisSettings.get(k);
Copy link
Contributor

Choose a reason for hiding this comment

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

k is not very descriptive

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Revised

*/
public Map<String, IndexedSymlink> getSymlinks(String projectName) {
if (mappedIndexedSymlinks == null) {
throw new IllegalStateException("getSettings() not yet called");
Copy link
Contributor

Choose a reason for hiding this comment

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

is it problem to call it here getSettings()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No doesn't seem so

@tarzanek
Copy link
Contributor

tarzanek commented May 5, 2020

lgtm, merging

@tarzanek tarzanek merged commit 182f294 into oracle:master May 5, 2020
@idodeclare idodeclare deleted the feature/settings_helper branch May 5, 2020 15:52
@idodeclare
Copy link
Contributor Author

Thank you for the reviews, @ktulinger and @tarzanek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants