error: cannot access <class> extension method found in pre JDK 8 classfile
Remi Forax
forax at univ-mlv.fr
Sun Oct 21 11:52:21 PDT 2012
On 10/21/2012 05:34 PM, Boaz Nahum wrote:
> Hi.
>
> I know that I already asked and ignored - I guess it is not the forum for
> such questions - But where else can I ask ?
No, it's the right mailing list, I don't remember seeing your email, sorry.
Sometimes the first error, here, "cannot find symbol class
ParameterListDescriptor" trouble enough the compiler so it starts to
print other errors that in fact doesn't exist but are artificially
created because the first error occurs.
I wonder if you are not in that case.
Do you have a way to fix the first error to see if you still see the
second one ?
cheers,
Rémi
>
> Well some of our third party code generate this error:
>
> error: cannot access <clsass-name>
> extension method found in pre JDK 8 classfile
>
> For example(there are many others), the following code:
>
> import javax.media.jai.OperationDescriptorImpl;
> import javax.media.jai.ParameterListDescriptor;
>
> public class ExtensionMethodInPreJDK8Problem extends
> OperationDescriptorImpl {
>
> public ExtensionMethodInPreJDK8Problem(String[][] resources, String[]
> supportedModes, String[] sourceNames,
> Class[][] sourceClasses, ParameterListDescriptor
> pld) {
> super(resources, supportedModes, sourceNames, sourceClasses, pld);
> }
> }
>
> generates:
>
> Information:Compilation completed with 3 errors and 0 warnings in 1 sec
> Information:3 errors
> Information:0 warnings
>
> C:\data\LearnJDK8\JavaCProblem\src\ExtensionMethodInPreJDK8Problem.java
> Error:Error:line (1)error: cannot find symbol class
> ParameterListDescriptor
> Error:Error:line (8)error: cannot access OperationDescriptor
> *extension method found in pre JDK 8 classfile*
> Error:Error:line (11)error: cannot find symbol class
> ParameterListDescriptor
>
> of-course the only reference I found is:
>
> MethodSymbol readMethod() {
>
> long flags = adjustMethodFlags(nextChar());
>
> Name name = readName(nextChar());
>
> Type type = readType(nextChar());
>
> if (currentOwner.isInterface() &&
>
> (flags & ABSTRACT) == 0) {
>
> if (majorVersion > Target.JDK1_8.majorVersion ||
>
> (majorVersion == Target.JDK1_8.majorVersion &&
> minorVersion >= Target.JDK1_8.minorVersion)) {
>
> currentOwner.flags_field |= DEFENDER;
>
> flags |= DEFENDER;
>
> } else {
>
> //protect against ill-formed classfiles
>
> throw new CompletionFailure(currentOwner,
> "*extension method found in pre JDK 8 classfile*");
>
> }
>
> }
> ....................
>
More information about the lambda-dev
mailing list