lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r818808 - /lucene/solr/trunk/src/java/org/apache/solr/search/CacheConfig.java
Date Fri, 25 Sep 2009 10:24:59 GMT
Author: shalin
Date: Fri Sep 25 10:24:58 2009
New Revision: 818808

URL: http://svn.apache.org/viewvc?rev=818808&view=rev
Log:
Remove unused import and redundant casts

Modified:
    lucene/solr/trunk/src/java/org/apache/solr/search/CacheConfig.java

Modified: lucene/solr/trunk/src/java/org/apache/solr/search/CacheConfig.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/search/CacheConfig.java?rev=818808&r1=818807&r2=818808&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/search/CacheConfig.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/search/CacheConfig.java Fri Sep 25 10:24:58
2009
@@ -22,7 +22,6 @@
 
 import java.util.Map;
 
-import org.apache.solr.common.ResourceLoader;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.util.DOMUtil;
 import org.apache.solr.core.SolrConfig;
@@ -78,7 +77,7 @@
 
 
   public static CacheConfig getConfig(SolrConfig solrConfig, String xpath) {
-    Node node = (Node)solrConfig.getNode(xpath, false);
+    Node node = solrConfig.getNode(xpath, false);
     return getConfig(solrConfig, node);
   }
 
@@ -88,14 +87,14 @@
     CacheConfig config = new CacheConfig();
     config.nodeName = node.getNodeName();
     config.args = DOMUtil.toMap(node.getAttributes());
-    String nameAttr = (String)config.args.get("name");  // OPTIONAL
+    String nameAttr = config.args.get("name");  // OPTIONAL
     if (nameAttr==null) {
       config.args.put("name",config.nodeName);
     }
 
     SolrResourceLoader loader = solrConfig.getResourceLoader();
-    config.cacheImpl = (String)config.args.get("class");
-    config.regenImpl = (String)config.args.get("regenerator");
+    config.cacheImpl = config.args.get("class");
+    config.regenImpl = config.args.get("regenerator");
     config.clazz = loader.findClass(config.cacheImpl);
     if (config.regenImpl != null) {
       config.regenerator = (CacheRegenerator) loader.newInstance(config.regenImpl);



Mime
View raw message