Home | History | Annotate | Download | only in shaking8
      1 // Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file
      2 // for details. All rights reserved. Use of this source code is governed by a
      3 // BSD-style license that can be found in the LICENSE file.
      4 package shaking8;
      5 
      6 import java.util.Arrays;
      7 
      8 public class Shaking {
      9 
     10   public static void main(String[] args) {
     11     Thing[] empty = new Thing[0];
     12     OtherThing[] one = {new OtherThing(1)};
     13     callCloneOnArray(null);
     14     System.out.println(Arrays.toString(empty));
     15     System.out.println(Arrays.toString(one));
     16   }
     17 
     18   private static void callCloneOnArray(YetAnotherThing[] array) {
     19     if (array != null) {
     20       array.clone();
     21     }
     22   }
     23 }
     24