Bug 235620 - AssertionError: isSameType UNKNOWN
AssertionError: isSameType UNKNOWN
Status: NEW
Product: java
Classification: Unclassified
Component: Compiler
7.4
All All
: P3 (vote)
: TBD
Assigned To: Dusan Balek
issues@java
EXCEPTIONS_REPORT
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-06 18:37 UTC by theshadow27
Modified: 2014-03-12 12:31 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (4.47 KB, text/plain)
2013-09-06 18:38 UTC, theshadow27
Details
stacktrace (6.73 KB, text/plain)
2013-09-19 14:51 UTC, theshadow27
Details
full stacktrace (both exceptions (16.88 KB, text/plain)
2013-09-20 16:55 UTC, theshadow27
Details
testcase (1.21 KB, text/plain)
2013-09-24 19:56 UTC, theshadow27
Details
testcase: Issue235620.java (1.50 KB, text/plain)
2013-09-26 13:28 UTC, theshadow27
Details
stacktrace (4.77 KB, text/plain)
2014-02-08 16:31 UTC, Exceptions Reporter
Details
stacktrace (3.05 KB, text/plain)
2014-03-12 12:31 UTC, Jiri Prox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description theshadow27 2013-09-06 18:37:59 UTC
This bug was originally marked as duplicate of bug 233939, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201309060001)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.25-b01, Java(TM) SE Runtime Environment, 1.7.0_25-b15
OS: Mac OS X

User Comments:
theshadow27: Highlighted some code




Stacktrace: 
java.lang.AssertionError: isSameType UNKNOWN
   at com.sun.tools.javac.code.Types$SameTypeVisitor.visitType(Types.java:1110)
   at com.sun.tools.javac.code.Types$SameTypeVisitor.visitType(Types.java:1082)
   at com.sun.tools.javac.code.Type.accept(Type.java:169)
   at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:4392)
   at com.sun.tools.javac.code.Types$SameTypeVisitor.visitArrayType(Types.java:1161)
   at com.sun.tools.javac.code.Types$SameTypeVisitor.visitArrayType(Types.java:1082)
Comment 1 theshadow27 2013-09-06 18:38:00 UTC
Created attachment 139774 [details]
stacktrace
Comment 2 theshadow27 2013-09-06 18:58:57 UTC
SEVERE [org.openide.util.Exceptions]
java.lang.NullPointerException
Caused: org.netbeans.modules.parsing.spi.ParseException
	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:211)
	at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:106)
[catch] at org.netbeans.modules.editor.java.JavaCompletionProvider$JavaCompletionQuery.query(JavaCompletionProvider.java:301)
	at org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:223)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
WARNING [org.netbeans.modules.findbugs.RunFindBugs]: Cannot find sig file for: com.pericore.util.HeapStreamTest$42
INFO [org.netbeans.api.java.source.ElementHandle]: Resolved type is null for kind = CLASS
INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=com.pericore.util.HeapStreamTest$42 ]
INFO [org.netbeans.api.java.source.ElementHandle]: Resolved type is null for kind = CLASS
INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=com.pericore.util.HeapStreamTest$42 ]
Comment 3 theshadow27 2013-09-19 14:41:58 UTC
This was reopened automatically re: id #692509, on dev build 130918, which seems to be very different than the original bug in build 130906. Make sure to check out the exception from 2013-09-19 before closing this - it might be a different issue entirely.
Comment 4 theshadow27 2013-09-19 14:51:10 UTC
Created attachment 140255 [details]
stacktrace

pasted an annonomous class into a @Test method of a nessted junit class. The structure is bascially:

@RunWith(Suite.class)
@SuiteClasses(OuterTest.InnerClass.class)
public class OuterTest{
  static void run(Runnable r) { r.run(); }
  public static class InnerClass{
      @Test
      public void testSomething(){
// ---- Snip ---
           run(new Runnable(){
               @Override
               void run(){
                   assertEquals("a", "b"); 
               }
           });
// ----- /Snip ----
      }
  }
} 

pased Snip into a new @Test method of the InnerClass
Comment 5 theshadow27 2013-09-19 15:00:39 UTC
See also bug 236152, which, after this exception is raised, can be triggered consistently just by clicking in the editor window in the section of pasted code (which has no hints and remains highlighted yellow). Everything seems to go back to normal after the file is saved.
Comment 6 theshadow27 2013-09-20 16:55:05 UTC
Created attachment 140315 [details]
full stacktrace (both exceptions

Full stacktrace of both exceptions
Comment 7 theshadow27 2013-09-24 19:56:20 UTC
Created attachment 140428 [details]
testcase

The attached testcase allows the issue to be reproduced simply and repeatably in the latest dev build (130924). 

 * Steps:
 *
 * 1) in the testSomething() method, highlight the code between the two comments
 * 2) Copy the highlighted code using ctrl+c
 * 3) Place cursor in the testSomethingElse() method between the two comments
 * 4) Paste the copied code using ctrl+v
 * 
 * This will trigger the AssertionError consistently
Comment 8 Jiri Prox 2013-09-24 21:36:49 UTC
reproducible
Comment 9 theshadow27 2013-09-26 13:28:54 UTC
Created attachment 140509 [details]
testcase: Issue235620.java

Updated testcase to actually produce the AssertionError reported in this bug (bug 235620). Previous (obsolete) testcase was duplicating the NullPointerException reported in bug 236155. Also, this testcase can be used to demonstrate bug 236152. 

Steps To Reproduce:

 1) in the testSomething() method, highlight the code between the two comments

 2) Copy the highlighted code using ctrl+c

 3) Place cursor in the testSomethingElse() method between the two comments

 4) Paste the copied code using ctrl+v
  
  This will trigger first the NPE from bug 236155, then the AssertionError from bug 235620 
 
 5) then click inside the pasted method. This will trigger the IllegalArgumentException from bug 236152
Comment 10 Exceptions Reporter 2014-02-08 16:31:23 UTC
Created attachment 144942 [details]
stacktrace

Copy/Paste
Comment 11 Jiri Prox 2014-03-12 12:31:11 UTC
Created attachment 145968 [details]
stacktrace

Copying content of one (about 5 classes) packaged into another


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo