You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2014/03/16 20:39:37 UTC

svn commit: r1578144 [20/37] - in /lucene/dev/branches/lucene5376_2: ./ dev-tools/ dev-tools/idea/.idea/libraries/ dev-tools/idea/solr/contrib/dataimporthandler/ dev-tools/idea/solr/contrib/map-reduce/ dev-tools/idea/solr/core/src/test/ dev-tools/scrip...

Modified: lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java (original)
+++ lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/store/MockDirectoryWrapper.java Sun Mar 16 19:39:10 2014
@@ -76,7 +76,7 @@ public class MockDirectoryWrapper extend
   boolean wrapLockFactory = true;
   private Set<String> unSyncedFiles;
   private Set<String> createdFiles;
-  private Set<String> openFilesForWrite = new HashSet<String>();
+  private Set<String> openFilesForWrite = new HashSet<>();
   Set<String> openLocks = Collections.synchronizedSet(new HashSet<String>());
   volatile boolean crashed;
   private ThrottledIndexOutput throttledOutput;
@@ -101,14 +101,14 @@ public class MockDirectoryWrapper extend
 
   private synchronized void init() {
     if (openFiles == null) {
-      openFiles = new HashMap<String,Integer>();
-      openFilesDeleted = new HashSet<String>();
+      openFiles = new HashMap<>();
+      openFilesDeleted = new HashSet<>();
     }
 
     if (createdFiles == null)
-      createdFiles = new HashSet<String>();
+      createdFiles = new HashSet<>();
     if (unSyncedFiles == null)
-      unSyncedFiles = new HashSet<String>();
+      unSyncedFiles = new HashSet<>();
   }
 
   public MockDirectoryWrapper(Random random, Directory delegate) {
@@ -207,14 +207,14 @@ public class MockDirectoryWrapper extend
    *  unsynced files. */
   public synchronized void crash() throws IOException {
     crashed = true;
-    openFiles = new HashMap<String,Integer>();
-    openFilesForWrite = new HashSet<String>();
-    openFilesDeleted = new HashSet<String>();
+    openFiles = new HashMap<>();
+    openFilesForWrite = new HashSet<>();
+    openFilesDeleted = new HashSet<>();
     Iterator<String> it = unSyncedFiles.iterator();
-    unSyncedFiles = new HashSet<String>();
+    unSyncedFiles = new HashSet<>();
     // first force-close all files, so we can corrupt on windows etc.
     // clone the file map, as these guys want to remove themselves on close.
-    Map<Closeable,Exception> m = new IdentityHashMap<Closeable,Exception>(openFileHandles);
+    Map<Closeable,Exception> m = new IdentityHashMap<>(openFileHandles);
     for (Closeable f : m.keySet()) {
       try {
         f.close();
@@ -441,7 +441,7 @@ public class MockDirectoryWrapper extend
   }
 
   public synchronized Set<String> getOpenDeletedFiles() {
-    return new HashSet<String>(openFilesDeleted);
+    return new HashSet<>(openFilesDeleted);
   }
 
   private boolean failOnCreateOutput = true;
@@ -629,11 +629,11 @@ public class MockDirectoryWrapper extend
   public synchronized void close() throws IOException {
     // files that we tried to delete, but couldn't because readers were open.
     // all that matters is that we tried! (they will eventually go away)
-    Set<String> pendingDeletions = new HashSet<String>(openFilesDeleted);
+    Set<String> pendingDeletions = new HashSet<>(openFilesDeleted);
     maybeYield();
     if (openFiles == null) {
-      openFiles = new HashMap<String,Integer>();
-      openFilesDeleted = new HashSet<String>();
+      openFiles = new HashMap<>();
+      openFilesDeleted = new HashSet<>();
     }
     if (openFiles.size() > 0) {
       // print the first one as its very verbose otherwise
@@ -666,7 +666,7 @@ public class MockDirectoryWrapper extend
         // TODO: factor this out / share w/ TestIW.assertNoUnreferencedFiles
         if (assertNoUnreferencedFilesOnClose) {
           // now look for unreferenced files: discount ones that we tried to delete but could not
-          Set<String> allFiles = new HashSet<String>(Arrays.asList(listAll()));
+          Set<String> allFiles = new HashSet<>(Arrays.asList(listAll()));
           allFiles.removeAll(pendingDeletions);
           String[] startFiles = allFiles.toArray(new String[0]);
           IndexWriterConfig iwc = new IndexWriterConfig(LuceneTestCase.TEST_VERSION_CURRENT, null);
@@ -674,8 +674,8 @@ public class MockDirectoryWrapper extend
           new IndexWriter(in, iwc).rollback();
           String[] endFiles = in.listAll();
 
-          Set<String> startSet = new TreeSet<String>(Arrays.asList(startFiles));
-          Set<String> endSet = new TreeSet<String>(Arrays.asList(endFiles));
+          Set<String> startSet = new TreeSet<>(Arrays.asList(startFiles));
+          Set<String> endSet = new TreeSet<>(Arrays.asList(endFiles));
           
           if (pendingDeletions.contains("segments.gen") && endSet.contains("segments.gen")) {
             // this is possible if we hit an exception while writing segments.gen, we try to delete it
@@ -703,7 +703,7 @@ public class MockDirectoryWrapper extend
               }
 
               try {
-                Set<String> ghosts = new HashSet<String>(sis.files(in, false));
+                Set<String> ghosts = new HashSet<>(sis.files(in, false));
                 for (String s : ghosts) {
                   if (endSet.contains(s) && !startSet.contains(s)) {
                     assert pendingDeletions.contains(s);
@@ -725,14 +725,14 @@ public class MockDirectoryWrapper extend
           endFiles = endSet.toArray(new String[0]);
 
           if (!Arrays.equals(startFiles, endFiles)) {
-            List<String> removed = new ArrayList<String>();
+            List<String> removed = new ArrayList<>();
             for(String fileName : startFiles) {
               if (!endSet.contains(fileName)) {
                 removed.add(fileName);
               }
             }
 
-            List<String> added = new ArrayList<String>();
+            List<String> added = new ArrayList<>();
             for(String fileName : endFiles) {
               if (!startSet.contains(fileName)) {
                 added.add(fileName);
@@ -841,7 +841,7 @@ public class MockDirectoryWrapper extend
    */
   synchronized public void failOn(Failure fail) {
     if (failures == null) {
-      failures = new ArrayList<Failure>();
+      failures = new ArrayList<>();
     }
     failures.add(fail);
   }

Modified: lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/AbstractBeforeAfterRule.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/AbstractBeforeAfterRule.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/AbstractBeforeAfterRule.java (original)
+++ lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/AbstractBeforeAfterRule.java Sun Mar 16 19:39:10 2014
@@ -39,7 +39,7 @@ abstract class AbstractBeforeAfterRule i
     return new Statement() {
       @Override
       public void evaluate() throws Throwable {
-        final ArrayList<Throwable> errors = new ArrayList<Throwable>();
+        final ArrayList<Throwable> errors = new ArrayList<>();
 
         try {
           before();

Modified: lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/LineFileDocs.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/LineFileDocs.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/LineFileDocs.java (original)
+++ lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/LineFileDocs.java Sun Mar 16 19:39:10 2014
@@ -197,7 +197,7 @@ public class LineFileDocs implements Clo
     }
   }
 
-  private final ThreadLocal<DocState> threadDocs = new ThreadLocal<DocState>();
+  private final ThreadLocal<DocState> threadDocs = new ThreadLocal<>();
 
   /** Note: Document instance is re-used per-thread */
   public Document nextDoc() throws IOException {

Modified: lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/LuceneJUnit3MethodProvider.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/LuceneJUnit3MethodProvider.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/LuceneJUnit3MethodProvider.java (original)
+++ lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/LuceneJUnit3MethodProvider.java Sun Mar 16 19:39:10 2014
@@ -34,7 +34,7 @@ public final class LuceneJUnit3MethodPro
   @Override
   public Collection<Method> getTestMethods(Class<?> suiteClass, ClassModel classModel) {
     Map<Method,MethodModel> methods = classModel.getMethods();
-    ArrayList<Method> result = new ArrayList<Method>();
+    ArrayList<Method> result = new ArrayList<>();
     for (MethodModel mm : methods.values()) {
       // Skip any methods that have overrieds/ shadows.
       if (mm.getDown() != null) continue;

Modified: lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java (original)
+++ lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java Sun Mar 16 19:39:10 2014
@@ -319,11 +319,11 @@ public abstract class LuceneTestCase ext
   /** All {@link Directory} implementations. */
   private static final List<String> CORE_DIRECTORIES;
   static {
-    CORE_DIRECTORIES = new ArrayList<String>(FS_DIRECTORIES);
+    CORE_DIRECTORIES = new ArrayList<>(FS_DIRECTORIES);
     CORE_DIRECTORIES.add("RAMDirectory");
   };
   
-  protected static final Set<String> doesntSupportOffsets = new HashSet<String>(Arrays.asList( 
+  protected static final Set<String> doesntSupportOffsets = new HashSet<>(Arrays.asList(
     "Lucene3x",
     "MockFixedIntBlock",
     "MockVariableIntBlock",
@@ -392,7 +392,7 @@ public abstract class LuceneTestCase ext
     }
 
     ignoreAfterMaxFailuresDelegate = 
-        new AtomicReference<TestRuleIgnoreAfterMaxFailures>(
+        new AtomicReference<>(
             new TestRuleIgnoreAfterMaxFailures(maxFailures));
     ignoreAfterMaxFailures = TestRuleDelegate.of(ignoreAfterMaxFailuresDelegate);
   }
@@ -414,7 +414,7 @@ public abstract class LuceneTestCase ext
 
   /** By-name list of ignored types like loggers etc. */
   private final static Set<String> STATIC_LEAK_IGNORED_TYPES = 
-      Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(
+      Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
       "org.slf4j.Logger",
       "org.apache.solr.SolrLogFormatter",
       EnumSet.class.getName())));
@@ -691,7 +691,7 @@ public abstract class LuceneTestCase ext
    */
   @SafeVarargs @SuppressWarnings("varargs")
   public static <T> Set<T> asSet(T... args) {
-    return new HashSet<T>(Arrays.asList(args));
+    return new HashSet<>(Arrays.asList(args));
   }
 
   /**
@@ -1203,13 +1203,13 @@ public abstract class LuceneTestCase ext
             break;
           case 3:
             final AtomicReader ar = SlowCompositeReaderWrapper.wrap(r);
-            final List<String> allFields = new ArrayList<String>();
+            final List<String> allFields = new ArrayList<>();
             for (FieldInfo fi : ar.getFieldInfos()) {
               allFields.add(fi.name);
             }
             Collections.shuffle(allFields, random);
             final int end = allFields.isEmpty() ? 0 : random.nextInt(allFields.size());
-            final Set<String> fields = new HashSet<String>(allFields.subList(0, end));
+            final Set<String> fields = new HashSet<>(allFields.subList(0, end));
             // will create no FC insanity as ParallelAtomicReader has own cache key:
             r = new ParallelAtomicReader(
               new FieldFilterAtomicReader(ar, fields, false),
@@ -1735,7 +1735,7 @@ public abstract class LuceneTestCase ext
     Random random = random();
 
     // collect this number of terms from the left side
-    HashSet<BytesRef> tests = new HashSet<BytesRef>();
+    HashSet<BytesRef> tests = new HashSet<>();
     int numPasses = 0;
     while (numPasses < 10 && tests.size() < numTests) {
       leftEnum = leftTerms.iterator(leftEnum);
@@ -1778,7 +1778,7 @@ public abstract class LuceneTestCase ext
 
     rightEnum = rightTerms.iterator(rightEnum);
 
-    ArrayList<BytesRef> shuffledTests = new ArrayList<BytesRef>(tests);
+    ArrayList<BytesRef> shuffledTests = new ArrayList<>(tests);
     Collections.shuffle(shuffledTests, random);
 
     for (BytesRef b : shuffledTests) {
@@ -1897,7 +1897,7 @@ public abstract class LuceneTestCase ext
   }
 
   private static Set<String> getDVFields(IndexReader reader) {
-    Set<String> fields = new HashSet<String>();
+    Set<String> fields = new HashSet<>();
     for(FieldInfo fi : MultiFields.getMergedFieldInfos(reader)) {
       if (fi.hasDocValues()) {
         fields.add(fi.name);
@@ -2050,8 +2050,8 @@ public abstract class LuceneTestCase ext
     FieldInfos rightInfos = MultiFields.getMergedFieldInfos(rightReader);
     
     // TODO: would be great to verify more than just the names of the fields!
-    TreeSet<String> left = new TreeSet<String>();
-    TreeSet<String> right = new TreeSet<String>();
+    TreeSet<String> left = new TreeSet<>();
+    TreeSet<String> right = new TreeSet<>();
     
     for (FieldInfo fi : leftInfos) {
       left.add(fi.name);

Modified: lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.java (original)
+++ lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/RunListenerPrintReproduceInfo.java Sun Mar 16 19:39:10 2014
@@ -42,7 +42,7 @@ public final class RunListenerPrintRepro
    * A list of all test suite classes executed so far in this JVM (ehm, 
    * under this class's classloader).
    */
-  private static List<String> testClassesRun = new ArrayList<String>();
+  private static List<String> testClassesRun = new ArrayList<>();
 
   /**
    * The currently executing scope.

Modified: lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleDelegate.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleDelegate.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleDelegate.java (original)
+++ lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleDelegate.java Sun Mar 16 19:39:10 2014
@@ -40,6 +40,6 @@ final class TestRuleDelegate<T extends T
   }
 
   static <T extends TestRule> TestRuleDelegate<T> of(AtomicReference<T> delegate) {
-    return new TestRuleDelegate<T>(delegate);
+    return new TestRuleDelegate<>(delegate);
   }
 }

Modified: lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java (original)
+++ lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java Sun Mar 16 19:39:10 2014
@@ -72,7 +72,7 @@ final class TestRuleSetupAndRestoreClass
   /**
    * Restore these system property values.
    */
-  private HashMap<String, String> restoreProperties = new HashMap<String,String>();
+  private HashMap<String, String> restoreProperties = new HashMap<>();
 
   private Codec savedCodec;
   private Locale savedLocale;
@@ -149,7 +149,7 @@ final class TestRuleSetupAndRestoreClass
     }
 
     Class<?> targetClass = RandomizedContext.current().getTargetClass();
-    avoidCodecs = new HashSet<String>();
+    avoidCodecs = new HashSet<>();
     if (targetClass.isAnnotationPresent(SuppressCodecs.class)) {
       SuppressCodecs a = targetClass.getAnnotation(SuppressCodecs.class);
       avoidCodecs.addAll(Arrays.asList(a.value()));

Modified: lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/TestUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/TestUtil.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/TestUtil.java (original)
+++ lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/TestUtil.java Sun Mar 16 19:39:10 2014
@@ -799,7 +799,7 @@ public final class TestUtil {
    * @param reflectedValues contains a map with "AttributeClass#key" as values
    */
   public static <T> void assertAttributeReflection(final AttributeImpl att, Map<String,T> reflectedValues) {
-    final Map<String,Object> map = new HashMap<String,Object>();
+    final Map<String,Object> map = new HashMap<>();
     att.reflectWith(new AttributeReflector() {
       @Override
       public void reflect(Class<? extends Attribute> attClass, String key, Object value) {

Modified: lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java (original)
+++ lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/automaton/AutomatonTestUtil.java Sun Mar 16 19:39:10 2014
@@ -157,11 +157,11 @@ public class AutomatonTestUtil {
 
       // must use IdentityHashmap because two Transitions w/
       // different start nodes can be considered the same
-      leadsToAccept = new IdentityHashMap<Transition,Boolean>();
-      final Map<State,List<ArrivingTransition>> allArriving = new HashMap<State,List<ArrivingTransition>>();
+      leadsToAccept = new IdentityHashMap<>();
+      final Map<State,List<ArrivingTransition>> allArriving = new HashMap<>();
 
-      final LinkedList<State> q = new LinkedList<State>();
-      final Set<State> seen = new HashSet<State>();
+      final LinkedList<State> q = new LinkedList<>();
+      final Set<State> seen = new HashSet<>();
 
       // reverse map the transitions, so we can quickly look
       // up all arriving transitions to a given state
@@ -170,7 +170,7 @@ public class AutomatonTestUtil {
           final Transition t = s.transitionsArray[i];
           List<ArrivingTransition> tl = allArriving.get(t.to);
           if (tl == null) {
-            tl = new ArrayList<ArrivingTransition>();
+            tl = new ArrayList<>();
             allArriving.put(t.to, tl);
           }
           tl.add(new ArrivingTransition(s, t));
@@ -201,7 +201,7 @@ public class AutomatonTestUtil {
 
     public int[] getRandomAcceptedString(Random r) {
 
-      final List<Integer> soFar = new ArrayList<Integer>();
+      final List<Integer> soFar = new ArrayList<>();
       if (a.isSingleton()) {
         // accepts only one
         final String s = a.singleton;
@@ -239,7 +239,7 @@ public class AutomatonTestUtil {
           if (cheat) {
             // pick a transition that we know is the fastest
             // path to an accept state
-            List<Transition> toAccept = new ArrayList<Transition>();
+            List<Transition> toAccept = new ArrayList<>();
             for(int i=0;i<s.numTransitions;i++) {
               final Transition t0 = s.transitionsArray[i];
               if (leadsToAccept.containsKey(t0)) {
@@ -334,7 +334,7 @@ public class AutomatonTestUtil {
   public static void determinizeSimple(Automaton a) {
     if (a.deterministic || a.isSingleton())
       return;
-    Set<State> initialset = new HashSet<State>();
+    Set<State> initialset = new HashSet<>();
     initialset.add(a.initial);
     determinizeSimple(a, initialset);
   }
@@ -346,9 +346,9 @@ public class AutomatonTestUtil {
   public static void determinizeSimple(Automaton a, Set<State> initialset) {
     int[] points = a.getStartPoints();
     // subset construction
-    Map<Set<State>, Set<State>> sets = new HashMap<Set<State>, Set<State>>();
-    LinkedList<Set<State>> worklist = new LinkedList<Set<State>>();
-    Map<Set<State>, State> newstate = new HashMap<Set<State>, State>();
+    Map<Set<State>, Set<State>> sets = new HashMap<>();
+    LinkedList<Set<State>> worklist = new LinkedList<>();
+    Map<Set<State>, State> newstate = new HashMap<>();
     sets.put(initialset, initialset);
     worklist.add(initialset);
     a.initial = new State();
@@ -362,7 +362,7 @@ public class AutomatonTestUtil {
           break;
         }
       for (int n = 0; n < points.length; n++) {
-        Set<State> p = new HashSet<State>();
+        Set<State> p = new HashSet<>();
         for (State q : s)
           for (Transition t : q.getTransitions())
             if (t.min <= points[n] && points[n] <= t.max)

Modified: lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/fst/FSTTester.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/fst/FSTTester.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/fst/FSTTester.java (original)
+++ lucene/dev/branches/lucene5376_2/lucene/test-framework/src/java/org/apache/lucene/util/fst/FSTTester.java Sun Mar 16 19:39:10 2014
@@ -236,7 +236,7 @@ public class FSTTester<T> {
   private T randomAcceptedWord(FST<T> fst, IntsRef in) throws IOException {
     FST.Arc<T> arc = fst.getFirstArc(new FST.Arc<T>());
 
-    final List<FST.Arc<T>> arcs = new ArrayList<FST.Arc<T>>();
+    final List<FST.Arc<T>> arcs = new ArrayList<>();
     in.length = 0;
     in.offset = 0;
     final T NO_OUTPUT = fst.outputs.getNoOutput();
@@ -281,7 +281,7 @@ public class FSTTester<T> {
 
     final boolean willRewrite = random.nextBoolean();
 
-    final Builder<T> builder = new Builder<T>(inputMode == 0 ? FST.INPUT_TYPE.BYTE1 : FST.INPUT_TYPE.BYTE4,
+    final Builder<T> builder = new Builder<>(inputMode == 0 ? FST.INPUT_TYPE.BYTE1 : FST.INPUT_TYPE.BYTE4,
                                               prune1, prune2,
                                               prune1==0 && prune2==0,
                                               allowRandomSuffixSharing ? random.nextBoolean() : true,
@@ -320,7 +320,7 @@ public class FSTTester<T> {
       out.close();
       IndexInput in = dir.openInput("fst.bin", context);
       try {
-        fst = new FST<T>(in, outputs);
+        fst = new FST<>(in, outputs);
       } finally {
         in.close();
         dir.deleteFile("fst.bin");
@@ -366,7 +366,7 @@ public class FSTTester<T> {
     if (doReverseLookup) {
       @SuppressWarnings("unchecked") FST<Long> fstLong0 = (FST<Long>) fst;
       fstLong = fstLong0;
-      validOutputs = new HashSet<Long>();
+      validOutputs = new HashSet<>();
       for(InputOutput<T> pair: pairs) {
         Long output = (Long) pair.output;
         maxLong = Math.max(maxLong, output);
@@ -402,7 +402,7 @@ public class FSTTester<T> {
       System.out.println("TEST: check valid terms/next()");
     }
     {
-      IntsRefFSTEnum<T> fstEnum = new IntsRefFSTEnum<T>(fst);
+      IntsRefFSTEnum<T> fstEnum = new IntsRefFSTEnum<>(fst);
       for(InputOutput<T> pair : pairs) {
         IntsRef term = pair.input;
         if (LuceneTestCase.VERBOSE) {
@@ -421,7 +421,7 @@ public class FSTTester<T> {
       assertNull(fstEnum.next());
     }
 
-    final Map<IntsRef,T> termsMap = new HashMap<IntsRef,T>();
+    final Map<IntsRef,T> termsMap = new HashMap<>();
     for(InputOutput<T> pair : pairs) {
       termsMap.put(pair.input, pair.output);
     }
@@ -464,7 +464,7 @@ public class FSTTester<T> {
     if (LuceneTestCase.VERBOSE) {
       System.out.println("TEST: verify seek");
     }
-    IntsRefFSTEnum<T> fstEnum = new IntsRefFSTEnum<T>(fst);
+    IntsRefFSTEnum<T> fstEnum = new IntsRefFSTEnum<>(fst);
     num = LuceneTestCase.atLeast(random, 100);
     for(int iter=0;iter<num;iter++) {
       if (LuceneTestCase.VERBOSE) {
@@ -556,7 +556,7 @@ public class FSTTester<T> {
         System.out.println("TEST: iter " + iter);
       }
       // reset:
-      fstEnum = new IntsRefFSTEnum<T>(fst);
+      fstEnum = new IntsRefFSTEnum<>(fst);
       int upto = -1;
       while(true) {
         boolean isDone = false;
@@ -682,7 +682,7 @@ public class FSTTester<T> {
     //System.out.println("TEST: tally prefixes");
 
     // build all prefixes
-    final Map<IntsRef,CountMinOutput<T>> prefixes = new HashMap<IntsRef,CountMinOutput<T>>();
+    final Map<IntsRef,CountMinOutput<T>> prefixes = new HashMap<>();
     final IntsRef scratch = new IntsRef(10);
     for(InputOutput<T> pair: pairs) {
       scratch.copyInts(pair.input);
@@ -690,7 +690,7 @@ public class FSTTester<T> {
         scratch.length = idx;
         CountMinOutput<T> cmo = prefixes.get(scratch);
         if (cmo == null) {
-          cmo = new CountMinOutput<T>();
+          cmo = new CountMinOutput<>();
           cmo.count = 1;
           cmo.output = pair.output;
           prefixes.put(IntsRef.deepCopyOf(scratch), cmo);
@@ -787,7 +787,7 @@ public class FSTTester<T> {
     if (LuceneTestCase.VERBOSE) {
       System.out.println("TEST: check pruned enum");
     }
-    IntsRefFSTEnum<T> fstEnum = new IntsRefFSTEnum<T>(fst);
+    IntsRefFSTEnum<T> fstEnum = new IntsRefFSTEnum<>(fst);
     IntsRefFSTEnum.InputOutput<T> current;
     while((current = fstEnum.next()) != null) {
       if (LuceneTestCase.VERBOSE) {

Modified: lucene/dev/branches/lucene5376_2/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java (original)
+++ lucene/dev/branches/lucene5376_2/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java Sun Mar 16 19:39:10 2014
@@ -89,9 +89,9 @@ public class GetMavenDependenciesTask ex
   private static final String DEPENDENCY_MANAGEMENT_PROPERTY = "lucene.solr.dependency.management";
   private static final String IVY_USER_DIR_PROPERTY = "ivy.default.ivy.user.dir";
   private static final Properties allProperties = new Properties();
-  private static final Set<String> modulesWithSeparateCompileAndTestPOMs = new HashSet<String>();
+  private static final Set<String> modulesWithSeparateCompileAndTestPOMs = new HashSet<>();
 
-  private static final Set<String>  optionalExternalDependencies = new HashSet<String>();
+  private static final Set<String>  optionalExternalDependencies = new HashSet<>();
   static {
     // Add modules here that have split compile and test POMs
     // - they need compile-scope deps to also be test-scope deps.
@@ -106,13 +106,13 @@ public class GetMavenDependenciesTask ex
 
   private final XPath xpath = XPathFactory.newInstance().newXPath();
   private final SortedMap<String,SortedSet<String>> internalCompileScopeDependencies
-      = new TreeMap<String,SortedSet<String>>();
-  private final Set<String> nonJarDependencies = new HashSet<String>();
-  private final Map<String,Set<String>> dependencyClassifiers = new HashMap<String,Set<String>>();
-  private final Map<String,Set<String>> interModuleExternalCompileScopeDependencies = new HashMap<String,Set<String>>();
-  private final Map<String,Set<String>> interModuleExternalTestScopeDependencies = new HashMap<String,Set<String>>();
+      = new TreeMap<>();
+  private final Set<String> nonJarDependencies = new HashSet<>();
+  private final Map<String,Set<String>> dependencyClassifiers = new HashMap<>();
+  private final Map<String,Set<String>> interModuleExternalCompileScopeDependencies = new HashMap<>();
+  private final Map<String,Set<String>> interModuleExternalTestScopeDependencies = new HashMap<>();
   private final Map<String,SortedSet<ExternalDependency>> allExternalDependencies
-     = new HashMap<String,SortedSet<ExternalDependency>>();
+     = new HashMap<>();
   private final DocumentBuilder documentBuilder;
   private File ivyCacheDir;
   private Pattern internalJarPattern;
@@ -257,7 +257,7 @@ public class GetMavenDependenciesTask ex
   private void addSharedExternalDependencies() {
     // Delay adding shared compile-scope dependencies until after all have been processed,
     // so dependency sharing is limited to a depth of one.
-    Map<String,SortedSet<ExternalDependency>> sharedDependencies = new HashMap<String,SortedSet<ExternalDependency>>();
+    Map<String,SortedSet<ExternalDependency>> sharedDependencies = new HashMap<>();
     for (String artifactId : interModuleExternalCompileScopeDependencies.keySet()) {
       TreeSet<ExternalDependency> deps = new TreeSet<>();
       sharedDependencies.put(artifactId, deps);
@@ -278,7 +278,7 @@ public class GetMavenDependenciesTask ex
     for (String artifactId : interModuleExternalTestScopeDependencies.keySet()) {
       SortedSet<ExternalDependency> deps = sharedDependencies.get(artifactId);
       if (null == deps) {
-        deps = new TreeSet<ExternalDependency>();
+        deps = new TreeSet<>();
         sharedDependencies.put(artifactId, deps);
       }
       Set<String> moduleDependencies = interModuleExternalTestScopeDependencies.get(artifactId);
@@ -311,7 +311,7 @@ public class GetMavenDependenciesTask ex
     for (String artifactId : sharedDependencies.keySet()) {
       SortedSet<ExternalDependency> deps = allExternalDependencies.get(artifactId);
       if (null == deps) {
-        deps = new TreeSet<ExternalDependency>();
+        deps = new TreeSet<>();
         allExternalDependencies.put(artifactId, deps);
       }
       deps.addAll(sharedDependencies.get(artifactId));
@@ -360,7 +360,7 @@ public class GetMavenDependenciesTask ex
   private void setGrandparentDependencyManagementProperty() {
     StringBuilder builder = new StringBuilder();
     appendAllInternalDependencies(builder);
-    Map<String,String> versionsMap = new HashMap<String,String>();
+    Map<String,String> versionsMap = new HashMap<>();
     appendAllExternalDependencies(builder, versionsMap);
     builder.setLength(builder.length() - 1); // drop trailing newline
     allProperties.setProperty(DEPENDENCY_MANAGEMENT_PROPERTY, builder.toString());
@@ -377,7 +377,7 @@ public class GetMavenDependenciesTask ex
    */
   private void appendAllInternalDependencies(StringBuilder builder) {
     for (String artifactId : internalCompileScopeDependencies.keySet()) {
-      List<String> exclusions = new ArrayList<String>();
+      List<String> exclusions = new ArrayList<>();
       exclusions.addAll(internalCompileScopeDependencies.get(artifactId));
       SortedSet<ExternalDependency> extDeps = allExternalDependencies.get(artifactId);
       if (null != extDeps) {
@@ -427,7 +427,7 @@ public class GetMavenDependenciesTask ex
     log("Loading centralized ivy versions from: " + centralizedVersionsFile, verboseLevel);
     ivyCacheDir = getIvyCacheDir();
     Properties versions = loadPropertiesFile(centralizedVersionsFile);
-    SortedSet<Map.Entry> sortedEntries = new TreeSet<Map.Entry>(new Comparator<Map.Entry>() {
+    SortedSet<Map.Entry> sortedEntries = new TreeSet<>(new Comparator<Map.Entry>() {
       @Override public int compare(Map.Entry o1, Map.Entry o2) {
         return ((String)o1.getKey()).compareTo((String)o2.getKey());
       }
@@ -465,7 +465,7 @@ public class GetMavenDependenciesTask ex
    */
   private Collection<String> getTransitiveDependenciesFromIvyCache
   (String groupId, String artifactId, String version) {
-    SortedSet<String> transitiveDependencies = new TreeSet<String>();
+    SortedSet<String> transitiveDependencies = new TreeSet<>();
     //                                      E.g. ~/.ivy2/cache/xerces/xercesImpl/ivy-2.9.1.xml
     File ivyXmlFile = new File(new File(new File(ivyCacheDir, groupId), artifactId), "ivy-" + version + ".xml");
     if ( ! ivyXmlFile.exists()) {
@@ -500,8 +500,8 @@ public class GetMavenDependenciesTask ex
   private void  setInternalDependencyProperties() {
     log("Loading module dependencies from: " + moduleDependenciesPropertiesFile, verboseLevel);
     Properties moduleDependencies = loadPropertiesFile(moduleDependenciesPropertiesFile);
-    Map<String,SortedSet<String>> testScopeDependencies = new HashMap<String,SortedSet<String>>();
-    Map<String, String> testScopePropertyKeys = new HashMap<String,String>();
+    Map<String,SortedSet<String>> testScopeDependencies = new HashMap<>();
+    Map<String, String> testScopePropertyKeys = new HashMap<>();
     for (Map.Entry entry : moduleDependencies.entrySet()) {
       String newPropertyKey = (String)entry.getKey();
       StringBuilder newPropertyValue = new StringBuilder();
@@ -527,7 +527,7 @@ public class GetMavenDependenciesTask ex
         String origModuleDir = antProjectName.replace("analyzers-", "analysis/");
         Pattern unwantedInternalDependencies = Pattern.compile
             ("(?:lucene/build/|solr/build/(?:contrib/)?)" + origModuleDir + "|" + UNWANTED_INTERNAL_DEPENDENCIES);
-        SortedSet<String> sortedDeps = new TreeSet<String>();
+        SortedSet<String> sortedDeps = new TreeSet<>();
         for (String dependency : value.split(",")) {
           matcher = SHARED_EXTERNAL_DEPENDENCIES_PATTERN.matcher(dependency);
           if (matcher.find()) {
@@ -542,7 +542,7 @@ public class GetMavenDependenciesTask ex
                   = isTest ? interModuleExternalTestScopeDependencies : interModuleExternalCompileScopeDependencies;
               Set<String> sharedSet = sharedDeps.get(artifactName);
               if (null == sharedSet) {
-                sharedSet = new HashSet<String>();
+                sharedSet = new HashSet<>();
                 sharedDeps.put(artifactName, sharedSet);
               }
               if (isTestScope) {
@@ -675,7 +675,7 @@ public class GetMavenDependenciesTask ex
       boolean isOptional = optionalExternalDependencies.contains(dependencyCoordinate);
       SortedSet<ExternalDependency> deps = allExternalDependencies.get(module);
       if (null == deps) {
-        deps = new TreeSet<ExternalDependency>();
+        deps = new TreeSet<>();
         allExternalDependencies.put(module, deps);
       }
       NodeList artifacts = null;

Modified: lucene/dev/branches/lucene5376_2/lucene/tools/src/java/org/apache/lucene/validation/LibVersionsCheckTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/lucene/tools/src/java/org/apache/lucene/validation/LibVersionsCheckTask.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/lucene/tools/src/java/org/apache/lucene/validation/LibVersionsCheckTask.java (original)
+++ lucene/dev/branches/lucene5376_2/lucene/tools/src/java/org/apache/lucene/validation/LibVersionsCheckTask.java Sun Mar 16 19:39:10 2014
@@ -98,7 +98,7 @@ public class LibVersionsCheckTask extend
    * All /org/name version keys found in ivy-versions.properties, and whether they
    * are referenced in any ivy.xml file.
    */
-  private Map<String,Boolean> referencedCoordinateKeys = new LinkedHashMap<String,Boolean>();
+  private Map<String,Boolean> referencedCoordinateKeys = new LinkedHashMap<>();
 
   /**
    * Adds a set of ivy.xml resources to check.
@@ -320,7 +320,7 @@ public class LibVersionsCheckTask extend
 
   private class DependencyRevChecker extends DefaultHandler {
     private final File ivyXmlFile;
-    private final Stack<String> tags = new Stack<String>();
+    private final Stack<String> tags = new Stack<>();
     
     public boolean fail = false;
 

Modified: lucene/dev/branches/lucene5376_2/lucene/tools/src/java/org/apache/lucene/validation/LicenseCheckTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/lucene/tools/src/java/org/apache/lucene/validation/LicenseCheckTask.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/lucene/tools/src/java/org/apache/lucene/validation/LicenseCheckTask.java (original)
+++ lucene/dev/branches/lucene5376_2/lucene/tools/src/java/org/apache/lucene/validation/LicenseCheckTask.java Sun Mar 16 19:39:10 2014
@@ -235,8 +235,8 @@ public class LicenseCheckTask extends Ta
     }
     
     // Get the expected license path base from the mapper and search for license files.
-    Map<File, LicenseType> foundLicenses = new LinkedHashMap<File, LicenseType>();
-    List<File> expectedLocations = new ArrayList<File>();
+    Map<File, LicenseType> foundLicenses = new LinkedHashMap<>();
+    List<File> expectedLocations = new ArrayList<>();
 outer:
     for (String mappedPath : licenseMapper.mapFileName(jarFile.getName())) {
       for (LicenseType licenseType : LicenseType.values()) {

Modified: lucene/dev/branches/lucene5376_2/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/CHANGES.txt?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/CHANGES.txt (original)
+++ lucene/dev/branches/lucene5376_2/solr/CHANGES.txt Sun Mar 16 19:39:10 2014
@@ -76,10 +76,32 @@ Velocity 1.7 and Velocity Tools 2.0
 Apache UIMA 2.3.1
 Apache ZooKeeper 3.4.5
 
-                      
+Upgrading from Solr 4.7
+----------------------
+
+* In previous versions of Solr, Terms that exceeded Lucene's MAX_TERM_LENGTH were
+  silently ignored when indexing documents.  Begining with Solr 4.8, a document
+  an error will be generated when attempting to index a document with a term
+  that is too large.  If you wish to continue to have large terms ignored,
+  use "solr.LengthFilterFactory" in all of your Analyzers.  See LUCENE-5472 for
+  more details.
+  
+* Solr 4.8 needs Java 7 as minimum requirement.  If you not have done already,
+  update the underlying JDK/JRE versions to at least Oracle Java 7u1 or OpenJDK
+  7u1.  Please review the list of known JVM bugs at:
+  http://wiki.apache.org/lucene-java/JavaBugs
+  Solr 4.8 was also tested to work with Java 8, so give it a try!
+
 Detailed Change List
 ----------------------
 
+System Requirements
+----------------------
+
+* LUCENE-4747, LUCENE-5514: Move to Java 7 as minimum Java version.
+  (Robert Muir, Uwe Schindler)
+
+
 New Features
 ----------------------
 
@@ -88,6 +110,25 @@ New Features
 * SOLR-5183: JSON updates now support nested child documents using a 
   "_childDocument_" object key.  (Varun Thacker, hossman)
 
+* SOLR-5714: You can now use one pool of memory for for the HDFS block cache
+  that all collections share. (Mark Miller, Gregory Chanan)
+
+* SOLR-5720: Add ExpandComponent to expand results collapsed by the 
+  CollapsingQParserPlugin. (Joel Bernstein)
+
+* SOLR-5653: Create a RestManager to provide REST API endpoints for
+  reconfigurable plugins. (Tim Potter, Steve Rowe)
+
+* SOLR-5655: Create a stopword filter factory that is (re)configurable,
+  and capable of reporting its configuration, via REST API.
+  (Tim Potter via Steve Rowe)
+
+* SOLR-5477: Async execution of OverseerCollectionProcessor(CollectionsAPI)
+  tasks. (Anshum Gupta)
+
+* SOLR-3177: Enable tagging and excluding filters in StatsComponent via the
+  localParams syntax. (Mathias H., Nikolai Luthman, Vitaliy Zhovtyuk, shalin)
+
 Bug Fixes
 ----------------------
 
@@ -103,12 +144,57 @@ Bug Fixes
 * SOLR-5782: The full MapReduceIndexer help text does not display when using
   --help.  (Mark Miller, Wolfgang Hoschek)
 
+* SOLR-5734: We should use System.nanoTime rather than System.currentTimeMillis
+  when calculating elapsed time. (Mark Miller, Ramkumar Aiyengar)
+
+* SOLR-5760: ConcurrentUpdateSolrServer has a blockUntilFinished call when
+  streamDeletes is true that should be tucked into the if statement below it.
+  (Mark Miller, Gregory Chanan)
+
+* SOLR-5761: HttpSolrServer has a few fields that can be set via setters but
+  are not volatile. (Mark Miller, Gregory Chanan)
+
+* SOLR-5811: The Overseer will retry work items until success, which is a serious
+  problem if you hit a bad work item. (Mark Miller)
+  
+* SOLR-5796: Increase how long we are willing to wait for a core to see the ZK
+  advertised leader in it's local state. (Timothy Potter, Mark Miller)  
+
+* SOLR-5818: distrib search with custom comparator does not quite work correctly
+  (Ryan Ernst)
+
+* SOLR-5834: Overseer threads are only being interrupted and not closed.
+  (hossman, Mark Miller)
+
+* SOLR-5839: ZookeeperInfoServlet does not trim path properly.
+  (Furkan KAMACI via Mark Miller)
+
+* SOLR-5800: Admin UI - Analysis form doesn't render results correctly when a
+  CharFilter is used. (steffkes)
+
+* SOLR-5861: Recovery should not set onlyIfLeaderActive=true for slice in 'recovery'
+  state. (shalin)
+
+* SOLR-5867: OverseerCollectionProcessor isn't properly generating https urls in some
+  cases. (Steve Davids via shalin)
+
+* SOLR-5866: UpdateShardHandler needs to use the system default scheme registry to
+  properly handle https via javax.net.ssl.* properties. (Steve Davids via shalin)
+
+* SOLR-5550: shards.info is not returned by a short circuited distributed query.
+  (Timothy Potter, shalin)
+
 Optimizations
 ----------------------
 * SOLR-1880: Distributed Search skips GET_FIELDS stage if EXECUTE_QUERY
   stage gets all fields. Requests with fl=id or fl=id,score are now single-pass.
   (Shawn Smith, Vitaliy Zhovtyuk, shalin)
 
+* SOLR-5783: Requests to open a new searcher will now reuse the current registered
+  searcher (w/o additional warming) if possible in situations where the underlying 
+  index has not changed.  This reduces overhead in situations such as deletes that 
+  do not modify the index, and/or redundant commits. (hossman)
+  
 
 Other Changes
 ---------------------
@@ -129,6 +215,32 @@ Other Changes
 * SOLR-5771: Add SolrTestCaseJ4.SuppressSSL annotation to disable SSL (instead of static boolean).
   (Robert Muir)
 
+* SOLR-5799: When registering as the leader, if an existing ephemeral
+  registration exists, wait a short time to see if it goes away.
+  (Mark Miller)
+
+* LUCENE-5472: IndexWriter.addDocument will now throw an IllegalArgumentException 
+  if a Term to be indexed exceeds IndexWriter.MAX_TERM_LENGTH.  To recreate previous
+  behavior of silently ignoring these terms, use LengthFilter in your Analyzer.
+  (hossman, Mike McCandless, Varun Thacker)
+
+* SOLR-5796: Make how long we are willing to wait for a core to see the ZK
+  advertised leader in it's local state configurable. 
+  (Timothy Potter via Mark Miller)
+  
+* SOLR-5825: Separate http request creating and execution in SolrJ
+  (Steven Bower via Erick Erickson)
+  
+* SOLR-5837: Add hashCode/equals to SolrDocument, SolrInputDocument
+  and SolrInputField for testing purposes. (Varun Thacker, Noble Paul,
+  Mark Miller)
+
+* SOLR-5853: The createCollection methods in the test framework now reports
+  result of operation in the returned CollectionAdminResponse (janhoy)
+
+* SOLR-5838: Relative SolrHome Path Bug At AbstractFullDistribZkTestBase.
+  (Furkan KAMACI via shalin)
+
 ==================  4.7.0 ==================
 
 Versions of Major Components

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/analysis-extras/src/java/org/apache/solr/schema/ICUCollationField.java Sun Mar 16 19:39:10 2014
@@ -287,7 +287,7 @@ public class ICUCollationField extends F
   @Override
   public List<StorableField> createFields(SchemaField field, Object value, float boost) {
     if (field.hasDocValues()) {
-      List<StorableField> fields = new ArrayList<StorableField>();
+      List<StorableField> fields = new ArrayList<>();
       fields.add(createField(field, value, boost));
       final BytesRef bytes = getCollationKey(field.getName(), value.toString());
       if (field.multiValued()) {

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/ClusteringComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/ClusteringComponent.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/ClusteringComponent.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/ClusteringComponent.java Sun Mar 16 19:39:10 2014
@@ -210,7 +210,7 @@ public class ClusteringComponent extends
       if( fields == null || fields.size() == 0 ) return;
       StringBuilder sb = new StringBuilder();
       String[] flparams = fl.split( "[,\\s]+" );
-      Set<String> flParamSet = new HashSet<String>(flparams.length);
+      Set<String> flParamSet = new HashSet<>(flparams.length);
       for( String flparam : flparams ){
         // no need trim() because of split() by \s+
         flParamSet.add(flparam);

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngine.java Sun Mar 16 19:39:10 2014
@@ -123,7 +123,7 @@ public class CarrotClusteringEngine exte
     final SolrParams initParams = SolrParams.toSolrParams(config);
 
     // Initialization attributes for Carrot2 controller.
-    HashMap<String, Object> initAttributes = new HashMap<String, Object>();
+    HashMap<String, Object> initAttributes = new HashMap<>();
 
     // Customize Carrot2's resource lookup to first look for resources
     // using Solr's resource loader. If that fails, try loading from the classpath.
@@ -221,7 +221,7 @@ public class CarrotClusteringEngine exte
       Map<SolrDocument, Integer> docIds, SolrQueryRequest sreq) {
     try {
       // Prepare attributes for Carrot2 clustering call
-      Map<String, Object> attributes = new HashMap<String, Object>();
+      Map<String, Object> attributes = new HashMap<>();
       List<Document> documents = getDocuments(solrDocList, docIds, query, sreq);
       attributes.put(AttributeNames.DOCUMENTS, documents);
       attributes.put(AttributeNames.QUERY, query.toString());
@@ -350,7 +350,7 @@ public class CarrotClusteringEngine exte
     }
 
     Iterator<SolrDocument> docsIter = solrDocList.iterator();
-    List<Document> result = new ArrayList<Document>(solrDocList.size());
+    List<Document> result = new ArrayList<>(solrDocList.size());
 
     float[] scores = {1.0f};
     int[] docsHolder = new int[1];
@@ -500,7 +500,7 @@ public class CarrotClusteringEngine exte
   private void clustersToNamedList(List<Cluster> outputClusters,
                                    List<NamedList<Object>> parent, boolean outputSubClusters, int maxLabels) {
     for (Cluster outCluster : outputClusters) {
-      NamedList<Object> cluster = new SimpleOrderedMap<Object>();
+      NamedList<Object> cluster = new SimpleOrderedMap<>();
       parent.add(cluster);
 
       // Add labels

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/LuceneCarrot2StemmerFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/LuceneCarrot2StemmerFactory.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/LuceneCarrot2StemmerFactory.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/java/org/apache/solr/handler/clustering/carrot2/LuceneCarrot2StemmerFactory.java Sun Mar 16 19:39:10 2014
@@ -84,7 +84,7 @@ public class LuceneCarrot2StemmerFactory
      */
     private static HashMap<LanguageCode, Class<? extends SnowballProgram>> snowballStemmerClasses;
     static {
-      snowballStemmerClasses = new HashMap<LanguageCode, Class<? extends SnowballProgram>>();
+      snowballStemmerClasses = new HashMap<>();
       snowballStemmerClasses.put(LanguageCode.DANISH, DanishStemmer.class);
       snowballStemmerClasses.put(LanguageCode.DUTCH, DutchStemmer.class);
       snowballStemmerClasses.put(LanguageCode.ENGLISH, EnglishStemmer.class);

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/ClusteringComponentTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/ClusteringComponentTest.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/ClusteringComponentTest.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/ClusteringComponentTest.java Sun Mar 16 19:39:10 2014
@@ -52,7 +52,7 @@ public class ClusteringComponentTest ext
     SolrRequestHandler handler = core.getRequestHandler("standard");
     SolrQueryResponse rsp;
     rsp = new SolrQueryResponse();
-    rsp.add("responseHeader", new SimpleOrderedMap<Object>());
+    rsp.add("responseHeader", new SimpleOrderedMap<>());
     SolrQueryRequest req = new LocalSolrQueryRequest(core, params);
     handler.handleRequest(req, rsp);
     NamedList<?> values = rsp.getValues();
@@ -70,7 +70,7 @@ public class ClusteringComponentTest ext
     handler = core.getRequestHandler("docClustering");
 
     rsp = new SolrQueryResponse();
-    rsp.add("responseHeader", new SimpleOrderedMap<Object>());
+    rsp.add("responseHeader", new SimpleOrderedMap<>());
     req = new LocalSolrQueryRequest(core, params);
     handler.handleRequest(req, rsp);
     values = rsp.getValues();

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/MockDocumentClusteringEngine.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/MockDocumentClusteringEngine.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/MockDocumentClusteringEngine.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/MockDocumentClusteringEngine.java Sun Mar 16 19:39:10 2014
@@ -27,11 +27,11 @@ import org.apache.solr.search.DocSet;
 public class MockDocumentClusteringEngine extends DocumentClusteringEngine {
   @Override
   public NamedList<?> cluster(DocSet docs, SolrParams solrParams) {
-    return new NamedList<Object>();
+    return new NamedList<>();
   }
 
   @Override
   public NamedList<?> cluster(SolrParams solrParams) {
-    return new NamedList<Object>();
+    return new NamedList<>();
   }
 }

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/clustering/src/test/org/apache/solr/handler/clustering/carrot2/CarrotClusteringEngineTest.java Sun Mar 16 19:39:10 2014
@@ -472,7 +472,7 @@ public class CarrotClusteringEngineTest 
 
       // Perform clustering
       LocalSolrQueryRequest req = new LocalSolrQueryRequest(h.getCore(), solrParams);
-      Map<SolrDocument,Integer> docIds = new HashMap<SolrDocument, Integer>(docList.size());
+      Map<SolrDocument,Integer> docIds = new HashMap<>(docList.size());
       SolrDocumentList solrDocList = SolrPluginUtils.docListToSolrDocumentList( docList, searcher, engine.getFieldsToLoad(req), docIds );
 
       @SuppressWarnings("unchecked")

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java Sun Mar 16 19:39:10 2014
@@ -140,7 +140,7 @@ public class MailEntityProcessor extends
   }
 
   private Map<String, Object> getDocumentFromMail(Message mail) {
-    Map<String, Object> row = new HashMap<String, Object>();
+    Map<String, Object> row = new HashMap<>();
     try {
       addPartToDocument(mail, row, true);
       return row;
@@ -201,7 +201,7 @@ public class MailEntityProcessor extends
     if ((adresses = mail.getFrom()) != null && adresses.length > 0)
       row.put(FROM, adresses[0].toString());
 
-    List<String> to = new ArrayList<String>();
+    List<String> to = new ArrayList<>();
     if ((adresses = mail.getRecipients(Message.RecipientType.TO)) != null)
       addAddressToList(adresses, to);
     if ((adresses = mail.getRecipients(Message.RecipientType.CC)) != null)
@@ -219,7 +219,7 @@ public class MailEntityProcessor extends
       row.put(SENT_DATE, d);
     }
 
-    List<String> flags = new ArrayList<String>();
+    List<String> flags = new ArrayList<>();
     for (Flags.Flag flag : mail.getFlags().getSystemFlags()) {
       if (flag == Flags.Flag.ANSWERED)
         flags.add(FLAG_ANSWERED);
@@ -319,7 +319,7 @@ public class MailEntityProcessor extends
 
     public FolderIterator(Store mailBox) {
       this.mailbox = mailBox;
-      folders = new ArrayList<Folder>();
+      folders = new ArrayList<>();
       getTopLevelFolders(mailBox);
     }
 
@@ -529,8 +529,8 @@ public class MailEntityProcessor extends
   private String protocol;
 
   private String folderNames;
-  private List<String> exclude = new ArrayList<String>();
-  private List<String> include = new ArrayList<String>();
+  private List<String> exclude = new ArrayList<>();
+  private List<String> include = new ArrayList<>();
   private boolean recurse;
 
   private int batchSize;
@@ -550,7 +550,7 @@ public class MailEntityProcessor extends
   private boolean connected = false;
   private FolderIterator folderIter;
   private MessageIterator msgIter;
-  private List<CustomFilter> filters = new ArrayList<CustomFilter>();
+  private List<CustomFilter> filters = new ArrayList<>();
   private static FetchProfile fp = new FetchProfile();
   private static final Logger LOG = LoggerFactory.getLogger(DataImporter.class);
 

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/TikaEntityProcessor.java Sun Mar 16 19:39:10 2014
@@ -107,7 +107,7 @@ public class TikaEntityProcessor extends
   @Override
   public Map<String, Object> nextRow() {
     if(done) return null;
-    Map<String, Object> row = new HashMap<String, Object>();
+    Map<String, Object> row = new HashMap<>();
     DataSource<InputStream> dataSource = context.getDataSource();
     InputStream is = dataSource.getData(context.getResolvedEntityAttribute(URL));
     ContentHandler contentHandler = null;

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler-extras/src/test/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler-extras/src/test/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler-extras/src/test/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler-extras/src/test/org/apache/solr/handler/dataimport/TestMailEntityProcessor.java Sun Mar 16 19:39:10 2014
@@ -53,7 +53,7 @@ public class TestMailEntityProcessor ext
   private static final String host = "host";
   private static final String protocol = "imaps";
 
-  private static Map<String, String> paramMap = new HashMap<String, String>();
+  private static Map<String, String> paramMap = new HashMap<>();
 
   @Test
   @Ignore("Needs a Mock Mail Server to work")
@@ -172,7 +172,7 @@ public class TestMailEntityProcessor ext
   }
 
   static class SolrWriterImpl extends SolrWriter {
-    List<SolrInputDocument> docs = new ArrayList<SolrInputDocument>();
+    List<SolrInputDocument> docs = new ArrayList<>();
     Boolean deleteAllCalled;
     Boolean commitCalled;
 

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ClobTransformer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ClobTransformer.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ClobTransformer.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ClobTransformer.java Sun Mar 16 19:39:10 2014
@@ -47,7 +47,7 @@ public class ClobTransformer extends Tra
       Object o = aRow.get(srcCol);
       if (o instanceof List) {
         List<Clob> inputs = (List<Clob>) o;
-        List<String> results = new ArrayList<String>();
+        List<String> results = new ArrayList<>();
         for (Object input : inputs) {
           if (input instanceof Clob) {
             Clob clob = (Clob) input;

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ConfigParseUtil.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ConfigParseUtil.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ConfigParseUtil.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ConfigParseUtil.java Sun Mar 16 19:39:10 2014
@@ -34,7 +34,7 @@ public class ConfigParseUtil {
   }
 
   public static HashMap<String, String> getAllAttributes(Element e) {
-    HashMap<String, String> m = new HashMap<String, String>();
+    HashMap<String, String> m = new HashMap<>();
     NamedNodeMap nnm = e.getAttributes();
     for (int i = 0; i < nnm.getLength(); i++) {
       m.put(nnm.item(i).getNodeName(), nnm.item(i).getNodeValue());
@@ -61,7 +61,7 @@ public class ConfigParseUtil {
   }
 
   public static List<Element> getChildNodes(Element e, String byName) {
-    List<Element> result = new ArrayList<Element>();
+    List<Element> result = new ArrayList<>();
     NodeList l = e.getChildNodes();
     for (int i = 0; i < l.getLength(); i++) {
       if (e.equals(l.item(i).getParentNode())

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ContextImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ContextImpl.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ContextImpl.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/ContextImpl.java Sun Mar 16 19:39:10 2014
@@ -138,7 +138,7 @@ public class ContextImpl extends Context
     }
     if (Context.SCOPE_ENTITY.equals(scope)) {
       if (entitySession == null) {
-        entitySession = new HashMap<String, Object>();
+        entitySession = new HashMap<>();
       }
       entitySession.put(name, val);
     } else if (Context.SCOPE_GLOBAL.equals(scope)) {

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DIHCacheSupport.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DIHCacheSupport.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DIHCacheSupport.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DIHCacheSupport.java Sun Mar 16 19:39:10 2014
@@ -36,7 +36,7 @@ public class DIHCacheSupport {
       .getLogger(DIHCacheSupport.class);
   private String cacheForeignKey;
   private String cacheImplName;
-  private Map<String,DIHCache> queryVsCache = new HashMap<String,DIHCache>();
+  private Map<String,DIHCache> queryVsCache = new HashMap<>();
   private Map<String,Iterator<Map<String,Object>>> queryVsCacheIterator;
   private Iterator<Map<String,Object>> dataSourceRowCache;
   private boolean cacheDoKeyLookup;
@@ -94,7 +94,7 @@ public class DIHCacheSupport {
   
   public void initNewParent(Context context) {
     dataSourceRowCache = null;
-    queryVsCacheIterator = new HashMap<String,Iterator<Map<String,Object>>>();
+    queryVsCacheIterator = new HashMap<>();
     for (Map.Entry<String,DIHCache> entry : queryVsCache.entrySet()) {
       queryVsCacheIterator.put(entry.getKey(), entry.getValue().iterator());
     }

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DIHWriterBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DIHWriterBase.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DIHWriterBase.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DIHWriterBase.java Sun Mar 16 19:39:10 2014
@@ -27,7 +27,7 @@ public abstract class DIHWriterBase impl
   
   @Override
   public void setDeltaKeys(Set<Map<String,Object>> passedInDeltaKeys) {
-    deltaKeys = new HashSet<Object>();
+    deltaKeys = new HashSet<>();
     for (Map<String,Object> aMap : passedInDeltaKeys) {
       if (aMap.size() > 0) {
         Object key = null;

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImportHandler.java Sun Mar 16 19:39:10 2014
@@ -210,7 +210,7 @@ public class DataImportHandler extends R
 
   private Map<String, Object> getParamsMap(SolrParams params) {
     Iterator<String> names = params.getParameterNamesIterator();
-    Map<String, Object> result = new HashMap<String, Object>();
+    Map<String, Object> result = new HashMap<>();
     while (names.hasNext()) {
       String s = names.next();
       String[] val = params.getParams(s);

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImporter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImporter.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImporter.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DataImporter.java Sun Mar 16 19:39:10 2014
@@ -80,12 +80,12 @@ public class DataImporter {
   private DIHConfiguration config;
   private Date indexStartTime;
   private Properties store = new Properties();
-  private Map<String, Map<String,String>> requestLevelDataSourceProps = new HashMap<String, Map<String,String>>();
+  private Map<String, Map<String,String>> requestLevelDataSourceProps = new HashMap<>();
   private IndexSchema schema;
   public DocBuilder docBuilder;
   public DocBuilder.Statistics cumulativeStatistics = new DocBuilder.Statistics();
   private SolrCore core;  
-  private Map<String, Object> coreScopeSession = new ConcurrentHashMap<String,Object>();
+  private Map<String, Object> coreScopeSession = new ConcurrentHashMap<>();
   private ReentrantLock importLock = new ReentrantLock();
   private boolean isDeltaImportSupported = false;  
   private final String handlerName;  
@@ -131,7 +131,7 @@ public class DataImporter {
           success = true;
         }      
         
-        Map<String,Map<String,String>> dsProps = new HashMap<String,Map<String,String>>();
+        Map<String,Map<String,String>> dsProps = new HashMap<>();
         if(defaultParams!=null) {
           int position = 0;
           while (position < defaultParams.size()) {
@@ -143,7 +143,7 @@ public class DataImporter {
               success = true;
               NamedList dsConfig = (NamedList) defaultParams.getVal(position);
               LOG.info("Getting configuration for Global Datasource...");              
-              Map<String,String> props = new HashMap<String,String>();
+              Map<String,String> props = new HashMap<>();
               for (int i = 0; i < dsConfig.size(); i++) {
                 props.put(dsConfig.getName(i), dsConfig.getVal(i).toString());
               }
@@ -225,9 +225,9 @@ public class DataImporter {
   
   public DIHConfiguration readFromXml(Document xmlDocument) {
     DIHConfiguration config;
-    List<Map<String, String >> functions = new ArrayList<Map<String ,String>>();
+    List<Map<String, String >> functions = new ArrayList<>();
     Script script = null;
-    Map<String, Map<String,String>> dataSources = new HashMap<String, Map<String,String>>();
+    Map<String, Map<String,String>> dataSources = new HashMap<>();
     
     NodeList dataConfigTags = xmlDocument.getElementsByTagName("dataConfig");
     if(dataConfigTags == null || dataConfigTags.getLength() == 0) {
@@ -263,7 +263,7 @@ public class DataImporter {
     List<Element> dataSourceTags = ConfigParseUtil.getChildNodes(e, ConfigNameConstants.DATA_SRC);
     if (!dataSourceTags.isEmpty()) {
       for (Element element : dataSourceTags) {
-        Map<String,String> p = new HashMap<String,String>();
+        Map<String,String> p = new HashMap<>();
         HashMap<String, String> attrs = ConfigParseUtil.getAllAttributes(element);
         for (Map.Entry<String, String> entry : attrs.entrySet()) {
           p.put(entry.getKey(), entry.getValue());
@@ -294,7 +294,7 @@ public class DataImporter {
     } else {
       Element pwElement = propertyWriterTags.get(0);
       String type = null;
-      Map<String,String> params = new HashMap<String,String>();
+      Map<String,String> params = new HashMap<>();
       for (Map.Entry<String,String> entry : ConfigParseUtil.getAllAttributes(
           pwElement).entrySet()) {
         if (TYPE.equals(entry.getKey())) {
@@ -494,7 +494,7 @@ public class DataImporter {
     //this map object is a Collections.synchronizedMap(new LinkedHashMap()). if we
     // synchronize on the object it must be safe to iterate through the map
     Map statusMessages = (Map) retrieve(STATUS_MSGS);
-    Map<String, String> result = new LinkedHashMap<String, String>();
+    Map<String, String> result = new LinkedHashMap<>();
     if (statusMessages != null) {
       synchronized (statusMessages) {
         for (Object o : statusMessages.entrySet()) {
@@ -520,7 +520,7 @@ public class DataImporter {
    * used by tests.
    */
   Map<String, Evaluator> getEvaluators(List<Map<String,String>> fn) {
-    Map<String, Evaluator> evaluators = new HashMap<String, Evaluator>();
+    Map<String, Evaluator> evaluators = new HashMap<>();
     evaluators.put(Evaluator.DATE_FORMAT_EVALUATOR, new DateFormatEvaluator());
     evaluators.put(Evaluator.SQL_ESCAPE_EVALUATOR, new SqlEscapingEvaluator());
     evaluators.put(Evaluator.URL_ENCODE_EVALUATOR, new UrlEvaluator());

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatEvaluator.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatEvaluator.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatEvaluator.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatEvaluator.java Sun Mar 16 19:39:10 2014
@@ -52,9 +52,9 @@ import org.apache.solr.util.DateMathPars
 public class DateFormatEvaluator extends Evaluator {
   
   public static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
-  Map<DateFormatCacheKey, SimpleDateFormat> cache = new WeakHashMap<DateFormatCacheKey, SimpleDateFormat>();
-  Map<String, Locale> availableLocales = new HashMap<String, Locale>();
-  Set<String> availableTimezones = new HashSet<String>();
+  Map<DateFormatCacheKey, SimpleDateFormat> cache = new WeakHashMap<>();
+  Map<String, Locale> availableLocales = new HashMap<>();
+  Set<String> availableTimezones = new HashSet<>();
   
   class DateFormatCacheKey {
     DateFormatCacheKey(Locale l, TimeZone tz, String df) {

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatTransformer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatTransformer.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatTransformer.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DateFormatTransformer.java Sun Mar 16 19:39:10 2014
@@ -40,7 +40,7 @@ import org.slf4j.LoggerFactory;
  * @since solr 1.3
  */
 public class DateFormatTransformer extends Transformer {
-  private Map<String, SimpleDateFormat> fmtCache = new HashMap<String, SimpleDateFormat>();
+  private Map<String, SimpleDateFormat> fmtCache = new HashMap<>();
   private static final Logger LOG = LoggerFactory
           .getLogger(DateFormatTransformer.class);
 
@@ -66,7 +66,7 @@ public class DateFormatTransformer exten
         Object o = aRow.get(srcCol);
         if (o instanceof List) {
           List inputs = (List) o;
-          List<Date> results = new ArrayList<Date>();
+          List<Date> results = new ArrayList<>();
           for (Object input : inputs) {
             results.add(process(input, fmt, locale));
           }

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DebugInfo.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DebugInfo.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DebugInfo.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DebugInfo.java Sun Mar 16 19:39:10 2014
@@ -26,12 +26,12 @@ import org.apache.solr.common.util.Named
 import org.apache.solr.common.util.StrUtils;
 
 public class DebugInfo {
-  public List<SolrInputDocument> debugDocuments = new ArrayList<SolrInputDocument>(0);
+  public List<SolrInputDocument> debugDocuments = new ArrayList<>(0);
   public NamedList<String> debugVerboseOutput = null;
   public boolean verbose;
   
   public DebugInfo(Map<String,Object> requestParams) {
     verbose = StrUtils.parseBool((String) requestParams.get("verbose"), false);
-    debugVerboseOutput = new NamedList<String>();
+    debugVerboseOutput = new NamedList<>();
   }
 }

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DebugLogger.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DebugLogger.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DebugLogger.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DebugLogger.java Sun Mar 16 19:39:10 2014
@@ -183,7 +183,7 @@ class DebugLogger {
       @Override
       public Object getData(String query) {
         log(DIHLogLevels.ENTITY_META, "query", query);
-        long start = System.currentTimeMillis();
+        long start = System.nanoTime();
         try {
           return ds.getData(query);
         } catch (DataImportHandlerException de) {

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DocBuilder.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DocBuilder.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DocBuilder.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/DocBuilder.java Sun Mar 16 19:39:10 2014
@@ -28,6 +28,7 @@ import org.apache.solr.handler.dataimpor
 import static org.apache.solr.handler.dataimport.SolrWriter.LAST_INDEX_KEY;
 import static org.apache.solr.handler.dataimport.DataImportHandlerException.SEVERE;
 import static org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow;
+
 import org.apache.solr.schema.IndexSchema;
 import org.apache.solr.schema.SchemaField;
 import org.slf4j.Logger;
@@ -35,6 +36,7 @@ import org.slf4j.LoggerFactory;
 
 import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicLong;
 
@@ -72,9 +74,9 @@ public class DocBuilder {
 
   boolean verboseDebug = false;
 
-  Map<String, Object> session = new HashMap<String, Object>();
+  Map<String, Object> session = new HashMap<>();
 
-  static final ThreadLocal<DocBuilder> INSTANCE = new ThreadLocal<DocBuilder>();
+  static final ThreadLocal<DocBuilder> INSTANCE = new ThreadLocal<>();
   private Map<String, Object> persistedProperties;
   
   private DIHProperties propWriter;
@@ -130,7 +132,7 @@ public class DocBuilder {
         resolver = new VariableResolver();
       }
       resolver.setEvaluators(dataImporter.getEvaluators());
-      Map<String, Object> indexerNamespace = new HashMap<String, Object>();
+      Map<String, Object> indexerNamespace = new HashMap<>();
       if (persistedProperties.get(LAST_INDEX_TIME) != null) {
         indexerNamespace.put(LAST_INDEX_TIME, persistedProperties.get(LAST_INDEX_TIME));
       } else  {
@@ -138,9 +140,9 @@ public class DocBuilder {
         indexerNamespace.put(LAST_INDEX_TIME, epoch);
       }
       indexerNamespace.put(INDEX_START_TIME, dataImporter.getIndexStartTime());
-      indexerNamespace.put("request", new HashMap<String,Object>(reqParams.getRawParams()));
+      indexerNamespace.put("request", new HashMap<>(reqParams.getRawParams()));
       for (Entity entity : dataImporter.getConfig().getEntities()) {
-        Map<String, Object> entityNamespace = new HashMap<String, Object>();        
+        Map<String, Object> entityNamespace = new HashMap<>();
         String key = SolrWriter.LAST_INDEX_KEY;
         Object lastIndex = persistedProperties.get(entity.getName() + "." + key);
         if (lastIndex != null) {
@@ -186,7 +188,7 @@ public class DocBuilder {
     try {
       dataImporter.store(DataImporter.STATUS_MSGS, statusMessages);
       config = dataImporter.getConfig();
-      final AtomicLong startTime = new AtomicLong(System.currentTimeMillis());
+      final AtomicLong startTime = new AtomicLong(System.nanoTime());
       statusMessages.put(TIME_ELAPSED, new Object() {
         @Override
         public String toString() {
@@ -211,10 +213,10 @@ public class DocBuilder {
       }
       AtomicBoolean fullCleanDone = new AtomicBoolean(false);
       //we must not do a delete of *:* multiple times if there are multiple root entities to be run
-      Map<String,Object> lastIndexTimeProps = new HashMap<String,Object>();
+      Map<String,Object> lastIndexTimeProps = new HashMap<>();
       lastIndexTimeProps.put(LAST_INDEX_KEY, dataImporter.getIndexStartTime());
 
-      epwList = new ArrayList<EntityProcessorWrapper>(config.getEntities().size());
+      epwList = new ArrayList<>(config.getEntities().size());
       for (Entity e : config.getEntities()) {
         epwList.add(getEntityProcessorWrapper(e));
       }
@@ -340,7 +342,7 @@ public class DocBuilder {
 
     addStatusMessage("Identifying Delta");
     LOG.info("Starting delta collection.");
-    Set<Map<String, Object>> deletedKeys = new HashSet<Map<String, Object>>();
+    Set<Map<String, Object>> deletedKeys = new HashSet<>();
     Set<Map<String, Object>> allPks = collectDelta(currentEntityProcessorWrapper, resolver, deletedKeys);
     if (stop.get())
       return;
@@ -409,7 +411,7 @@ public class DocBuilder {
   private void buildDocument(VariableResolver vr, DocWrapper doc,
       Map<String,Object> pk, EntityProcessorWrapper epw, boolean isRoot,
       ContextImpl parentCtx) {
-    List<EntityProcessorWrapper> entitiesToDestroy = new ArrayList<EntityProcessorWrapper>();
+    List<EntityProcessorWrapper> entitiesToDestroy = new ArrayList<>();
     try {
       buildDocument(vr, doc, pk, epw, isRoot, parentCtx, entitiesToDestroy);
     } catch (Exception e) {
@@ -563,7 +565,7 @@ public class DocBuilder {
     Map<String ,Object> session;
 
     public void setSessionAttribute(String key, Object val){
-      if(session == null) session = new HashMap<String, Object>();
+      if(session == null) session = new HashMap<>();
       session.put(key, val);
     }
 
@@ -766,7 +768,7 @@ public class DocBuilder {
     ContextImpl context1 = new ContextImpl(epw, resolver, null, Context.FIND_DELTA, session, null, this);
     epw.init(context1);
 
-    Set<Map<String, Object>> myModifiedPks = new HashSet<Map<String, Object>>();
+    Set<Map<String, Object>> myModifiedPks = new HashSet<>();
 
    
 
@@ -779,7 +781,7 @@ public class DocBuilder {
     }
     
     // identifying the modified rows for this entity
-    Map<String, Map<String, Object>> deltaSet = new HashMap<String, Map<String, Object>>();
+    Map<String, Map<String, Object>> deltaSet = new HashMap<>();
     LOG.info("Running ModifiedRowKey() for Entity: " + epw.getEntity().getName());
     //get the modified rows in this entity
     String pk = epw.getEntity().getPk();
@@ -802,7 +804,7 @@ public class DocBuilder {
         return new HashSet();
     }
     //get the deleted rows for this entity
-    Set<Map<String, Object>> deletedSet = new HashSet<Map<String, Object>>();
+    Set<Map<String, Object>> deletedSet = new HashSet<>();
     while (true) {
       Map<String, Object> row = epw.nextDeletedRowKey();
       if (row == null)
@@ -832,7 +834,7 @@ public class DocBuilder {
     LOG.info("Completed DeletedRowKey for Entity: " + epw.getEntity().getName() + " rows obtained : " + deletedSet.size());
 
     myModifiedPks.addAll(deltaSet.values());
-    Set<Map<String, Object>> parentKeyList = new HashSet<Map<String, Object>>();
+    Set<Map<String, Object>> parentKeyList = new HashSet<>();
     //all that we have captured is useless (in a sub-entity) if no rows in the parent is modified because of these
     //propogate up the changes in the chain
     if (epw.getEntity().getParentEntity() != null) {
@@ -860,7 +862,7 @@ public class DocBuilder {
 
     // Do not use entity.isDocRoot here because one of descendant entities may set rootEntity="true"
     return epw.getEntity().getParentEntity() == null ?
-        myModifiedPks : new HashSet<Map<String, Object>>(parentKeyList);
+        myModifiedPks : new HashSet<>(parentKeyList);
   }
 
   private void getModifiedParentRows(VariableResolver resolver,
@@ -894,7 +896,7 @@ public class DocBuilder {
   public static final String TIME_ELAPSED = "Time Elapsed";
 
   static String getTimeElapsedSince(long l) {
-    l = System.currentTimeMillis() - l;
+    l = TimeUnit.MILLISECONDS.convert(System.nanoTime() - l, TimeUnit.NANOSECONDS);
     return (l / (60000 * 60)) + ":" + (l / 60000) % 60 + ":" + (l / 1000)
             % 60 + "." + l % 1000;
   }
@@ -947,7 +949,7 @@ public class DocBuilder {
     }
 
     public Map<String, Object> getStatsSnapshot() {
-      Map<String, Object> result = new HashMap<String, Object>();
+      Map<String, Object> result = new HashMap<>();
       result.put("docCount", docCount.get());
       result.put("deletedDocCount", deletedDocCount.get());
       result.put("rowCount", rowsCount.get());

Modified: lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java?rev=1578144&r1=1578143&r2=1578144&view=diff
==============================================================================
--- lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java (original)
+++ lucene/dev/branches/lucene5376_2/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/EntityProcessorWrapper.java Sun Mar 16 19:39:10 2014
@@ -43,7 +43,7 @@ public class EntityProcessorWrapper exte
   private EntityProcessor delegate;
   private Entity entity;
   private DataSource datasource;
-  private List<EntityProcessorWrapper> children = new ArrayList<EntityProcessorWrapper>();
+  private List<EntityProcessorWrapper> children = new ArrayList<>();
   private DocBuilder docBuilder;
   private boolean initalized;
   private String onError;
@@ -176,7 +176,7 @@ public class EntityProcessorWrapper exte
       if (stopTransform) break;
       try {
         if (rows != null) {
-          List<Map<String, Object>> tmpRows = new ArrayList<Map<String, Object>>();
+          List<Map<String, Object>> tmpRows = new ArrayList<>();
           for (Map<String, Object> map : rows) {
             resolver.addNamespace(entityName, map);
             Object o = t.transformRow(map, context);