View | Details | Raw Unified | Return to bug 148352
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/parser/Parser.java (-1 / +1 lines)
Lines 7176-7182 Link Here
7176
			break;
7176
			break;
7177
		case TokenNameStringLiteral :
7177
		case TokenNameStringLiteral :
7178
			StringLiteral stringLiteral;
7178
			StringLiteral stringLiteral;
7179
			if (this.recordStringLiterals && this.checkExternalizeStrings) {
7179
			if (this.recordStringLiterals && this.checkExternalizeStrings && !this.statementRecoveryActivated) {
7180
				stringLiteral = this.createStringLiteral(
7180
				stringLiteral = this.createStringLiteral(
7181
					this.scanner.getCurrentTokenSourceString(), 
7181
					this.scanner.getCurrentTokenSourceString(), 
7182
					this.scanner.startPosition, 
7182
					this.scanner.startPosition, 
(-)buildnotes_jdt-core.html (+2 lines)
Lines 127-132 Link Here
127
<h3>Problem Reports Fixed</h3>
127
<h3>Problem Reports Fixed</h3>
128
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=102728">102728</a>
128
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=102728">102728</a>
129
[compiler] Reduce the stack depth demands of extended string concatenation ASTs
129
[compiler] Reduce the stack depth demands of extended string concatenation ASTs
130
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=102728">102728</a>
131
[compiler] Reduce the stack depth demands of extended string concatenation ASTs
130
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=142530">142530</a>
132
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=142530">142530</a>
131
[hierarchical packages] '.' in folder names confuses package explorer
133
[hierarchical packages] '.' in folder names confuses package explorer
132
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=148523">148523</a>
134
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=148523">148523</a>
(-)src/org/eclipse/jdt/core/tests/compiler/regression/ExternalizeStringLiteralsTest.java (+31 lines)
Lines 517-522 Link Here
517
		true,
517
		true,
518
		customOptions);	
518
		customOptions);	
519
}
519
}
520
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=148352
521
public void test017() {
522
	Map customOptions = getCompilerOptions();
523
	customOptions.put(CompilerOptions.OPTION_ReportNonExternalizedStringLiteral, CompilerOptions.ERROR);
524
	this.runNegativeTest(
525
		new String[] {
526
			"X.java",
527
			"public class X {\n" +
528
			"	public void foo(String locationInAST) {\n" +
529
			"		String enclosingType= \"\"; //$NON-NLS-1$\n" +
530
			"		if (locationInAST != null) {\n" +
531
			"			enclosingType.toString()\n" +
532
			"		}\n" +
533
			"	}\n" +
534
			"}",
535
		}, 
536
		"----------\n" + 
537
		"1. ERROR in X.java (at line 5)\n" + 
538
		"	enclosingType.toString()\n" + 
539
		"	                       ^\n" + 
540
		"Syntax error, insert \";\" to complete BlockStatements\n" + 
541
		"----------\n",
542
		null,
543
		true,
544
		customOptions,
545
		false,
546
		false,
547
		false,
548
		false,
549
		true);	
550
}
520
public static Class testClass() {
551
public static Class testClass() {
521
	return ExternalizeStringLiteralsTest.class;
552
	return ExternalizeStringLiteralsTest.class;
522
}
553
}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/AbstractRegressionTest.java (-6 / +11 lines)
Lines 555-561 Link Here
555
			false /* do not generate output */,
555
			false /* do not generate output */,
556
			false /* do not show category */, 
556
			false /* do not show category */, 
557
			false /* do not show warning token */, 
557
			false /* do not show warning token */, 
558
			false  /* do not skip javac for this peculiar test */);
558
			false  /* do not skip javac for this peculiar test */,
559
			false  /* do not perform statements recovery */);
559
	}
560
	}
560
561
561
	/**
562
	/**
Lines 575-581 Link Here
575
			false /* do not generate output */,
576
			false /* do not generate output */,
576
			false /* do not show category */, 
577
			false /* do not show category */, 
577
			false /* do not show warning token */, 
578
			false /* do not show warning token */, 
578
			false  /* do not skip javac for this peculiar test */);
579
			false  /* do not skip javac for this peculiar test */,
580
			false  /* do not perform statements recovery */);
579
	}
581
	}
580
	/**
582
	/**
581
	 * Log contains all problems (warnings+errors)
583
	 * Log contains all problems (warnings+errors)
Lines 595-601 Link Here
595
			false /* do not generate output */,
597
			false /* do not generate output */,
596
			false /* do not show category */, 
598
			false /* do not show category */, 
597
			false /* do not show warning token */, 
599
			false /* do not show warning token */, 
598
			false  /* do not skip javac for this peculiar test */);
600
			false  /* do not skip javac for this peculiar test */,
601
			false  /* do not perform statements recovery */);
599
	}
602
	}
600
	/**
603
	/**
601
	 * Log contains all problems (warnings+errors)
604
	 * Log contains all problems (warnings+errors)
Lines 618-624 Link Here
618
		  generateOutput,
621
		  generateOutput,
619
		  showCategory,
622
		  showCategory,
620
		  showWarningToken,
623
		  showWarningToken,
621
		  false  /* do not skip javac for this peculiar test */);
624
		  false  /* do not skip javac for this peculiar test */,
625
		  false  /* do not perform statements recovery */);
622
	}
626
	}
623
	/**
627
	/**
624
	 * Log contains all problems (warnings+errors)
628
	 * Log contains all problems (warnings+errors)
Lines 632-638 Link Here
632
		boolean generateOutput,
636
		boolean generateOutput,
633
		boolean showCategory,
637
		boolean showCategory,
634
		boolean showWarningToken,
638
		boolean showWarningToken,
635
		boolean skipJavac) {
639
		boolean skipJavac,
640
		boolean performStatementsRecovery) {
636
		// Non-javac part
641
		// Non-javac part
637
		try {
642
		try {
638
			if (shouldFlushOutputDirectory)
643
			if (shouldFlushOutputDirectory)
Lines 652-658 Link Here
652
				options.putAll(customOptions);
657
				options.putAll(customOptions);
653
			}
658
			}
654
			CompilerOptions compilerOptions = new CompilerOptions(options);
659
			CompilerOptions compilerOptions = new CompilerOptions(options);
655
			compilerOptions.performStatementsRecovery = false;
660
			compilerOptions.performStatementsRecovery = performStatementsRecovery;
656
			Compiler batchCompiler = 
661
			Compiler batchCompiler = 
657
				new Compiler(
662
				new Compiler(
658
					getNameEnvironment(new String[]{}, classLib), 
663
					getNameEnvironment(new String[]{}, classLib), 

Return to bug 148352