Bug 317719 - Method incorrectly flagged as having same erasure output when return type differs
Summary: Method incorrectly flagged as having same erasure output when return type dif...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P3 normal with 2 votes (vote)
Target Milestone: 3.7.1   Edit
Assignee: Ayushman Jain CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 317762 318247 319342 320514 322371 323927 326108 328125 328910 379794 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-23 11:42 EDT by Robert Munteanu CLA
Modified: 2014-03-03 11:32 EST (History)
22 users (show)

See Also:
srikanth_sankaran: review+


Attachments
proposed fix (70.09 KB, patch)
2011-08-01 02:48 EDT, Ayushman Jain CLA
no flags Details | Diff
proposed fix v1.0 + updated tests (162.45 KB, patch)
2011-08-02 16:00 EDT, Ayushman Jain CLA
no flags Details | Diff
proposed fix v2.0 + updated tests (147.88 KB, patch)
2011-08-03 13:32 EDT, Ayushman Jain CLA
no flags Details | Diff
final patch (186.19 KB, patch)
2011-08-09 05:57 EDT, Ayushman Jain CLA
no flags Details | Diff
patch updated for HEAD (187.10 KB, patch)
2011-08-09 06:50 EDT, Ayushman Jain CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Munteanu CLA 2010-06-23 11:42:36 EDT
The following class fails to compile under Eclipse 3.6, but works fine with Eclipse 3.5 and javac. The methods are distinguished by the different return type, as having the same return type makes javac report two compilation errors as well.

bc.. 
package com.example;

import java.util.List;

public class ErasureBug {

    public String output(List<Integer> integers) {

        return "";
    }

    public void output(List<Double> doubles) {

    }
}
Comment 1 Olivier Thomann CLA 2010-06-23 12:01:08 EDT
This doesn't compile any longer with JDK7 javac.
Srikanth, duplicate of bug 293615 ?
Comment 2 Srikanth Sankaran CLA 2010-06-24 02:28:05 EDT
(In reply to comment #1)
> This doesn't compile any longer with JDK7 javac.
> Srikanth, duplicate of bug 293615 ?

This is due to the fix for bug# 273862 (Note: the defect title
is missing the word NOT, it should read, " ... should not be used ...")
which was made in response to javac behavior change introduced by
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6182950.

The fix for bug# 273862 special cased the new behavior for compliance
level 1.7, but after deliberation, eclipse compiler implemented the
new behavior for all compliance levels (via the fix for bug# 289247).

The current eclipse behavior is the correct one and so closing this
defect as INVALID.
Comment 3 Srikanth Sankaran CLA 2010-06-24 02:33:51 EDT
*** Bug 317762 has been marked as a duplicate of this bug. ***
Comment 4 Srikanth Sankaran CLA 2010-06-28 23:47:54 EDT
*** Bug 318247 has been marked as a duplicate of this bug. ***
Comment 5 Srikanth Sankaran CLA 2010-06-28 23:50:53 EDT
(In reply to comment #2)

> This is due to the fix for bug# 273862 (Note: the defect title
> is missing the word NOT, it should read, " ... should not be used ...")

I have since fixed the title.
Comment 6 Srikanth Sankaran CLA 2010-07-11 23:09:49 EDT
*** Bug 319342 has been marked as a duplicate of this bug. ***
Comment 7 Srikanth Sankaran CLA 2010-07-21 10:35:26 EDT
*** Bug 320514 has been marked as a duplicate of this bug. ***
Comment 8 Ayushman Jain CLA 2010-08-03 09:05:58 EDT
Verified for 3.7M1
Comment 9 Srikanth Sankaran CLA 2010-08-11 13:33:28 EDT
*** Bug 322371 has been marked as a duplicate of this bug. ***
Comment 10 Srikanth Sankaran CLA 2010-08-30 00:49:07 EDT
*** Bug 323927 has been marked as a duplicate of this bug. ***
Comment 11 Olivier Thomann CLA 2010-09-23 21:49:26 EDT
*** Bug 326108 has been marked as a duplicate of this bug. ***
Comment 12 Ayushman Jain CLA 2010-10-12 14:03:45 EDT
*** Bug 327571 has been marked as a duplicate of this bug. ***
Comment 13 Olivier Thomann CLA 2010-10-19 09:32:20 EDT
*** Bug 328125 has been marked as a duplicate of this bug. ***
Comment 14 Ayushman Jain CLA 2010-10-28 05:00:48 EDT
*** Bug 328910 has been marked as a duplicate of this bug. ***
Comment 15 tracer.eraser CLA 2010-11-16 14:17:53 EST
> The fix for bug# 273862 special cased the new behavior for compliance
> level 1.7, but after deliberation, eclipse compiler implemented the
> new behavior for all compliance levels (via the fix for bug# 289247).
> 
> The current eclipse behavior is the correct one and so closing this
> defect as INVALID.

Declaring this bug as INVALID does not seem like a proper solution to me.  Code that compiles with 1.6 javac should compile in Eclipse with compliance level 1.6.  Why can this not be fixed properly?  Is there any workaround that can be employed (such as using javac instead of the built in compiler)?
Comment 16 Olivier Thomann CLA 2010-11-17 08:45:56 EST
(In reply to comment #15)
> Declaring this bug as INVALID does not seem like a proper solution to me.  Code
> that compiles with 1.6 javac should compile in Eclipse with compliance level
> 1.6.  Why can this not be fixed properly?  Is there any workaround that can be
This would be true if this is not a bug in javac 1.6. Are you saying that we should have the same bug in 1.6 compliance as javac has ?
This has been fixed and reported as a bug against javac. It has been fixed only in 1.7 stream right now. If Oracle decides to backport it to 1.6 stream, then it won't compile for you as well.
We try to keep the same behavior when this is not directly related to a bug.
Comment 17 Olivier Thomann CLA 2010-11-17 08:48:42 EST
*** Bug 330434 has been marked as a duplicate of this bug. ***
Comment 18 Liam Knox CLA 2011-06-26 21:50:40 EDT
I dont think you should mark this as invalid. 

Yes you are addressing a javac bug but you are not really apperciating Eclipse or javac mixed usage in the industry.  People will be building code, patching old code etc etc, in Eclipse and deploying with ant builds using javac.  Discrepancies in their behaviours causes massive headaches, time and money loss world wide.

Perhaps you should actually poll you user base to see what they prefer?  But seriously having no switch on this behaviour for pre 1.7 Java source versions is very unprofessional.
Comment 19 Ayushman Jain CLA 2011-06-27 01:35:10 EDT
(In reply to comment #18)
> Perhaps you should actually poll you user base to see what they prefer?  But
> seriously having no switch on this behaviour for pre 1.7 Java source versions
> is very unprofessional.

Given that its a javac bug, don't you think its a better to idea to knock on Oracle's door and press them to backport their fix to java 1.6 as well? That way you will no longer have complains against the "correct" Eclipse behaviour.
Comment 20 Liam Knox CLA 2011-06-27 01:58:43 EDT

(In reply to comment #19)
Quite frankly no.

Is Eclipse a Compiler, and IDE or what?  I can't say its being marketed as a compiler.

When I point to a JDK version I expect it to use the javac from that, any other action is counter intuitive and wrong.

As for bugs, Eclipse seems to allow trailing comas on annotation parameters i.e. @Suite(...,) javac throws this out. javac must be correct here. 
So what you are actually providing a Java developer with now is a superset of bugs/fixes for two different compilers. This is not a very good thing.
No one will be using Eclipse for production or automated builds for starters.

Stick to the flagging problems and warnings of the compiler that the user selects, not fudging in patches and add 'other' features that are not in the compiler theye select


> (In reply to comment #18)
> > Perhaps you should actually poll you user base to see what they prefer?  But
> > seriously having no switch on this behaviour for pre 1.7 Java source versions
> > is very unprofessional.
> Given that its a javac bug, don't you think its a better to idea to knock on
> Oracle's door and press them to backport their fix to java 1.6 as well? That
> way you will no longer have complains against the "correct" Eclipse behaviour.
Comment 21 Ian Bull CLA 2011-06-27 02:13:18 EDT
(In reply to comment #20)
This seems to be getting a little off topic.  Yes Eclipse has its own compiler.  IIRC, javac is not an incremental compiler, and you could not achieve the same level of integration without it. For more information, you'd have to look at the JDT design from pre 2003.

> No one will be using Eclipse for production or automated builds for starters.

This one baffles me. I know a lot of businesses that choose the Eclipse compiler over javac.  In fact, Eclipse is built with the Eclipse Compiler.
Comment 22 Srikanth Sankaran CLA 2011-06-27 02:23:44 EDT
(In reply to comment #20)

[...]

> When I point to a JDK version I expect it to use the javac from that, any other
> action is counter intuitive and wrong.

> As for bugs, Eclipse seems to allow trailing comas on annotation parameters
> i.e. @Suite(...,) javac throws this out. javac must be correct here. 

Please open a separate bug for unrelated items and we will evaluate them
independently.

> Stick to the flagging problems and warnings of the compiler that the user
> selects, not fudging in patches and add 'other' features that are not in the
> compiler theye select

The wording of this comment seems to imply that you harbor the notion that
eclipse IDE uses javac  from the JDK you point it to with some incremental
patches/fixes.

As a subsequent commenter pointed out, this is not so. Eclipse has its own
compiler built from the ground up that has no shared code with javac compiler
proper. 

And it is not our aim to bug compatible with javac.
Comment 23 Liam Knox CLA 2011-06-27 02:32:28 EDT
(In reply to comment #22)

So great its even worse then :-)
Now I have 2 compilers with different bugs in them. Fantastic.  
Ok move onto Intellij I guess.

In all respects, I want to select the compiler I use.  
If you want to offer me one please keep it obvious and selectable.  All you are doing is adding massive pain, cost to many, many of your users.

I doubt you have seen one post thanking you for 'fixing' this?

> (In reply to comment #20)
> [...]
> > When I point to a JDK version I expect it to use the javac from that, any other
> > action is counter intuitive and wrong.
> > As for bugs, Eclipse seems to allow trailing comas on annotation parameters
> > i.e. @Suite(...,) javac throws this out. javac must be correct here. 
> Please open a separate bug for unrelated items and we will evaluate them
> independently.
> > Stick to the flagging problems and warnings of the compiler that the user
> > selects, not fudging in patches and add 'other' features that are not in the
> > compiler theye select
> The wording of this comment seems to imply that you harbor the notion that
> eclipse IDE uses javac  from the JDK you point it to with some incremental
> patches/fixes.
> As a subsequent commenter pointed out, this is not so. Eclipse has its own
> compiler built from the ground up that has no shared code with javac compiler
> proper. 
> And it is not our aim to bug compatible with javac.
Comment 24 Srikanth Sankaran CLA 2011-06-27 03:04:10 EDT
(In reply to comment #23)

> In all respects, I want to select the compiler I use.  
> If you want to offer me one please keep it obvious and selectable. 

As pointed out earlier, the IDE's rich feature set is built on top of
and derives directly from having our own compiler. This compiler cannot
be substituted/deselected, though ant scripts can use javac if needed.
Comment 25 Liam Knox CLA 2011-06-27 03:58:19 EDT
(In reply to comment #24)
In that case I think it is every ones best interest that you, Oracle, and who ever else is developing compilers work together to develop a java compiler compliance kit that ensures you are specification compliant.

Clearly its been 15+ years of Java now and neither you or Oracle are yet compliant to the specification.

In the meantime myself, team and recommendation to our firm will be to stick to Eclipse 3.5 and address this when we hit Java 7.

I can understand why you have done what you did in purity stakes but I cant say it was the best of the 2 evils you had as options for the community.

> (In reply to comment #23)
> > In all respects, I want to select the compiler I use.  
> > If you want to offer me one please keep it obvious and selectable. 
> As pointed out earlier, the IDE's rich feature set is built on top of
> and derives directly from having our own compiler. This compiler cannot
> be substituted/deselected, though ant scripts can use javac if needed.
Comment 26 Chris Bucchere CLA 2011-07-13 17:22:23 EDT
> > As pointed out earlier, the IDE's rich feature set is built on top of
> > and derives directly from having our own compiler. This compiler cannot
> > be substituted/deselected, though ant scripts can use javac if needed.

+1 to Liam's comments.

If Eclipse's compliance settings are set to 1.6, then the built-in compiler should match javac 1.6 as much as possible. I'm in a shop that uses Eclipse and ant/javac interchangeably.

For now, we have to roll back to Eclipse 3.5 to work around this issue . . . that's not an ideal solution for us.
Comment 27 KKK ZZZ CLA 2011-07-21 10:57:56 EDT
Can't agree more to Liam. I am surprised to hear something like 'to knock oracle's door'. This sounds so unprofessional and irresponsible. Being 'bug compatible' is actually the only choice until you own java and rule the world.

If you have any respects to your customers, please think about how to make their works easier(yes you did a great job, thanks a ton) but not harder(like this one). At least we could have a work-around solution like making a flag on your own compiler but not fail else workable projects.
Comment 28 Srikanth Sankaran CLA 2011-07-21 21:01:16 EDT
Thanks for everyone who weighed on this issue - we are looking into
making this a warning in 1.6- modes. This is likely to be done for
3.7.1.
Comment 29 Chris Bucchere CLA 2011-07-21 22:37:48 EDT
(In reply to comment #28)
> Thanks for everyone who weighed on this issue - we are looking into
> making this a warning in 1.6- modes. This is likely to be done for
> 3.7.1.

Srikanth, thank you so much for addressing this issue!
Comment 30 KKK ZZZ CLA 2011-07-21 22:46:46 EDT
(In reply to comment #28)
> Thanks for everyone who weighed on this issue - we are looking into
> making this a warning in 1.6- modes. This is likely to be done for
> 3.7.1.

This is really a great deal. You guys are always superb.
Comment 31 Liam Knox CLA 2011-07-21 22:52:37 EDT
(In reply to comment #28)
> Thanks for everyone who weighed on this issue - we are looking into
> making this a warning in 1.6- modes. This is likely to be done for
> 3.7.1.

Thanks a lot.
Comment 32 Daniel Le Berre CLA 2011-07-22 07:20:37 EDT
Thanks for taking account community feedback on this. That will indeed make our life easier in the classroom.
Comment 33 Olivier Thomann CLA 2011-07-22 10:04:25 EDT
(In reply to comment #25)
> Clearly its been 15+ years of Java now and neither you or Oracle are yet
> compliant to the specification.
This is not true. We are trying to match the specifications as much as possible. This case is completely different from being compliant with the specifications.
Comment 34 Liam Knox CLA 2011-07-22 16:41:04 EDT
(In reply to comment #33)
Surely if we had basic testing of compliance around the compiler we would all be in a far better position?  I thought the JDK has some compliance kit?  Isn't the compiler part of this?  

Currently there are simple bugs in javac to do with annotations and commas that Eclipse handles correctly and javac incorrectly.  One very simple compliance test could of nipped this in the bud before Java 5.  It remains on the Bug list at Oracle now for fix in JDK 7 ... how many years is that? This one simple discrepancy between compilers has caused much time wasted for my team.  Multiply that by the teams in the community using both javac and Eclipse and you start to get a picture of the issue. 

It is not a case of 'were right and there wrong', it is about getting it better for all and anything Eclipse can do to influence this will help the community.    
  
> (In reply to comment #25)
> > Clearly its been 15+ years of Java now and neither you or Oracle are yet
> > compliant to the specification.
> This is not true. We are trying to match the specifications as much as
> possible. This case is completely different from being compliant with the
> specifications.
Comment 35 Srikanth Sankaran CLA 2011-07-25 07:23:46 EDT
Ayush, As I am away this week, could you please look at this please ?
Ask Olivier for review once the patch is ready.
Comment 36 Ayushman Jain CLA 2011-07-27 03:13:04 EDT
Well, this looks a bit twisted. The following case does not compile with javac6, even though return types are different

package p;


import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.List;

public class ErasureBug {       

    public String output(List<String> integers) { 

        return "";   
    }      
 
    public void output(List doubles) {  
    	return ""; 
    }   
}
Comment 37 Ayushman Jain CLA 2011-07-27 04:02:38 EDT
(In reply to comment #36)
> Well, this looks a bit twisted. The following case does not compile with
> javac6, even though return types are different

I guess this is another javac6 bug. I don't see much of a difference in case in comment 0 and in comment 36. In both cases, formal parameters are not equal but their erasures are equal making the methods erasure compatible. 

We were wrongly compiling this code (comment 36) in Eclipse 3.5 as well, so if we go back to the old behaviour, we still won't be completely compatible with javac6.
Comment 38 Ayushman Jain CLA 2011-08-01 02:33:05 EDT
Again, running into more javac issues:

This does not compile with jacac6:
 interface J {  
  <T extends Number> T foo(final Number p); 
  Float foo(final Number p);
}

However this does:
class X {
	 <N extends B> N a(A<Number> s) { return null; }
	 <N> Object a(A<Number> n) { return null; }
}
class A<T> {}
class B {}

I dont see much difference- return types are different and method parameters are equal.

Srikanth, what do you think we should do here?
Comment 39 Ayushman Jain CLA 2011-08-01 02:48:59 EDT
Created attachment 200641 [details]
proposed fix

This is the fix i was working on btw. Haven't updated all tests yet
Comment 40 Srikanth Sankaran CLA 2011-08-01 05:03:47 EDT
(In reply to comment #36)
> Well, this looks a bit twisted. The following case does not compile with
> javac6, even though return types are different

Sigh. That is the fundamental problem in attempting to be bug compatible.

(In reply to comment #38)

> Srikanth, what do you think we should do here?

What we want to do is match the JDK 1.7 behavior in all cases you cite,
except that it should be only a warning in 1.6 compliance. So if that
leaves us compiling some code which JDK 1.6 won't, but JDK 1.7 will, that
is ok.

OIOW, let us not be more restrictive in the scenario at hand than JDK 1.6
when compliance is set to 1.6
Comment 41 Ayushman Jain CLA 2011-08-02 16:00:30 EDT
Created attachment 200761 [details]
proposed fix v1.0 + updated tests

Checked most of the tests with javac6 and 7. We do compile some cases where javac6 fails, but I guess thats the best we can do. In 1.7 and 1.5 compliance the patch preserves the old behaviour
Comment 42 Ayushman Jain CLA 2011-08-02 16:01:03 EDT
Srikanth, please review. Thanks!
Comment 43 Srikanth Sankaran CLA 2011-08-03 00:23:51 EDT
(In reply to comment #41)
> Created attachment 200761 [details]
> proposed fix v1.0 + updated tests
> 
> Checked most of the tests with javac6 and 7.

Just so we don't inadvertently introduce some unexpected behavior,
could you verify the behavior with all the tests that had to change ?

> We do compile some cases where
> javac6 fails,

Could you confirm that in all these cases, our new bahavior matches JDK 1.7 ?
Comment 44 Ayushman Jain CLA 2011-08-03 01:48:24 EDT
(In reply to comment #43)
> Just so we don't inadvertently introduce some unexpected behavior,
> could you verify the behavior with all the tests that had to change ?
Yes I meant I checked "all" tests.
 
> > We do compile some cases where
> > javac6 fails,
> 
> Could you confirm that in all these cases, our new bahavior matches JDK 1.7 ?

Why should the behaviour match JDK 1.7 in 1.6 compliance? The whole point of this bug is to check return types in 1.6 compliance. So the following case would compile with javac7
public interface J {
  <T extends Number> T foo(final Number p);
  Float foo(final Number p);
}

but should not compile in 1.6 compliance since return types differ. (However, it does compile with javac6 on some strange whim).
Comment 45 Ayushman Jain CLA 2011-08-03 02:42:30 EDT
(In reply to comment #44)
> Why should the behaviour match JDK 1.7 in 1.6 compliance? The whole point of
> this bug is to check return types in 1.6 compliance. So the following case
> would compile with javac7
> public interface J {
>   <T extends Number> T foo(final Number p);
>   Float foo(final Number p);
> }
> 
> but should not compile in 1.6 compliance since return types differ. (However,
> it does compile with javac6 on some strange whim).

Sorry there's a mistake in this comment. I wanted to point out the other case
class X {
     <N extends B> N a(A<Number> s) { return null; }
     <N> Object a(A<Number> n) { return null; }
}
class A<T> {}
class B {}
which javac6 compiles but javac7 doesnt. If we align with javac7, we get more restrictive vis-a-vis javac6. Then again people will complain.
Comment 46 Ayushman Jain CLA 2011-08-03 03:06:57 EDT
Perhaps I'm not too clear. Lets start back at comment 38. Given that both cases are similar in the fact that they have different return types, and same arguments, fixing this issue will mean ECJ with compliance 1.6 will *compile* BOTH cases, while javac6 and 7 will both *reject* the FIRST case.

Is this ok? Or if it is not, what is the alternative?
Comment 47 Srikanth Sankaran CLA 2011-08-03 03:59:30 EDT
(In reply to comment #44)
> (In reply to comment #43)

> Why should the behaviour match JDK 1.7 in 1.6 compliance? The whole point of
> this bug is to check return types in 1.6 compliance. So the following case
> would compile with javac7

What I was suggesting was that where we do differ from JDK 1.6, it would be
better if our behavior was grounded in (some version of) reality by matching
JDK 1.7 feature. But from the examples you cite, this does look like a utopian
goal. So let us skip that point.

(In reply to comment #46)

[...]

> Is this ok? Or if it is not, what is the alternative?

I guess we will have to live with it. Can we compare the new behavior on
the cases you cite with some version of eclipse before the fix for bug 289247
went in (3.6 M2). So does the new behavior matches eclipse 3.6 on these corner
cases ? 

See also https://bugs.eclipse.org/bugs/show_bug.cgi?id=258658.
Comment 48 Ayushman Jain CLA 2011-08-03 06:10:11 EDT
(In reply to comment #47)
> I guess we will have to live with it. Can we compare the new behavior on
> the cases you cite with some version of eclipse before the fix for bug 289247
> went in (3.6 M2).

While looking into this fix I believe we may have sidestepped the specs in JLS $8.4.2 which says two methods have same subsignatures if
 - either they have same signature, or
 - signature of either of them has same erasure as the other's signature.

I don't see this being taken into account in our current implementation in SourceTypeBinding#methods(). We are just checking the "erasure" point, but not the "same signature" point, which entails looking into the type variables, substitutability, etc. So basically I dont understand the logic behind deleting that whole block of code in SourceTypeBinding in Kent's patch - https://bugs.eclipse.org/bugs/attachment.cgi?id=146981&action=diff.

One example of this is org.eclipse.jdt.core.tests.compiler.regression.AmbiguousMethodTest.test010a(). Clearly in this the 2 methods have same erasure. Yet we are no longer complaining so.

Srikanth, can you please validate my claim?
Comment 49 Ayushman Jain CLA 2011-08-03 06:30:23 EDT
(In reply to comment #48)
> One example of this is
> org.eclipse.jdt.core.tests.compiler.regression.AmbiguousMethodTest.test010a().
> Clearly in this the 2 methods have same erasure. Yet we are no longer
> complaining so.

For the record, javac7 compiles this. So even now we're not compatible it seems :\
Comment 50 Ayushman Jain CLA 2011-08-03 13:32:21 EDT
Created attachment 200840 [details]
proposed fix v2.0 + updated tests

This patch more or less reverts the fix for bug 289247 in compliance 1.6. It takes care of the comment 48. However, the test mentioned in comment 48 fails with "duplicate method" error. Javac7 compiles it, as mentioned in comment 49.
Comment 51 Srikanth Sankaran CLA 2011-08-08 11:41:07 EDT
To maintain sanity, I suggest that we should address separate issues
using different bugs. Let us keep the current one only for the case
where we have started reporting name clash/duplicate method error even
in 1.6 mode ignoring differences in the method return type. 

Anyways it is too late in the game for 3.7.1 for us to be
looking into a comprehensive overhaul of this area.

Having looked at both the patches, I am inclined to go with the
first one. It looks simpler and all it is basically doing is to
make the error a warning in 1.6 mode if the clashing method differ
in return type.

I think given how many duplicates have come about, we should verify
that the patch addresses every single case of duplicate of this bug.

After releasing the focused fix, we can have follow up defects that
can be investigated for 3.8.

I'll spend some more time with the first patch and share comments
if any.
Comment 52 Srikanth Sankaran CLA 2011-08-08 12:36:51 EDT
I reviewed the code changes in proposed fix v1.0 and it looks good
to me. Here are a couple of comments:

Source type binding:

(1) The variable complyTo15 is better named complyTo15OrAbove.
(2) The variable severity should be initialized inside the loop,
    inside of outside.

I didn't review the changed tests per se, since per comment 41
and comment 44, these have been validated against versions of
javac compiler.

For the cases where we still differences, please raise follow up
defects. Please verify against all the duplicates to make sure
they are all fixed. If all of this looks good, it is ready for
release.
Comment 53 Srikanth Sankaran CLA 2011-08-08 20:48:23 EDT
(In reply to comment #52)
> Please verify against all the duplicates to make sure
> they are all fixed. If all of this looks good, it is ready for
> release.

I checked against all the duplicates and 9/11 work ok.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=317762 and
https://bugs.eclipse.org/bugs/show_bug.cgi?id=327571 needs
to be looked into. 

The former is a variant of one of the exceptions you have cited
already I believe. In the latter case, the name clash is gone,
but we report the call as being ambiguous (even in 1.7 mode) - 
needs to be looked into see if this is reasonable.

Now that the virulent strain of this bug is addressed by this
patch, let us release it with new junits for the duplicates and
reopen bug 317762 and bug 327571 targetting them for 3.8
Comment 54 Srikanth Sankaran CLA 2011-08-09 02:14:49 EDT
(In reply to comment #53)
> (In reply to comment #52)
> > Please verify against all the duplicates to make sure
> > they are all fixed. If all of this looks good, it is ready for
> > release.
> 
> I checked against all the duplicates and 9/11 work ok.
> 
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=317762 and
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=327571 needs
> to be looked into. 

https://bugs.eclipse.org/bugs/show_bug.cgi?id=327571 was not
really a duplicate, but was mistagged (and has since been reopened.)
So the patch fixes 9/10 duplicates and the original.
Comment 55 Srikanth Sankaran CLA 2011-08-09 02:33:20 EDT
(In reply to comment #54)

> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=317762 and

Mea culpa. Even this is fixed by the current patch. So we are
all set to go. Thanks Ayush. Sorry for the noise.
Comment 56 Ayushman Jain CLA 2011-08-09 05:57:42 EDT
Created attachment 201125 [details]
final patch

patch taking care of the review comments and adding all dups as regression tests.
Comment 57 Ayushman Jain CLA 2011-08-09 06:50:35 EDT
Created attachment 201129 [details]
patch updated for HEAD
Comment 58 Ayushman Jain CLA 2011-08-09 09:06:56 EDT
Released in HEAD for 3.8M2 and in R_3_7_maintenance for 3.7.1
Comment 59 Ayushman Jain CLA 2011-08-09 09:07:41 EDT
.
Comment 60 Satyam Kandula CLA 2011-08-25 10:00:05 EDT
IMHO, the test case given in comment 36 should be fixed. Filed bug 355838 to track this.
Comment 61 Satyam Kandula CLA 2011-08-25 10:00:34 EDT
Verified for 3.7.1 RC2 using build M20110824-0800
Comment 62 Srikanth Sankaran CLA 2011-09-14 01:55:25 EDT
Verified for 3.8M2 using build id: I20110912-0800
Comment 63 Srikanth Sankaran CLA 2012-05-17 08:22:58 EDT
*** Bug 379794 has been marked as a duplicate of this bug. ***
Comment 64 JIAN GUAN CLA 2014-03-03 11:32:20 EST
Hello the problem happens again in Version: 4.3.1.

	public static double[] extractScore(List<Token> tkl) {
		double [] s=new double[tkl.size()];
		for (int i=0;i<s.length;i++) {
			s[i]=tkl.get(i).getScore();
		}
		return s;		
	}
	
	public static double[][] extractScore(List<ArrayList<Token>> tkll) {
		double [][] s=new double[tkll.size()][];
		for (int i=0;i<s.length;i++) {
			s[i]= new double[tkll.get(i).size()];
			for (int j=0;j<s[i].length;j++) {
				s[i][j]=tkll.get(i).get(j).getScore();
			}
		}
		return s;		
	}


it appears: Method extractScore(List<ArrayList<Token>>) has the same erasure extractScore(List<E>) as another method in type Token