You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Austin Stephens (JIRA)" <ji...@apache.org> on 2019/02/07 22:12:00 UTC

[jira] [Created] (NETBEANS-2094) AssertionError while typing before an annotation in anonymous inner class

Austin Stephens created NETBEANS-2094:
-----------------------------------------

             Summary: AssertionError while typing before an annotation in anonymous inner class
                 Key: NETBEANS-2094
                 URL: https://issues.apache.org/jira/browse/NETBEANS-2094
             Project: NetBeans
          Issue Type: Bug
          Components: java - Source
    Affects Versions: 10.0
            Reporter: Austin Stephens


Paste the following into a code file:

 
{code:java}
    public static InputStream foo(InputStream from){
            return new InputStream() {
            MemoryStream ms = new MemoryStream();
            GZIPOutputStream compress = new GZIPOutputStream(ms.getOutputStream());
            
            @Override
            public int read() throws IOException {
                throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
            }
        }
    }
{code}
and try to type "byte[] buffer" above the Override Annotation. An assertion error will be thrown with the stack trace of:

 
{noformat}
Assert.error:155    
Assert.checkNonNull:62    
Annotate.fromAnnotations:167    
Annotate.lambda$annotateTypeSecondStage$5:1031    
861978341.run    
Annotate.flush:194    
Annotate.unblockAnnotations:144    
TypeEnter.complete:229    
Symbol.complete:645    
Symbol$ClassSymbol.complete:1352    
Attr.visitClassDef:982    
NBAttr.visitClassDef:61    
JCTree$JCClassDecl.accept:778    
Attr.attribTree:673    
Attr.attribStat:749    
Attr.visitAnonymousClassDefinition:2508    
Attr.visitNewClass:2391    
JCTree$JCNewClass.accept:1695    
Attr.attribTree:673    
Attr.visitReturn:1931    
JCTree$JCReturn.accept:1552    
Attr.attribTree:673    
Attr.attribStat:749    
Attr.attribStats:773    
Attr.visitBlock:1350    
NBAttr.visitBlock:73    
JCTree$JCBlock.accept:1026    
Attr.attribTree:673    
Attr.attribStat:749     
JavacParser.parseImpl:399    
JavacParser.parse:332    
TaskProcessor.callParse:598    
SourceCache.getResult:228    
ResultIterator.getParserResult:115    
ResultIterator.getParserResult:129   
TaskProcessor.callUserTask:586    
ParserManager$UserTaskAction.run:130    
ParserManager$UserTaskAction.run:114    
TaskProcessor$2.call:181    
TaskProcessor$2.call:178    
FileChangedManager.priorityIO:153    
ProvidedExtensions.priorityIO:335    
DataObjectEnvFactory.runPriorityIO:118    
Utilities.runPriorityIO:67    
TaskProcessor.runUserTask:178    
ParserManager.parse:81    
JPACodeCompletionProvider$JPACodeCompletionQuery.query:118    
AsyncCompletionTask.run:198    
RequestProcessor$Task.run:1418    
GlobalLookup.execute:45    
Lookups.executeWith:278    
RequestProcessor$Processor.run:2033   {noformat}
 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists