title: superclass vs utility class for common code
body: <p>I have the same method in 2 classes that copy fields from one object to  builders. I want to refactor it but I do not know if I should create a static method in an utility class or abstract it to a superclass.</p>
  
  <p>The classes that shares this code are Beans and part of a multithreading app.</p>
  
  <p>The method would be like:</p>
  
  <pre><code>protected static void copyPartyGroup(Message.Builder msgBuilder, 
      final PartyGroup partyIDsGroup, Party.Builder rartyBuilder) {
  
      rartyBuilder.setPartyID(partyIDsGroup.getId())
      ....
  
      msgBuilder.setID(partyIDsGroup.getId())
  
      ....
  
  }
  </code></pre>
  
  <p>Thank you very much for your help.</p>