Java 7 -> Java8 code breakage scenarios
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Thu Feb 28 04:24:31 PST 2013
On 28/02/13 11:45, Boaz Nahum wrote:
>> From your email I guessed you had to workaround new bugs. I probably have
>> mis-interpreted. Good to know that everything is looking almost sane on
>> your part.
>>
>>
>> Yes, I hardy can read my own English ...
> Actually, One of dependencies problem I reported may be consider as bug,
> because the missing dependency cause a compiler crash. You helped me to
> find it, see thread:
>
> http://mail.openjdk.java.net/pipermail/compiler-dev/2013-February/005625.html
>
> Once the dependency was added the crash disappeared.
>
> I will trace back all other issues, But it will take some time.
[moving to lambda-dev, which is more appropriate]
I've tried to reproduce something like what you described:
//A.java
public interface A {
void m();
}
//B.java
public class B implements A {
@Override
public void m() { }
public static void n() { }
}
//C.java
public class C {
void test(B b) {
B.n();
}
}
I've compiled A, B, then only kept classfile for B.class.
Then I tried to compile C.java against B.class - I only got an error
message like this:
C.java:3: error: cannot access A
B.n();
^
class file for A not found
1 error
The message goes away if you compile with -source 7. That's
understandable, no default method lookup in JDK 7.
However I could not reproduce any crash. So it seems like some
ingredient is missing...
Maurizio
>
> Thanks
> Boaz
More information about the lambda-dev
mailing list