borowiak / pwa-technologies

Automatically exported from code.google.com/p/pwa-technologies
0 stars 0 forks source link

Method uses toArray() with zero-length array argument #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As reported by findbugs:
"This method uses the toArray() method of a collection derived class, and 
passes in a zero-length prototype array argument. It is more efficient to use 
myCollection.toArray(new Foo[myCollection.size()]) If the array passed in is 
big enough to store all of the elements of the collection, then it is populated 
and returned directly. This avoids the need to create a second array (by 
reflection) to return as the result."

Classes with the reported issue:
* org.archive.access.nutch.Multiple
* org.archive.mapred.TaskLogInputFormat

Original issue reported on code.google.com by devel.da...@vcruz.net on 18 Sep 2012 at 2:20

GoogleCodeExporter commented 9 years ago
Added patch.

Original comment by devel.da...@vcruz.net on 18 Sep 2012 at 2:59

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by devel.da...@vcruz.net on 18 Sep 2012 at 2:59

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r446.

Original comment by devel.da...@vcruz.net on 11 Dec 2012 at 12:22