asdf2014 commented on a change in pull request #5980: Various changes about 
druid-services module
URL: https://github.com/apache/incubator-druid/pull/5980#discussion_r201389385
 
 

 ##########
 File path: 
extensions-contrib/orc-extensions/src/test/java/io/druid/data/input/orc/OrcIndexGeneratorJobTest.java
 ##########
 @@ -291,8 +291,8 @@ private void verifyJob(IndexGeneratorJob job) throws 
IOException
         Assert.assertEquals(Integer.valueOf(9), 
dataSegment.getBinaryVersion());
 
         Assert.assertEquals(dataSourceName, dataSegment.getDataSource());
-        Assert.assertTrue(dataSegment.getDimensions().size() == 1);
-        String[] dimensions = dataSegment.getDimensions().toArray(new 
String[dataSegment.getDimensions().size()]);
+        Assert.assertEquals(1, dataSegment.getDimensions().size());
+        String[] dimensions = dataSegment.getDimensions().toArray(new 
String[0]);
 
 Review comment:
   Yes. Indeed, in this way, such a similar work will be more effective. By the 
way, can we learn from Alibaba's Java coding specification project 
[P3C](https://github.com/alibaba/p3c). Although the specifications in it are 
not completely correct... For example, i just submitted [the issue about the 
pre-allocated size toArray method](https://github.com/alibaba/p3c/issues/348) 
to P3C a few days ago. :sweat_smile:

----------------------------------------------------------------
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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to