diff --git a/spring-binding/src/main/java/org/springframework/binding/collection/CompositeIterator.java b/spring-binding/src/main/java/org/springframework/binding/collection/CompositeIterator.java deleted file mode 100644 index cd617be2..00000000 --- a/spring-binding/src/main/java/org/springframework/binding/collection/CompositeIterator.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2004-2012 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.binding.collection; - -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.NoSuchElementException; - -import org.springframework.util.Assert; - -/** - * Iterator that combines multiple other iterators. This is a simple implementation that just maintains a list of - * iterators which are invoked in sequence untill all iterators are exhausted. - * - * @author Erwin Vervaet - * @deprecated in favor of {@link org.springframework.util.CompositeIterator} - */ -@Deprecated -public class CompositeIterator implements Iterator { - - private List> iterators = new LinkedList>(); - - private boolean inUse = false; - - /** - * Create a new composite iterator. Add iterators using the {@link #add(Iterator)} method. - */ - public CompositeIterator() { - } - - /** - * Add given iterator to this composite. - */ - public void add(Iterator iterator) { - Assert.state(!inUse, "You can no longer add iterator to a composite iterator that's already in use"); - if (iterators.contains(iterator)) { - throw new IllegalArgumentException("You cannot add the same iterator twice"); - } - iterators.add(iterator); - } - - public boolean hasNext() { - inUse = true; - for (Iterator iterator : iterators) { - if (iterator.hasNext()) { - return true; - } - } - return false; - } - - public E next() { - inUse = true; - for (Iterator iterator : iterators) { - if (iterator.hasNext()) { - return iterator.next(); - } - } - throw new NoSuchElementException("Exhaused all iterators"); - } - - public void remove() { - throw new UnsupportedOperationException("Remove is not supported"); - } -} diff --git a/spring-binding/src/main/java/org/springframework/binding/convert/service/GenericConversionService.java b/spring-binding/src/main/java/org/springframework/binding/convert/service/GenericConversionService.java index 47a310f8..36a6f3a7 100644 --- a/spring-binding/src/main/java/org/springframework/binding/convert/service/GenericConversionService.java +++ b/spring-binding/src/main/java/org/springframework/binding/convert/service/GenericConversionService.java @@ -132,9 +132,6 @@ public class GenericConversionService implements ConversionService { * * @param id the id of the custom converter instance * @param converter the converter - * - * @deprecated use {@link #addConverter(Converter)} instead or better yet use Spring 3 type conversion and - * formatting options (see Spring Documentation). */ public void addConverter(String id, Converter converter) { customConverters.put(id, converter); diff --git a/spring-binding/src/test/java/org/springframework/binding/collection/CompositeIteratorTests.java b/spring-binding/src/test/java/org/springframework/binding/collection/CompositeIteratorTests.java deleted file mode 100644 index 0907ac11..00000000 --- a/spring-binding/src/test/java/org/springframework/binding/collection/CompositeIteratorTests.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2004-2012 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.binding.collection; - -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; -import java.util.NoSuchElementException; - -import junit.framework.TestCase; - -/** - * Test case for {@link CompositeIterator}. - * - * @author Erwin Vervaet - */ -@Deprecated -public class CompositeIteratorTests extends TestCase { - - public void testNoIterators() { - CompositeIterator it = new CompositeIterator(); - assertFalse(it.hasNext()); - try { - it.next(); - fail(); - } catch (NoSuchElementException e) { - // expected - } - } - - public void testSingleIterator() { - CompositeIterator it = new CompositeIterator(); - it.add(Arrays.asList(new String[] { "0", "1" }).iterator()); - for (int i = 0; i < 2; i++) { - assertTrue(it.hasNext()); - assertEquals(String.valueOf(i), it.next()); - } - assertFalse(it.hasNext()); - try { - it.next(); - fail(); - } catch (NoSuchElementException e) { - // expected - } - } - - public void testMultipleIterators() { - CompositeIterator it = new CompositeIterator(); - it.add(Arrays.asList(new String[] { "0", "1" }).iterator()); - it.add(Arrays.asList(new String[] { "2" }).iterator()); - it.add(Arrays.asList(new String[] { "3", "4" }).iterator()); - for (int i = 0; i < 5; i++) { - assertTrue(it.hasNext()); - assertEquals(String.valueOf(i), it.next()); - } - assertFalse(it.hasNext()); - try { - it.next(); - fail(); - } catch (NoSuchElementException e) { - // expected - } - } - - public void testInUse() { - List list = Arrays.asList(new String[] { "0", "1" }); - CompositeIterator it = new CompositeIterator(); - it.add(list.iterator()); - it.hasNext(); - try { - it.add(list.iterator()); - fail(); - } catch (IllegalStateException e) { - // expected - } - it = new CompositeIterator(); - it.add(list.iterator()); - it.next(); - try { - it.add(list.iterator()); - fail(); - } catch (IllegalStateException e) { - // expected - } - } - - public void testDuplicateIterators() { - List list = Arrays.asList(new String[] { "0", "1" }); - Iterator iterator = list.iterator(); - CompositeIterator it = new CompositeIterator(); - it.add(iterator); - it.add(list.iterator()); - try { - it.add(iterator); - fail(); - } catch (IllegalArgumentException e) { - // expected - } - } - -} diff --git a/spring-binding/src/test/java/org/springframework/binding/convert/service/DefaultConversionServiceTests.java b/spring-binding/src/test/java/org/springframework/binding/convert/service/DefaultConversionServiceTests.java index b800212e..f4552ae6 100644 --- a/spring-binding/src/test/java/org/springframework/binding/convert/service/DefaultConversionServiceTests.java +++ b/spring-binding/src/test/java/org/springframework/binding/convert/service/DefaultConversionServiceTests.java @@ -45,7 +45,6 @@ import org.springframework.binding.format.DefaultNumberFormatFactory; * * @author Keith Donald */ -@SuppressWarnings("deprecation") public class DefaultConversionServiceTests extends TestCase { public void testConvertCompatibleTypes() { diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowResourceResolver.java b/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowResourceResolver.java deleted file mode 100644 index 385e6dd2..00000000 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/Jsf2FlowResourceResolver.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2004-2012 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.faces.webflow; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * @deprecated Use FlowResourceResolver - */ -@Deprecated -public class Jsf2FlowResourceResolver extends FlowResourceResolver { - - Log logger = LogFactory.getLog(FlowExternalContext.class); - - public Jsf2FlowResourceResolver() { - this.logger.warn("Jsf2FlowResourceResolver has been deprecated, please update your faces-config.xml to use FlowResourceResolver"); - } -} diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfRuntimeInformation.java b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfRuntimeInformation.java index 8948cfea..f5d9e40a 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/JsfRuntimeInformation.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/JsfRuntimeInformation.java @@ -35,21 +35,14 @@ public class JsfRuntimeInformation { private static final ClassLoader CLASSLOADER = JsfRuntimeInformation.class.getClassLoader(); - /** JSF Version 2.2 */ public static final int JSF_22 = 4; - /** JSF Version 2.1 */ public static final int JSF_21 = 3; - /** JSF Version 2.0 */ public static final int JSF_20 = 2; - /** @deprecated As of Web Flow 2.4.0 JSF 2.0 is a minimum requirement */ - @Deprecated public static final int JSF_12 = 1; - /** @deprecated As of Web Flow 2.4.0 JSF 2.0 is a minimum requirement */ - @Deprecated public static final int JSF_11 = 0; private static final int jsfVersion; @@ -66,7 +59,6 @@ public class JsfRuntimeInformation { } else { jsfVersion = JSF_11; } - } private static final boolean mojarraPresent = @@ -91,14 +83,10 @@ public class JsfRuntimeInformation { return jsfVersion >= JSF_20; } - /** @deprecated As of Web Flow 2.4.0 JSF 2.0 is a minimum requirement */ - @Deprecated public static boolean isAtLeastJsf12() { return jsfVersion >= JSF_12; } - /** @deprecated As of Web Flow 2.4.0 JSF 2.0 is a minimum requirement */ - @Deprecated public static boolean isLessThanJsf20() { return jsfVersion < JSF_20; } diff --git a/spring-webflow/src/test/java/org/springframework/webflow/mvc/view/AbstractBindingModelTests.java b/spring-webflow/src/test/java/org/springframework/webflow/mvc/view/AbstractBindingModelTests.java index 6f9f05a5..a7ca2e6e 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/mvc/view/AbstractBindingModelTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/mvc/view/AbstractBindingModelTests.java @@ -64,10 +64,9 @@ public abstract class AbstractBindingModelTests extends TestCase { public void testGetRawValue() { testBean.datum2 = 3; - assertEquals(new Integer(3), model.getRawFieldValue("datum2")); + assertEquals(3, model.getRawFieldValue("datum2")); } - @SuppressWarnings("deprecation") public void testGetFieldValueConvertedWithCustomConverter() { testBean.datum2 = 3; conversionService.addConverter("customConverter", new StringToObject(Integer.class) { diff --git a/spring-webflow/src/test/java/org/springframework/webflow/mvc/view/MvcViewTests.java b/spring-webflow/src/test/java/org/springframework/webflow/mvc/view/MvcViewTests.java index d51c3c4f..af08a758 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/mvc/view/MvcViewTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/mvc/view/MvcViewTests.java @@ -10,7 +10,6 @@ import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.Map; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -451,7 +450,6 @@ public class MvcViewTests extends TestCase { assertEquals(null, bindBean.getBeanProperty().getName()); } - @SuppressWarnings("deprecation") public void testResumeEventModelBindingCustomConverter() throws Exception { MockRequestContext context = new MockRequestContext(); context.putRequestParameter("_eventId", "submit"); diff --git a/spring-webflow/src/test/java/org/springframework/webflow/persistence/JpaFlowExecutionListenerTests.java b/spring-webflow/src/test/java/org/springframework/webflow/persistence/JpaFlowExecutionListenerTests.java index f533c13c..7f6a8e7f 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/persistence/JpaFlowExecutionListenerTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/persistence/JpaFlowExecutionListenerTests.java @@ -21,7 +21,6 @@ import org.springframework.webflow.execution.FlowExecutionException; import org.springframework.webflow.test.MockFlowSession; import org.springframework.webflow.test.MockRequestContext; -@SuppressWarnings("deprecation") public class JpaFlowExecutionListenerTests extends TestCase { private EntityManagerFactory entityManagerFactory; diff --git a/spring-webflow/src/test/java/org/springframework/webflow/persistence/JpaPersistenceContextPropagationTests.java b/spring-webflow/src/test/java/org/springframework/webflow/persistence/JpaPersistenceContextPropagationTests.java index 6f938df4..ed1b9d72 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/persistence/JpaPersistenceContextPropagationTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/persistence/JpaPersistenceContextPropagationTests.java @@ -11,7 +11,6 @@ import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter; import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.webflow.execution.FlowExecutionListener; -@SuppressWarnings("deprecation") public class JpaPersistenceContextPropagationTests extends AbstractPersistenceContextPropagationTests { private EntityManagerFactory entityManagerFactory;