Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou-hao committed Jul 15, 2021
1 parent d789877 commit 97f2460
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class ApacheCommonPropertyOperator implements ObjectPropertyOperator, ObjectConverter {

private static PropertyUtilsBean propertyUtils = BeanUtilsBean.getInstance().getPropertyUtils();
private static final PropertyUtilsBean propertyUtils = BeanUtilsBean.getInstance().getPropertyUtils();

public static final ApacheCommonPropertyOperator INSTANCE = new ApacheCommonPropertyOperator();

Expand All @@ -28,7 +28,7 @@ public Optional<Object> getProperty(Object object, String name) {
} catch (NoSuchMethodException ignore) {

} catch (Exception e) {
log.info("无法获取属性:{},对象:{}", name, object, e);
log.info("无法获取属性:{},对象:{}", name, object, e);
}
return Optional.empty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,23 @@
@AllArgsConstructor(staticName = "of")
public class PrepareSqlFragments implements SqlFragments {

public static PrepareSqlFragments of(String sql,Object... parameter){
public static PrepareSqlFragments of(String sql, Object... parameter) {
return PrepareSqlFragments.of()
.addSql(sql)
.addParameter(parameter);
.addSql(sql)
.addParameter(parameter);
}

@Override
public boolean isEmpty() {
return sql.isEmpty();
}

private List<String> sql = new ArrayList<>(64);

private List<Object> parameters = new ArrayList<>(8);
private List<Object> parameters = new ArrayList<>(16);

public void removeLastSql() {
if(sql.isEmpty()){
if (sql.isEmpty()) {
return;
}
sql.remove(sql.size() - 1);
Expand Down

0 comments on commit 97f2460

Please sign in to comment.