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

Exception constructing methods are not populating the message string

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 1.0.0.Beta6
    • 1.0.0.Beta5
    • None

      ...which sometimes leads to compile errors.

      This input:

      InvocationMessages.java
      // ...
      
          @Message(id = 3, value = "Null value passed in for parameter %s")
          IllegalArgumentException nullParameter(String param);
      
          @Message(id = 4, value = "Null value specified for serialized field %s")
          InvalidObjectException nullField(String param);
      
          @Message(id = 5, value = "The given interceptor instance is of the wrong type")
          IllegalArgumentException wrongInterceptorType();
      // ...
      

      Yields this output:

      InvocationMessages_$bundle.java
      // ...
         
          @Override
          public final IllegalArgumentException nullParameter(final String param) {
              IllegalArgumentException result = new IllegalArgumentException();
              return result;
          }
      
          protected String nullParameter$str() {
              return nullParameter;
          }
          
          @Override
          public final InvalidObjectException nullField(final String param) {
              InvalidObjectException result = new InvalidObjectException();
              return result;
          }
      
          protected String nullField$str() {
              return nullField;
          }
      
      
          @Override
          public final IllegalArgumentException wrongInterceptorType() {
              IllegalArgumentException result = new IllegalArgumentException();
              return result;
          }
      
          protected String wrongInterceptorType$str() {
              return wrongInterceptorType;
          }
      // ...
      

      In particular this is an issue because InvalidObjectException does not have a no-arg constructor.

            jperkins-rhn James Perkins
            dlloyd@redhat.com David Lloyd
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: