Skip to content

Commit eaf0ba3

Browse files
leonschenkbeikov
authored andcommitted
HHH-18675: Revert to java 11
1 parent 83ec629 commit eaf0ba3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,8 @@ public Map<String, IdentifiableDomainType<?>> getIdentifiableTypesByName() {
280280
if ( !property.isGeneric() ) {
281281
final PersistentAttribute<X, ?> concreteAttribute = factoryFunction.apply( entityType, property );
282282
if ( concreteAttribute != null ) {
283-
@SuppressWarnings("unchecked") final AttributeContainer<X> attributeContainer = (AttributeContainer<X>) entityType;
284-
attributeContainer.getInFlightAccess().addConcreteGenericAttribute( concreteAttribute );
283+
//noinspection unchecked
284+
( (AttributeContainer<X>) entityType ).getInFlightAccess().addConcreteGenericAttribute( concreteAttribute );
285285
}
286286
}
287287
}

hibernate-core/src/test/java/org/hibernate/orm/test/manytomany/generic/ManyToManyNonGenericTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import java.util.List;
2626
import java.util.Set;
2727
import java.util.UUID;
28+
import java.util.stream.Collectors;
2829

2930
import static org.hamcrest.MatcherAssert.assertThat;
3031
import static org.hamcrest.Matchers.containsInAnyOrder;
@@ -102,7 +103,7 @@ public Set<Node> getChildren() {
102103

103104
@Override
104105
public String toString() {
105-
return "node [%s] parent of %s".formatted(id, children.stream().map(n -> n.id).toList());
106+
return String.format("node [%s] parent of %s", id, children.stream().map(n -> n.id).collect(Collectors.toList()));
106107
}
107108
}
108109
}

0 commit comments

Comments
 (0)