mirror of
https://github.com/mapstruct/mapstruct.git
synced 2025-07-12 00:00:08 +08:00
#504 fix potential NPE in StreamEncoder (char-array can be null)
This commit is contained in:
parent
0674a8780b
commit
fb8a6e3ae0
@ -143,6 +143,7 @@ class IndentationCorrectingWriter extends Writer {
|
||||
}
|
||||
|
||||
private void flush(StateContext context) throws IOException {
|
||||
if ( null != context.characters && context.currentIndex - context.lastStateChange > 0 ) {
|
||||
context.writer.write(
|
||||
context.characters,
|
||||
context.lastStateChange,
|
||||
@ -161,6 +162,7 @@ class IndentationCorrectingWriter extends Writer {
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user