Skip to content

Commit b181d5a

Browse files
committed
Merge branch 'SentryMan-main' into main
2 parents 849ed17 + 34f3a54 commit b181d5a

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package org.example.customer;
2+
3+
import io.avaje.jsonb.Json;
4+
5+
import java.time.Instant;
6+
7+
@Json
8+
public class IgnoreField2 {
9+
10+
@Json.Ignore
11+
private String middleName;
12+
private Instant time;
13+
private int num;
14+
15+
public String getMiddleName() {
16+
return middleName;
17+
}
18+
19+
public IgnoreField2 setMiddleName(String middleName) {
20+
this.middleName = middleName;
21+
return this;
22+
}
23+
24+
public Instant getTime() {
25+
return time;
26+
}
27+
28+
public IgnoreField2 setTime(Instant time) {
29+
this.time = time;
30+
return this;
31+
}
32+
33+
public int getNum() {
34+
return num;
35+
}
36+
37+
public IgnoreField2 setNum(int num) {
38+
this.num = num;
39+
return this;
40+
}
41+
}

jsonb-generator/src/main/java/io/avaje/jsonb/generator/BeanReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ void writeConstructor(Append writer) {
172172
}
173173
Set<String> uniqueTypes = new HashSet<>();
174174
for (FieldReader allField : allFields) {
175-
if (allField.include() || !allField.isRaw()) {
175+
if (allField.include() && !allField.isRaw()) {
176176
if (uniqueTypes.add(allField.adapterShortType())) {
177177
allField.writeConstructor(writer);
178178
}

0 commit comments

Comments
 (0)