error: cannot access <class> extension method found in pre JDK 8 classfile

maurizio cimadamore maurizio.cimadamore at oracle.com
Sun Oct 21 09:56:24 PDT 2012


I think this has been fixed in [1]

http://hg.openjdk.java.net/lambda/lambda/langtools/rev/a78999ebabfc

This fix is not included in the latest promoted binary build - so that 
might explain why you are getting this.
Hope this helps.

Maurizio

On 21-Oct-12 4: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 ?
>
> 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