File tree 3 files changed +6
-1
lines changed
jackson/src/main/java/org/linguafranca/pwdb/kdbx/jackson
3 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,9 @@ public boolean shouldProtect(String s) {
194
194
}
195
195
196
196
public List <KeePassFile .Binary > getBinaries () {
197
+ if (keePassFile .meta .binaries == null ) {
198
+ keePassFile .createBinaries ();
199
+ }
197
200
return keePassFile .meta .binaries ;
198
201
}
199
202
Original file line number Diff line number Diff line change 17
17
18
18
import com .ctc .wstx .api .WstxInputProperties ;
19
19
import com .ctc .wstx .api .WstxOutputProperties ;
20
+ import com .fasterxml .jackson .annotation .JsonInclude ;
20
21
import com .fasterxml .jackson .databind .DeserializationFeature ;
21
22
import com .fasterxml .jackson .databind .MapperFeature ;
22
23
import com .fasterxml .jackson .databind .SerializationFeature ;
@@ -98,6 +99,7 @@ public void save(OutputStream outputStream) {
98
99
mapper .enable (ToXmlGenerator .Feature .WRITE_XML_DECLARATION );
99
100
mapper .enable (SerializationFeature .INDENT_OUTPUT );
100
101
mapper .disable (SerializationFeature .FAIL_ON_EMPTY_BEANS );
102
+ mapper .setSerializationInclusion (JsonInclude .Include .NON_EMPTY );
101
103
102
104
// set the serializer to Woodstox
103
105
System .setProperty ("javax.xml.stream.XMLOutputFactory" , "com.ctc.wstx.stax.WstxOutputFactory" );
Original file line number Diff line number Diff line change 16
16
17
17
<KeePassFile >
18
18
<Meta >
19
- <Generator >Keepass-Java-2 </Generator >
19
+ <Generator >KeePassJava2 </Generator >
20
20
<HeaderHash ></HeaderHash >
21
21
<DatabaseName >New Database</DatabaseName >
22
22
<DatabaseNameChanged >${creationDate}</DatabaseNameChanged >
You can’t perform that action at this time.
0 commit comments