diff --git a/spring-webflow/src/main/java/org/springframework/webflow/action/ResultObjectBasedEventFactory.java b/spring-webflow/src/main/java/org/springframework/webflow/action/ResultObjectBasedEventFactory.java index d8556bc8..9640c693 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/action/ResultObjectBasedEventFactory.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/action/ResultObjectBasedEventFactory.java @@ -15,7 +15,6 @@ */ package org.springframework.webflow.action; -import org.springframework.core.JdkVersion; import org.springframework.core.enums.LabeledEnum; import org.springframework.util.StringUtils; import org.springframework.webflow.execution.Event; @@ -78,7 +77,7 @@ public class ResultObjectBasedEventFactory extends EventFactorySupport implement } else if (isLabeledEnum(resultObject.getClass())) { String resultId = ((LabeledEnum) resultObject).getLabel(); return event(source, resultId, getResultAttributeName(), resultObject); - } else if (isJdk5Enum(resultObject.getClass())) { + } else if (isEnum(resultObject.getClass())) { String eventId = EnumUtils.getEnumName(resultObject); return event(source, eventId, getResultAttributeName(), resultObject); } else if (isString(resultObject.getClass())) { @@ -101,7 +100,7 @@ public class ResultObjectBasedEventFactory extends EventFactorySupport implement * Check whether or not given type is mapped to a corresponding event using special mapping rules. */ public boolean isMappedValueType(Class type) { - return isBoolean(type) || isLabeledEnum(type) || isJdk5Enum(type) || isString(type) || isEvent(type); + return isBoolean(type) || isLabeledEnum(type) || isEnum(type) || isString(type) || isEvent(type); } // internal helpers to determine the 'type' of a class @@ -114,12 +113,8 @@ public class ResultObjectBasedEventFactory extends EventFactorySupport implement return LabeledEnum.class.isAssignableFrom(type); } - private boolean isJdk5Enum(Class type) { - if (JdkVersion.getMajorJavaVersion() >= JdkVersion.JAVA_15) { - return EnumUtils.isEnum(type); - } else { - return false; - } + private boolean isEnum(Class type) { + return EnumUtils.isEnum(type); } private boolean isString(Class type) { diff --git a/spring-webflow/src/main/java/org/springframework/webflow/conversation/impl/ConversationLockFactory.java b/spring-webflow/src/main/java/org/springframework/webflow/conversation/impl/ConversationLockFactory.java index 1117700c..3ee36a96 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/conversation/impl/ConversationLockFactory.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/conversation/impl/ConversationLockFactory.java @@ -17,7 +17,6 @@ package org.springframework.webflow.conversation.impl; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.springframework.core.JdkVersion; /** * Simple utility class for creating conversation lock instances based on the current execution environment. @@ -63,15 +62,6 @@ class ConversationLockFactory { * lock is returned. */ public ConversationLock createLock() { - if (JdkVersion.getMajorJavaVersion() >= JdkVersion.JAVA_15) { - return new JdkConcurrentConversationLock(timeoutSeconds); - } else if (backportConcurrentPresent) { - return new JdkBackportConcurrentConversationLock(timeoutSeconds); - } else { - logger.warn("Unable to enable conversation locking. Switch to Java 5 or above, " - + "or put the 'backport-util-concurrent' package on the classpath " - + "to enable locking in your Java 1.4 environment."); - return NoOpConversationLock.INSTANCE; - } + return new JdkConcurrentConversationLock(timeoutSeconds); } } \ No newline at end of file diff --git a/spring-webflow/src/main/java/org/springframework/webflow/engine/builder/model/FlowModelFlowBuilder.java b/spring-webflow/src/main/java/org/springframework/webflow/engine/builder/model/FlowModelFlowBuilder.java index d6de314c..605315c4 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/engine/builder/model/FlowModelFlowBuilder.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/engine/builder/model/FlowModelFlowBuilder.java @@ -38,7 +38,6 @@ import org.springframework.context.annotation.AnnotationConfigUtils; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.GenericApplicationContext; import org.springframework.context.support.ReloadableResourceBundleMessageSource; -import org.springframework.core.JdkVersion; import org.springframework.core.io.Resource; import org.springframework.core.style.ToStringCreator; import org.springframework.util.Assert; @@ -338,9 +337,7 @@ public class FlowModelFlowBuilder extends AbstractFlowBuilder { flowContext.getBeanFactory().registerScope("conversation", new ConversationScope()); Resource flowResource = flowModelHolder.getFlowModelResource(); flowContext.setResourceLoader(new FlowRelativeResourceLoader(flowResource)); - if (JdkVersion.getMajorJavaVersion() >= JdkVersion.JAVA_15) { - AnnotationConfigUtils.registerAnnotationConfigProcessors(flowContext); - } + AnnotationConfigUtils.registerAnnotationConfigProcessors(flowContext); new XmlBeanDefinitionReader(flowContext).loadBeanDefinitions(resources); registerFlowBeans(flowContext.getBeanFactory()); registerMessageSource(flowContext, flowResource);