Index: CHANGES.txt =================================================================== --- CHANGES.txt (revision 836019) +++ CHANGES.txt (working copy) @@ -16,6 +16,12 @@ the internal cache implementation for thread safety, before it was declared protected. (Peter Lenahan, Uwe Schindler, Simon Willnauer) +* LUCENE-2052: Some methods in Lucene core were changed to accept + Java 5 varargs. This is not a backwards compatibility problem as + long as you not try to override such a method. We left common + overriden methods unchanged and added varargs to constructors + or final methods (MultiSearcher,...). (Uwe Schindler) + Changes in runtime behavior * LUCENE-1677: Remove the system property to set SegmentReader class Index: src/java/org/apache/lucene/search/ConjunctionScorer.java =================================================================== --- src/java/org/apache/lucene/search/ConjunctionScorer.java (revision 836019) +++ src/java/org/apache/lucene/search/ConjunctionScorer.java (working copy) @@ -33,7 +33,7 @@ this(similarity, scorers.toArray(new Scorer[scorers.size()])); } - public ConjunctionScorer(Similarity similarity, Scorer[] scorers) throws IOException { + public ConjunctionScorer(Similarity similarity, Scorer... scorers) throws IOException { super(similarity); this.scorers = scorers; coord = similarity.coord(scorers.length, scorers.length); Index: src/java/org/apache/lucene/search/FieldCacheTermsFilter.java =================================================================== --- src/java/org/apache/lucene/search/FieldCacheTermsFilter.java (revision 836019) +++ src/java/org/apache/lucene/search/FieldCacheTermsFilter.java (working copy) @@ -97,7 +97,7 @@ private String field; private String[] terms; - public FieldCacheTermsFilter(String field, String[] terms) { + public FieldCacheTermsFilter(String field, String... terms) { this.field = field; this.terms = terms; } Index: src/java/org/apache/lucene/search/function/CustomScoreQuery.java =================================================================== --- src/java/org/apache/lucene/search/function/CustomScoreQuery.java (revision 836019) +++ src/java/org/apache/lucene/search/function/CustomScoreQuery.java (working copy) @@ -82,7 +82,7 @@ * {@link org.apache.lucene.search.function.FieldScoreQuery FieldScoreQueries}. * This parameter is optional - it can be null or even an empty array. */ - public CustomScoreQuery(Query subQuery, ValueSourceQuery valSrcQueries[]) { + public CustomScoreQuery(Query subQuery, ValueSourceQuery... valSrcQueries) { super(); this.subQuery = subQuery; this.valSrcQueries = valSrcQueries!=null? Index: src/java/org/apache/lucene/search/Query.java =================================================================== --- src/java/org/apache/lucene/search/Query.java (revision 836019) +++ src/java/org/apache/lucene/search/Query.java (working copy) @@ -178,7 +178,7 @@ * *
A utility for use by {@link #combine(Query[])} implementations.
*/
- public static Query mergeBooleanQueries(BooleanQuery[] queries) {
+ public static Query mergeBooleanQueries(BooleanQuery... queries) {
HashSet