Skip to content

Commit

Permalink
Simplify the mustSetExact method.
Browse files Browse the repository at this point in the history
  • Loading branch information
broneill committed Sep 28, 2024
1 parent 009f7c8 commit e1894cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/cojen/tupl/table/expr/Expr.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.cojen.tupl.table.expr;

import java.lang.constant.Constable;

import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedHashMap;
Expand Down Expand Up @@ -392,8 +394,7 @@ public static void setAny(Variable v, Object value) {

public static boolean mustSetExact(Class<?> type, Object value) {
return value != null && !(value instanceof Variable) && !type.isPrimitive()
&& !String.class.isAssignableFrom(type)
&& !Class.class.isAssignableFrom(type);
&& !Constable.class.isAssignableFrom(type);
}

@FunctionalInterface
Expand Down

0 comments on commit e1894cd

Please sign in to comment.