I'm using Lombok to add logging to my Java applications. I've been using this for some time, but since I upgraded my IDE from IntelliJ 13 Community edition to 14 Ultimate, I get the following compile errors (using maven):
error: log has private access in SesameServer
This error originates in a subclass of SesameServer
:
@Slf4j
public class AnnotatorServices extends SesameServer {
@Override
protected void initialiseRDFStoreManager(Series<Parameter> parameters) throws RepositoryConfigException, RepositoryException {
log.info("<< ------ Annotator Services ------- >>");
}
}
Of course SesameServer
also uses the @Slf4j
annotation to add logging. The @Slf4j
annotation adds the line:
private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(SesameServer.class);
to the class in which it is used (both SesameServer
and AnnotatorServices
where SesameServer.class
is of course replaced by AnnotatorServices.class
).
Apparently the compiler thinks I want to use the log
variable from SesameServer
instead of AnnotatorServices
(both classes have variables with the same name).
How can I prevent this problem, i.e. that the SesameServer.log
is used instead of AnnotatorServices.log
?
AnnotatorServices.this.log
– Stagger