Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-4347

should ignore inner classes that are assigned to static fields

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • ipojo-manipulator-1.11.0
    • ipojo-manipulator-1.11.1
    • iPOJO
    • None

    Description

      The iPOJO manipulator also instruments static inner classes that don't have any iPOJO annotations.
      For example:

      private static final Function<String, String> TRIM = new Function() {
          public String apply(String input) {
              return input.trim();
          }
      };
      

      results in the following:

      private static final Function<String, String> TRIM = new Function()
        {
          public String apply(String paramAnonymousString)
          {
            if (!this.this$0.__M1___apply$java_lang_String) {
              return super.__M_apply(paramAnonymousString);
            }
            String str;
            try
            {
              this.this$0.__IM.onEntry(this, "1___apply$java_lang_String", new Object[] { paramAnonymousString });
              str = super.__M_apply(paramAnonymousString);
              this.this$0.__IM.onExit(this, "1___apply$java_lang_String", str);
            }
            catch (Throwable localThrowable)
            {
              this.this$0.__IM.onError(this, "1___apply$java_lang_String", localThrowable);
              throw localThrowable;
            }
            return str;
          }
          
          public String __M_apply(String input)
          {
            return input.trim();
          }
        };
      

      This fails at runtime with NoSuchFieldError for this.this$0

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            clement.escoffier Clement Escoffier
            d.de.wit Daan de Wit
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment