vrozov commented on a change in pull request #1446: DRILL-6349: Drill JDBC
driver fails on Java 1.9+ with NoClassDefFoundError: sun/misc/VM
URL: https://github.com/apache/drill/pull/1446#discussion_r213835338
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/planner/FileSystemPartitionDescriptor.java
##########
@@ -179,7 +179,7 @@ protected void createPartitionSublists() {
// build a list of DFSDirPartitionLocation.
for (final List<String> dirs : dirToFileMap.keySet()) {
- locations.add( new DFSDirPartitionLocation((String [])dirs.toArray(),
dirToFileMap.get(dirs)));
+ locations.add( new DFSDirPartitionLocation(dirs.toArray(new String [0]),
dirToFileMap.get(dirs)));
Review comment:
Thanks for the link. There is a difference in behavior of `ArrayList` and
`Array.ArrayList` that is used in this method. In any case, if you touch this
method, you will need to fix it, as there is no reason to create `ArrayList`,
so I'd suggest to file a separate JIRA and fix it in a separate PR.
----------------------------------------------------------------
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