Skip to content

Commit

Permalink
fix: npe for uninitialized optional fields
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Mar 9, 2024
1 parent f620045 commit ce52cd5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ingester-rpc/src/main/java/io/greptime/rpc/TlsOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
*/
public class TlsOptions implements Copiable<TlsOptions> {

private Optional<File> clientCertChain;
private Optional<File> clientCertChain = Optional.empty();

private Optional<File> privateKey;
private Optional<File> privateKey = Optional.empty();

private Optional<String> privateKeyPassword;
private Optional<String> privateKeyPassword = Optional.empty();

private Optional<File> rootCerts;
private Optional<File> rootCerts = Optional.empty();

@Override
public TlsOptions copy() {
Expand Down

0 comments on commit ce52cd5

Please sign in to comment.