lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject [1/2] lucene-solr git commit: SOLR-8764: Remove deprecated methods and classes
Date Wed, 02 Mar 2016 14:29:26 GMT
Repository: lucene-solr
Updated Branches:
  refs/heads/branch_6x 251cdbcee -> 8bbb1dcac


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8bbb1dca/solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.java b/solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.java
index 54c4b6e..31d54a8 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/util/ClientUtils.java
@@ -61,42 +61,6 @@ public class ClientUtils
     return streams;
   }
 
-  /**
-   * @param d SolrDocument to convert
-   * @return a SolrInputDocument with the same fields and values as the
-   *   SolrDocument.  All boosts are 1.0f
-   * @deprecated This method will be removed in Solr 6.0
-   */
-  @Deprecated
-  public static SolrInputDocument toSolrInputDocument( SolrDocument d )
-  {
-    SolrInputDocument doc = new SolrInputDocument();
-    for( String name : d.getFieldNames() ) {
-      doc.addField( name, d.getFieldValue(name), 1.0f );
-    }
-    return doc;
-  }
-
-  /**
-   * @param d SolrInputDocument to convert
-   * @return a SolrDocument with the same fields and values as the SolrInputDocument
-   * @deprecated This method will be removed in Solr 6.0
-   */
-  @Deprecated
-  public static SolrDocument toSolrDocument(SolrInputDocument d) {
-    SolrDocument doc = new SolrDocument();
-    for (SolrInputField field : d) {
-      doc.setField(field.getName(), field.getValue());
-    }
-    if (d.getChildDocuments() != null) {
-      for (SolrInputDocument in : d.getChildDocuments()) {
-        doc.addChildDocument(toSolrDocument(in));
-      }
-
-    }
-    return doc;
-  }
-
   //------------------------------------------------------------------------
   //------------------------------------------------------------------------
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8bbb1dca/solr/solrj/src/java/org/apache/solr/common/cloud/ClosableThread.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ClosableThread.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ClosableThread.java
deleted file mode 100644
index 861a9c8..0000000
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ClosableThread.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.common.cloud;
-
-/**
- * @deprecated because this class is no longer used internally and will be removed
- */
-@Deprecated
-public interface ClosableThread {
-  public void close();
-  public boolean isClosed();
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8bbb1dca/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.java
index a32743c..0f50f0a 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkCmdExecutor.java
@@ -66,11 +66,6 @@ public class ZkCmdExecutor {
           Thread.currentThread().interrupt();
           throw new InterruptedException();
         }
-        if (Thread.currentThread() instanceof ClosableThread) {
-          if (((ClosableThread) Thread.currentThread()).isClosed()) {
-            throw exception;
-          }
-        }
         if (i != retryCount -1) {
           retryDelay(i);
         }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8bbb1dca/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
index a904f3e..60a8100 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
@@ -419,8 +419,7 @@ public class ZkStateReader implements Closeable {
     }
 
     this.clusterState = new ClusterState(liveNodes, result, legacyClusterStateVersion);
-    LOG.debug("clusterStateSet: version [{}] legacy [{}] interesting [{}] watched [{}] lazy
[{}] total [{}]",
-        clusterState.getZkClusterStateVersion(),
+    LOG.debug("clusterStateSet: legacy [{}] interesting [{}] watched [{}] lazy [{}] total
[{}]",
         legacyCollectionStates.keySet().size(),
         interestingCollections.size(),
         watchedCollectionStates.keySet().size(),
@@ -428,8 +427,7 @@ public class ZkStateReader implements Closeable {
         clusterState.getCollectionStates().size());
 
     if (LOG.isTraceEnabled()) {
-      LOG.trace("clusterStateSet: version [{}] legacy [{}] interesting [{}] watched [{}]
lazy [{}] total [{}]",
-          clusterState.getZkClusterStateVersion(),
+      LOG.trace("clusterStateSet: legacy [{}] interesting [{}] watched [{}] lazy [{}] total
[{}]",
           legacyCollectionStates.keySet(),
           interestingCollections,
           watchedCollectionStates.keySet(),

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8bbb1dca/solr/solrj/src/java/org/apache/solr/common/util/IteratorChain.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/IteratorChain.java b/solr/solrj/src/java/org/apache/solr/common/util/IteratorChain.java
deleted file mode 100644
index 9e47c87..0000000
--- a/solr/solrj/src/java/org/apache/solr/common/util/IteratorChain.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.common.util;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/** Chain several Iterators, so that this iterates
- *  over all of them in sequence.
- *
- * @deprecated This class is no longer used by Solr, and may be removed in future versions
- */
-@Deprecated
-public class IteratorChain<E> implements Iterator<E> {
-
-  private final List<Iterator<E>> iterators = new ArrayList<>();
-  private Iterator<Iterator<E>> itit;
-  private Iterator<E> current;
- 
-  public void addIterator(Iterator<E> it) {
-    if(itit!=null) throw new RuntimeException("all Iterators must be added before calling
hasNext()");
-    iterators.add(it);
-  }
-  
-  @Override
-  public boolean hasNext() {
-    if(itit==null) itit = iterators.iterator();
-    return recursiveHasNext();
-  }
-  
-  /** test if current iterator hasNext(), and if not try the next
-   *  one in sequence, recursively
-   */
-  private boolean recursiveHasNext() {
-    // return false if we have no more iterators
-    if(current==null) {
-      if(itit.hasNext()) {
-        current=itit.next();
-      } else {
-        return false;
-      }
-    }
-    
-    boolean result = current.hasNext();
-    if(!result) {
-      current = null;
-      result = recursiveHasNext();
-    }
-    
-    return result;
-  }
-
-  /** hasNext() must ALWAYS be called before calling this
-   *  otherwise it's a bit hard to keep track of what's happening
-   */
-  @Override
-  public E next() {
-    if(current==null) { 
-      throw new RuntimeException("For an IteratorChain, hasNext() MUST be called before calling
next()");
-    }
-    return current.next();
-  }
-
-  @Override
-  public void remove() {
-    // we just need this class 
-    // to iterate in readonly mode
-    throw new UnsupportedOperationException();
-  }
-  
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8bbb1dca/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-sql.xml
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-sql.xml b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-sql.xml
index e164924..10feac9 100644
--- a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-sql.xml
+++ b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-sql.xml
@@ -52,7 +52,6 @@
 
   <requestHandler name="standard" class="solr.StandardRequestHandler" default="true" />
   <requestHandler name="/update" class="solr.UpdateRequestHandler"  />
-  <requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />
 
   <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
     <lst name="invariants">

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8bbb1dca/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java
b/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java
index 7b838be..6390ddc 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/beans/TestDocumentObjectBinder.java
@@ -101,67 +101,6 @@ public class TestDocumentObjectBinder extends LuceneTestCase {
     assertEquals("CCTV Store", supplierTwo.get(0));
   }
 
-  public void testToAndFromSolrDocument() {
-    Item item = new Item();
-    item.id = "one";
-    item.inStock = false;
-    item.categories = new String[] {"aaa", "bbb", "ccc"};
-    item.features = Arrays.asList(item.categories);
-    List<String> supA = Arrays.asList("supA1", "supA2", "supA3");
-    List<String> supB = Arrays.asList("supB1", "supB2", "supB3");
-    item.supplier = new HashMap<>();
-    item.supplier.put("supplier_supA", supA);
-    item.supplier.put("supplier_supB", supB);
-    
-    item.supplier_simple = new HashMap<>();
-    item.supplier_simple.put("sup_simple_supA", "supA_val");
-    item.supplier_simple.put("sup_simple_supB", "supB_val");
-    
-    DocumentObjectBinder binder = new DocumentObjectBinder();
-    SolrInputDocument doc = binder.toSolrInputDocument(item);
-    SolrDocumentList docs = new SolrDocumentList();
-    docs.add(ClientUtils.toSolrDocument(doc));
-    Item out = binder.getBeans(Item.class, docs).get(0);
-    Item singleOut = binder.getBean(Item.class, ClientUtils.toSolrDocument(doc));
-    
-    // make sure it came out the same
-    assertEquals(item.id, out.id);
-    assertEquals(item.inStock, out.inStock);
-    assertEquals(item.categories.length, out.categories.length);
-    assertEquals(item.features, out.features);
-    assertEquals(supA, out.supplier.get("supplier_supA"));
-    assertEquals(supB, out.supplier.get("supplier_supB"));
-    assertEquals(item.supplier_simple.get("sup_simple_supB"), out.supplier_simple.get("sup_simple_supB"));
-
-    assertEquals(item.id, singleOut.id);
-    assertEquals(item.inStock, singleOut.inStock);
-    assertEquals(item.categories.length, singleOut.categories.length);
-    assertEquals(item.features, singleOut.features);
-    assertEquals(supA, singleOut.supplier.get("supplier_supA"));
-    assertEquals(supB, singleOut.supplier.get("supplier_supB"));
-    assertEquals(item.supplier_simple.get("sup_simple_supB"), out.supplier_simple.get("sup_simple_supB"));
-    
-//    put back "out" as Bean, to see if both ways work as you would expect
-//    but the Field that "allSuppliers" need to be cleared, as it is just for 
-//    retrieving data, not to post data
-    out.allSuppliers = null;
-    SolrInputDocument doc1 = binder.toSolrInputDocument(out);
-    
-    SolrDocumentList docs1 = new SolrDocumentList();
-    docs1.add(ClientUtils.toSolrDocument(doc1));
-    Item out1 = binder.getBeans(Item.class, docs1).get(0);
-
-    assertEquals(item.id, out1.id);
-    assertEquals(item.inStock, out1.inStock);
-    assertEquals(item.categories.length, out1.categories.length);
-    assertEquals(item.features, out1.features);
-
-    assertEquals(item.supplier_simple.get("sup_simple_supB"), out1.supplier_simple.get("sup_simple_supB"));
-
-    assertEquals(supA, out1.supplier.get("supplier_supA"));
-    assertEquals(supB, out1.supplier.get("supplier_supB"));
-  }
-
   public void testChild() throws Exception {
     SingleValueChild in = new SingleValueChild();
     in.id = "1";
@@ -169,10 +108,11 @@ public class TestDocumentObjectBinder extends LuceneTestCase {
     in.child.id = "1.0";
     in.child.name = "Name One";
     DocumentObjectBinder binder = new DocumentObjectBinder();
-    SolrInputDocument doc = binder.toSolrInputDocument(in);
-    assertEquals(1, doc.getChildDocuments().size());
-    assertEquals(1, ClientUtils.toSolrDocument(doc).getChildDocuments().size());
-    SingleValueChild out = binder.getBean(SingleValueChild.class, ClientUtils.toSolrDocument(doc));
+    SolrInputDocument solrInputDoc = binder.toSolrInputDocument(in);
+    SolrDocument solrDoc = toSolrDocument(solrInputDoc);
+    assertEquals(1, solrInputDoc.getChildDocuments().size());
+    assertEquals(1, solrDoc.getChildDocuments().size());
+    SingleValueChild out = binder.getBean(SingleValueChild.class, solrDoc);
     assertEquals(in.id, out.id);
     assertEquals(in.child.id, out.child.id);
     assertEquals(in.child.name, out.child.name);
@@ -183,10 +123,11 @@ public class TestDocumentObjectBinder extends LuceneTestCase {
     child.id = "1.1";
     child.name = "Name Two";
     listIn.child = Arrays.asList(in.child, child);
-    doc = binder.toSolrInputDocument(listIn);
-    assertEquals(2, doc.getChildDocuments().size());
-    assertEquals(2, ClientUtils.toSolrDocument(doc).getChildDocuments().size());
-    ListChild listOut = binder.getBean(ListChild.class, ClientUtils.toSolrDocument(doc));
+    solrInputDoc = binder.toSolrInputDocument(listIn);
+    solrDoc = toSolrDocument(solrInputDoc);
+    assertEquals(2, solrInputDoc.getChildDocuments().size());
+    assertEquals(2, solrDoc.getChildDocuments().size());
+    ListChild listOut = binder.getBean(ListChild.class, solrDoc);
     assertEquals(listIn.id, listOut.id);
     assertEquals(listIn.child.get(0).id, listOut.child.get(0).id);
     assertEquals(listIn.child.get(0).name, listOut.child.get(0).name);
@@ -196,10 +137,11 @@ public class TestDocumentObjectBinder extends LuceneTestCase {
     ArrayChild arrIn = new ArrayChild();
     arrIn.id = "3";
     arrIn.child = new Child[]{in.child, child};
-    doc = binder.toSolrInputDocument(arrIn);
-    assertEquals(2, doc.getChildDocuments().size());
-    assertEquals(2, ClientUtils.toSolrDocument(doc).getChildDocuments().size());
-    ArrayChild arrOut = binder.getBean(ArrayChild.class, ClientUtils.toSolrDocument(doc));
+    solrInputDoc = binder.toSolrInputDocument(arrIn);
+    solrDoc = toSolrDocument(solrInputDoc);
+    assertEquals(2, solrInputDoc.getChildDocuments().size());
+    assertEquals(2, solrDoc.getChildDocuments().size());
+    ArrayChild arrOut = binder.getBean(ArrayChild.class, solrDoc);
     assertEquals(arrIn.id, arrOut.id);
     assertEquals(arrIn.child[0].id, arrOut.child[0].id);
     assertEquals(arrIn.child[0].name, arrOut.child[0].name);
@@ -208,6 +150,19 @@ public class TestDocumentObjectBinder extends LuceneTestCase {
 
   }
 
+  private static SolrDocument toSolrDocument(SolrInputDocument d) {
+    SolrDocument doc = new SolrDocument();
+    for (SolrInputField field : d) {
+      doc.setField(field.getName(), field.getValue());
+    }
+    if (d.getChildDocuments() != null) {
+      for (SolrInputDocument in : d.getChildDocuments()) {
+        doc.addChildDocument(toSolrDocument(in));
+      }
+    }
+    return doc;
+  }
+
   public static class Item {
     @Field
     String id;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8bbb1dca/solr/solrj/src/test/org/apache/solr/common/util/IteratorChainTest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/common/util/IteratorChainTest.java b/solr/solrj/src/test/org/apache/solr/common/util/IteratorChainTest.java
deleted file mode 100644
index e26563f..0000000
--- a/solr/solrj/src/test/org/apache/solr/common/util/IteratorChainTest.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.solr.common.util;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.lucene.util.LuceneTestCase;
-import org.apache.solr.common.util.IteratorChain;
-
-public class IteratorChainTest extends LuceneTestCase {
-  
-  private Iterator<String> makeIterator(String marker,int howMany) {
-    final List<String> c = new ArrayList<>();
-    for(int i = 1; i <= howMany; i++) {
-      c.add(marker + i);
-    }
-    return c.iterator();
-  }
-  
-  public void testNoIterator() {
-    final IteratorChain<String> c = new IteratorChain<>();
-    assertFalse("Empty IteratorChain.hastNext() is false",c.hasNext());
-    assertEquals("",getString(c));
-  }
-  
-  public void testCallNextTooEarly() {
-    final IteratorChain<String> c = new IteratorChain<>();
-    c.addIterator(makeIterator("a",3));
-    try {
-      c.next();
-      fail("Calling next() before hasNext() should throw RuntimeException");
-    } catch(RuntimeException asExpected) {
-      // we're fine
-    }
-  }
-  
-  public void testCallAddTooLate() {
-    final IteratorChain<String> c = new IteratorChain<>();
-    c.hasNext();
-    try {
-      c.addIterator(makeIterator("a",3));
-      fail("Calling addIterator after hasNext() should throw RuntimeException");
-    } catch(RuntimeException asExpected) {
-      // we're fine
-    }
-  }
-  
-  public void testRemove() {
-    final IteratorChain<String> c = new IteratorChain<>();
-    try {
-      c.remove();
-      fail("Calling remove should throw UnsupportedOperationException");
-    } catch(UnsupportedOperationException asExpected) {
-      // we're fine
-    }
-  }
-  
-  public void testOneIterator() {
-    final IteratorChain<String> c = new IteratorChain<>();
-    c.addIterator(makeIterator("a",3));
-    assertEquals("a1a2a3",getString(c));
-  }
-  
-  public void testTwoIterators() {
-    final IteratorChain<String> c = new IteratorChain<>();
-    c.addIterator(makeIterator("a",3));
-    c.addIterator(makeIterator("b",2));
-    assertEquals("a1a2a3b1b2",getString(c));
-  }
-  
-  public void testEmptyIteratorsInTheMiddle() {
-    final IteratorChain<String> c = new IteratorChain<>();
-    c.addIterator(makeIterator("a",3));
-    c.addIterator(makeIterator("b",0));
-    c.addIterator(makeIterator("c",1));
-    assertEquals("a1a2a3c1",getString(c));
-  }
-  
-  /** dump the contents of it to a String */
-  private String getString(Iterator<String> it) {
-    final StringBuilder sb = new StringBuilder();
-    sb.append("");
-    while(it.hasNext()) {
-      sb.append(it.next());
-    }
-    return sb.toString();
-  }
-}

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8bbb1dca/solr/test-framework/src/java/org/apache/solr/SolrTestCaseHS.java
----------------------------------------------------------------------
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseHS.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseHS.java
index a3f74e6..4aed135 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseHS.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseHS.java
@@ -22,6 +22,7 @@ import org.apache.lucene.util.IOUtils;
 import org.apache.lucene.util.LuceneTestCase;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrServerException;
+import org.apache.solr.client.solrj.embedded.JettyConfig;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
 import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.impl.NoOpResponseParser;
@@ -32,6 +33,7 @@ import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.NamedList;
+import org.apache.solr.core.CoreDescriptor;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.schema.IndexSchema;
 import org.apache.solr.schema.SchemaField;
@@ -449,7 +451,16 @@ public class SolrTestCaseHS extends SolrTestCaseJ4 {
       }
 
       if (jetty == null) {
-        jetty = new JettySolrRunner(baseDir.getAbsolutePath(), "/solr", port, solrconfigFile,
schemaFile, true, null, null, null);
+        JettyConfig jettyConfig = JettyConfig.builder()
+            .stopAtShutdown(true)
+            .setContext("/solr")
+            .setPort(port)
+            .withSSLConfig(sslConfig)
+            .build();
+        Properties nodeProperties = new Properties();
+        nodeProperties.setProperty("solrconfig", solrconfigFile);
+        nodeProperties.setProperty(CoreDescriptor.CORE_SCHEMA, schemaFile);
+        jetty = new JettySolrRunner(baseDir.getAbsolutePath(), nodeProperties, jettyConfig);
       }
 
       // silly stuff included from solrconfig.snippet.randomindexconfig.xml

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8bbb1dca/solr/webapp/web/js/angular/app.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/angular/app.js b/solr/webapp/web/js/angular/app.js
index afb77d6..afd3271 100644
--- a/solr/webapp/web/js/angular/app.js
+++ b/solr/webapp/web/js/angular/app.js
@@ -787,16 +787,5 @@ var solr_admin = function( app_config )
               },
               error : function()
               {
-                show_global_error
-                (
-                  '<div class="message"><p>Unable to load environment info from
<code>' + system_url.esc() + '</code>.</p>' +
-                  '<p>This interface requires that you activate the admin request handlers
in all SolrCores by adding the ' +
-                  'following configuration to your <code>solrconfig.xml</code>:</p></div>'
+ "\n" +
-
-                  '<div class="code"><pre class="syntax language-xml"><code>'
+
-                  '<!-- Admin Handlers - This will register all the standard admin RequestHandlers.
-->'.esc() + "\n" +
-                  '<requestHandler name="/admin/" class="solr.admin.AdminHandlers" />'.esc()
+
-                  '</code></pre></div>'
-                );
   };
 */

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8bbb1dca/solr/webapp/web/js/scripts/app.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/scripts/app.js b/solr/webapp/web/js/scripts/app.js
index 32382b0..a967cfe 100644
--- a/solr/webapp/web/js/scripts/app.js
+++ b/solr/webapp/web/js/scripts/app.js
@@ -479,17 +479,6 @@ var solr_admin = function( app_config )
               },
               error : function()
               {
-                show_global_error
-                (
-                  '<div class="message"><p>Unable to load environment info from
<code>' + system_url.esc() + '</code>.</p>' +
-                  '<p>This interface requires that you activate the admin request handlers
in all SolrCores by adding the ' +
-                  'following configuration to your <code>solrconfig.xml</code>:</p></div>'
+ "\n" +
-
-                  '<div class="code"><pre class="syntax language-xml"><code>'
+
-                  '<!-- Admin Handlers - This will register all the standard admin RequestHandlers.
-->'.esc() + "\n" +
-                  '<requestHandler name="/admin/" class="solr.admin.AdminHandlers" />'.esc()
+
-                  '</code></pre></div>'
-                );
               },
               complete : function()
               {


Mime
View raw message