-
Notifications
You must be signed in to change notification settings - Fork 357
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
Fix logging delimiter parameterization #5003
Merged
senivam
merged 3 commits into
eclipse-ee4j:master
from
nunomsantos:fix-logging-delimiter-parameterization
Mar 18, 2022
Merged
Fix logging delimiter parameterization #5003
senivam
merged 3 commits into
eclipse-ee4j:master
from
nunomsantos:fix-logging-delimiter-parameterization
Mar 18, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…t working as expected Relates to issue eclipse-ee4j#4734 and pull request eclipse-ee4j#4745
Relates to issue eclipse-ee4j#4734 and pull request eclipse-ee4j#4745
nunomsantos
commented
Mar 14, 2022
core-common/src/main/java/org/glassfish/jersey/logging/LoggingFeature.java
Show resolved
Hide resolved
Hi, @jansupol. Not sure if I need to request a review but I don't see how I can do that in the UI. |
senivam
approved these changes
Mar 17, 2022
jansupol
reviewed
Mar 18, 2022
core-common/src/main/java/org/glassfish/jersey/logging/LoggingFeature.java
Show resolved
Hide resolved
jansupol
approved these changes
Mar 18, 2022
This was referenced Jun 14, 2022
Closed
This was referenced Dec 7, 2022
Closed
1 task
This was referenced Jan 6, 2023
Merged
This was referenced Feb 11, 2023
Closed
1 task
This was referenced May 11, 2023
This was referenced Jun 1, 2023
This was referenced Jun 4, 2023
This was referenced Jun 15, 2023
This was referenced Jul 6, 2023
This was referenced Aug 28, 2023
This was referenced Jan 16, 2024
1 task
1 task
This was referenced Apr 13, 2024
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi all,
While reading the classes and tests for the logging feature I noticed that the code introduced in pull request #4745 to add the improvement requested on #4734 is not working as intended.
This has not been noticed by the existing tests because they were using a constructor that would not pass through the problematic code.
Currently, when registering the
LoggingFeature
and setting theLoggingFeature.LOGGING_FEATURE_SEPARATOR
property, the empty constructor is called, which calls other constructors with nulls and so on.Eventually we reach the constructor using a
LoggingFeatureBuilder
, where the arguments are set to be passed to the last constructor.There, the builder is also set with the default separator, which later causes the following code to ignore the configuration properties on
configureBuilderParameters(...)
.Since the builder is initially set with the default separator, it is never overridden by the configurations.
The fix is just to remove the line setting the
DEFAULT_SEPARATOR
on the builder before passing to the last constructor.I guess a conversation could be had about the other configurations: anything set as non-null in the builder cannot be overridden by configurations later; but that's likely okay because those other constructors are only used in tests and the empty constructor just sets everything as null.