vongosling closed pull request #360: [ISSUE #359]Fix logging check period
URL: https://github.com/apache/rocketmq/pull/360
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/logging/src/main/java/org/apache/rocketmq/logging/inner/LoggingBuilder.java
b/logging/src/main/java/org/apache/rocketmq/logging/inner/LoggingBuilder.java
index 469cb52b2..f457a6956 100644
---
a/logging/src/main/java/org/apache/rocketmq/logging/inner/LoggingBuilder.java
+++
b/logging/src/main/java/org/apache/rocketmq/logging/inner/LoggingBuilder.java
@@ -966,7 +966,7 @@ int computeCheckPeriod() {
rollingCalendar.setType(i);
Date next = new
Date(rollingCalendar.getNextCheckMillis(epoch));
String r1 = simpleDateFormat.format(next);
- if (r0.equals(r1)) {
+ if (r0 != null && r1 != null && !r0.equals(r1)) {
return i;
}
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services