File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
engine/src/main/java/org/hibernate/search Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 2424
2525package org .hibernate .search .query .dsl .impl ;
2626
27+ import java .util .Arrays ;
2728import java .util .Date ;
2829import java .util .List ;
2930
@@ -43,16 +44,14 @@ class FacetBuildingContext<T> {
4344 /**
4445 * The list of types which are supported for range faceting
4546 */
46- private static final List <Class <?>> allowedRangeTypes = newArrayList ( 6 );
47-
48- static {
49- allowedRangeTypes .add ( String .class );
50- allowedRangeTypes .add ( Integer .class );
51- allowedRangeTypes .add ( Long .class );
52- allowedRangeTypes .add ( Double .class );
53- allowedRangeTypes .add ( Float .class );
54- allowedRangeTypes .add ( Date .class );
55- }
47+ private static final List <Class <?>> allowedRangeTypes = Arrays .<Class <?>>asList (
48+ String .class ,
49+ Integer .class ,
50+ Long .class ,
51+ Double .class ,
52+ Float .class ,
53+ Date .class
54+ );
5655
5756 private final SearchFactoryImplementor factory ;
5857 private final Class <?> entityType ;
Original file line number Diff line number Diff line change 2525package org .hibernate .search .util .impl ;
2626
2727import java .util .ArrayList ;
28- import java .util .Arrays ;
2928import java .util .Collection ;
3029import java .util .Collections ;
3130import java .util .HashMap ;
@@ -68,7 +67,9 @@ public static <T> ArrayList<T> newArrayList(final int size) {
6867 }
6968
7069 public static <T > Set <T > asSet (T ... ts ) {
71- return new HashSet <T >( Arrays .asList ( ts ) );
70+ HashSet <T > set = new HashSet <T >( ts .length );
71+ Collections .addAll ( set , ts );
72+ return set ;
7273 }
7374
7475 public static <T > List <T > toImmutableList (final Collection <T > c ) {
You can’t perform that action at this time.
0 commit comments