Skip to content

Commit

Permalink
Making the intent clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
harawata committed Jan 26, 2025
1 parent 0b76b37 commit 7043d8a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/java/org/apache/ibatis/mapping/ParameterMapping.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
*/
public class ParameterMapping {

private static Object UNSET = new Object();
private Configuration configuration;

private String property;
Expand All @@ -38,8 +39,7 @@ public class ParameterMapping {
private String resultMapId;
private String jdbcTypeName;
private String expression;
private Object value;
private boolean hasValue;
private Object value = UNSET;

private ParameterMapping() {
}
Expand Down Expand Up @@ -103,7 +103,6 @@ public Builder expression(String expression) {

public Builder value(Object value) {
parameterMapping.value = value;
parameterMapping.hasValue = true;
return this;
}

Expand Down Expand Up @@ -218,7 +217,7 @@ public Object getValue() {
}

public boolean hasValue() {
return hasValue;
return value != UNSET;
}

@Override
Expand Down

0 comments on commit 7043d8a

Please sign in to comment.