This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 249345 - AssertionError: isSubClass Q
Summary: AssertionError: isSubClass Q
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal with 3 votes (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-14 13:23 UTC by aimee1969
Modified: 2016-11-14 10:40 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 211753


Attachments
stacktrace (6.52 KB, text/plain)
2014-12-14 13:23 UTC, aimee1969
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aimee1969 2014-12-14 13:23:01 UTC
Build: NetBeans IDE 8.0.2 (Build 201411181905)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.25-b02, Java(TM) SE Runtime Environment, 1.8.0_25-b17
OS: Mac OS X

User Comments:
GUEST: Appears once per Netbeans start, unknown if affects anything, but annoying.

GUEST: Happens when scanning projects. Started in 8.0.1. Worked fine till 8.0

GUEST: open java project (cloned hg repository), clean & build

GUEST: I get this error any time I open this particular file.

aimee1969: <Please provide a description of the problem or the steps to reproduce>
changerd lucene core from jdk7 to jdk 8
compilation fails under jdk8
lucene-4.10.2/core/build/classes
An exception has occurred in the compiler (1.8.0_25). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
java.lang.AssertionError: isSubClass Q
	at com.sun.tools.javac.code.Symbol.isSubClass(Symbol.java:447)
	at com.sun.tools.javac.code.Symbol.isMemberOf(Symbol.java:456)
	at com.sun.tools.javac.code.Symbol$MethodSymbol.overrides(Symbol.java:1469)
	at com.sun.tools.javac.code.Types$ImplementationCache.implementationInternal(Types.java:2671)
	at com.sun.tools.javac.code.Types$ImplementationCache.get(Types.java:2653)
	at com.sun.tools.javac.code.Types.implementation(Types.java:2682)
	at com.sun.tools.javac.code.Symbol$MethodSymbol.implementation(Symbol.jav

GUEST: Nothing. Just started netbeans. I can see "Background scanning of projects..." going in.




Stacktrace: 
java.lang.AssertionError: isSubClass Q
   at com.sun.tools.javac.code.Symbol.isSubClass(Symbol.java:450)
   at com.sun.tools.javac.code.Symbol.isMemberOf(Symbol.java:457)
   at com.sun.tools.javac.code.Symbol$MethodSymbol.overrides(Symbol.java:1547)
   at com.sun.tools.javac.code.Types$ImplementationCache.implementationInternal(Types.java:2680)
   at com.sun.tools.javac.code.Types$ImplementationCache.get(Types.java:2663)
   at com.sun.tools.javac.code.Types.implementation(Types.java:2692)
Comment 1 aimee1969 2014-12-14 13:23:03 UTC
Created attachment 151100 [details]
stacktrace
Comment 2 aimee1969 2014-12-15 13:52:31 UTC
By process of elimination, the following file 

org.apache.lucene.search.spans.SpanMultiTermQueryWrapper 

is the class that causes the error. Lucerne version is 4.10.2

By just changing the jdk from 7 to 8 for the project (lucent core) causes the java.lang.AssertionError  error to be raised (seen in the notifications area of nb)

The nb and OS X 10.10  was a fresh install in the last week.

The source file has not been modified, the character set is UTF-8.

The whole project compile of under jdk7.
A number of classes in the package had the spanner symbol, they all compiled ok, with the exception of the one mentioned.

File opens in textwrangler without any visible problems.

Aimee
Comment 3 bbourgoignie 2015-07-02 08:53:56 UTC
Same problem after switching from even 6 to 8 I think. 

The class giving the AssertionError has the following class definition:

@Entity
public class ReportEntryElement <Type extends AbstractReportEntryElementType>
        implements ReportPart, Serializable{}

Removing the extends makes the AssertionError disappear. 

I changed the jdk version of netbeans to 8_45.

The file compiles, so it seems to be a problem in the parser of netbeans?
Comment 4 bbourgoignie 2015-07-02 13:46:43 UTC
I reverted everything back to java 7_71 and it works. Netbeans is still running java 8_45. 

Does this mean there is an error in the java jdk implementation? 

Is there more infer I can provide to help you fix the problem? I would like to move to jdk 8. If this is not a netbeans problem I would like to submit a jdk bug report.
Comment 5 achecchi 2015-07-10 14:25:02 UTC
I also encountered this issue using NB 8.0.2, JDK 8 u45, and Windows 7.

The error can be reproduced with the following:

interface A
{
  void someMethod(); // [M]
}

abstract class B implements A
{
  void someMethod(int arg) {} // [M'] <-- overloads A.someMethod()
}

class C
{
  static <X extends B> callX()
  {
    X instanceOfX = null;
    System.out.println(instanceOfX.someMethod()); // yes, this wouldn't run but we're interested in the parsing error here.
  }
}

------------------

Using an interface [A] method [M] as an argument to another method where:
- the class on which [M] is called [B] is defined as a generic <X extends B>  - B is abstract
- B contains a method [M'] that overloads [M]