From de3ef6b3a487b42d090f928ad51e564e7ac69556 Mon Sep 17 00:00:00 2001 From: Kuba3105 Date: Wed, 25 Sep 2024 09:05:52 +0200 Subject: [PATCH] Fixed nested folding bug --- .../jdt/ui/text/folding/DefaultJavaFoldingStructureProvider.java | 1 + 1 file changed, 1 insertion(+) diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/folding/DefaultJavaFoldingStructureProvider.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/folding/DefaultJavaFoldingStructureProvider.java index 9fe9b601aa7..938ab019c09 100755 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/folding/DefaultJavaFoldingStructureProvider.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/folding/DefaultJavaFoldingStructureProvider.java @@ -962,6 +962,7 @@ private void computeFoldingStructureOfControlStatements(String source, FoldingSt scanner.setSource(source.toCharArray()); Stack blockStarts = new Stack<>(); int token; + try { while ((token = scanner.getNextToken()) != ITerminalSymbols.TokenNameEOF) { switch (token) {