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 268577

Summary: False alert when package private inner class used
Product: java Reporter: pekarna <pekarna>
Component: CompilerAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description pekarna 2016-10-19 02:49:38 UTC
I have a setup like this:


----------------------------------
TypeScriptGenerator.java:

...

abstract class ModelMember
{
    String beanPropertyName;
    ModelType type;
    boolean isIterable;
    EnumSet<BeanMethodType> methodsPresent = EnumSet.noneOf(BeanMethodType.class);

    public static enum BeanMethodType { GET, SET, ADD, REMOVE; }
}

----------------------------------
TsGenUtils.java:

public class TsGenUtils
static String removePrefixAndSetMethodPresence(String name, String prefix, EnumSet<ModelMember.BeanMethodType> methodsPresent, ModelRelation.BeanMethodType flagToSetIfPrefixFound) { ... }

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

NetBeans show an errorneous warning at ModelMember and ModelRelation which are both accessible as package private abstract classes in a class in the same package. It compiles fine.

OpenJDK 1.8, -source 1.8, Maven 3.0.3.
Comment 1 pekarna 2016-10-19 02:50:47 UTC
The warning is
"package ModelMember does not exist"