title: How to Fix FindBug error 'May expose internal representation by incorporating reference to mutable object' while setting Array of Objects?
body: <p>I have a method which takes an Array of object as input and stores it in an instance variable. Here is the code that does it but, FindBugs reports it an error saying "May expose internal representation by incorporating reference to mutable object".</p>
  
  <pre><code>public final class HelloWorld
  {
      public final Hello objs[];
  
      public HelloWorld(Hello[] inputs)
     {
          this.objs = inputs;
     }
  
  }
  </code></pre>
  
  <p>I tried using Arrays.copyOf but, still i am getting this error.</p>
  
  <pre><code>this.objs = Arrays.copyOf(inputs,inputs.length);
  </code></pre>
  
  <p><strong><em>How can i fix this FindBugs issue ?</em></strong> </p>