-
Notifications
You must be signed in to change notification settings - Fork 34
refactor: Refactored to remove hasH2Console boolean flag and replace … #1309
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
refactor: Refactored to remove hasH2Console boolean flag and replace … #1309
Conversation
Generated by 🚫 Danger |
@@ -85,7 +84,6 @@ public void onIndexPageWithLocalResources() { | |||
ContentSecurityPolicyHeaderWriter writer = new ContentSecurityPolicyHeaderWriter( | |||
false, | |||
true, | |||
bool(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everywhere where we used bool()
, I suggest to use nullOr(H2_CONSOLE_PATH)
to have the similar behavior as before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, just a small improvement.
PMD complains:
See https://travis-ci.org/github/php-coder/mystamps/jobs/669489779 |
86b25fc
to
f7f8b1d
Compare
|
||
// @todo #226 Introduce app.use-public-hostname property | ||
boolean usePublicHostname = environment.acceptsProfiles("prod"); | ||
String hostname = usePublicHostname ? SiteUrl.PUBLIC_URL : SiteUrl.SITE; | ||
|
||
String h2ConsolePath = hasH2Console ? h2ConsoleProperties.getPath() : null; | ||
String h2ConsolePath = h2ConsoleProperties == null ? null: h2ConsoleProperties.getPath(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CheckStyle complains on this line:
[ERROR] src/main/java/ru/mystamps/web/support/spring/security/SecurityConfig.java:[95,66] (whitespace) WhitespaceAround: ':' is not preceded with whitespace.
See https://travis-ci.org/github/php-coder/mystamps/jobs/669672924
Everything else looks good. Ping me when it will be ready to be merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@php-coder ping
…it with a check on the H2 console properties/path. Fix php-coder#1307
f7f8b1d
to
6af47d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you!
@mscibilia Thank you again for your contribution! 👍 If you want to work on something else, please, let me know -- you can pick whatever you want and I'll explain in details what is needed or I can select something for you (for example, #603 is simple as it only requires to modify regexp and related tests). |
…it with a check on the H2 console properties/path.
Addressed to #1307