Skip to content

Commit

Permalink
Fix the "read-only analyzer" support code
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed Sep 20, 2021
1 parent 7bdc035 commit 21a3442
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ private Boolean isReadOnlyFromTrace() {

/** Only approximate for now. */
private boolean isReadOnlyFromOptions(String options) {
return options != null && options.contains("readOnly");
return options != null &&
options.contains("readOnly") &&
!options.contains("readOnly=false");
}

/** Only approximate for now. */
Expand All @@ -67,7 +69,7 @@ private Boolean isReadOnlyFromOpResult() {
return null;
} else {
return TraceUtil.getParametersAsStringList(result, "options").stream()
.anyMatch(o -> o.contains("readOnly"));
.anyMatch(o -> o.contains("readOnly") && !o.contains("readOnly=false"));
}
}
}

0 comments on commit 21a3442

Please sign in to comment.