accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bil...@apache.org
Subject svn commit: r1229638 - /incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/ContextFactory.java
Date Tue, 10 Jan 2012 17:01:39 GMT
Author: billie
Date: Tue Jan 10 17:01:38 2012
New Revision: 1229638

URL: http://svn.apache.org/viewvc?rev=1229638&view=rev
Log:
ACCUMULO-286 fixed mysteriously broken parameterization in ContextFactory

Modified:
    incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/ContextFactory.java

Modified: incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/ContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/ContextFactory.java?rev=1229638&r1=1229637&r2=1229638&view=diff
==============================================================================
--- incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/ContextFactory.java
(original)
+++ incubator/accumulo/trunk/src/core/src/main/java/org/apache/accumulo/core/util/ContextFactory.java
Tue Jan 10 17:01:38 2012
@@ -147,16 +147,15 @@ public class ContextFactory {
     }
   }
   
-  @SuppressWarnings("unchecked")
+  @SuppressWarnings({"unchecked", "rawtypes"})
   public static <K1,V1,K2,V2> Mapper<K1,V1,K2,V2>.Context createMapContext(Mapper<K1,V1,K2,V2>
m, TaskAttemptContext tac, RecordReader<K1,V1> reader,
       RecordWriter<K2,V2> writer, InputSplit split) {
     try {
       if (useV21) {
         Object basis = MAP_CONTEXT_IMPL_CONSTRUCTOR.newInstance(tac.getConfiguration(), tac.getTaskAttemptID(),
reader, writer, null, null, split);
-        return (Mapper<K1,V1,K2,V2>.Context) MAP_CONTEXT_CONSTRUCTOR.newInstance((Mapper<K1,V1,K2,V2>)
MAP_CONSTRUCTOR.newInstance(), basis);
+        return (Mapper.Context) MAP_CONTEXT_CONSTRUCTOR.newInstance((Mapper<K1,V1,K2,V2>)
MAP_CONSTRUCTOR.newInstance(), basis);
       } else {
-        return (Mapper<K1,V1,K2,V2>.Context) MAP_CONTEXT_CONSTRUCTOR.newInstance(m,
tac.getConfiguration(), tac.getTaskAttemptID(), reader, writer, null, null,
-            split);
+        return (Mapper.Context) MAP_CONTEXT_CONSTRUCTOR.newInstance(m, tac.getConfiguration(),
tac.getTaskAttemptID(), reader, writer, null, null, split);
       }
     } catch (InstantiationException e) {
       throw new IllegalArgumentException("Can't create object", e);



Mime
View raw message