-
Bug
-
Resolution: Done
-
Major
-
2.0.1.Final
-
None
If I have two classes with the same simple name in the logging interface, and a single method uses both of them, the generated class fails to qualify one of them, resulting in compilation errors like this:
[ERROR] /home/david/src/java/wildfly-naming/target/generated-sources/annotations/org/wildfly/naming/client/_private/Messages_$logger.java:[35,8] org.wildfly.naming.client._private.Messages_$logger is not abstract and does not override abstract method authenticationFailed(org.wildfly.security.auth.AuthenticationException) in org.wildfly.naming.client._private.Messages [ERROR] /home/david/src/java/wildfly-naming/target/generated-sources/annotations/org/wildfly/naming/client/_private/Messages_$logger.java:[403,5] method does not override or implement a method from a supertype
The source looks like this:
// ... import org.wildfly.security.auth.AuthenticationException; // ... @MessageLogger(projectCode = "WFNAM", length = 5) public interface Messages extends BasicLogger { // ... @Message(id = 32, value = "Peer authentication failed") javax.naming.AuthenticationException authenticationFailed(@Cause AuthenticationException cause); // ...
The generated code is:
private static final String authenticationFailed = "WFNAM00032: Peer authentication failed"; protected String authenticationFailed$str() { return authenticationFailed; } @Override public final AuthenticationException authenticationFailed(final AuthenticationException cause) { // XXX This is a problem line; return type is not qualified final AuthenticationException result = new AuthenticationException(String.format(authenticationFailed$str())); // XXX and this type and constructor are also not qualified result.initCause(cause); final StackTraceElement[] st = result.getStackTrace(); result.setStackTrace(Arrays.copyOfRange(st, 1, st.length)); return result; }
- is incorporated by
-
LOGTOOL-118 Upgrade JDeparser from 2.0.0.Final to 2.0.2.Final
- Resolved