You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/02/09 23:28:58 UTC
[GitHub] [druid] suneet-s opened a new pull request #9339: IntelliJ
inspections cleanup
suneet-s opened a new pull request #9339: IntelliJ inspections cleanup
URL: https://github.com/apache/druid/pull/9339
* Standard Charset object can be used
* Redundant Collection.addAll() call
* String literal concatenation missing whitespace
* Statement with empty body
* Redundant Collection operation
* StringBuilder can be replaced with String
* Type parameter hides visible type
Reading through the warnings, none of these appear terribly bad.
The type parameter warning is a good one to be an error since it's usually a mistake in parameterizing the types by the dev.
Empty statement bodies are also good errors to flag since it's possible an empty body
was unintentional.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] suneet-s commented on a change in pull request #9339:
IntelliJ inspections cleanup
Posted by GitBox <gi...@apache.org>.
suneet-s commented on a change in pull request #9339: IntelliJ inspections cleanup
URL: https://github.com/apache/druid/pull/9339#discussion_r381421868
##########
File path: processing/src/main/java/org/apache/druid/query/groupby/having/GreaterThanHavingSpec.java
##########
@@ -121,12 +121,10 @@ public int hashCode()
@Override
public String toString()
{
- final StringBuilder sb = new StringBuilder();
- sb.append("GreaterThanHavingSpec");
- sb.append("{aggregationName='").append(aggregationName).append('\'');
- sb.append(", value=").append(value);
- sb.append('}');
- return sb.toString();
+ return "GreaterThanHavingSpec{" +
+ "{aggregationName='" + aggregationName + '\'' +
Review comment:
Done
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] ccaominh merged pull request #9339: IntelliJ inspections
cleanup
Posted by GitBox <gi...@apache.org>.
ccaominh merged pull request #9339: IntelliJ inspections cleanup
URL: https://github.com/apache/druid/pull/9339
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] ccaominh commented on a change in pull request #9339:
IntelliJ inspections cleanup
Posted by GitBox <gi...@apache.org>.
ccaominh commented on a change in pull request #9339: IntelliJ inspections cleanup
URL: https://github.com/apache/druid/pull/9339#discussion_r406375081
##########
File path: services/src/main/java/org/apache/druid/cli/CliHadoopIndexer.java
##########
@@ -84,8 +84,8 @@ public void run()
extensionURLs.addAll(Arrays.asList(((URLClassLoader) extensionLoader).getURLs()));
}
- final List<URL> nonHadoopURLs = new ArrayList<>();
- nonHadoopURLs.addAll(Arrays.asList(((URLClassLoader) CliHadoopIndexer.class.getClassLoader()).getURLs()));
+ final List<URL> nonHadoopURLs = new ArrayList<>(Arrays.asList(((URLClassLoader) CliHadoopIndexer.class.getClassLoader())
Review comment:
The `new ArrrayList<>()` seems unnecessary?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] ccaominh commented on a change in pull request #9339:
IntelliJ inspections cleanup
Posted by GitBox <gi...@apache.org>.
ccaominh commented on a change in pull request #9339: IntelliJ inspections cleanup
URL: https://github.com/apache/druid/pull/9339#discussion_r406373285
##########
File path: processing/src/main/java/org/apache/druid/segment/writeout/OnHeapMemorySegmentWriteOutMediumFactory.java
##########
@@ -23,6 +23,7 @@
import java.io.File;
+
Review comment:
Revert?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] ccaominh commented on a change in pull request #9339:
IntelliJ inspections cleanup
Posted by GitBox <gi...@apache.org>.
ccaominh commented on a change in pull request #9339: IntelliJ inspections cleanup
URL: https://github.com/apache/druid/pull/9339#discussion_r381099034
##########
File path: processing/src/main/java/org/apache/druid/query/groupby/having/GreaterThanHavingSpec.java
##########
@@ -121,12 +121,10 @@ public int hashCode()
@Override
public String toString()
{
- final StringBuilder sb = new StringBuilder();
- sb.append("GreaterThanHavingSpec");
- sb.append("{aggregationName='").append(aggregationName).append('\'');
- sb.append(", value=").append(value);
- sb.append('}');
- return sb.toString();
+ return "GreaterThanHavingSpec{" +
+ "{aggregationName='" + aggregationName + '\'' +
Review comment:
There's an extra `{` that got added here.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] suneet-s commented on a change in pull request #9339:
IntelliJ inspections cleanup
Posted by GitBox <gi...@apache.org>.
suneet-s commented on a change in pull request #9339: IntelliJ inspections cleanup
URL: https://github.com/apache/druid/pull/9339#discussion_r406624765
##########
File path: services/src/main/java/org/apache/druid/cli/CliHadoopIndexer.java
##########
@@ -84,8 +84,8 @@ public void run()
extensionURLs.addAll(Arrays.asList(((URLClassLoader) extensionLoader).getURLs()));
}
- final List<URL> nonHadoopURLs = new ArrayList<>();
- nonHadoopURLs.addAll(Arrays.asList(((URLClassLoader) CliHadoopIndexer.class.getClassLoader()).getURLs()));
+ final List<URL> nonHadoopURLs = new ArrayList<>(Arrays.asList(((URLClassLoader) CliHadoopIndexer.class.getClassLoader())
Review comment:
removed
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] suneet-s commented on a change in pull request #9339:
IntelliJ inspections cleanup
Posted by GitBox <gi...@apache.org>.
suneet-s commented on a change in pull request #9339: IntelliJ inspections cleanup
URL: https://github.com/apache/druid/pull/9339#discussion_r406623418
##########
File path: processing/src/main/java/org/apache/druid/segment/writeout/OnHeapMemorySegmentWriteOutMediumFactory.java
##########
@@ -23,6 +23,7 @@
import java.io.File;
+
Review comment:
removed
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org