From b103b2a0ad3af744f72b05bf22ade807f058a125 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Sun, 24 Nov 2013 15:39:24 -0600 Subject: [PATCH] HHH-8741 - More checkstyle cleanups --- .../hibernate/dialect/AbstractHANADialect.java | 3 --- .../java/org/hibernate/engine/spi/Mapping.java | 2 ++ .../java/org/hibernate/engine/spi/TypedValue.java | 4 ++++ .../spi/AbstractPreDatabaseOperationEvent.java | 2 ++ .../hql/internal/ast/tree/ParameterContainer.java | 4 +++- .../hibernate/hql/internal/ast/util/ASTUtil.java | 3 +++ .../hql/internal/ast/util/ColumnHelper.java | 1 + .../id/factory/IdentifierGeneratorFactory.java | 2 ++ .../util/collections/CollectionHelper.java | 15 ++++++++++++--- shared/config/checkstyle/checkstyle.xml | 4 +++- 10 files changed, 32 insertions(+), 8 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java index 6975d924f9..e55f772894 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java @@ -306,7 +306,6 @@ public abstract class AbstractHANADialect extends Dialect { getDefaultProperties().setProperty( AvailableSettings.NON_CONTEXTUAL_LOB_CREATION, "true" ); } - @Deprecated @Override public boolean bindLimitParametersInReverseOrder() { return true; @@ -431,7 +430,6 @@ public abstract class AbstractHANADialect extends Dialect { return getForUpdateString( lockMode ) + " of " + aliases; } - @Deprecated @Override public String getLimitString(final String sql, final boolean hasOffset) { return new StringBuilder( sql.length() + 20 ).append( sql ) @@ -606,7 +604,6 @@ public abstract class AbstractHANADialect extends Dialect { return false; } - @Deprecated @Override public boolean supportsLimit() { return true; diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/Mapping.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/Mapping.java index f67bdbfc58..0fcca3f3fd 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/Mapping.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/Mapping.java @@ -45,7 +45,9 @@ public interface Mapping { * * @deprecated temporary solution */ + @Deprecated public IdentifierGeneratorFactory getIdentifierGeneratorFactory(); + public Type getIdentifierType(String className) throws MappingException; public String getIdentifierPropertyName(String className) throws MappingException; public Type getReferencedPropertyType(String className, String propertyName) throws MappingException; diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/TypedValue.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/TypedValue.java index bf360d646e..7953d83578 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/TypedValue.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/TypedValue.java @@ -52,6 +52,10 @@ public final class TypedValue implements Serializable { } ); } + + /** + * @deprecated explicit entity mode support is deprecated + */ @Deprecated public TypedValue(Type type, Object value, EntityMode entityMode) { this(type, value); diff --git a/hibernate-core/src/main/java/org/hibernate/event/spi/AbstractPreDatabaseOperationEvent.java b/hibernate-core/src/main/java/org/hibernate/event/spi/AbstractPreDatabaseOperationEvent.java index 685e72c13b..7e69cacb38 100644 --- a/hibernate-core/src/main/java/org/hibernate/event/spi/AbstractPreDatabaseOperationEvent.java +++ b/hibernate-core/src/main/java/org/hibernate/event/spi/AbstractPreDatabaseOperationEvent.java @@ -97,8 +97,10 @@ public abstract class AbstractPreDatabaseOperationEvent * {@link AbstractEvent}. * * @return Value for property 'source'. + * * @deprecated Use {@link #getSession} instead */ + @Deprecated public EventSource getSource() { return getSession(); } diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/ParameterContainer.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/ParameterContainer.java index f75443b470..0db1b0a1c1 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/ParameterContainer.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/ParameterContainer.java @@ -38,9 +38,11 @@ import org.hibernate.param.ParameterSpecification; * In the interim, this allows us to at least treat these "hidden" parameters properly which is * the most pressing need. * - * @deprecated + * @deprecated See entire discussion above + * * @author Steve Ebersole */ +@Deprecated public interface ParameterContainer { /** * Set the renderable text of this node. diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/ASTUtil.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/ASTUtil.java index 167bf0bb6c..57117671ea 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/ASTUtil.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/ASTUtil.java @@ -46,6 +46,7 @@ public final class ASTUtil { * * @deprecated (tellclovertoignorethis) */ + @Deprecated private ASTUtil() { } @@ -62,6 +63,7 @@ public final class ASTUtil { * * @deprecated silly */ + @Deprecated public static AST create(ASTFactory astFactory, int type, String text) { return astFactory.create( type, text ); } @@ -409,6 +411,7 @@ public final class ASTUtil { * * @deprecated Use #getTokenTypeName instead */ + @Deprecated public static String getConstantName(Class owner, int value) { return getTokenTypeName( owner, value ); } diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/ColumnHelper.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/ColumnHelper.java index 171ea257ca..f2b4c9e54a 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/ColumnHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/ColumnHelper.java @@ -41,6 +41,7 @@ public final class ColumnHelper { /** * @deprecated (tell clover to filter this out) */ + @Deprecated private ColumnHelper() { } diff --git a/hibernate-core/src/main/java/org/hibernate/id/factory/IdentifierGeneratorFactory.java b/hibernate-core/src/main/java/org/hibernate/id/factory/IdentifierGeneratorFactory.java index eb65714e2d..bf1ef6442d 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/factory/IdentifierGeneratorFactory.java +++ b/hibernate-core/src/main/java/org/hibernate/id/factory/IdentifierGeneratorFactory.java @@ -46,9 +46,11 @@ public interface IdentifierGeneratorFactory { * Allow injection of the dialect to use. * * @param dialect The dialect + * * @deprecated The intention is that Dialect should be required to be specified up-front and it would then get * ctor injected. */ + @Deprecated public void setDialect(Dialect dialect); /** diff --git a/hibernate-core/src/main/java/org/hibernate/internal/util/collections/CollectionHelper.java b/hibernate-core/src/main/java/org/hibernate/internal/util/collections/CollectionHelper.java index 769119d1e9..d241d768a4 100755 --- a/hibernate-core/src/main/java/org/hibernate/internal/util/collections/CollectionHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/util/collections/CollectionHelper.java @@ -43,11 +43,20 @@ public final class CollectionHelper { public static final int MINIMUM_INITIAL_CAPACITY = 16; public static final float LOAD_FACTOR = 0.75f; - @Deprecated // use java.util.Collections.EMPTY_LIST instead + /** + * @deprecated use {@link java.util.Collections#EMPTY_LIST} or {@link java.util.Collections#emptyList()} instead + */ + @Deprecated public static final List EMPTY_LIST = Collections.EMPTY_LIST; - @Deprecated // use java.util.Collections.EMPTY_LIST instead + /** + * @deprecated use {@link java.util.Collections#EMPTY_LIST} or {@link java.util.Collections#emptyList()} instead + */ + @Deprecated public static final Collection EMPTY_COLLECTION = Collections.EMPTY_LIST; - @Deprecated // use java.util.Collections.EMPTY_MAP instead + /** + * @deprecated use {@link java.util.Collections#EMPTY_MAP} or {@link java.util.Collections#emptyMap()} instead + */ + @Deprecated public static final Map EMPTY_MAP = Collections.EMPTY_MAP; private CollectionHelper() { diff --git a/shared/config/checkstyle/checkstyle.xml b/shared/config/checkstyle/checkstyle.xml index dfa2acd697..7191c470ef 100644 --- a/shared/config/checkstyle/checkstyle.xml +++ b/shared/config/checkstyle/checkstyle.xml @@ -186,7 +186,9 @@ The org.hibernate.engine.spi.ManagedEntity method names (prefixed with '&&_') muck with this --> - + + +