-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
Skip redundant LoggerContext reset #41910
Skip redundant LoggerContext reset #41910
Conversation
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.
Thanks for the PR. I've added a couple of issues to review.
*/ | ||
@ExtendWith(OutputCaptureExtension.class) | ||
@ExtendWith({ MockitoExtension.class, OutputCaptureExtension.class }) |
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.
Is this change accidental? It doesn't seem related to the other changes?
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.
This appeared in #41885, which was reverted.
Without this, I ran into this issue in my environment, which failed the tests that use Mockito.mock
within this class for being unable to delete mockitoboot*.jar
from the JUnit temp directory.
With the change, the test is less finicky on Windows.
That said, I can take it out if required.
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.
I don't think it's needed. Regardless, it isn't related to this change so I think it should be taken out. #41905 has hopefully helped here.
@@ -1,5 +1,5 @@ | |||
/* | |||
* Copyright 2012-2023 the original author or authors. | |||
* Copyright 2012-2024 the original author or authors. |
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.
There doesn't seem to be any changes in this file so the copyright header should not be updated.
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.
This file was updated in #41885, which was reverted, but updated again without updating the years. So I feel it's accurate, but I'm happy to take it out if required.
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.
I should have bumped the year as part of dd2ed5f. That should now be done separately as it isn't related to this change so please take it out of this PR.
Is this the case? Is Logback 1.5.7 not binary compatible with Logback 1.5.6? |
Thanks for the review 🙇♂️ |
Yes, because the return type of Spring Boot 3.3.2 with Logback 1.5.7 blows up with |
So this is in addition of the actual upgrade to Logback then? |
*/ | ||
@ExtendWith(OutputCaptureExtension.class) | ||
@ExtendWith({ MockitoExtension.class, OutputCaptureExtension.class }) |
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.
I don't think it's needed. Regardless, it isn't related to this change so I think it should be taken out. #41905 has hopefully helped here.
@@ -1,5 +1,5 @@ | |||
/* | |||
* Copyright 2012-2023 the original author or authors. | |||
* Copyright 2012-2024 the original author or authors. |
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.
I should have bumped the year as part of dd2ed5f. That should now be done separately as it isn't related to this change so please take it out of this PR.
Yes, I thought this made sense to do after reviewing dd2ed5f. |
4589afb
to
16f2696
Compare
Thank you for the review. 🙇🏻 All feedback has been implemented. ✨🧹 |
I think we should leave this as-is. Arguably, calling both In 1.5.7, |
Skips a redundant call to
LoggerContext#reset()
.#stop()
on anyLoggerContext
implicitly called#reset()
. On the other hand, since Logback 1.5.7, only calling#stop()
on a startedLoggerContext
implicitly calls#reset()
. Going forward, given the next version of Spring Boot will not be binary or source compatible with Logback 1.5.6 and earlier, it's only necessary to call#reset()
on a stoppedLoggerContext
.