Community
Participate
Working Groups
Here is a simple EJB with private constant for query name. JDT compiles it while Sun JDK's javac (both 1.6 and 1.5 latest versions) gives an error: [java.compile] /home/selin/projects/teko/d-Source/development/business/oss/core/java/ru/topsbi/oss/core/customer/Customer.java:31: FIND_BY_USER has private access in ru.topsbi.oss.core.customer.Customer [java.compile] @NamedQuery(name = Customer.FIND_BY_USER, query = "select c from Customer c where c.user = :user AND c.sysStatus = :status") [java.compile] ^ EJB: package ru.topsbi.oss.core.customer; @NamedQueries({ @NamedQuery(name = Customer.FIND_BY_USER, query = "select c from Customer c where c.user = :user AND c.sysStatus = :status") }) public class Customer extends AbstractEntity<Customer> { private static final String FIND_BY_USER = "findCustomerByUser"; }
This is a known issue where the scope for private access in ECJ is larger the compilation unit, where it should be the body of the declaring class.
Dup of bug 185422 *** This bug has been marked as a duplicate of bug 185422 ***