Bug 129388 - [1.5][compiler] Non-public Junit Assert.format accessible to test cases
Summary: [1.5][compiler] Non-public Junit Assert.format accessible to test cases
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.2 RC2   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-24 14:47 EST by Sandeep Tamhankar CLA
Modified: 2006-04-28 12:06 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sandeep Tamhankar CLA 2006-02-24 14:47:51 EST
Test code looks something like this:

package com.foo.bar;

import static java.lang.String.format;

public class MyTestClass extends TestCase {
    public void testFoo() {
        format(...);
    }
}

Expected result: format would be picked up from String.
Actual result: format is picked up from the Assert class, and it's not even public!  Results in compile error because of argument mismatch.
Comment 1 Sandeep Tamhankar CLA 2006-02-24 15:17:35 EST
This is fixed in 3.1.2

*** This bug has been marked as a duplicate of 117861 ***
Comment 2 Sandeep Tamhankar CLA 2006-03-08 15:24:59 EST
I upgraded to 3.2M5a and this bug is in that branch!

Just to make sure we're all on the same page, here's the version info about my "Eclipse Java Development Tools" feature:

Version: 3.2.0.v20060215-1200-0cq-cuim1y
Build id: I20060223-1656
Comment 3 Sandeep Tamhankar CLA 2006-03-08 16:47:13 EST
I'm on Windows now, so I'm updating the bug report accordingly.  In other words, I didn't run 3.2 on Linux to see if this bug shows up there; I ran it on Windows.
Comment 4 Kent Johnson CLA 2006-04-12 14:36:28 EDT
I tried this in 3.1.2 and it doesn't work there either.
Comment 5 Kent Johnson CLA 2006-04-24 16:16:45 EDT
Added StaticImport test043
Comment 6 Olivier Thomann CLA 2006-04-28 12:06:03 EDT
Verified with I20060427-1600 for 3.2RC2