You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/10/03 20:12:37 UTC
[GitHub] [pulsar] eolivelli commented on a change in pull request #12270: [Modernizer]Add Maven Modernizer plugin in pulsar-common module and fix violation.
eolivelli commented on a change in pull request #12270:
URL: https://github.com/apache/pulsar/pull/12270#discussion_r720880279
##########
File path: pulsar-common/pom.xml
##########
@@ -196,6 +196,24 @@
<build>
<plugins>
+ <plugin>
+ <groupId>org.gaul</groupId>
+ <artifactId>modernizer-maven-plugin</artifactId>
Review comment:
We should define the plugin in the parent pom
##########
File path: pulsar-common/src/main/java/org/apache/pulsar/common/policies/data/PersistentOfflineTopicStats.java
##########
@@ -55,8 +55,8 @@
public PersistentOfflineTopicStats(String topicName, String brokerName) {
this.brokerName = brokerName;
this.topicName = topicName;
- this.dataLedgerDetails = Lists.newArrayList();
- this.cursorDetails = Maps.newHashMap();
+ this.dataLedgerDetails = new ArrayList<>();
Review comment:
I prefer this version (as probably the JVM deals better with having the constructor call insteadof havingan indirection), but we are using these helpers everywhere.
Probably we should ask on dev@ about this style change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org