jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r1227869 - /incubator/jena/Jena2/ARQ/trunk/src/main/java/org/openjena/atlas/lib/Tuple.java
Date Thu, 05 Jan 2012 22:15:17 GMT
Author: andy
Date: Thu Jan  5 22:15:17 2012
New Revision: 1227869

URL: http://svn.apache.org/viewvc?rev=1227869&view=rev
Log:
Java7 comment

Modified:
    incubator/jena/Jena2/ARQ/trunk/src/main/java/org/openjena/atlas/lib/Tuple.java

Modified: incubator/jena/Jena2/ARQ/trunk/src/main/java/org/openjena/atlas/lib/Tuple.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/ARQ/trunk/src/main/java/org/openjena/atlas/lib/Tuple.java?rev=1227869&r1=1227868&r2=1227869&view=diff
==============================================================================
--- incubator/jena/Jena2/ARQ/trunk/src/main/java/org/openjena/atlas/lib/Tuple.java (original)
+++ incubator/jena/Jena2/ARQ/trunk/src/main/java/org/openjena/atlas/lib/Tuple.java Thu Jan
 5 22:15:17 2012
@@ -42,7 +42,7 @@ public final class Tuple<T> implements I
 //        return Tuple.create(tuple) ;
 //    }
     
-    public static <X> Tuple<X> create(X ... elements)
+    public static <X> Tuple<X> create(/*@SuppressWarnings("unchecked")*/ X ...
elements)
     { return new Tuple<X>(elements) ; }
     
     
@@ -75,9 +75,9 @@ public final class Tuple<T> implements I
     // Alternative : Object[] (+ cast on access)
     final T[] tuple ;
     
-    private Tuple(T...tuple)
+    private Tuple(/*@SuppressWarnings("unchecked")*/ T...tuple)
     {
-        this.tuple = tuple ;
+        this.tuple = ArrayUtils.copy(tuple) ;   // Take copy to stop 'tuple' being referenced
after the call.
     }
     
     public T get(int idx) { return tuple[idx] ; }



Mime
View raw message