View | Details | Raw Unified | Return to bug 239198 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java (+2 lines)
Lines 9219-9224 Link Here
9219
					this.hasReportedError = true;
9219
					this.hasReportedError = true;
9220
				}
9220
				}
9221
				this.lastCheckPoint = this.scanner.currentPosition;
9221
				this.lastCheckPoint = this.scanner.currentPosition;
9222
				this.currentToken = 0;
9222
				this.restartRecovery = true;
9223
				this.restartRecovery = true;
9223
			}				
9224
			}				
9224
			if(this.statementRecoveryActivated) {
9225
			if(this.statementRecoveryActivated) {
Lines 9247-9252 Link Here
9247
						this.hasReportedError = true;
9248
						this.hasReportedError = true;
9248
					}
9249
					}
9249
					this.lastCheckPoint = this.scanner.currentPosition;
9250
					this.lastCheckPoint = this.scanner.currentPosition;
9251
					this.currentToken = 0;
9250
					this.restartRecovery = true;
9252
					this.restartRecovery = true;
9251
				}					
9253
				}					
9252
				if(this.statementRecoveryActivated) {
9254
				if(this.statementRecoveryActivated) {
(-)src/org/eclipse/jdt/core/tests/compiler/parser/ParserTest.java (+31 lines)
Lines 742-745 Link Here
742
		"----------\n"
742
		"----------\n"
743
	);
743
	);
744
}
744
}
745
/*
746
 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=239198
747
 */
748
public void test028() {
749
	Map options = getCompilerOptions();
750
	options.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
751
	runNegativeTest(
752
		new String[] {
753
			"X.java",
754
			"class X {\n" +
755
			"    public static void foo(String param) {\n" +
756
			"    	String foo= param;\n" +
757
			"    	Srtring bar = \"\"\"\n" +
758
			"    }\n" +
759
			"}"
760
		},
761
		"----------\n" + 
762
		"1. ERROR in X.java (at line 4)\n" + 
763
		"	Srtring bar = \"\"\"\n" + 
764
		"	              ^^\n" + 
765
		"Non-externalized string literal; it should be followed by //$NON-NLS-<n>$\n" + 
766
		"----------\n" + 
767
		"2. ERROR in X.java (at line 4)\n" + 
768
		"	Srtring bar = \"\"\"\n" + 
769
		"	                ^\n" + 
770
		"String literal is not properly closed by a double-quote\n" + 
771
		"----------\n",
772
		null,
773
		true,
774
		options);
775
}
745
}
776
}

Return to bug 239198