Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-8512

ReflectionProtoGenerator throws missing field exception on methods that looks like getter or setter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 1.34.0.Final
    • 1.32.0.Final
    • Core Engine
    • None
    • False
    • None
    • False
    • ---
    • ---
    • Moderate

    Description

      ReflectionProtoGenerator throws missing field exception on methods that looks like getter or setter but without a backing field, below example should trigger the exception.

       

      public class Person {
          private String id;
      
          public String getId() {
              return id;
          }
          public void setId(String id) {
              this.id = id;
          }
          // seeks for idBytes field throwing IllegalArgumentException
          public byte[] getIdBytes() {
              return id.getBytes();
          }
      }
      

       

      Could be handled by renaming the problematic method but sometimes the POJO is extended from a third party library or even from base java classes.

      Attachments

        Activity

          People

            cnicolai@redhat.com Cristiano Nicolai
            jmusacchio Juan Manuel Musacchio (Inactive)
            Marian Macik Marian Macik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: