avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r982741 - in /avro/trunk/lang/java: build.xml src/test/java/org/apache/avro/ipc/trace/TestSpanAggregation.java
Date Thu, 05 Aug 2010 19:28:53 GMT
Author: cutting
Date: Thu Aug  5 19:28:52 2010
New Revision: 982741

URL: http://svn.apache.org/viewvc?rev=982741&view=rev
Log:
AVRO-595.  Fix three unchecked warnings and make unchecked warnings cause compilation to fail.

Modified:
    avro/trunk/lang/java/build.xml
    avro/trunk/lang/java/src/test/java/org/apache/avro/ipc/trace/TestSpanAggregation.java

Modified: avro/trunk/lang/java/build.xml
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/build.xml?rev=982741&r1=982740&r2=982741&view=diff
==============================================================================
--- avro/trunk/lang/java/build.xml (original)
+++ avro/trunk/lang/java/build.xml Thu Aug  5 19:28:52 2010
@@ -81,7 +81,7 @@
   <property name="javac.deprecation" value="off"/>
   <property name="javac.version" value="1.6"/>
   <property name="javac.args" value=""/>
-  <property name="javac.args.warnings" value="-Xlint:unchecked"/>
+  <property name="javac.args.warnings" value="-Xlint:unchecked -Werror"/>
 
   <property name="ivy.version" value="2.1.0"/>
   <property name="ivy.url"

Modified: avro/trunk/lang/java/src/test/java/org/apache/avro/ipc/trace/TestSpanAggregation.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/src/test/java/org/apache/avro/ipc/trace/TestSpanAggregation.java?rev=982741&r1=982740&r2=982741&view=diff
==============================================================================
--- avro/trunk/lang/java/src/test/java/org/apache/avro/ipc/trace/TestSpanAggregation.java
(original)
+++ avro/trunk/lang/java/src/test/java/org/apache/avro/ipc/trace/TestSpanAggregation.java
Thu Aug  5 19:28:52 2010
@@ -122,6 +122,7 @@ public class TestSpanAggregation {
    *        e                    
    */
   @Test
+  @SuppressWarnings("unchecked")
   public void testTraceFormation1() {
     Span a1 = createClientSpan(idValue(1), idValue(1), null, new Utf8("a"));
     Span a2 = createServerSpan(idValue(1), idValue(1), null, new Utf8("a"));
@@ -179,7 +180,7 @@ public class TestSpanAggregation {
     event2.event = SpanEvent.CLIENT_RECV;
     event2.timeStamp = System.currentTimeMillis() * 1000000;
     
-    out.events = new GenericData.Array(
+    out.events = new GenericData.Array<TimestampedEvent>(
         2, Schema.createArray(TimestampedEvent.SCHEMA$));
     out.events.add(event1);
     out.events.add(event2);
@@ -210,7 +211,7 @@ public class TestSpanAggregation {
     event2.event = SpanEvent.SERVER_SEND;
     event2.timeStamp = System.currentTimeMillis();
     
-    out.events = new GenericData.Array(
+    out.events = new GenericData.Array<TimestampedEvent>(
         2, Schema.createArray(TimestampedEvent.SCHEMA$));
     out.events.add(event1);
     out.events.add(event2);



Mime
View raw message