title: Class with utility static method gives Non-transient non-serializable instance field error
body: <p>I have a utility class with static method only </p>
  
  <pre><code>public final class ABC {
  
      /**
       * private constructor to prevent from object creation
       */
      private ABC() {
      }
  
      private static Map&lt;String, String&gt; buildInfo(@NonNull final X x) {
  
          final DataClass dataClass = x.getData();
  
          /**
            Some manipulation
          **/
          return info;
      }
  }
  
  </code></pre>
  
  <p>class X has a data class with </p>
  
  <pre><code>class X {
      DataClass dataClass;
      ...
  };
  
  class DataClass {
      ...
      Optional&lt;String&gt; abc;
      ...
  }
  
  
  </code></pre>
  
  <p>This piece of code gives "FindBugs reported warnings". <code>SE_BAD_FIELD: Non-transient non-Serialization instance field in serializable class</code> for DataClass. </p>
  
  <pre><code>This Serializable class defines a non-primitive instance field which is neither transient, Serializable, or java.lang.Object, and does not appear to implement the Externalizable interface or the readObject() and writeObject() methods.  Objects of this class will not be deserialized correctly if a non-Serializable object is stored in this field.
  </code></pre>
  
  <p>Why it is giving errors this in the utility method where i am not trying to make things serializable?</p>