Skip to content

Commit

Permalink
3.2.72
Browse files Browse the repository at this point in the history
  • Loading branch information
noear committed May 16, 2023
1 parent 37b5a24 commit 15e57bb
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<dependency>
<groupId>org.noear</groupId>
<artifactId>snack3</artifactId>
<version>3.2.71</version>
<version>3.2.72</version>
</dependency>
```

Expand Down
2 changes: 2 additions & 0 deletions UPDATE_LOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#### 3.2.72
* 修复 bindTo(obj) 可能会返回 null 的问题

#### 3.2.71
* 优化 `$.[?(@.field == 'l1-field-1')].children[?(@.field == 'l2-field-1')]` 兼容性
Expand Down
2 changes: 1 addition & 1 deletion snack3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.noear</groupId>
<artifactId>snack3</artifactId>
<version>3.2.71</version>
<version>3.2.72</version>
<packaging>jar</packaging>

<name>${project.artifactId}</name>
Expand Down
4 changes: 3 additions & 1 deletion snack3/src/main/java/org/noear/snack/ONode.java
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,9 @@ public <T> T to(Toer toer) {
public <T> T bindTo(T target) {
Context ctx = new Context(_o, this, target.getClass());
ctx.target = target;
return (T) ctx.handle(DEFAULTS.DEF_OBJECT_TOER).target;
ctx.handle(DEFAULTS.DEF_OBJECT_TOER);

return target;
}


Expand Down
8 changes: 4 additions & 4 deletions snack3/src/main/java/org/noear/snack/to/ObjectToer.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void handle(Context ctx) throws Exception {

private Object analyse(Context ctx, ONode o, Object rst, Class<?> clz, Type type, Map<String, Type> genericInfo) throws Exception {
if (o == null) {
return null;
return rst;
}

if (clz != null) {
Expand All @@ -52,7 +52,7 @@ private Object analyse(Context ctx, ONode o, Object rst, Class<?> clz, Type type
}

if(o.isNull()){
return null;
return rst;
}

//提前找到@type类型,便于自定义解码器定位
Expand Down Expand Up @@ -133,7 +133,7 @@ private Object analyse(Context ctx, ONode o, Object rst, Class<?> clz, Type type
return analyseCollection(ctx, o, rst, clz, type, genericInfo);
}
default:
return null;
return rst;
}
}

Expand Down Expand Up @@ -342,7 +342,7 @@ public Object analyseCollection(Context ctx, ONode o, Object rst, Class<?> clz,
}

if (list == null) {
return null;
return rst;
}

Class<?> itemClz = null;
Expand Down
2 changes: 1 addition & 1 deletion snack3_demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<dependency>
<groupId>org.noear</groupId>
<artifactId>snack3</artifactId>
<version>3.2.71</version>
<version>3.2.72</version>
</dependency>

<!-- <dependency>-->
Expand Down
2 changes: 1 addition & 1 deletion 文章_Java_中_Snack3的使用.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Snack3 基于jdk8,80kb大小,非常小巧。
<dependency>
<groupId>org.noear</groupId>
<artifactId>snack3</artifactId>
<version>3.2.71</version>
<version>3.2.72</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion 文章_Snack3_一个新的微型JSON框架.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ONode 即 `One node` 之意;借签了 `Javascript` 所有变量由 `var` 申
<dependency>
<groupId>org.noear</groupId>
<artifactId>snack3</artifactId>
<version>3.2.71</version>
<version>3.2.72</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion 文章_Snack3之Jsonpath使用.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Snack3 是一个支持JSONPath的JSON框架。JSONPath是一个很强大的功
<dependency>
<groupId>org.noear</groupId>
<artifactId>snack3</artifactId>
<version>3.2.71</version>
<version>3.2.72</version>
</dependency>
```

Expand Down

0 comments on commit 15e57bb

Please sign in to comment.