-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Feat(SystemClock): Added PreciseClock implementation to the system clock class, for the benefit of Java 8 users. #3217
base: 2.x
Are you sure you want to change the base?
Conversation
The build failure is due to the Please, rebase. |
d621b82
to
cf1ddbf
Compare
Code changes look good to me. Can you add a changelog entry for this? You can copy |
Hi @jvz , @ppkarwasz There we go did it 📦 |
…ock class, for the benefit of Java 8 users.
cf1ddbf
to
b147ca3
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.
Since the Java 8 and Java 9+ versions of the SystemClock
class are identical now, can you remove the Java 9+ version (in log4j-core-java9
). The log4j-core-java9
package has a lot of dummy classes, whose purpose is to make the module compilable, they are not packaged. Can you remove those dummy classes too?
/** | ||
* Implementation of the {@code Clock} interface that returns the system time. | ||
* @since 2.25 |
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.
The class itself is older, so we should remove the @since
.
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.
Sounds good!
/** | ||
* {@inheritDoc} | ||
*/ |
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.
Personally I find {@inheritDoc}
a little bit useless, since IDEs will look at the Javadoc of the parent class/implemented interface anyway, if the Javadoc is missing.
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.
Sounds good, will remove this too!
Great opportunity for me to learn here:
|
To make it "compilable". The These are the classes that I call "dummy" classes.
We use the Maven Assembly plugin to package the classes in
They should have a comment near the top that says that they are "dummy" or something equivalent. |
Straight forward change to override the behavior of System Clock, to implement the Precise Clock interface, for the benefit of Java 8 users. The PR is for issue #3198
Checklist
2.x
branch if you are targeting Log4j 2; usemain
otherwise./mvnw verify
succeeds (if it fails due to code formatting issues reported by Spotless, simply run./mvnw spotless:apply
and retry)src/changelog/.2.x.x
directory