mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 00:24:57 +00:00
HHH-5736 Removing unnecessary instance check. Applying Hibernate formatting.
This commit is contained in:
parent
18ed85a0cd
commit
ed89cef855
@ -251,11 +251,8 @@ public Order desc(Expression<?> x) {
|
||||
// predicates ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
public Predicate wrap(Expression<Boolean> expression) {
|
||||
if ( CompoundPredicate.class.isInstance( expression ) ) {
|
||||
return (( CompoundPredicate ) expression);
|
||||
}
|
||||
else if(Predicate.class.isInstance(expression)) {
|
||||
return ( ( Predicate ) expression );
|
||||
if ( Predicate.class.isInstance( expression ) ) {
|
||||
return ( (Predicate) expression );
|
||||
}
|
||||
else if ( PathImplementor.class.isInstance( expression ) ) {
|
||||
return new BooleanAssertionPredicate( this, expression, Boolean.TRUE );
|
||||
@ -343,7 +340,7 @@ public Predicate isFalse(Expression<Boolean> expression) {
|
||||
if ( predicate.getExpressions().size() == 0 ) {
|
||||
return new BooleanStaticAssertionPredicate(
|
||||
this,
|
||||
predicate.getOperator() == Predicate.BooleanOperator.OR
|
||||
predicate.getOperator() == Predicate.BooleanOperator.OR
|
||||
);
|
||||
}
|
||||
predicate.not();
|
||||
@ -1366,7 +1363,7 @@ public <E, C extends Collection<E>> Predicate isMember(E e, Expression<C> collec
|
||||
}
|
||||
return new MemberOfPredicate<E, C>(
|
||||
this,
|
||||
e,
|
||||
e,
|
||||
(PluralAttributePath<C>)collectionExpression
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user