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 258205 - Compiler throws NPEs and Assertions on malformed annotations
Summary: Compiler throws NPEs and Assertions on malformed annotations
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-01 16:34 UTC by Svata Dedic
Modified: 2016-03-01 16:34 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
dump file (4.44 KB, application/octet-stream)
2016-03-01 16:34 UTC, Svata Dedic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2016-03-01 16:34:14 UTC
Created attachment 158699 [details]
dump file

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication3;

import javax.persistence.JoinTable;

public class Test { 
   
     @JoinTable(name = "submission_compile_info",
            inverseJoinColumns = JoinC olumn("compile_info"))
    final int number;
    
    public Test(final Integer number) {
        this.number = requireNonNull(number);
    }
                            
}


Then try to remove the space in "JoinC olumn"; an Assertion error will be trown from ClassWriter:

java.lang.AssertionError: <error>
	at com.sun.tools.javac.jvm.ClassWriter$AttributeWriter.visitError(ClassWriter.java:902)
	at com.sun.tools.javac.code.Attribute$Error.accept(Attribute.java:387)
	at com.sun.tools.javac.jvm.ClassWriter$AttributeWriter.visitArray(ClassWriter.java:908)
	at com.sun.tools.javac.code.Attribute$Array.accept(Attribute.java:327)
	at com.sun.tools.javac.jvm.ClassWriter.writeCompoundAttribute(ClassWriter.java:925)
	at com.sun.tools.javac.jvm.ClassWriter.writeJavaAnnotations(ClassWriter.java:760)
	at com.sun.tools.javac.jvm.ClassWriter.writeMemberAttrs(ClassWriter.java:620)
	at com.sun.tools.javac.jvm.ClassWriter.writeField(ClassWriter.java:1120)
	at com.sun.tools.javac.jvm.ClassWriter.writeFields(ClassWriter.java:1629)
	at com.sun.tools.javac.jvm.ClassWriter.writeClassFile(ClassWriter.java:1732)
	at com.sun.tools.javac.jvm.ClassWriter.writeClass(ClassWriter.java:1659)
	at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:740)
	at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1607)
	at com.sun.tools.javac.api.JavacTaskImpl$6.process(JavacTaskImpl.java:539)
	at com.sun.tools.javac.api.JavacTaskImpl$Filter.run(JavacTaskImpl.java:607)
	at com.sun.tools.javac.api.JavacTaskImpl.generate(JavacTaskImpl.java:542)
[catch] at org.netbeans.modules.java.source.indexing.MultiPassCompileWorker.compile(MultiPassCompileWorker.java:304)
	at org.netbeans.modules.java.source.indexing.JavaCustomIndexer.index(JavaCustomIndexer.java:251)
	at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor$2.run(Indexable.java:161)
	at org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.runIndexer(RepositoryUpdater.java:296)
	at org.netbeans.modules.parsing.spi.indexing.Indexable$MyAccessor.index(Indexable.java:159)