From 39c1ab923f6a196318581c66ebe8d5519b01fdb2 Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Thu, 17 Sep 2009 19:24:35 +0000 Subject: [PATCH] tidying --- .../core/convert/support/StringToArray.java | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 org.springframework.core/src/main/java/org/springframework/core/convert/support/StringToArray.java diff --git a/org.springframework.core/src/main/java/org/springframework/core/convert/support/StringToArray.java b/org.springframework.core/src/main/java/org/springframework/core/convert/support/StringToArray.java deleted file mode 100644 index 0a4a9bb7df..0000000000 --- a/org.springframework.core/src/main/java/org/springframework/core/convert/support/StringToArray.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2002-2009 the original author or authors. - * - * Licensed 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.springframework.core.convert.support; - -import org.springframework.core.convert.TypeDescriptor; -import org.springframework.util.StringUtils; - -/** - * Converts a comma-delimited string to an array. - * - * @author Keith Donald - * @since 3.0 - */ -class StringToArray implements ConversionExecutor { - - private final ArrayToArray converter; - - public StringToArray(TypeDescriptor targetType, GenericConversionService conversionService) { - this.converter = new ArrayToArray(TypeDescriptor.valueOf(String[].class), targetType, conversionService); - } - - public Object execute(Object source) { - String str = (String) source; - String[] fields = StringUtils.commaDelimitedListToStringArray(str); - return this.converter.execute(fields); - } - -}