lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] Commented: (LUCENE-2339) Allow Directory.copy() to accept a collection of file names to be copied
Date Tue, 23 Mar 2010 07:16:27 GMT


Uwe Schindler commented on LUCENE-2339:

bq. I just wanted to avoid converting arrays to a Collection, just so that they can be iterated

Sorry, for the dumb question: In which JDK do arrays implement Iterable? From my knowledge
and a quick check with Java 5, it does not. Passing an array to a method taking Iterable does
not work. Arrays only work in extended for statement, but not because they are Itearble. The
generated code by javac is also totally different (and more effective than creating an iterator,
it just uses the conventional for(i=0; i<length; i++) approach - try it out with javac
and decompiling with jad or whatever)! Also arrays of native types can hardly implement Iterable
without autoboxing.

- []
- []

> Allow Directory.copy() to accept a collection of file names to be copied
> ------------------------------------------------------------------------
>                 Key: LUCENE-2339
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Earwin Burrfoot
>            Assignee: Michael McCandless
>         Attachments: LUCENE-2339.patch, LUCENE-2339.patch, LUCENE-2339.patch
> Par example, I want to copy files pertaining to a certain commit, and not everything
there is in a Directory.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message