add some wildcards

This commit is contained in:
Gavin King 2022-10-27 01:46:28 +02:00
parent 25cb085f48
commit 412319819e
14 changed files with 18 additions and 19 deletions

View File

@ -7,7 +7,6 @@
package org.hibernate.dialect.temptable; package org.hibernate.dialect.temptable;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;

View File

@ -31,10 +31,10 @@ public class PropertyAccessEmbeddedImpl implements PropertyAccess {
private final PropertyAccessStrategyEmbeddedImpl strategy; private final PropertyAccessStrategyEmbeddedImpl strategy;
private final GetterImpl getter; private final GetterImpl getter;
@SuppressWarnings("UnusedParameters")
public PropertyAccessEmbeddedImpl( public PropertyAccessEmbeddedImpl(
PropertyAccessStrategyEmbeddedImpl strategy, PropertyAccessStrategyEmbeddedImpl strategy,
Class containerType, Class<?> containerType,
@SuppressWarnings("UnusedParameters")
String propertyName) { String propertyName) {
this.strategy = strategy; this.strategy = strategy;
this.getter = new GetterImpl( containerType ); this.getter = new GetterImpl( containerType );
@ -56,9 +56,9 @@ public class PropertyAccessEmbeddedImpl implements PropertyAccess {
} }
private static class GetterImpl implements Getter { 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; this.containerType = containerType;
} }

View File

@ -23,7 +23,7 @@ public class PropertyAccessEnhancedImpl extends PropertyAccessMixedImpl {
public PropertyAccessEnhancedImpl( public PropertyAccessEnhancedImpl(
PropertyAccessStrategy strategy, PropertyAccessStrategy strategy,
Class containerJavaType, Class<?> containerJavaType,
String propertyName) { String propertyName) {
super( strategy, containerJavaType, propertyName ); super( strategy, containerJavaType, propertyName );
} }

View File

@ -27,7 +27,7 @@ public class PropertyAccessFieldImpl implements PropertyAccess {
public PropertyAccessFieldImpl( public PropertyAccessFieldImpl(
PropertyAccessStrategyFieldImpl strategy, PropertyAccessStrategyFieldImpl strategy,
Class containerJavaType, Class<?> containerJavaType,
final String propertyName) { final String propertyName) {
this.strategy = strategy; this.strategy = strategy;

View File

@ -40,7 +40,7 @@ public class PropertyAccessMixedImpl implements PropertyAccess {
public PropertyAccessMixedImpl( public PropertyAccessMixedImpl(
PropertyAccessStrategy strategy, PropertyAccessStrategy strategy,
Class containerJavaType, Class<?> containerJavaType,
String propertyName) { String propertyName) {
this.strategy = strategy; 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 { try {
return ReflectHelper.findField( containerJavaType, propertyName ); return ReflectHelper.findField( containerJavaType, propertyName );
} }

View File

@ -47,7 +47,7 @@ public class PropertyAccessStrategyBackRefImpl implements PropertyAccessStrategy
} }
@Override @Override
public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { public PropertyAccess buildPropertyAccess(Class<?> containerJavaType, String propertyName, boolean setterRequired) {
return new PropertyAccessBackRefImpl( this ); return new PropertyAccessBackRefImpl( this );
} }

View File

@ -22,7 +22,7 @@ public class PropertyAccessStrategyChainedImpl implements PropertyAccessStrategy
} }
@Override @Override
public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { public PropertyAccess buildPropertyAccess(Class<?> containerJavaType, String propertyName, boolean setterRequired) {
for ( PropertyAccessStrategy candidate : chain ) { for ( PropertyAccessStrategy candidate : chain ) {
try { try {
return candidate.buildPropertyAccess( containerJavaType, propertyName, true ); return candidate.buildPropertyAccess( containerJavaType, propertyName, true );

View File

@ -10,7 +10,7 @@ import org.hibernate.property.access.spi.PropertyAccess;
import org.hibernate.property.access.spi.PropertyAccessStrategy; 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 Gavin King
* @author Steve Ebersole * @author Steve Ebersole
@ -22,7 +22,7 @@ public class PropertyAccessStrategyEmbeddedImpl implements PropertyAccessStrateg
public static final PropertyAccessStrategyEmbeddedImpl INSTANCE = new PropertyAccessStrategyEmbeddedImpl(); public static final PropertyAccessStrategyEmbeddedImpl INSTANCE = new PropertyAccessStrategyEmbeddedImpl();
@Override @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 ); return new PropertyAccessEmbeddedImpl( this, containerJavaType, propertyName );
} }
} }

View File

@ -23,7 +23,7 @@ public class PropertyAccessStrategyEnhancedImpl implements PropertyAccessStrateg
public static final PropertyAccessStrategyEnhancedImpl INSTANCE = new PropertyAccessStrategyEnhancedImpl(); public static final PropertyAccessStrategyEnhancedImpl INSTANCE = new PropertyAccessStrategyEnhancedImpl();
@Override @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 ); return new PropertyAccessEnhancedImpl( this, containerJavaType, propertyName );
} }
} }

View File

@ -22,7 +22,7 @@ public class PropertyAccessStrategyFieldImpl implements PropertyAccessStrategy {
public static final PropertyAccessStrategyFieldImpl INSTANCE = new PropertyAccessStrategyFieldImpl(); public static final PropertyAccessStrategyFieldImpl INSTANCE = new PropertyAccessStrategyFieldImpl();
@Override @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 ); return new PropertyAccessFieldImpl( this, containerJavaType, propertyName );
} }
} }

View File

@ -31,7 +31,7 @@ public class PropertyAccessStrategyIndexBackRefImpl implements PropertyAccessStr
} }
@Override @Override
public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { public PropertyAccess buildPropertyAccess(Class<?> containerJavaType, String propertyName, boolean setterRequired) {
return new PropertyAccessIndexBackRefImpl( this ); return new PropertyAccessIndexBackRefImpl( this );
} }

View File

@ -22,7 +22,7 @@ public class PropertyAccessStrategyMapImpl implements PropertyAccessStrategy {
public static final PropertyAccessStrategyMapImpl INSTANCE = new PropertyAccessStrategyMapImpl(); public static final PropertyAccessStrategyMapImpl INSTANCE = new PropertyAccessStrategyMapImpl();
@Override @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. // Sometimes containerJavaType is null, but if it isn't, make sure it's a Map.
if (containerJavaType != null && !Map.class.isAssignableFrom( containerJavaType)) { if (containerJavaType != null && !Map.class.isAssignableFrom( containerJavaType)) {

View File

@ -21,7 +21,7 @@ public class PropertyAccessStrategyMixedImpl implements PropertyAccessStrategy {
public static final PropertyAccessStrategyMixedImpl INSTANCE = new PropertyAccessStrategyMixedImpl(); public static final PropertyAccessStrategyMixedImpl INSTANCE = new PropertyAccessStrategyMixedImpl();
@Override @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 ); return new PropertyAccessMixedImpl( this, containerJavaType, propertyName );
} }
} }

View File

@ -31,7 +31,7 @@ public class PropertyAccessStrategyNoopImpl implements PropertyAccessStrategy {
public static final PropertyAccessStrategyNoopImpl INSTANCE = new PropertyAccessStrategyNoopImpl(); public static final PropertyAccessStrategyNoopImpl INSTANCE = new PropertyAccessStrategyNoopImpl();
@Override @Override
public PropertyAccess buildPropertyAccess(Class containerJavaType, String propertyName, boolean setterRequired) { public PropertyAccess buildPropertyAccess(Class<?> containerJavaType, String propertyName, boolean setterRequired) {
return PropertyAccessNoopImpl.INSTANCE; return PropertyAccessNoopImpl.INSTANCE;
} }