Uploaded image for project: 'Log Tool'
  1. Log Tool
  2. LOGTOOL-104

FQCN and an import improperly deconflicted - FQCN lost

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 2.0.1.Final
    • None
    • Hide

      To the org.jboss.logging.processor.generated.TransformLogger add import java.util.List; and add the following messages:

          @LogMessage
          @Message("Irrelevant typeTest1 message %s")
          void typeTest1(List list);
          
          @LogMessage
          @Message("Irrelevant typeTest2 message %s")
          void typeTest2(java.awt.List list);
      

      Observe the test failure at the processing level.

      Show
      To the org.jboss.logging.processor.generated.TransformLogger add import java.util.List; and add the following messages: @LogMessage @Message( "Irrelevant typeTest1 message %s" ) void typeTest1(List list); @LogMessage @Message( "Irrelevant typeTest2 message %s" ) void typeTest2(java.awt.List list); Observe the test failure at the processing level.

      Given:

      import org.osgi.framework.hooks.service.EventHook;
      
      @MessageLogger(projectCode = "JBOSGI")
      public interface FrameworkLogger extends BasicLogger {
      
          @LogMessage(level = WARN)
          @Message(id = 11019, value = "Error while calling event hook: %s")
          void warnErrorWhileCallingEventHook(@Cause Throwable cause, EventHook hook);
      
          @LogMessage(level = WARN)
          @Message(id = 11040, value = "Error while calling bundle event hook: %s")
          void warnErrorWhileCallingBundleEventHook(@Cause Throwable cause, org.osgi.framework.hooks.bundle.EventHook hook);
      }
      

      Compilation failure:

      ERROR] COMPILATION ERROR :
      [INFO] -------------------------------------------------------------
      [ERROR] /Users/arcivanov/Documents/src/jbosgi/jbosgi-framework/core/target/generated-sources/annotations/org/jboss/osgi/framework/FrameworkLogger_$logger.java:[26,8] org.jboss.osgi.framework.FrameworkLogger_$logger is not abstract and does not override abstract method warnErrorWhileCallingBundleEventHook(java.lang.Throwable,org.osgi.framework.hooks.bundle.EventHook) in org.jboss.osgi.framework.FrameworkLogger
      [ERROR] /Users/arcivanov/Documents/src/jbosgi/jbosgi-framework/core/target/generated-sources/annotations/org/jboss/osgi/framework/FrameworkLogger_$logger.java:[336,5] method does not override or implement a method from a supertype

      Cause:

      import org.osgi.framework.hooks.service.EventHook;
      
      @Generated(value = "org.jboss.logging.processor.generator.model.MessageLoggerImplementor", date = "2016-04-18T04:40:24-0400")
      public class FrameworkLogger_$logger extends DelegatingBasicLogger implements FrameworkLogger,BasicLogger,Serializable {
      
          @Override
          public final void warnErrorWhileCallingEventHook(final Throwable cause, final EventHook hook) {
              super.log.logf(FQCN, org.jboss.logging.Logger.Level.WARN, cause, warnErrorWhileCallingEventHook$str(), hook);
          }
      
          @Override
          public final void warnErrorWhileCallingBundleEventHook(final Throwable cause, final EventHook hook) {
              super.log.logf(FQCN, org.jboss.logging.Logger.Level.WARN, cause, warnErrorWhileCallingBundleEventHook$str(), hook);
          }
      }
      

      As you can see the cause of the failure is that EventHook argument FQCN is lost in the generated warnErrorWhileCallingBundleEventHook.

              jperkins-rhn James Perkins
              arcivanov_jira Arcadiy Ivanov (Inactive)
              Archiver:
              rhn-support-sthamilt Stacey Hamilton

                Created:
                Updated:
                Resolved:
                Archived: