From 412319819e2f2d302a55760eae68cab33a372373 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Thu, 27 Oct 2022 01:46:28 +0200 Subject: [PATCH] add some wildcards --- .../org/hibernate/dialect/temptable/TemporaryTable.java | 1 - .../access/internal/PropertyAccessEmbeddedImpl.java | 8 ++++---- .../access/internal/PropertyAccessEnhancedImpl.java | 2 +- .../property/access/internal/PropertyAccessFieldImpl.java | 2 +- .../property/access/internal/PropertyAccessMixedImpl.java | 4 ++-- .../internal/PropertyAccessStrategyBackRefImpl.java | 2 +- .../internal/PropertyAccessStrategyChainedImpl.java | 2 +- .../internal/PropertyAccessStrategyEmbeddedImpl.java | 4 ++-- .../internal/PropertyAccessStrategyEnhancedImpl.java | 2 +- .../access/internal/PropertyAccessStrategyFieldImpl.java | 2 +- .../internal/PropertyAccessStrategyIndexBackRefImpl.java | 2 +- .../access/internal/PropertyAccessStrategyMapImpl.java | 2 +- .../access/internal/PropertyAccessStrategyMixedImpl.java | 2 +- .../access/internal/PropertyAccessStrategyNoopImpl.java | 2 +- 14 files changed, 18 insertions(+), 19 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/temptable/TemporaryTable.java b/hibernate-core/src/main/java/org/hibernate/dialect/temptable/TemporaryTable.java index 163f3d22d2..7d8bced74d 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/temptable/TemporaryTable.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/temptable/TemporaryTable.java @@ -7,7 +7,6 @@ package org.hibernate.dialect.temptable; import java.util.ArrayList; -import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.UUID; diff --git a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessEmbeddedImpl.java b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessEmbeddedImpl.java index 7b29fa12d2..e2667a85ba 100644 --- a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessEmbeddedImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessEmbeddedImpl.java @@ -31,10 +31,10 @@ public class PropertyAccessEmbeddedImpl implements PropertyAccess { private final PropertyAccessStrategyEmbeddedImpl strategy; private final GetterImpl getter; - @SuppressWarnings("UnusedParameters") public PropertyAccessEmbeddedImpl( PropertyAccessStrategyEmbeddedImpl strategy, - Class containerType, + Class containerType, + @SuppressWarnings("UnusedParameters") String propertyName) { this.strategy = strategy; this.getter = new GetterImpl( containerType ); @@ -56,9 +56,9 @@ public class PropertyAccessEmbeddedImpl implements PropertyAccess { } private static class GetterImpl implements Getter { - private final Class containerType; + private final Class containerType; - public GetterImpl(Class containerType) { + public GetterImpl(Class containerType) { this.containerType = containerType; } diff --git a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessEnhancedImpl.java b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessEnhancedImpl.java index a8eab52674..332940c6e6 100644 --- a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessEnhancedImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessEnhancedImpl.java @@ -23,7 +23,7 @@ public class PropertyAccessEnhancedImpl extends PropertyAccessMixedImpl { public PropertyAccessEnhancedImpl( PropertyAccessStrategy strategy, - Class containerJavaType, + Class containerJavaType, String propertyName) { super( strategy, containerJavaType, propertyName ); } diff --git a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessFieldImpl.java b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessFieldImpl.java index b717a70d67..d9019e68c9 100644 --- a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessFieldImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessFieldImpl.java @@ -27,7 +27,7 @@ public class PropertyAccessFieldImpl implements PropertyAccess { public PropertyAccessFieldImpl( PropertyAccessStrategyFieldImpl strategy, - Class containerJavaType, + Class containerJavaType, final String propertyName) { this.strategy = strategy; diff --git a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessMixedImpl.java b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessMixedImpl.java index 7ec1add1ee..5832da24fd 100644 --- a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessMixedImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessMixedImpl.java @@ -40,7 +40,7 @@ public class PropertyAccessMixedImpl implements PropertyAccess { public PropertyAccessMixedImpl( PropertyAccessStrategy strategy, - Class containerJavaType, + Class containerJavaType, String propertyName) { this.strategy = strategy; @@ -79,7 +79,7 @@ public class PropertyAccessMixedImpl implements PropertyAccess { } } - protected static Field fieldOrNull(Class containerJavaType, String propertyName) { + protected static Field fieldOrNull(Class containerJavaType, String propertyName) { try { return ReflectHelper.findField( containerJavaType, propertyName ); } diff --git a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyBackRefImpl.java b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyBackRefImpl.java index 09ef39b82a..c6d1e5e354 100644 --- a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyBackRefImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyBackRefImpl.java @@ -47,7 +47,7 @@ public class PropertyAccessStrategyBackRefImpl implements PropertyAccessStrategy } @Override - public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { + public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { return new PropertyAccessBackRefImpl( this ); } diff --git a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyChainedImpl.java b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyChainedImpl.java index 01d2e0046f..76ae1d78fe 100644 --- a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyChainedImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyChainedImpl.java @@ -22,7 +22,7 @@ public class PropertyAccessStrategyChainedImpl implements PropertyAccessStrategy } @Override - public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { + public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { for ( PropertyAccessStrategy candidate : chain ) { try { return candidate.buildPropertyAccess( containerJavaType, propertyName, true ); diff --git a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyEmbeddedImpl.java b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyEmbeddedImpl.java index 8894ab0c30..e414669150 100644 --- a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyEmbeddedImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyEmbeddedImpl.java @@ -10,7 +10,7 @@ import org.hibernate.property.access.spi.PropertyAccess; import org.hibernate.property.access.spi.PropertyAccessStrategy; /** - * A PropertyAccessStrategy that deals with non-aggregated composites. + * A {@link PropertyAccessStrategy} that deals with non-aggregated composites. * * @author Gavin King * @author Steve Ebersole @@ -22,7 +22,7 @@ public class PropertyAccessStrategyEmbeddedImpl implements PropertyAccessStrateg public static final PropertyAccessStrategyEmbeddedImpl INSTANCE = new PropertyAccessStrategyEmbeddedImpl(); @Override - public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { + public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { return new PropertyAccessEmbeddedImpl( this, containerJavaType, propertyName ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyEnhancedImpl.java b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyEnhancedImpl.java index a34a8a1572..1c7d89d2fc 100644 --- a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyEnhancedImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyEnhancedImpl.java @@ -23,7 +23,7 @@ public class PropertyAccessStrategyEnhancedImpl implements PropertyAccessStrateg public static final PropertyAccessStrategyEnhancedImpl INSTANCE = new PropertyAccessStrategyEnhancedImpl(); @Override - public PropertyAccess buildPropertyAccess(Class containerJavaType, final String propertyName, boolean setterRequired) { + public PropertyAccess buildPropertyAccess(Class containerJavaType, final String propertyName, boolean setterRequired) { return new PropertyAccessEnhancedImpl( this, containerJavaType, propertyName ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyFieldImpl.java b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyFieldImpl.java index ae9d507ae0..e6a16b5114 100644 --- a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyFieldImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyFieldImpl.java @@ -22,7 +22,7 @@ public class PropertyAccessStrategyFieldImpl implements PropertyAccessStrategy { public static final PropertyAccessStrategyFieldImpl INSTANCE = new PropertyAccessStrategyFieldImpl(); @Override - public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { + public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { return new PropertyAccessFieldImpl( this, containerJavaType, propertyName ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyIndexBackRefImpl.java b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyIndexBackRefImpl.java index 0c32ffa364..8e243bbd20 100644 --- a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyIndexBackRefImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyIndexBackRefImpl.java @@ -31,7 +31,7 @@ public class PropertyAccessStrategyIndexBackRefImpl implements PropertyAccessStr } @Override - public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { + public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { return new PropertyAccessIndexBackRefImpl( this ); } diff --git a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyMapImpl.java b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyMapImpl.java index b3ffb97d1a..c1de791525 100644 --- a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyMapImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyMapImpl.java @@ -22,7 +22,7 @@ public class PropertyAccessStrategyMapImpl implements PropertyAccessStrategy { public static final PropertyAccessStrategyMapImpl INSTANCE = new PropertyAccessStrategyMapImpl(); @Override - public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { + public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { // Sometimes containerJavaType is null, but if it isn't, make sure it's a Map. if (containerJavaType != null && !Map.class.isAssignableFrom( containerJavaType)) { diff --git a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyMixedImpl.java b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyMixedImpl.java index 2c6e176aab..7c14337989 100644 --- a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyMixedImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyMixedImpl.java @@ -21,7 +21,7 @@ public class PropertyAccessStrategyMixedImpl implements PropertyAccessStrategy { public static final PropertyAccessStrategyMixedImpl INSTANCE = new PropertyAccessStrategyMixedImpl(); @Override - public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { + public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { return new PropertyAccessMixedImpl( this, containerJavaType, propertyName ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyNoopImpl.java b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyNoopImpl.java index 2ab911d3a8..5fa5a1fecb 100644 --- a/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyNoopImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/property/access/internal/PropertyAccessStrategyNoopImpl.java @@ -31,7 +31,7 @@ public class PropertyAccessStrategyNoopImpl implements PropertyAccessStrategy { public static final PropertyAccessStrategyNoopImpl INSTANCE = new PropertyAccessStrategyNoopImpl(); @Override - public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { + public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { return PropertyAccessNoopImpl.INSTANCE; }