NullPointerException
が以下の行から時々得られます。3進演算子と予期しないNullPointerException
System.out.println("Date::"+ row != null ? row.getLegMaturityDate() : "null");
大括弧を付けた後は問題ありません。
System.out.println("Date::"+ (row != null ? row.getLegMaturityDate() : "null"));
私にその動作を明確にしてください。前もって感謝します。
これは、ネスティングステートメント/式を可能な限り制限しようとする理由です。ステートメントを2つに分割すると、その問題は発生しません。 – helpermethod