clarify licensing
[nestedvm.git] / src / org / ibex / nestedvm / util / InodeCache.java
index c4cedb9..12e2aea 100644 (file)
@@ -1,6 +1,8 @@
-package org.ibex.nestedvm.util;
+// Copyright 2000-2005 the Contributors, as shown in the revision logs.
+// Licensed under the Apache License 2.0 ("the License").
+// You may not use this file except in compliance with the License.
 
-import java.util.Arrays;
+package org.ibex.nestedvm.util;
 
 // Based on the various org.xwt.util.* classes by Adam Megacz
 
@@ -37,12 +39,14 @@ public class InodeCache {
         clear();
     }
     
+    private static void fill(Object[] a,Object o) { for(int i=0;i<a.length;i++) a[i] = o; }
+    private static void fill(short[] a, short s)  { for(int i=0;i<a.length;i++) a[i] = s; }
     public final void clear() {
         size = usedSlots = 0;
         mru = lru = -1;
-        Arrays.fill(keys,null);
-        Arrays.fill(inodes,SHORT_NULL);
-        Arrays.fill(reverse,SHORT_NULL);
+        fill(keys,null);
+        fill(inodes,SHORT_NULL);
+        fill(reverse,SHORT_NULL);
     }
     
     public final short get(Object key) {