Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump jakarta.persistence:jakarta.persistence-api from 3.1.0 to 3.2.0 #441

Open
wants to merge 9 commits into
base: java17
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-root</artifactId>
<version>6.9-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>

<packaging>pom</packaging>
<name>Querydsl</name>
Expand Down Expand Up @@ -96,7 +96,7 @@
<argLine>-Xms256m -Xmx512m</argLine>

<!-- default bytecode version for src/main -->
<main.java.version>11</main.java.version>
<main.java.version>17</main.java.version>
<latest.java.version>21</latest.java.version>

<git-code-format-maven-plugin.version>5.3</git-code-format-maven-plugin.version>
Expand Down Expand Up @@ -125,10 +125,10 @@
<r2dbc.version>1.0.0.RELEASE</r2dbc.version>

<!-- JPA deps -->
<hibernate.version>6.6.0.Final</hibernate.version>
<hibernate.version>7.0.0.Beta1</hibernate.version>
<hibernate.validator.version>8.0.1.Final</hibernate.validator.version>
<eclipselink.version>4.0.4</eclipselink.version>
<jpa.version>3.1.0</jpa.version>
<eclipselink.version>5.0.0-B03</eclipselink.version>
<jpa.version>3.2.0</jpa.version>
<jakarta.annotation.version>3.0.0</jakarta.annotation.version>

<mvn.version>3.9.9</mvn.version>
Expand Down Expand Up @@ -1051,7 +1051,7 @@
<configuration>
<exportDatatables>true</exportDatatables>
<activeRecipes>
<recipe>org.openrewrite.java.migrate.Java8toJava11</recipe>
<recipe>org.openrewrite.java.migrate.UpgradeToJava17</recipe>
</activeRecipes>
</configuration>
</execution>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-root</artifactId>
<version>6.9-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-docs</artifactId>
Expand Down
6 changes: 1 addition & 5 deletions querydsl-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-root</artifactId>
<version>6.9-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-examples</artifactId>
Expand All @@ -27,10 +27,6 @@
<module>querydsl-example-r2dbc-sql-codegen</module>
</modules>

<properties>
<main.java.version>17</main.java.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-jpa-guice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.9-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-jpa-guice</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-jpa-quarkus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.9-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-jpa-quarkus</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-jpa-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.9-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-jpa-spring</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-kotlin-codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.9-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>
<artifactId>querydsl-example-kotlin-codegen</artifactId>
<name>Querydsl example - Kotlin Codegen</name>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-kotlin-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.9-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>
<artifactId>querydsl-example-kotlin</artifactId>
<name>Querydsl example - Kotlin JPA</name>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-kotlin-mongodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.9-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>
<artifactId>querydsl-example-kotlin-mongodb</artifactId>
<name>Querydsl example - Kotlin MongoDB</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.9-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-r2dbc-sql-codegen</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-sql-guice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.9-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-sql-guice</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-examples/querydsl-example-sql-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-examples</artifactId>
<version>6.9-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-example-sql-spring</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-libraries/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-root</artifactId>
<version>6.9-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-libraries</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion querydsl-libraries/querydsl-collections/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-libraries</artifactId>
<version>6.9-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<groupId>io.github.openfeign.querydsl</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ private List evaluateSingleSource(
final List<Expression<?>> sources = Collections.<Expression<?>>singletonList(source);
final Iterable<?> iterable = iterables.values().iterator().next();
List<?> list;
if (iterable instanceof List) {
list = (List) iterable;
if (iterable instanceof List<?> list1) {
list = list1;
} else {
list = IteratorAdapter.asList(iterable.iterator());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public MultiComparator(Evaluator<Object[]> ev, boolean[] directions, boolean[] n

@Override
public int compare(T o1, T o2) {
if (o1 instanceof Object[]) {
return innerCompare(ev.evaluate((Object[]) o1), ev.evaluate((Object[]) o2));
if (o1 instanceof Object[] objects) {
return innerCompare(ev.evaluate(objects), ev.evaluate((Object[]) o2));
} else {
return innerCompare(ev.evaluate(o1), ev.evaluate(o2));
}
Expand Down
2 changes: 1 addition & 1 deletion querydsl-libraries/querydsl-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-libraries</artifactId>
<version>6.9-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</parent>

<artifactId>querydsl-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ public BooleanBuilder clone() throws CloneNotSupportedException {
public boolean equals(Object o) {
if (o == this) {
return true;
} else if (o instanceof BooleanBuilder) {
return Objects.equals(((BooleanBuilder) o).getValue(), predicate);
} else if (o instanceof BooleanBuilder builder) {
return Objects.equals(builder.getValue(), predicate);
} else {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ private void addLastJoin() {
public void addJoin(JoinType joinType, Expression<?> expr) {
addLastJoin();
if (!exprInJoins.contains(expr)) {
if (expr instanceof Path && ((Path<?>) expr).getMetadata().isRoot()) {
if (expr instanceof Path<?> path && path.getMetadata().isRoot()) {
exprInJoins.add(expr);
} else {
validate(expr);
Expand Down Expand Up @@ -378,8 +378,7 @@ public void setValidatingVisitor(ValidatingVisitor visitor) {

@Override
public boolean equals(Object o) {
if (o instanceof QueryMetadata) {
var q = (QueryMetadata) o;
if (o instanceof QueryMetadata q) {
return q.getFlags().equals(flags)
&& q.getGroupBy().equals(groupBy)
&& Objects.equals(q.getHaving(), having)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ public int hashCode() {
public boolean equals(Object o) {
if (o == this) {
return true;
} else if (o instanceof JoinExpression) {
var j = (JoinExpression) o;
} else if (o instanceof JoinExpression j) {
return Objects.equals(condition, j.condition)
&& Objects.equals(target, j.target)
&& Objects.equals(type, j.type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ public int hashCode() {
public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj instanceof JoinFlag) {
return ((JoinFlag) obj).flag.equals(flag);
} else if (obj instanceof JoinFlag joinFlag) {
return joinFlag.flag.equals(flag);
} else {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ public int hashCode() {
public boolean equals(Object obj) {
if (obj == this) {
return true;
} else if (obj instanceof QueryFlag) {
var other = (QueryFlag) obj;
} else if (obj instanceof QueryFlag other) {
return other.position.equals(position) && other.flag.equals(flag);
} else {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ public <T> List<T> subList(List<T> list) {
public boolean equals(Object o) {
if (o == this) {
return true;
} else if (o instanceof QueryModifiers) {
var qm = (QueryModifiers) o;
} else if (o instanceof QueryModifiers qm) {
return Objects.equals(qm.getLimit(), limit) && Objects.equals(qm.getOffset(), offset);
} else {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ public final class Alias {
final Object current = aliasFactory.getCurrentAndReset();
if (arg instanceof CollectionPath) {
return (CollectionPath<D, SimpleExpression<D>>) arg; // NOSONAR
} else if (arg instanceof ManagedObject) {
return (CollectionPath<D, SimpleExpression<D>>) ((ManagedObject) arg).__mappedPath();
} else if (arg instanceof ManagedObject object) {
return (CollectionPath<D, SimpleExpression<D>>) object.__mappedPath();
} else {
return (CollectionPath<D, SimpleExpression<D>>) current;
}
Expand Down Expand Up @@ -242,8 +242,8 @@ public final class Alias {
final Object current = aliasFactory.getCurrentAndReset();
if (arg instanceof ListPath) {
return (ListPath<D, SimpleExpression<D>>) arg; // NOSONAR
} else if (arg instanceof ManagedObject) {
return (ListPath<D, SimpleExpression<D>>) ((ManagedObject) arg).__mappedPath();
} else if (arg instanceof ManagedObject object) {
return (ListPath<D, SimpleExpression<D>>) object.__mappedPath();
} else {
return (ListPath<D, SimpleExpression<D>>) current;
}
Expand Down Expand Up @@ -272,8 +272,8 @@ public final class Alias {
final Object current = aliasFactory.getCurrentAndReset();
if (arg instanceof MapPath) {
return (MapPath<K, V, SimpleExpression<V>>) arg; // NOSONAR
} else if (arg instanceof ManagedObject) {
return (MapPath<K, V, SimpleExpression<V>>) ((ManagedObject) arg).__mappedPath();
} else if (arg instanceof ManagedObject object) {
return (MapPath<K, V, SimpleExpression<V>>) object.__mappedPath();
} else {
return (MapPath<K, V, SimpleExpression<V>>) current;
}
Expand All @@ -291,8 +291,8 @@ public final class Alias {
final Object current = aliasFactory.getCurrentAndReset();
if (arg instanceof SetPath) {
return (SetPath<D, SimpleExpression<D>>) arg; // NOSONAR
} else if (arg instanceof ManagedObject) {
return (SetPath<D, SimpleExpression<D>>) ((ManagedObject) arg).__mappedPath();
} else if (arg instanceof ManagedObject object) {
return (SetPath<D, SimpleExpression<D>>) object.__mappedPath();
} else {
return (SetPath<D, SimpleExpression<D>>) current;
}
Expand Down Expand Up @@ -351,8 +351,8 @@ public final class Alias {
final Object current = aliasFactory.getCurrentAndReset();
if (arg instanceof EntityPath<?>) {
return (EntityPathBase<D>) arg; // NOSONAR
} else if (arg instanceof ManagedObject) {
return (EntityPathBase<D>) ((ManagedObject) arg).__mappedPath();
} else if (arg instanceof ManagedObject object) {
return (EntityPathBase<D>) object.__mappedPath();
} else {
return (EntityPathBase<D>) current;
}
Expand All @@ -364,8 +364,8 @@ private static <D, P extends Path<D>> P getPath(D arg) {
final Object current = aliasFactory.getCurrentAndReset();
if (arg instanceof Path<?>) {
return (P) arg;
} else if (arg instanceof ManagedObject) {
return (P) ((ManagedObject) arg).__mappedPath();
} else if (arg instanceof ManagedObject object) {
return (P) object.__mappedPath();
} else {
return (P) current;
}
Expand Down Expand Up @@ -415,8 +415,8 @@ public static <A> A alias(Class<A> cl, String var) {
@SuppressWarnings("unchecked")
public static <D> Expression<D> getAny(D arg) {
Object current = aliasFactory.getCurrentAndReset();
if (arg instanceof ManagedObject) {
return (Expression<D>) ((ManagedObject) arg).__mappedPath();
if (arg instanceof ManagedObject object) {
return (Expression<D>) object.__mappedPath();
} else if (current != null) {
return (Expression<D>) current;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,12 @@ protected AbstractGroupByTransformer(Expression<K> key, Expression<?>... express
projection.add(key);

for (Expression<?> expr : expressions) {
if (expr instanceof GroupExpression<?, ?>) {
GroupExpression<?, ?> groupExpr = (GroupExpression<?, ?>) expr;
if (expr instanceof GroupExpression<?, ?> groupExpr) {
groupExpressions.add(groupExpr);
Expression<?> colExpression = groupExpr.getExpression();
if (colExpression instanceof Operation
&& ((Operation) colExpression).getOperator() == Ops.ALIAS) {
projection.add(((Operation) colExpression).getArg(0));
if (colExpression instanceof Operation<?> operation
&& operation.getOperator() == Ops.ALIAS) {
projection.add(operation.getArg(0));
} else {
projection.add(colExpression);
}
Expand All @@ -100,8 +99,8 @@ protected static FactoryExpression<Tuple> withoutGroupExpressions(
final FactoryExpression<Tuple> expr) {
List<Expression<?>> args = new ArrayList<>(expr.getArgs().size());
for (Expression<?> arg : expr.getArgs()) {
if (arg instanceof GroupExpression) {
args.add(((GroupExpression) arg).getExpression());
if (arg instanceof GroupExpression<?, ?> expression) {
args.add(expression.getExpression());
} else {
args.add(arg);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ public GroupImpl(List<GroupExpression<?, ?>> columnDefinitions, List<QPair<?, ?>
collector = coldef.createGroupCollector();
Expression<?> coldefExpr = coldef.getExpression();
groupCollectorMap.put(coldefExpr, collector);
if (coldefExpr instanceof Operation
&& ((Operation) coldefExpr).getOperator() == Ops.ALIAS) {
groupCollectorMap.put(((Operation) coldefExpr).getArg(1), collector);
if (coldefExpr instanceof Operation<?> operation && operation.getOperator() == Ops.ALIAS) {
groupCollectorMap.put(operation.getArg(1), collector);
}
}
groupCollectors.add(collector);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ public class CollectionAnyVisitor implements Visitor<Expression<?>, Context> {
private static <T> Path<T> replaceParent(Path<T> path, Path<?> parent) {
var metadata =
new PathMetadata(parent, path.getMetadata().getElement(), path.getMetadata().getPathType());
if (path instanceof CollectionExpression) {
CollectionExpression<?, ?> col = (CollectionExpression<?, ?>) path;
if (path instanceof CollectionExpression<?, ?> col) {
return Expressions.listPath(col.getParameter(0), SimplePath.class, metadata);
} else {
return ExpressionUtils.path(path.getType(), metadata);
Expand Down
Loading