This is an automated email from the ASF dual-hosted git repository.
dbalek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new f613251 Modified to prevent IllegalStateExceptions from CasualDiff.
(#3422)
f613251 is described below
commit f61325118521af3c1a769fcf2c4d1acd5627745f
Author: Dusan Balek <[email protected]>
AuthorDate: Fri Jan 7 09:53:45 2022 +0100
Modified to prevent IllegalStateExceptions from CasualDiff. (#3422)
---
.../src/org/netbeans/modules/java/source/save/PositionEstimator.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/java/java.source.base/src/org/netbeans/modules/java/source/save/PositionEstimator.java
b/java/java.source.base/src/org/netbeans/modules/java/source/save/PositionEstimator.java
index 351f163..8e69d00 100644
---
a/java/java.source.base/src/org/netbeans/modules/java/source/save/PositionEstimator.java
+++
b/java/java.source.base/src/org/netbeans/modules/java/source/save/PositionEstimator.java
@@ -968,7 +968,7 @@ public abstract class PositionEstimator {
if (seq.movePrevious() && seq.offset() >= sectionStart &&
nonRelevant.contains(seq.token().id())) {
moveToSrcRelevantBounded(seq, Direction.BACKWARD);
seq.moveNext();
- treeEnd = seq.offset();
+ treeEnd = Math.max(seq.offset(), treeStart);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists