Skip to content

Commit 14e3a27

Browse files
author
David Hayes
committed
More aggressive NPE protection
1 parent e5d0051 commit 14e3a27

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/java/net/sf/jsqlparser/util/TablesNamesFinder.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,11 +767,13 @@ public <S> Void visit(AnalyticExpression analytic, S context) {
767767

768768
if (analytic.getWindowElement() != null) {
769769
if (analytic.getWindowElement().getRange() != null) {
770-
if (analytic.getWindowElement().getRange().getStart().getExpression() != null) {
770+
if (analytic.getWindowElement().getRange().getStart() != null
771+
&& analytic.getWindowElement().getRange().getStart().getExpression() != null) {
771772
analytic.getWindowElement().getRange().getStart().getExpression().accept(this,
772773
context);
773774
}
774-
if (analytic.getWindowElement().getRange().getEnd().getExpression() != null) {
775+
if (analytic.getWindowElement().getRange().getEnd() != null
776+
&& analytic.getWindowElement().getRange().getEnd().getExpression() != null) {
775777
analytic.getWindowElement().getRange().getEnd().getExpression().accept(this,
776778
context);
777779
}

0 commit comments

Comments
 (0)