Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352496

Summary: tests using wrong version of JCL
Product: [Eclipse Project] JDT Reporter: Stephan Herrmann <stephan.herrmann>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: Olivier_Thomann, raksha.vasisht
Version: 3.7Flags: stephan.herrmann: review+
Target Milestone: 3.7.1   
Hardware: Other   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Proposed fix none

Description Stephan Herrmann CLA 2011-07-19 14:40:16 EDT
As found in bug 300576 the following tests:
  CompilationUnitTests
  SortCompilationUnitElementsTests
have bogus project setup:
  this.testProject = createJavaProject("P", new String[] {"src"}, new String[] {getExternalJCLPathString()}, "bin", "1.5");

This creates a project at compliance 1.5 but uses jclMin.jar where it
should use jclMin1.5.jar

The fix is to use
  getExternalJCLPathString("1.5")
Comment 1 Olivier Thomann CLA 2011-07-19 14:47:26 EDT
I think both projects should use:
  setUpJavaProject("P", "1.5");
Comment 2 Olivier Thomann CLA 2011-07-19 14:50:11 EDT
(In reply to comment #1)
> I think both projects should use:
>   setUpJavaProject("P", "1.5");
Of course, it is not that simple. Investigating.
Comment 3 Olivier Thomann CLA 2011-07-19 14:55:59 EDT
Created attachment 199935 [details]
Proposed fix
Comment 4 Olivier Thomann CLA 2011-07-19 14:57:26 EDT
Released in BETA_JAVA7 branch.
Stephan, please review.

setUpJavaProject("P", "1.5"); works fine when there is an underlying project in the resource folder that properly sets up the source folders.
Comment 5 Raksha Vasisht CLA 2011-07-20 06:13:45 EDT
Verified.
Comment 6 Stephan Herrmann CLA 2011-07-20 10:40:31 EDT
Patch looks good.