diff --git a/spring-core/src/main/java/org/springframework/lang/UsesJava7.java b/spring-core/src/main/java/org/springframework/lang/UsesJava7.java index aab6906366e..e25470f6c3d 100644 --- a/spring-core/src/main/java/org/springframework/lang/UsesJava7.java +++ b/spring-core/src/main/java/org/springframework/lang/UsesJava7.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2018 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. @@ -28,6 +28,7 @@ import java.lang.annotation.Target; * * @author Stephane Nicoll * @since 4.1 + * @deprecated as of 5.0 since the framework is based on Java 8+ now */ @Retention(RetentionPolicy.CLASS) @Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE}) diff --git a/spring-core/src/main/java/org/springframework/lang/UsesJava8.java b/spring-core/src/main/java/org/springframework/lang/UsesJava8.java index 11e02dd6e71..0db59a1a658 100644 --- a/spring-core/src/main/java/org/springframework/lang/UsesJava8.java +++ b/spring-core/src/main/java/org/springframework/lang/UsesJava8.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2018 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. @@ -28,6 +28,7 @@ import java.lang.annotation.Target; * * @author Stephane Nicoll * @since 4.1 + * @deprecated as of 5.0 since the framework is based on Java 8+ now */ @Retention(RetentionPolicy.CLASS) @Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE}) diff --git a/spring-jcl/src/main/java/org/apache/commons/logging/impl/SimpleLog.java b/spring-jcl/src/main/java/org/apache/commons/logging/impl/SimpleLog.java index d33391f2c68..2ccc7962df2 100644 --- a/spring-jcl/src/main/java/org/apache/commons/logging/impl/SimpleLog.java +++ b/spring-jcl/src/main/java/org/apache/commons/logging/impl/SimpleLog.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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. @@ -18,13 +18,14 @@ package org.apache.commons.logging.impl; /** * Originally a simple Commons Logging provider configured by system properties. - * Deprecated in {@code spring-jcl}, effectively equivalent to {@link NoOpLog} now. + * Deprecated in {@code spring-jcl}, effectively equivalent to {@link NoOpLog}. * *

Instead of instantiating this directly, call {@code LogFactory#getLog(Class/String)} * which will fall back to {@code java.util.logging} if neither Log4j nor SLF4J are present. * * @author Juergen Hoeller (for the {@code spring-jcl} variant) * @since 5.0 + * @deprecated in {@code spring-jcl} (effectively equivalent to {@link NoOpLog}) */ @Deprecated @SuppressWarnings("serial") diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate5/HibernateTemplate.java b/spring-orm/src/main/java/org/springframework/orm/hibernate5/HibernateTemplate.java index b887ac7c44b..0b2eb742197 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate5/HibernateTemplate.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate5/HibernateTemplate.java @@ -1131,7 +1131,6 @@ public class HibernateTemplate implements HibernateOperations, InitializingBean * @see #setCacheQueries * @see #setQueryCacheRegion */ - @Deprecated @SuppressWarnings({"rawtypes", "deprecation"}) protected void prepareQuery(org.hibernate.Query queryObject) { if (isCacheQueries()) { @@ -1232,7 +1231,7 @@ public class HibernateTemplate implements HibernateOperations, InitializingBean if (retVal instanceof org.hibernate.Query) { prepareQuery(((org.hibernate.Query) retVal)); } - if (retVal instanceof Criteria) { + else if (retVal instanceof Criteria) { prepareCriteria(((Criteria) retVal)); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMappingIntrospector.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMappingIntrospector.java index 88b77ab0739..62479747815 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMappingIntrospector.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMappingIntrospector.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 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. @@ -79,6 +79,7 @@ public class HandlerMappingIntrospector * Constructor that detects the configured {@code HandlerMapping}s in the * given {@code ApplicationContext} or falls back on * "DispatcherServlet.properties" like the {@code DispatcherServlet}. + * @deprecated as of 4.3.12, in favor of {@link #setApplicationContext} */ @Deprecated public HandlerMappingIntrospector(ApplicationContext context) {