From a68586a0363433ba3df430df9141150586118dee Mon Sep 17 00:00:00 2001 From: Shawn Heisey Date: Thu, 3 Oct 2013 01:38:40 +0000 Subject: [PATCH] SOLR-5264 removing deprecated "oneOrMany" method from trunk git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1528699 13f79535-47bb-0310-9956-ffa450edef68 --- .../FieldMutatingUpdateProcessorFactory.java | 41 ------------------- 1 file changed, 41 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/update/processor/FieldMutatingUpdateProcessorFactory.java b/solr/core/src/java/org/apache/solr/update/processor/FieldMutatingUpdateProcessorFactory.java index 9c4dc2aeecf..68f0c19ef87 100644 --- a/solr/core/src/java/org/apache/solr/update/processor/FieldMutatingUpdateProcessorFactory.java +++ b/solr/core/src/java/org/apache/solr/update/processor/FieldMutatingUpdateProcessorFactory.java @@ -243,47 +243,6 @@ public abstract class FieldMutatingUpdateProcessorFactory } - /** - * Removes all instance of the key from NamedList, returning the Set of - * Strings that key referred to. Throws an error if the key didn't refer - * to one or more strings (or arrays of strings) - * @exception SolrException invalid arr/str structure. - * @deprecated Replaced by {@link NamedList#removeConfigArgs(String)}. Will be - * removed in version 5.0. - */ - @Deprecated - public static Collection oneOrMany(final NamedList args, final String key) { - List result = new ArrayList(args.size() / 2); - final String err = "init arg '" + key + "' must be a string " - + "(ie: 'str'), or an array (ie: 'arr') containing strings; found: "; - - for (Object o = args.remove(key); null != o; o = args.remove(key)) { - if (o instanceof String) { - result.add((String)o); - continue; - } - - if (o instanceof Object[]) { - o = Arrays.asList((Object[]) o); - } - - if (o instanceof Collection) { - for (Object item : (Collection)o) { - if (! (item instanceof String)) { - throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, err + item.getClass()); - } - result.add((String)item); - } - continue; - } - - // who knows what the hell we have - throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, err + o.getClass()); - } - - return result; - } - /** * Removes the first instance of the key from NamedList, returning the Boolean * that key referred to, or null if the key is not specified.