4f591cb803
svn path=/nixpkgs/trunk/; revision=16527
81 lines
2.9 KiB
Diff
81 lines
2.9 KiB
Diff
Add missing casts. The GCC folks applied a similar patch in
|
|
GCC's own copy of Classpath:
|
|
http://gcc.gnu.org/ml/java/2007-05/msg00039.html .
|
|
|
|
--- classpath-0.98/javax/management/NotificationBroadcasterSupport.java 2009-07-30 16:52:08.000000000 +0200
|
|
+++ classpath-0.98/javax/management/NotificationBroadcasterSupport.java 2009-07-30 16:51:58.000000000 +0200
|
|
@@ -218,7 +218,7 @@
|
|
{
|
|
if (info == null || info.length == 0)
|
|
return new MBeanNotificationInfo[0];
|
|
- return info.clone();
|
|
+ return (MBeanNotificationInfo[]) info.clone();
|
|
}
|
|
|
|
/**
|
|
|
|
--- classpath-0.98/java/util/concurrent/CopyOnWriteArrayList.java 2008-03-27 18:39:25.000000000 +0100
|
|
+++ classpath-0.98/java/util/concurrent/CopyOnWriteArrayList.java 2009-07-30 17:08:30.000000000 +0200
|
|
@@ -147,7 +148,7 @@ public class CopyOnWriteArrayList<E>
|
|
*/
|
|
public CopyOnWriteArrayList(E[] array)
|
|
{
|
|
- data = array.clone();
|
|
+ data = (E[]) array.clone();
|
|
}
|
|
|
|
/**
|
|
@@ -364,7 +365,7 @@ public class CopyOnWriteArrayList<E>
|
|
public synchronized E set(int index, E e)
|
|
{
|
|
E result = data[index];
|
|
- E[] newData = data.clone();
|
|
+ E[] newData = (E[]) data.clone();
|
|
newData[index] = e;
|
|
data = newData;
|
|
return result;
|
|
|
|
--- classpath-0.98/java/util/EnumMap.java 2007-07-24 17:26:36.000000000 +0200
|
|
+++ classpath-0.98/java/util/EnumMap.java 2009-07-30 17:12:19.000000000 +0200
|
|
@@ -398,7 +398,7 @@ public class EnumMap<K extends Enum<K>,
|
|
// Can't happen.
|
|
result = null;
|
|
}
|
|
- result.store = store.clone();
|
|
+ result.store = (V[]) store.clone();
|
|
return result;
|
|
}
|
|
|
|
--- classpath-0.98/gnu/java/lang/reflect/GenericSignatureParser.java 2008-03-01 11:13:31.000000000 +0100
|
|
+++ classpath-0.98/gnu/java/lang/reflect/GenericSignatureParser.java 2009-07-30 17:14:24.000000000 +0200
|
|
@@ -75,7 +75,7 @@ final class TypeVariableImpl extends Typ
|
|
public Type[] getBounds()
|
|
{
|
|
resolve(bounds);
|
|
- return bounds.clone();
|
|
+ return (Type[]) bounds.clone();
|
|
}
|
|
|
|
public GenericDeclaration getGenericDeclaration()
|
|
@@ -154,7 +154,7 @@ final class ParameterizedTypeImpl extend
|
|
|
|
public Type[] getActualTypeArguments()
|
|
{
|
|
- return typeArgs.clone();
|
|
+ return (Type[]) typeArgs.clone();
|
|
}
|
|
|
|
public Type getRawType()
|
|
|
|
--- classpath-0.98/external/jsr166/java/util/ArrayDeque.java 2006-12-10 21:25:40.000000000 +0100
|
|
+++ classpath-0.98/external/jsr166/java/util/ArrayDeque.java 2009-07-30 17:15:35.000000000 +0200
|
|
@@ -787,7 +790,7 @@ public class ArrayDeque<E> extends Abstr
|
|
ArrayDeque<E> result = (ArrayDeque<E>) super.clone();
|
|
// Classpath local: we don't have Arrays.copyOf yet.
|
|
// result.elements = Arrays.copyOf(elements, elements.length);
|
|
- result.elements = elements.clone();
|
|
+ result.elements = (E[]) elements.clone();
|
|
return result;
|
|
|
|
} catch (CloneNotSupportedException e) {
|