avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject [32/43] avro git commit: AVRO-1828: Add EditorConfig file and cleanup of whitespace violations
Date Sat, 14 May 2016 23:44:05 GMT
http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/reflect/AvroAlias.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/reflect/AvroAlias.java b/lang/java/avro/src/main/java/org/apache/avro/reflect/AvroAlias.java
index bcd0fd1..d613350 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/reflect/AvroAlias.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/reflect/AvroAlias.java
@@ -25,7 +25,7 @@ import java.lang.annotation.Target;
 /**
  * Adds the given name and space as an alias to the schema.
  * Avro files of this schema can be read into classes
- * named by the alias. 
+ * named by the alias.
  */
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.TYPE)

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/reflect/CustomEncoding.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/reflect/CustomEncoding.java b/lang/java/avro/src/main/java/org/apache/avro/reflect/CustomEncoding.java
index 1c180e5..66421c5 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/reflect/CustomEncoding.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/reflect/CustomEncoding.java
@@ -25,10 +25,10 @@ import org.apache.avro.io.Encoder;
 
 /**
  * Expert:  a custom encoder and decoder that writes
- * an object directly to avro. 
+ * an object directly to avro.
  * No validation is performed to check that the encoding conforms to the schema.
  * Invalid implementations may result in an unreadable file.
- * The use of {@link org.apache.avro.io.ValidatingEncoder} is recommended. 
+ * The use of {@link org.apache.avro.io.ValidatingEncoder} is recommended.
  *
  * @param <T> The class of objects that can be serialized with this encoder / decoder.
  */
@@ -36,7 +36,7 @@ public abstract class CustomEncoding<T> {
 
   protected Schema schema;
 
-  
+
   protected abstract void write(Object datum, Encoder out) throws IOException;
 
   protected abstract T read(Object reuse, Decoder in) throws IOException;

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccess.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccess.java b/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccess.java
index ba739bc..ffc6f3c 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccess.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccess.java
@@ -20,7 +20,7 @@ package org.apache.avro.reflect;
 import java.lang.reflect.Field;
 
 abstract class FieldAccess {
-  
+
   protected abstract FieldAccessor getAccessor(Field field);
 
 }

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccessReflect.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccessReflect.java b/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccessReflect.java
index 680139a..fd544ec 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccessReflect.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccessReflect.java
@@ -47,7 +47,7 @@ class FieldAccessReflect extends FieldAccess {
       this.field = field;
       this.field.setAccessible(true);
       isStringable = field.isAnnotationPresent(Stringable.class);
-      isCustomEncoded = field.isAnnotationPresent(AvroEncode.class); 
+      isCustomEncoded = field.isAnnotationPresent(AvroEncode.class);
     }
 
     @Override
@@ -65,17 +65,17 @@ class FieldAccessReflect extends FieldAccess {
         IOException {
       field.set(object, value);
     }
-    
+
     @Override
     protected Field getField() {
       return field;
     }
-    
+
     @Override
     protected boolean isStringable() {
       return isStringable;
     }
-    
+
     @Override
     protected boolean isCustomEncoded() {
       return isCustomEncoded;

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccessUnsafe.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccessUnsafe.java b/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccessUnsafe.java
index b5ade1e..3ae25fd 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccessUnsafe.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccessUnsafe.java
@@ -92,7 +92,7 @@ class FieldAccessUnsafe extends FieldAccess {
     protected boolean supportsIO() {
       return true;
     }
-    
+
     @Override
     protected boolean isStringable() {
       return isStringable;
@@ -321,18 +321,18 @@ class FieldAccessUnsafe extends FieldAccess {
     protected Object get(Object object) {
       return UNSAFE.getObject(object, offset);
     }
-    
+
     @Override
     protected boolean supportsIO() {
       return false;
     }
-    
+
   }
-  
+
   final static class UnsafeCustomEncodedField extends UnsafeCachedField {
 
     private CustomEncoding<?> encoding;
-    
+
     UnsafeCustomEncodedField(Field f, CustomEncoding<?> encoding) {
       super(f);
       this.encoding = encoding;
@@ -347,7 +347,7 @@ class FieldAccessUnsafe extends FieldAccess {
     protected void set(Object object, Object value) throws IllegalAccessException, IOException {
       UNSAFE.putObject(object, offset, value);
     }
-    
+
     @Override
     protected void read(Object object, Decoder in) throws IOException {
       UNSAFE.putObject(object, offset, encoding.read(in));
@@ -357,7 +357,7 @@ class FieldAccessUnsafe extends FieldAccess {
     protected void write(Object object, Encoder out) throws IOException {
       encoding.write(UNSAFE.getObject(object, offset), out);
     }
-    
+
     protected boolean isCustomEncoded() {
       return true;
     }

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccessor.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccessor.java b/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccessor.java
index b76d185..9d71147 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccessor.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/reflect/FieldAccessor.java
@@ -41,15 +41,15 @@ abstract class FieldAccessor {
   protected boolean supportsIO() {
     return false;
   }
-  
+
   protected abstract Field getField();
-  
+
   protected boolean isStringable() {
     return false;
   }
-  
+
   protected boolean isCustomEncoded() {
     return false;
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectData.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectData.java b/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectData.java
index 5af55b7..6b6ae4e 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectData.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectData.java
@@ -87,17 +87,17 @@ public class ReflectData extends SpecificData {
       return makeNullable(schema);
     }
   }
-  
+
   private static final ReflectData INSTANCE = new ReflectData();
 
   /** For subclasses.  Applications normally use {@link ReflectData#get()}. */
   public ReflectData() {}
-  
+
   /** Construct with a particular classloader. */
   public ReflectData(ClassLoader classLoader) {
     super(classLoader);
   }
-  
+
   /** Return the singleton instance. */
   public static ReflectData get() { return INSTANCE; }
 
@@ -148,7 +148,7 @@ public class ReflectData extends SpecificData {
   public Object getField(Object record, String name, int position) {
     return getField(record, name, position, null);
   }
-  
+
   @Override
   protected Object getField(Object record, String name, int pos, Object state) {
     if (record instanceof IndexedRecord) {
@@ -160,7 +160,7 @@ public class ReflectData extends SpecificData {
       throw new AvroRuntimeException(e);
     }
   }
-    
+
   private FieldAccessor getAccessorForField(Object record, String name,
       int pos, Object optionalState) {
     if (optionalState != null) {
@@ -227,8 +227,8 @@ public class ReflectData extends SpecificData {
       return super.validate(schema, datum);
     }
   }
-  
-  static final ConcurrentHashMap<Class<?>, ClassAccessorData> 
+
+  static final ConcurrentHashMap<Class<?>, ClassAccessorData>
     ACCESSOR_CACHE = new ConcurrentHashMap<Class<?>, ClassAccessorData>();
 
   static class ClassAccessorData {
@@ -244,14 +244,14 @@ public class ReflectData extends SpecificData {
           continue;
         }
         FieldAccessor accessor = ReflectionUtil.getFieldAccess().getAccessor(f);
-        AvroName avroname = f.getAnnotation(AvroName.class);    
-        byName.put( (avroname != null 
+        AvroName avroname = f.getAnnotation(AvroName.class);
+        byName.put( (avroname != null
           ? avroname.value()
-          : f.getName()) , accessor);  
+          : f.getName()) , accessor);
       }
     }
-    
-    /** 
+
+    /**
      * Return the field accessors as an array, indexed by the field
      * index of the given schema.
      */
@@ -282,7 +282,7 @@ public class ReflectData extends SpecificData {
       return result;
     }
   }
-  
+
   private ClassAccessorData getClassAccessorData(Class<?> c) {
     ClassAccessorData data = ACCESSOR_CACHE.get(c);
     if(data == null && !IndexedRecord.class.isAssignableFrom(c)){
@@ -294,7 +294,7 @@ public class ReflectData extends SpecificData {
     }
     return data;
   }
-  
+
   private FieldAccessor[] getFieldAccessors(Class<?> c, Schema s) {
     ClassAccessorData data = getClassAccessorData(c);
     if (data != null) {
@@ -302,7 +302,7 @@ public class ReflectData extends SpecificData {
     }
     return null;
   }
-  
+
   private FieldAccessor getFieldAccessor(Class<?> c, String fieldName) {
     ClassAccessorData data = getClassAccessorData(c);
     if (data != null) {
@@ -431,9 +431,9 @@ public class ReflectData extends SpecificData {
                                   Map<String, Schema> names) {
     Schema keySchema = createSchema(keyType, names);
     Schema valueSchema = createSchema(valueType, names);
-    Schema.Field keyField = 
+    Schema.Field keyField =
       new Schema.Field(NS_MAP_KEY, keySchema, null, null);
-    Schema.Field valueField = 
+    Schema.Field valueField =
       new Schema.Field(NS_MAP_VALUE, valueSchema, null, null);
     String name = getNameForNonStringMapRecord(keyType, valueType,
       keySchema, valueSchema);
@@ -493,7 +493,7 @@ public class ReflectData extends SpecificData {
     if (type instanceof GenericArrayType) {                  // generic array
       Type component = ((GenericArrayType)type).getGenericComponentType();
       if (component == Byte.TYPE)                            // byte array
-        return Schema.create(Schema.Type.BYTES);           
+        return Schema.create(Schema.Type.BYTES);
       Schema result = Schema.createArray(createSchema(component, names));
       setElement(result, component);
       return result;
@@ -534,10 +534,10 @@ public class ReflectData extends SpecificData {
     } else if (type instanceof Class) {                      // Class
       Class<?> c = (Class<?>)type;
       if (c.isPrimitive() ||                                 // primitives
-          c == Void.class || c == Boolean.class || 
+          c == Void.class || c == Boolean.class ||
           c == Integer.class || c == Long.class ||
-          c == Float.class || c == Double.class || 
-          c == Byte.class || c == Short.class || 
+          c == Float.class || c == Double.class ||
+          c == Byte.class || c == Short.class ||
           c == Character.class)
         return super.createSchema(type, names);
       if (c.isArray()) {                                     // array
@@ -599,7 +599,7 @@ public class ReflectData extends SpecificData {
           consumeAvroAliasAnnotation(c, schema);
           names.put(c.getName(), schema);
           for (Field field : getCachedFields(c))
-            if ((field.getModifiers()&(Modifier.TRANSIENT|Modifier.STATIC))==0 
+            if ((field.getModifiers()&(Modifier.TRANSIENT|Modifier.STATIC))==0
                 && !field.isAnnotationPresent(AvroIgnore.class)) {
               Schema fieldSchema = createFieldSchema(field, names);
               AvroDefault defaultAnnotation
@@ -607,7 +607,7 @@ public class ReflectData extends SpecificData {
               JsonNode defaultValue = (defaultAnnotation == null)
                 ? null
                 : Schema.parseJson(defaultAnnotation.value());
-              
+
               if (defaultValue == null
                   && fieldSchema.getType() == Schema.Type.UNION) {
                 Schema defaultType = fieldSchema.getTypes().get(0);
@@ -616,17 +616,17 @@ public class ReflectData extends SpecificData {
                 }
               }
               AvroName annotatedName = field.getAnnotation(AvroName.class);       // Rename fields
-              String fieldName = (annotatedName != null)            
+              String fieldName = (annotatedName != null)
                 ? annotatedName.value()
                 : field.getName();
-              Schema.Field recordField 
+              Schema.Field recordField
                 = new Schema.Field(fieldName, fieldSchema, null, defaultValue);
-             
+
               AvroMeta meta = field.getAnnotation(AvroMeta.class);              // add metadata
-              if (meta != null) 
-                recordField.addProp(meta.key(), meta.value());  
-              for(Schema.Field f : fields) {                                
-                if (f.name().equals(fieldName)) 
+              if (meta != null)
+                recordField.addProp(meta.key(), meta.value());
+              for(Schema.Field f : fields) {
+                if (f.name().equals(fieldName))
                   throw new AvroTypeException("double field entry: "+ fieldName);
               }
               fields.add(recordField);
@@ -636,7 +636,7 @@ public class ReflectData extends SpecificData {
                                         null, null));
           schema.setFields(fields);
           AvroMeta meta = c.getAnnotation(AvroMeta.class);
-          if (meta != null) 
+          if (meta != null)
               schema.addProp(meta.key(), meta.value());
         }
         names.put(fullName, schema);
@@ -654,7 +654,7 @@ public class ReflectData extends SpecificData {
     makeNullable(Schema.create(Schema.Type.STRING));
 
   // if array element type is a class with a union annotation, note it
-  // this is required because we cannot set a property on the union itself 
+  // this is required because we cannot set a property on the union itself
   private void setElement(Schema schema, Type element) {
     if (!(element instanceof Class)) return;
     Class<?> c = (Class<?>)element;
@@ -694,7 +694,7 @@ public class ReflectData extends SpecificData {
 
   private static final Map<Class<?>,Field[]> FIELDS_CACHE =
     new ConcurrentHashMap<Class<?>,Field[]>();
-  
+
   // Return of this class and its superclasses to serialize.
   private static Field[] getCachedFields(Class<?> recordClass) {
     Field[] fieldsList = FIELDS_CACHE.get(recordClass);
@@ -722,7 +722,7 @@ public class ReflectData extends SpecificData {
     fieldsList = fields.values().toArray(new Field[0]);
     return fieldsList;
   }
-  
+
   /** Create a schema for a field. */
   protected Schema createFieldSchema(Field field, Map<String, Schema> names) {
     AvroEncode enc = field.getAnnotation(AvroEncode.class);
@@ -731,7 +731,7 @@ public class ReflectData extends SpecificData {
           return enc.using().newInstance().getSchema();
       } catch (Exception e) {
           throw new AvroRuntimeException("Could not create schema from custom serializer for " + field.getName());
-      } 
+      }
 
     AvroSchema explicit = field.getAnnotation(AvroSchema.class);
     if (explicit != null)                                   // explicit schema
@@ -816,7 +816,7 @@ public class ReflectData extends SpecificData {
     List<Schema> errs = new ArrayList<Schema>();
     errs.add(Protocol.SYSTEM_ERROR);              // every method can throw
     for (Type err : method.getGenericExceptionTypes())
-      if (err != AvroRemoteException.class) 
+      if (err != AvroRemoteException.class)
         errs.add(getSchema(err, names));
     Schema errors = Schema.createUnion(errs);
     return protocol.createMessage(method.getName(), null /* doc */, request, response, errors);
@@ -851,8 +851,8 @@ public class ReflectData extends SpecificData {
     case BYTES:
       if (!o1.getClass().isArray())
         break;
-      byte[] b1 = (byte[])o1; 
-      byte[] b2 = (byte[])o2; 
+      byte[] b1 = (byte[])o1;
+      byte[] b2 = (byte[])o2;
       return BinaryData.compareBytes(b1, 0, b1.length, b2, 0, b2.length);
     }
     return super.compare(o1, o2, s, equals);
@@ -862,7 +862,7 @@ public class ReflectData extends SpecificData {
   protected Object getRecordState(Object record, Schema schema) {
     return getFieldAccessors(record.getClass(), schema);
   }
-  
+
   private void consumeAvroAliasAnnotation(Class<?> c, Schema schema) {
     AvroAlias alias = c.getAnnotation(AvroAlias.class);
     if (alias != null) {

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectDatumReader.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectDatumReader.java b/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectDatumReader.java
index ee12180..3d5a301 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectDatumReader.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectDatumReader.java
@@ -275,13 +275,13 @@ public class ReflectDatumReader<T> extends SpecificDatumReader<T> {
         if (accessor.isStringable()) {
           try {
             String asString = (String) read(null, f.schema(), in);
-            accessor.set(record, asString == null 
+            accessor.set(record, asString == null
               ? null
               : newInstanceFromString(accessor.getField().getType(), asString));
             return;
           } catch (Exception e) {
             throw new AvroRuntimeException("Failed to read Stringable", e);
-          } 
+          }
         }
         LogicalType logicalType = f.schema().getLogicalType();
         if (logicalType != null) {

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectDatumWriter.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectDatumWriter.java b/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectDatumWriter.java
index 85e3c55..fbdb9a5 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectDatumWriter.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectDatumWriter.java
@@ -51,7 +51,7 @@ public class ReflectDatumWriter<T> extends SpecificDatumWriter<T> {
   public ReflectDatumWriter(Schema root, ReflectData reflectData) {
     super(root, reflectData);
   }
-  
+
   protected ReflectDatumWriter(ReflectData reflectData) {
     super(reflectData);
   }
@@ -69,7 +69,7 @@ public class ReflectDatumWriter<T> extends SpecificDatumWriter<T> {
     if (null == elementClass) {
       // not a Collection or an Array
       throw new AvroRuntimeException("Array data must be a Collection or Array");
-    } 
+    }
     Schema element = schema.getElementType();
     if (elementClass.isPrimitive()) {
       Schema.Type type = element.getType();
@@ -109,7 +109,7 @@ public class ReflectDatumWriter<T> extends SpecificDatumWriter<T> {
       out.writeArrayEnd();
     }
   }
-  
+
   private void writeObjectArray(Schema element, Object[] data, Encoder out) throws IOException {
     int size = data.length;
     out.setItemCount(size);
@@ -117,12 +117,12 @@ public class ReflectDatumWriter<T> extends SpecificDatumWriter<T> {
       this.write(element, data[i], out);
     }
   }
-    
+
   private void arrayError(Class<?> cl, Schema.Type type) {
     throw new AvroRuntimeException("Error writing array with inner type " +
       cl + " and avro type: " + type);
   }
-  
+
   @Override
   protected void writeBytes(Object datum, Encoder out) throws IOException {
     if (datum instanceof byte[])
@@ -176,7 +176,7 @@ public class ReflectDatumWriter<T> extends SpecificDatumWriter<T> {
             throw new AvroRuntimeException("Failed to write Stringable", e);
           }
           return;
-        }  
+        }
       }
     }
     super.writeField(record, f, out, state);

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectionUtil.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectionUtil.java b/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectionUtil.java
index 1457cdb..236de41 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectionUtil.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/reflect/ReflectionUtil.java
@@ -22,10 +22,10 @@ import org.apache.avro.AvroRuntimeException;
 /**
  * A few utility methods for using @link{java.misc.Unsafe}, mostly for private
  * use.
- * 
+ *
  * Use of Unsafe on Android is forbidden, as Android provides only a very
  * limited functionality for this class compared to the JDK version.
- * 
+ *
  */
 
 class ReflectionUtil {

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/specific/AvroGenerated.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/specific/AvroGenerated.java b/lang/java/avro/src/main/java/org/apache/avro/specific/AvroGenerated.java
index e57d27e..d040431 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/specific/AvroGenerated.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/specific/AvroGenerated.java
@@ -23,8 +23,8 @@ import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
 /**
- * Indicates that an annotated class is an Avro generated class. All Avro 
- * generated classes will be annotated with this annotation. 
+ * Indicates that an annotated class is an Avro generated class. All Avro
+ * generated classes will be annotated with this annotation.
  */
 @Target(ElementType.TYPE)
 @Retention(RetentionPolicy.RUNTIME)

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificData.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificData.java b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificData.java
index 647f823..ec2e33f 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificData.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificData.java
@@ -50,7 +50,7 @@ import org.apache.avro.io.BinaryDecoder;
 public class SpecificData extends GenericData {
 
   private static final SpecificData INSTANCE = new SpecificData();
-  
+
   private static final Class<?>[] NO_ARG = new Class[]{};
   private static final Class<?>[] SCHEMA_ARG = new Class[]{Schema.class};
   private static final Map<Class,Constructor> CTOR_CACHE =
@@ -101,7 +101,7 @@ public class SpecificData extends GenericData {
   public SpecificData(ClassLoader classLoader) {
     super(classLoader);
   }
-  
+
   @Override
   public DatumReader createDatumReader(Schema schema) {
     return new SpecificDatumReader(schema, schema, this);
@@ -293,7 +293,7 @@ public class SpecificData extends GenericData {
     return super.getSchemaName(datum);
   }
 
-  /** True iff a class should be serialized with toString(). */ 
+  /** True iff a class should be serialized with toString(). */
   protected boolean isStringable(Class<?> c) {
     return stringableClasses.contains(c);
   }
@@ -324,7 +324,7 @@ public class SpecificData extends GenericData {
       return super.compare(o1, o2, s, eq);
     }
   }
-  
+
   /** Create an instance of a class.  If the class implements {@link
    * SchemaConstructable}, call a constructor with a {@link
    * org.apache.avro.Schema} parameter, otherwise use a no-arg constructor. */
@@ -345,14 +345,14 @@ public class SpecificData extends GenericData {
     }
     return result;
   }
-  
+
   @Override
   public Object createFixed(Object old, Schema schema) {
     Class c = getClass(schema);
     if (c == null) return super.createFixed(old, schema); // punt to generic
     return c.isInstance(old) ? old : newInstance(c, schema);
   }
-  
+
   @Override
   public Object newRecord(Object old, Schema schema) {
     Class c = getClass(schema);

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificDatumReader.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificDatumReader.java b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificDatumReader.java
index ceffdd6..870d16f 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificDatumReader.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificDatumReader.java
@@ -79,7 +79,7 @@ public class SpecificDatumReader<T> extends GenericDatumReader<T> {
     case STRING:
       stringClass = getPropAsClass(schema, SpecificData.CLASS_PROP);
       break;
-    case MAP: 
+    case MAP:
       stringClass = getPropAsClass(schema, SpecificData.KEY_CLASS_PROP);
       break;
     }

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificDatumWriter.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificDatumWriter.java b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificDatumWriter.java
index 49dddbb..128b02e 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificDatumWriter.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificDatumWriter.java
@@ -32,19 +32,19 @@ public class SpecificDatumWriter<T> extends GenericDatumWriter<T> {
   public SpecificDatumWriter(Class<T> c) {
     super(SpecificData.get().getSchema(c), SpecificData.get());
   }
-  
+
   public SpecificDatumWriter(Schema schema) {
     super(schema, SpecificData.get());
   }
-  
+
   public SpecificDatumWriter(Schema root, SpecificData specificData) {
     super(root, specificData);
   }
-  
+
   protected SpecificDatumWriter(SpecificData specificData) {
     super(specificData);
   }
-  
+
   /** Returns the {@link SpecificData} implementation used by this writer. */
   public SpecificData getSpecificData() {
     return (SpecificData) getData();

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificErrorBuilderBase.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificErrorBuilderBase.java b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificErrorBuilderBase.java
index f95f42c..961f030 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificErrorBuilderBase.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificErrorBuilderBase.java
@@ -23,18 +23,18 @@ import org.apache.avro.Schema;
 import org.apache.avro.data.ErrorBuilder;
 import org.apache.avro.data.RecordBuilderBase;
 
-/** 
+/**
  * Abstract base class for specific ErrorBuilder implementations.
  * Not thread-safe.
  */
-abstract public class SpecificErrorBuilderBase<T extends SpecificExceptionBase> 
+abstract public class SpecificErrorBuilderBase<T extends SpecificExceptionBase>
   extends RecordBuilderBase<T> implements ErrorBuilder<T> {
   private Constructor<T> errorConstructor;
   private Object value;
   private boolean hasValue;
   private Throwable cause;
   private boolean hasCause;
-  
+
   /**
    * Creates a SpecificErrorBuilderBase for building errors of the given type.
    * @param schema the schema associated with the error class.
@@ -42,7 +42,7 @@ abstract public class SpecificErrorBuilderBase<T extends SpecificExceptionBase>
   protected SpecificErrorBuilderBase(Schema schema) {
     super(schema, SpecificData.get());
   }
-  
+
   /**
    * SpecificErrorBuilderBase copy constructor.
    * @param other SpecificErrorBuilderBase instance to copy.
@@ -55,19 +55,19 @@ abstract public class SpecificErrorBuilderBase<T extends SpecificExceptionBase>
     this.cause = other.cause;
     this.hasCause = other.hasCause;
   }
-  
+
   /**
    * Creates a SpecificErrorBuilderBase by copying an existing error instance.
    * @param other the error instance to copy.
    */
   protected SpecificErrorBuilderBase(T other) {
     super(other.getSchema(), SpecificData.get());
-    
+
     Object otherValue = other.getValue();
     if (otherValue != null) {
       setValue(otherValue);
     }
-    
+
     Throwable otherCause = other.getCause();
     if (otherCause != null) {
       setCause(otherCause);
@@ -85,12 +85,12 @@ abstract public class SpecificErrorBuilderBase<T extends SpecificExceptionBase>
     hasValue = true;
     return this;
   }
-  
+
   @Override
   public boolean hasValue() {
     return hasValue;
   }
-  
+
   @Override
   public SpecificErrorBuilderBase<T> clearValue() {
     value = null;
@@ -109,12 +109,12 @@ abstract public class SpecificErrorBuilderBase<T extends SpecificExceptionBase>
     hasCause = true;
     return this;
   }
-  
+
   @Override
   public boolean hasCause() {
     return hasCause;
   }
-  
+
   @Override
   public SpecificErrorBuilderBase<T> clearCause() {
     cause = null;

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificExceptionBase.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificExceptionBase.java b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificExceptionBase.java
index bf07e30..86d0a69 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificExceptionBase.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificExceptionBase.java
@@ -33,7 +33,7 @@ public abstract class SpecificExceptionBase extends AvroRemoteException
   public SpecificExceptionBase() {
     super();
   }
-  
+
   public SpecificExceptionBase(Throwable value) {
     super(value);
   }
@@ -41,7 +41,7 @@ public abstract class SpecificExceptionBase extends AvroRemoteException
   public SpecificExceptionBase(Object value) {
     super(value);
   }
-  
+
   public SpecificExceptionBase(Object value, Throwable cause) {
     super(value, cause);
   }

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificFixed.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificFixed.java b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificFixed.java
index 9ff9093..0802b0d 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificFixed.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificFixed.java
@@ -35,9 +35,9 @@ public abstract class SpecificFixed
   public SpecificFixed() {
     bytes(new byte[getSchema().getFixedSize()]);
   }
-  
+
   public SpecificFixed(byte[] bytes) {
-    bytes(bytes); 
+    bytes(bytes);
   }
 
   public void bytes(byte[] bytes) { this.bytes = bytes; }

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificRecordBase.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificRecordBase.java b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificRecordBase.java
index 51ee653..77d0928 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificRecordBase.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificRecordBase.java
@@ -51,7 +51,7 @@ public abstract class SpecificRecordBase
     if (this.getClass() != that.getClass()) return false; // not same schema
     return SpecificData.get().compare(this, that, this.getSchema(), true) == 0;
   }
-    
+
   @Override
   public int hashCode() {
     return SpecificData.get().hashCode(this, this.getSchema());

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificRecordBuilderBase.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificRecordBuilderBase.java b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificRecordBuilderBase.java
index d508dce..d157434 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificRecordBuilderBase.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/specific/SpecificRecordBuilderBase.java
@@ -24,9 +24,9 @@ import org.apache.avro.data.RecordBuilderBase;
  * Abstract base class for specific RecordBuilder implementations.
  * Not thread-safe.
  */
-abstract public class SpecificRecordBuilderBase<T extends SpecificRecord> 
+abstract public class SpecificRecordBuilderBase<T extends SpecificRecord>
   extends RecordBuilderBase<T> {
-  
+
   /**
    * Creates a SpecificRecordBuilderBase for building records of the given type.
    * @param schema the schema associated with the record class.
@@ -34,7 +34,7 @@ abstract public class SpecificRecordBuilderBase<T extends SpecificRecord>
   protected SpecificRecordBuilderBase(Schema schema) {
     super(schema, SpecificData.get());
   }
-  
+
   /**
    * SpecificRecordBuilderBase copy constructor.
    * @param other SpecificRecordBuilderBase instance to copy.
@@ -42,7 +42,7 @@ abstract public class SpecificRecordBuilderBase<T extends SpecificRecord>
   protected SpecificRecordBuilderBase(SpecificRecordBuilderBase<T> other) {
     super(other, SpecificData.get());
   }
-  
+
   /**
    * Creates a SpecificRecordBuilderBase by copying an existing record instance.
    * @param other the record instance to copy.

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/util/ByteBufferOutputStream.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/util/ByteBufferOutputStream.java b/lang/java/avro/src/main/java/org/apache/avro/util/ByteBufferOutputStream.java
index 2feb699..498a6d4 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/util/ByteBufferOutputStream.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/util/ByteBufferOutputStream.java
@@ -51,7 +51,7 @@ public class ByteBufferOutputStream extends OutputStream {
     }
     buffers.addAll(0, lists);
   }
-  
+
   /** Append a list of ByteBuffers to this stream. */
   public void append(List<ByteBuffer> lists) {
     for (ByteBuffer buffer: lists) {
@@ -59,7 +59,7 @@ public class ByteBufferOutputStream extends OutputStream {
     }
     buffers.addAll(lists);
   }
-  
+
   public void reset() {
     buffers = new LinkedList<ByteBuffer>();
     buffers.add(ByteBuffer.allocate(BUFFER_SIZE));

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/util/Utf8.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/util/Utf8.java b/lang/java/avro/src/main/java/org/apache/avro/util/Utf8.java
index 061d160..27d11a3 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/util/Utf8.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/util/Utf8.java
@@ -40,7 +40,7 @@ public class Utf8 implements Comparable<Utf8>, CharSequence {
     this.length = bytes.length;
     this.string = string;
   }
-  
+
   public Utf8(Utf8 other) {
     this.length = other.length;
     this.bytes = new byte[other.length];

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/main/java/org/apache/avro/util/WeakIdentityHashMap.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/main/java/org/apache/avro/util/WeakIdentityHashMap.java b/lang/java/avro/src/main/java/org/apache/avro/util/WeakIdentityHashMap.java
index d65227c..a22708a 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/util/WeakIdentityHashMap.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/util/WeakIdentityHashMap.java
@@ -31,14 +31,14 @@ import java.util.Set;
  * Implements a combination of WeakHashMap and IdentityHashMap.
  * Useful for caches that need to key off of a == comparison
  * instead of a .equals.
- * 
+ *
  * <b>
  * This class is not a general-purpose Map implementation! While
  * this class implements the Map interface, it intentionally violates
  * Map's general contract, which mandates the use of the equals method
  * when comparing objects. This class is designed for use only in the
  * rare cases wherein reference-equality semantics are required.
- * 
+ *
  * Note that this implementation is not synchronized.
  * </b>
  */
@@ -144,7 +144,7 @@ public class WeakIdentityHashMap<K, V> implements Map<K, V> {
 
   class IdentityWeakReference extends WeakReference<K> {
     int hash;
-        
+
     @SuppressWarnings("unchecked")
       IdentityWeakReference(Object obj) {
       super((K)obj, queue);

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/AvroTestUtil.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/AvroTestUtil.java b/lang/java/avro/src/test/java/org/apache/avro/AvroTestUtil.java
index e920e46..c1d2df6 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/AvroTestUtil.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/AvroTestUtil.java
@@ -26,11 +26,11 @@ public class AvroTestUtil {
   private AvroTestUtil() {
   }
 
-  /** 
+  /**
    * Create a temporary file in a test-appropriate directory.
-   * 
+   *
    * @param testClass The test case class requesting the file creation
-   * @param name The name of the file to be created 
+   * @param name The name of the file to be created
    */
   public static File tempFile(Class testClass, String name) {
     File testClassDir = new File(TMPDIR, testClass.getName());
@@ -38,11 +38,11 @@ public class AvroTestUtil {
     return new File(testClassDir, name);
   }
 
-  /** 
+  /**
    * Create a temporary directory in a test-appropriate directory.
-   * 
+   *
    * @param testClass The test case class requesting the directory creation
-   * @param name The name of the directory to be created  
+   * @param name The name of the directory to be created
    */
   public static File tempDirectory(Class testClass, String name) {
     File tmpFile = tempFile(testClass, name);

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/FooBarSpecificRecord.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/FooBarSpecificRecord.java b/lang/java/avro/src/test/java/org/apache/avro/FooBarSpecificRecord.java
index d0846f1..babcd36 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/FooBarSpecificRecord.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/FooBarSpecificRecord.java
@@ -1,6 +1,6 @@
 /**
  * Autogenerated by Avro
- * 
+ *
  * DO NOT EDIT DIRECTLY
  *
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,7 +19,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.avro;  
+package org.apache.avro;
 @SuppressWarnings("all")
 @org.apache.avro.specific.AvroGenerated
 public class FooBarSpecificRecord extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
@@ -35,7 +35,7 @@ public class FooBarSpecificRecord extends org.apache.avro.specific.SpecificRecor
   /**
    * Default constructor.  Note that this does not initialize fields
    * to their default values from the schema.  If that is desired then
-   * one should use <code>newBuilder()</code>. 
+   * one should use <code>newBuilder()</code>.
    */
   public FooBarSpecificRecord() {}
 
@@ -51,7 +51,7 @@ public class FooBarSpecificRecord extends org.apache.avro.specific.SpecificRecor
   }
 
   public org.apache.avro.Schema getSchema() { return SCHEMA$; }
-  // Used by DatumWriter.  Applications should not call. 
+  // Used by DatumWriter.  Applications should not call.
   public java.lang.Object get(int field$) {
     switch (field$) {
     case 0: return id;
@@ -62,7 +62,7 @@ public class FooBarSpecificRecord extends org.apache.avro.specific.SpecificRecor
     default: throw new org.apache.avro.AvroRuntimeException("Bad index");
     }
   }
-  // Used by DatumReader.  Applications should not call. 
+  // Used by DatumReader.  Applications should not call.
   @SuppressWarnings(value="unchecked")
   public void put(int field$, java.lang.Object value$) {
     switch (field$) {
@@ -154,17 +154,17 @@ public class FooBarSpecificRecord extends org.apache.avro.specific.SpecificRecor
   public static org.apache.avro.FooBarSpecificRecord.Builder newBuilder() {
     return new org.apache.avro.FooBarSpecificRecord.Builder();
   }
-  
+
   /** Creates a new FooBarSpecificRecord RecordBuilder by copying an existing Builder */
   public static org.apache.avro.FooBarSpecificRecord.Builder newBuilder(org.apache.avro.FooBarSpecificRecord.Builder other) {
     return new org.apache.avro.FooBarSpecificRecord.Builder(other);
   }
-  
+
   /** Creates a new FooBarSpecificRecord RecordBuilder by copying an existing FooBarSpecificRecord instance */
   public static org.apache.avro.FooBarSpecificRecord.Builder newBuilder(org.apache.avro.FooBarSpecificRecord other) {
     return new org.apache.avro.FooBarSpecificRecord.Builder(other);
   }
-  
+
   /**
    * RecordBuilder for FooBarSpecificRecord instances.
    */
@@ -181,7 +181,7 @@ public class FooBarSpecificRecord extends org.apache.avro.specific.SpecificRecor
     private Builder() {
       super(org.apache.avro.FooBarSpecificRecord.SCHEMA$);
     }
-    
+
     /** Creates a Builder by copying an existing Builder */
     private Builder(org.apache.avro.FooBarSpecificRecord.Builder other) {
       super(other);
@@ -206,7 +206,7 @@ public class FooBarSpecificRecord extends org.apache.avro.specific.SpecificRecor
         fieldSetFlags()[4] = true;
       }
     }
-    
+
     /** Creates a Builder by copying an existing FooBarSpecificRecord instance */
     private Builder(org.apache.avro.FooBarSpecificRecord other) {
             super(org.apache.avro.FooBarSpecificRecord.SCHEMA$);
@@ -236,20 +236,20 @@ public class FooBarSpecificRecord extends org.apache.avro.specific.SpecificRecor
     public java.lang.Integer getId() {
       return id;
     }
-    
+
     /** Sets the value of the 'id' field */
     public org.apache.avro.FooBarSpecificRecord.Builder setId(int value) {
       validate(fields()[0], value);
       this.id = value;
       fieldSetFlags()[0] = true;
-      return this; 
+      return this;
     }
-    
+
     /** Checks whether the 'id' field has been set */
     public boolean hasId() {
       return fieldSetFlags()[0];
     }
-    
+
     /** Clears the value of the 'id' field */
     public org.apache.avro.FooBarSpecificRecord.Builder clearId() {
       fieldSetFlags()[0] = false;
@@ -260,20 +260,20 @@ public class FooBarSpecificRecord extends org.apache.avro.specific.SpecificRecor
     public java.lang.String getName() {
       return name;
     }
-    
+
     /** Sets the value of the 'name' field */
     public org.apache.avro.FooBarSpecificRecord.Builder setName(java.lang.String value) {
       validate(fields()[1], value);
       this.name = value;
       fieldSetFlags()[1] = true;
-      return this; 
+      return this;
     }
-    
+
     /** Checks whether the 'name' field has been set */
     public boolean hasName() {
       return fieldSetFlags()[1];
     }
-    
+
     /** Clears the value of the 'name' field */
     public org.apache.avro.FooBarSpecificRecord.Builder clearName() {
       name = null;
@@ -285,20 +285,20 @@ public class FooBarSpecificRecord extends org.apache.avro.specific.SpecificRecor
     public java.util.List<java.lang.String> getNicknames() {
       return nicknames;
     }
-    
+
     /** Sets the value of the 'nicknames' field */
     public org.apache.avro.FooBarSpecificRecord.Builder setNicknames(java.util.List<java.lang.String> value) {
       validate(fields()[2], value);
       this.nicknames = value;
       fieldSetFlags()[2] = true;
-      return this; 
+      return this;
     }
-    
+
     /** Checks whether the 'nicknames' field has been set */
     public boolean hasNicknames() {
       return fieldSetFlags()[2];
     }
-    
+
     /** Clears the value of the 'nicknames' field */
     public org.apache.avro.FooBarSpecificRecord.Builder clearNicknames() {
       nicknames = null;
@@ -310,20 +310,20 @@ public class FooBarSpecificRecord extends org.apache.avro.specific.SpecificRecor
     public java.util.List<java.lang.Integer> getRelatedids() {
       return relatedids;
     }
-    
+
     /** Sets the value of the 'relatedids' field */
     public org.apache.avro.FooBarSpecificRecord.Builder setRelatedids(java.util.List<java.lang.Integer> value) {
       validate(fields()[3], value);
       this.relatedids = value;
       fieldSetFlags()[3] = true;
-      return this; 
+      return this;
     }
-    
+
     /** Checks whether the 'relatedids' field has been set */
     public boolean hasRelatedids() {
       return fieldSetFlags()[3];
     }
-    
+
     /** Clears the value of the 'relatedids' field */
     public org.apache.avro.FooBarSpecificRecord.Builder clearRelatedids() {
       relatedids = null;
@@ -335,20 +335,20 @@ public class FooBarSpecificRecord extends org.apache.avro.specific.SpecificRecor
     public org.apache.avro.TypeEnum getTypeEnum() {
       return typeEnum;
     }
-    
+
     /** Sets the value of the 'typeEnum' field */
     public org.apache.avro.FooBarSpecificRecord.Builder setTypeEnum(org.apache.avro.TypeEnum value) {
       validate(fields()[4], value);
       this.typeEnum = value;
       fieldSetFlags()[4] = true;
-      return this; 
+      return this;
     }
-    
+
     /** Checks whether the 'typeEnum' field has been set */
     public boolean hasTypeEnum() {
       return fieldSetFlags()[4];
     }
-    
+
     /** Clears the value of the 'typeEnum' field */
     public org.apache.avro.FooBarSpecificRecord.Builder clearTypeEnum() {
       typeEnum = null;
@@ -373,7 +373,7 @@ public class FooBarSpecificRecord extends org.apache.avro.specific.SpecificRecor
   }
 
   private static final org.apache.avro.io.DatumWriter
-    WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);  
+    WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);
 
   @Override public void writeExternal(java.io.ObjectOutput out)
     throws java.io.IOException {
@@ -381,7 +381,7 @@ public class FooBarSpecificRecord extends org.apache.avro.specific.SpecificRecor
   }
 
   private static final org.apache.avro.io.DatumReader
-    READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);  
+    READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);
 
   @Override public void readExternal(java.io.ObjectInput in)
     throws java.io.IOException {

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/GenerateBlockingData.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/GenerateBlockingData.java b/lang/java/avro/src/test/java/org/apache/avro/GenerateBlockingData.java
index 72a632b..1e9f895 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/GenerateBlockingData.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/GenerateBlockingData.java
@@ -39,7 +39,7 @@ public class GenerateBlockingData {
   private static final int SYNC_INTERVAL = 1000;
   private static ByteArrayOutputStream buffer =
                       new ByteArrayOutputStream(2*SYNC_INTERVAL);
-  
+
   private static EncoderFactory factory = EncoderFactory.get();
   private static Encoder bufOut = EncoderFactory.get().blockingBinaryEncoder(
       buffer, null);
@@ -53,24 +53,24 @@ public class GenerateBlockingData {
     buffer.reset();
     blockCount = 0;
   }
-  
+
   public static void main(String[] args) throws Exception {
     if(args.length != 3) {
       System.out.println(
           "Usage: GenerateBlockingData <schemafile> <outputfile> <count>");
       System.exit(-1);
     }
-    
+
     Schema sch = Schema.parse(new File(args[0]));
     File outputFile = new File(args[1]);
     int numObjects = Integer.parseInt(args[2]);
-    
+
     FileOutputStream out = new FileOutputStream(outputFile, false);
     DatumWriter<Object> dout = new GenericDatumWriter<Object>();
     dout.setSchema(sch);
     Encoder vout = factory.directBinaryEncoder(out, null);
     vout.writeLong(numObjects); // metadata:the count of objects in the file
-    
+
     for (Object datum : new RandomData(sch, numObjects)) {
       dout.write(datum, bufOut);
       blockCount++;

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/RandomData.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/RandomData.java b/lang/java/avro/src/test/java/org/apache/avro/RandomData.java
index c92a980..2dad518 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/RandomData.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/RandomData.java
@@ -48,7 +48,7 @@ public class RandomData implements Iterable<Object> {
     this.seed = seed;
     this.count = count;
   }
-  
+
   public Iterator<Object> iterator() {
     return new Iterator<Object>() {
       private int n;
@@ -61,7 +61,7 @@ public class RandomData implements Iterable<Object> {
       public void remove() { throw new UnsupportedOperationException(); }
     };
   }
-  
+
   @SuppressWarnings(value="unchecked")
   private static Object generate(Schema schema, Random random, int d) {
     switch (schema.getType()) {

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/TestDataFile.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/TestDataFile.java b/lang/java/avro/src/test/java/org/apache/avro/TestDataFile.java
index 21c99d8..e067496 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/TestDataFile.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/TestDataFile.java
@@ -252,7 +252,7 @@ public class TestDataFile {
     } finally {
       reader.close();
     }
-  }  
+  }
 
   public void testReadWithHeader() throws IOException {
     File file = makeFile();

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/TestDataFileConcat.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/TestDataFileConcat.java b/lang/java/avro/src/test/java/org/apache/avro/TestDataFileConcat.java
index e806857..b30c7b1 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/TestDataFileConcat.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/TestDataFileConcat.java
@@ -48,7 +48,7 @@ public class TestDataFileConcat {
     this.codec = codec;
     this.codec2 = codec2;
     this.recompress = recompress;
-    LOG.info("Testing concatenating files, " + codec2 + " into " + codec + 
+    LOG.info("Testing concatenating files, " + codec2 + " into " + codec +
         " with recompress=" + recompress);
   }
 
@@ -134,7 +134,7 @@ public class TestDataFileConcat {
       } finally {
         writer2.close();
       }
-      DataFileWriter<Object> concatinto = 
+      DataFileWriter<Object> concatinto =
         new DataFileWriter<Object>(new GenericDatumWriter<Object>())
         .setSyncInterval(syncInterval);
       concatinto.appendTo(file1);
@@ -180,5 +180,5 @@ public class TestDataFileConcat {
 
     }
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/TestDataFileCustomSync.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/TestDataFileCustomSync.java b/lang/java/avro/src/test/java/org/apache/avro/TestDataFileCustomSync.java
index 9270e8c..e3f3791 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/TestDataFileCustomSync.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/TestDataFileCustomSync.java
@@ -64,7 +64,7 @@ public class TestDataFileCustomSync {
     } catch (NoSuchAlgorithmException e) {
       throw new RuntimeException(e);
     }
-  }  
+  }
 
   @Test(expected = IOException.class)
   public void testInvalidSync() throws IOException {

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/TestProtocol.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/TestProtocol.java b/lang/java/avro/src/test/java/org/apache/avro/TestProtocol.java
index 007c273..295ee38 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/TestProtocol.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/TestProtocol.java
@@ -32,19 +32,19 @@ public class TestProtocol {
     p2.addProp("a","2");
     assertFalse(p1.equals(p2));
   }
-  
+
   @Test
   public void testSplitProtocolBuild() {
     Protocol p = new Protocol("P", null, "foo");
     p.addProp("property", "some value");
-     
+
     String protocolString = p.toString();
     final int mid = protocolString.length() / 2;
     String[] parts = {
       protocolString.substring(0, mid),
       protocolString.substring(mid),
-    }; 
-    
+    };
+
     Protocol parsedStringProtocol = org.apache.avro.Protocol.parse(protocolString);
     Protocol parsedArrayOfStringProtocol =
       org.apache.avro.Protocol.parse(protocolString.substring(0, mid),

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/TestSchema.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/TestSchema.java b/lang/java/avro/src/test/java/org/apache/avro/TestSchema.java
index ba2cab4..242ee8c 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/TestSchema.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/TestSchema.java
@@ -29,7 +29,7 @@ import org.apache.avro.Schema.Field;
 import org.apache.avro.Schema.Type;
 import org.junit.Test;
 
-public class TestSchema {  
+public class TestSchema {
   @Test
   public void testSplitSchemaBuild() {
     Schema s = SchemaBuilder
@@ -38,10 +38,10 @@ public class TestSchema {
          .name("clientProtocol").type().optional().stringType()
          .name("meta").type().optional().map().values().bytesType()
          .endRecord();
-    
+
     String schemaString = s.toString();
     final int mid = schemaString.length() / 2;
-    
+
     Schema parsedStringSchema = new org.apache.avro.Schema.Parser().parse(s.toString());
     Schema parsedArrayOfStringSchema =
       new org.apache.avro.Schema.Parser().parse

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/TestSchemaBuilder.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/TestSchemaBuilder.java b/lang/java/avro/src/test/java/org/apache/avro/TestSchemaBuilder.java
index 58a1a6f..70dc1e5 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/TestSchemaBuilder.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/TestSchemaBuilder.java
@@ -72,13 +72,13 @@ public class TestSchemaBuilder {
     Assert.assertEquals(new Schema.Field("f2", optional, null, true),
         fields.get(2));
   }
-  
+
   @Test
   public void testDoc() {
     Schema s = SchemaBuilder.fixed("myfixed").doc("mydoc").size(1);
     Assert.assertEquals("mydoc", s.getDoc());
   }
-  
+
   @Test
   public void testProps() {
     Schema s = SchemaBuilder.builder().intBuilder()
@@ -113,7 +113,7 @@ public class TestSchemaBuilder {
       .fields()
         .name("myint").type().intType().noDefault()
         .endRecord();
-    
+
     Assert.assertEquals("myrecord", s1.getName());
     Assert.assertEquals("myrecord", s2.getName());
     Assert.assertEquals("myrecord", s3.getName());
@@ -137,7 +137,7 @@ public class TestSchemaBuilder {
         .name("f0").type().stringType().noDefault()
         .endRecord();
   }
-  
+
   @Test
   public void testBoolean() {
     Schema.Type type = Schema.Type.BOOLEAN;
@@ -147,7 +147,7 @@ public class TestSchemaBuilder {
         .booleanBuilder().prop("p", "v").endBoolean();
     Assert.assertEquals(expected, built1);
   }
-  
+
   @Test
   public void testInt() {
     Schema.Type type = Schema.Type.INT;
@@ -157,7 +157,7 @@ public class TestSchemaBuilder {
         .intBuilder().prop("p", "v").endInt();
     Assert.assertEquals(expected, built1);
   }
-  
+
   @Test
   public void testLong() {
     Schema.Type type = Schema.Type.LONG;
@@ -167,7 +167,7 @@ public class TestSchemaBuilder {
         .longBuilder().prop("p", "v").endLong();
     Assert.assertEquals(expected, built1);
   }
-  
+
   @Test
   public void testFloat() {
     Schema.Type type = Schema.Type.FLOAT;
@@ -177,7 +177,7 @@ public class TestSchemaBuilder {
         .floatBuilder().prop("p", "v").endFloat();
     Assert.assertEquals(expected, built1);
   }
-  
+
   @Test
   public void testDuble() {
     Schema.Type type = Schema.Type.DOUBLE;
@@ -187,7 +187,7 @@ public class TestSchemaBuilder {
         .doubleBuilder().prop("p", "v").endDouble();
     Assert.assertEquals(expected, built1);
   }
-  
+
   @Test
   public void testString() {
     Schema.Type type = Schema.Type.STRING;
@@ -197,7 +197,7 @@ public class TestSchemaBuilder {
         .stringBuilder().prop("p", "v").endString();
     Assert.assertEquals(expected, built1);
   }
-  
+
   @Test
   public void testBytes() {
     Schema.Type type = Schema.Type.BYTES;
@@ -207,7 +207,7 @@ public class TestSchemaBuilder {
         .bytesBuilder().prop("p", "v").endBytes();
     Assert.assertEquals(expected, built1);
   }
-  
+
   @Test
   public void testNull() {
     Schema.Type type = Schema.Type.NULL;
@@ -218,7 +218,7 @@ public class TestSchemaBuilder {
     Assert.assertEquals(expected, built1);
   }
 
-  
+
   private Schema primitive(Schema.Type type, Schema bare) {
     // test creation of bare schema by name
     Schema bareByName = SchemaBuilder.builder().type(type.getName());
@@ -229,7 +229,7 @@ public class TestSchemaBuilder {
     p.addProp("p", "v");
     return p;
   }
-  
+
 
 //  @Test
 //  public void testError() {
@@ -328,16 +328,16 @@ public class TestSchemaBuilder {
     types.add(Schema.create(Schema.Type.LONG));
     types.add(Schema.create(Schema.Type.NULL));
     Schema expected = Schema.createUnion(types);
-    
+
     Schema schema = SchemaBuilder.unionOf()
         .longType().and()
         .nullType().endUnion();
     Assert.assertEquals(expected, schema);
-    
+
     schema = SchemaBuilder.nullable().longType();
     Assert.assertEquals(expected, schema);
   }
-  
+
   @Test
   public void testFields() {
     Schema rec = SchemaBuilder.record("Rec").fields()
@@ -353,7 +353,7 @@ public class TestSchemaBuilder {
     Assert.assertEquals(Order.IGNORE, rec.getField("ignored").order());
     Assert.assertTrue(rec.getField("aliased").aliases().contains("anAlias"));
   }
-  
+
   @Test
   public void testFieldShortcuts() {
     Schema full = SchemaBuilder.record("Blah").fields()
@@ -379,7 +379,7 @@ public class TestSchemaBuilder {
         .name("obytes").type().optional().bytesType()
         .name("nbytes").type().nullable().bytesType().bytesDefault(new byte[] {1,2,3})
         .endRecord();
-    
+
     Schema shortcut = SchemaBuilder.record("Blah").fields()
         .requiredBoolean("rbool")
         .optionalBoolean("obool")
@@ -403,10 +403,10 @@ public class TestSchemaBuilder {
         .optionalBytes("obytes")
         .nullableBytes("nbytes", new byte[] {1,2,3})
         .endRecord();
-    
+
     Assert.assertEquals(full, shortcut);
   }
-  
+
   @Test
   public void testNames() {
     // no contextual namespace
@@ -425,11 +425,11 @@ public class TestSchemaBuilder {
     checkField(r, expected, "f3");
     checkField(r, expected, "f4");
     checkField(r, expected, "f5");
-    
+
     // context namespace
     Schema f = SchemaBuilder.builder("").fixed("Foo").size(1);
     Assert.assertEquals(Schema.createFixed("Foo", null, null, 1), f);
-   
+
     // context namespace from record matches
     r = SchemaBuilder.record("Rec").namespace("org.foo").fields()
         .name("f0").type().fixed("MyFixed").size(1).noDefault()
@@ -465,7 +465,7 @@ public class TestSchemaBuilder {
     checkField(r, expected, "f3");
     checkField(r, expected, "f4");
     checkField(r, expected, "f5");
-    
+
     // context namespace from record, nested has no namespace
     expected = Schema.createFixed("MyFixed", null, null, 1);
     r = SchemaBuilder.record("Rec").namespace("org.rec").fields()
@@ -474,18 +474,18 @@ public class TestSchemaBuilder {
         .endRecord();
     checkField(r, expected, "f0");
     checkField(r, expected, "f1");
-    
+
     // mimic names of primitives, but with a namesapce.  This is OK
     SchemaBuilder.fixed("org.test.long").size(1);
     SchemaBuilder.fixed("long").namespace("org.test").size(1);
     SchemaBuilder.builder("org.test").fixed("long").size(1);
 
   }
-  
+
   private void checkField(Schema r, Schema expected, String name) {
     Assert.assertEquals(expected, r.getField(name).schema());
   }
-  
+
   @Test(expected=SchemaParseException.class)
   public void testNamesFailRedefined() {
     SchemaBuilder.record("Rec").fields()
@@ -498,12 +498,12 @@ public class TestSchemaBuilder {
   public void testNamesFailAbsent() {
     SchemaBuilder.builder().type("notdefined");
   }
-  
+
   @Test(expected=AvroTypeException.class)
   public void testNameReserved() {
     SchemaBuilder.fixed("long").namespace("").size(1);
   }
-  
+
   @Test
   public void testFieldTypesAndDefaultValues() {
     byte[] bytedef = new byte[]{3};
@@ -513,21 +513,21 @@ public class TestSchemaBuilder {
     mapdef.put("a", "A");
     ArrayList<String> arrdef = new ArrayList<String>();
     arrdef.add("arr");
-    
+
     Schema rec = SchemaBuilder.record("inner").fields()
       .name("f").type().intType().noDefault()
       .endRecord();
-    
+
     Schema rec2 = SchemaBuilder.record("inner2").fields()
       .name("f2").type().intType().noDefault()
       .endRecord();
-    
-    GenericData.Record recdef = 
+
+    GenericData.Record recdef =
         new GenericRecordBuilder(rec).set("f", 1).build();
-        
+
     GenericData.Record recdef2 =
         new GenericRecordBuilder(rec2).set("f2", 2).build();
-    
+
     Schema r = SchemaBuilder.record("r").fields()
       .name("boolF").type().booleanType().booleanDefault(false)
       .name("intF").type().intType().intDefault(1)
@@ -580,10 +580,10 @@ public class TestSchemaBuilder {
         .name("f2").type().intType().noDefault()
         .endRecord().and().intType().endUnion().recordDefault(recdef2)
       .endRecord();
-    
+
     GenericData.Record newRec =
         new GenericRecordBuilder(r).build();
-    
+
     Assert.assertEquals(false, newRec.get("boolF"));
     Assert.assertEquals(false, newRec.get("boolU"));
     Assert.assertEquals(1, newRec.get("intF"));
@@ -602,18 +602,18 @@ public class TestSchemaBuilder {
     Assert.assertEquals(bufdef, newRec.get("bytesU"));
     Assert.assertNull(newRec.get("nullF"));
     Assert.assertNull(newRec.get("nullU"));
-    Assert.assertArrayEquals(bytedef, 
+    Assert.assertArrayEquals(bytedef,
         ((GenericData.Fixed)newRec.get("fixedF1")).bytes());
-    Assert.assertArrayEquals(bytedef, 
+    Assert.assertArrayEquals(bytedef,
         ((GenericData.Fixed)newRec.get("fixedF2")).bytes());
-    Assert.assertArrayEquals(bytedef, 
+    Assert.assertArrayEquals(bytedef,
         ((GenericData.Fixed)newRec.get("fixedF3")).bytes());
-    Assert.assertArrayEquals(bytedef, 
+    Assert.assertArrayEquals(bytedef,
         ((GenericData.Fixed)newRec.get("fixedU")).bytes());
     Assert.assertEquals("S", newRec.get("enumF").toString());
     Assert.assertEquals("SS", newRec.get("enumU").toString());
     @SuppressWarnings("unchecked")
-    Map<CharSequence, CharSequence> map = 
+    Map<CharSequence, CharSequence> map =
       (Map<CharSequence, CharSequence>) newRec.get("mapF");
     Assert.assertEquals(mapdef.size(), map.size());
     for(Map.Entry<CharSequence, CharSequence> e : map.entrySet()) {
@@ -622,7 +622,7 @@ public class TestSchemaBuilder {
     }
     Assert.assertEquals(newRec.get("mapF"), newRec.get("mapU"));
     @SuppressWarnings("unchecked")
-    GenericData.Array<CharSequence> arr = 
+    GenericData.Array<CharSequence> arr =
       (GenericData.Array<CharSequence>) newRec.get("arrayF");
     Assert.assertEquals(arrdef.size(), arr.size());
     for(CharSequence c : arr) {
@@ -633,15 +633,15 @@ public class TestSchemaBuilder {
     Assert.assertEquals(recdef2, newRec.get("recordU"));
     Assert.assertEquals("S", newRec.get("byName").toString());
   }
-  
+
   @Test(expected=SchemaBuilderException.class)
   public void testBadDefault() {
     SchemaBuilder.record("r").fields()
       .name("f").type(Schema.create(Schema.Type.INT)).withDefault(new Object())
       .endRecord();
   }
-  
-  @Test 
+
+  @Test
   public void testUnionFieldBuild() {
     SchemaBuilder.record("r").fields()
       .name("allUnion").type().unionOf()

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/TestSchemaNormalization.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/TestSchemaNormalization.java b/lang/java/avro/src/test/java/org/apache/avro/TestSchemaNormalization.java
index f8c0413..cb8a6d7 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/TestSchemaNormalization.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/TestSchemaNormalization.java
@@ -111,7 +111,7 @@ public class TestSchemaNormalization {
                            s.getBytes("UTF-8"));
       return altExtend(SchemaNormalization.EMPTY64, 64, tmp, POSTFIX);
     } catch (java.io.UnsupportedEncodingException e)
-      { throw new RuntimeException(e); } 
+      { throw new RuntimeException(e); }
   }
 
   private static long altExtend(long poly, int degree, long fp, byte[] b) {

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/TypeEnum.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/TypeEnum.java b/lang/java/avro/src/test/java/org/apache/avro/TypeEnum.java
index 3cff7fe..de91bb3 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/TypeEnum.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/TypeEnum.java
@@ -1,6 +1,6 @@
 /**
  * Autogenerated by Avro
- * 
+ *
  * DO NOT EDIT DIRECTLY
  *
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,10 +19,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.avro;  
+package org.apache.avro;
 @SuppressWarnings("all")
 @org.apache.avro.specific.AvroGenerated
-public enum TypeEnum { 
+public enum TypeEnum {
   a, b, c  ;
   public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"enum\",\"name\":\"TypeEnum\",\"namespace\":\"org.apache.avro\",\"symbols\":[\"a\",\"b\",\"c\"]}");
   public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/data/RecordBuilderBaseTest.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/data/RecordBuilderBaseTest.java b/lang/java/avro/src/test/java/org/apache/avro/data/RecordBuilderBaseTest.java
index c3f236a..0a47e73 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/data/RecordBuilderBaseTest.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/data/RecordBuilderBaseTest.java
@@ -34,57 +34,57 @@ import org.junit.Test;
 public class RecordBuilderBaseTest {
   private static Set<Type> primitives;
   private static Set<Type> nonNullPrimitives;
-  
+
   @BeforeClass()
   public static void setUpBeforeClass() {
     primitives = new HashSet<Type>(Arrays.asList(Type.values()));
-    primitives.removeAll(Arrays.asList(new Type[] { 
-        Type.RECORD, Type.ENUM, Type.ARRAY, Type.MAP, Type.UNION, Type.FIXED 
+    primitives.removeAll(Arrays.asList(new Type[] {
+        Type.RECORD, Type.ENUM, Type.ARRAY, Type.MAP, Type.UNION, Type.FIXED
     }));
-    
+
     nonNullPrimitives = new HashSet<Type>(primitives);
     nonNullPrimitives.remove(Type.NULL);
   }
-  
+
   @Test
-  public void testIsValidValueWithPrimitives() { 
+  public void testIsValidValueWithPrimitives() {
     // Verify that a non-null value is valid for all primitives:
     for (Type type : primitives) {
       Field f = new Field("f", Schema.create(type), null, null);
       Assert.assertTrue(RecordBuilderBase.isValidValue(f, new Object()));
     }
-    
+
     // Verify that null is not valid for all non-null primitives:
     for (Type type : nonNullPrimitives) {
       Field f = new Field("f", Schema.create(type), null, null);
       Assert.assertFalse(RecordBuilderBase.isValidValue(f, null));
     }
   }
-  
+
   @Test
   public void testIsValidValueWithNullField() {
     // Verify that null is a valid value for null fields:
     Assert.assertTrue(RecordBuilderBase.isValidValue(
         new Field("f", Schema.create(Type.NULL), null, null), null));
   }
-  
+
   @Test
   public void testIsValidValueWithUnion() {
     // Verify that null values are not valid for a union with no null type:
-    Schema unionWithoutNull = Schema.createUnion(Arrays.asList(new Schema[] { 
+    Schema unionWithoutNull = Schema.createUnion(Arrays.asList(new Schema[] {
         Schema.create(Type.STRING), Schema.create(Type.BOOLEAN)
     }));
-    
+
     Assert.assertTrue(RecordBuilderBase.isValidValue(
         new Field("f", unionWithoutNull, null, null), new Object()));
     Assert.assertFalse(RecordBuilderBase.isValidValue(
         new Field("f", unionWithoutNull, null, null), null));
-    
+
     // Verify that null values are valid for a union with a null type:
-    Schema unionWithNull = Schema.createUnion(Arrays.asList(new Schema[] { 
+    Schema unionWithNull = Schema.createUnion(Arrays.asList(new Schema[] {
         Schema.create(Type.STRING), Schema.create(Type.NULL)
     }));
-    
+
     Assert.assertTrue(RecordBuilderBase.isValidValue(
         new Field("f", unionWithNull, null, null), new Object()));
     Assert.assertTrue(RecordBuilderBase.isValidValue(

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/file/TestBZip2Codec.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/file/TestBZip2Codec.java b/lang/java/avro/src/test/java/org/apache/avro/file/TestBZip2Codec.java
index febcaef..2a9cad2 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/file/TestBZip2Codec.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/file/TestBZip2Codec.java
@@ -24,39 +24,39 @@ import org.junit.Test;
 import static org.junit.Assert.assertTrue;
 
 public class TestBZip2Codec {
-  
+
   @Test
   public void testBZip2CompressionAndDecompression() throws IOException {
     Codec codec = CodecFactory.fromString("bzip2").createInstance();
     assertTrue(codec instanceof BZip2Codec);
     assertTrue(codec.getName().equals("bzip2"));
-    
+
     //This is 3 times the byte buffer on the BZip2 decompress plus some extra
     final int inputByteSize = BZip2Codec.DEFAULT_BUFFER_SIZE * 3 + 42;
-    
+
     byte[] inputByteArray = new byte[inputByteSize];
-    
+
     //Generate something that will compress well
     for (int i = 0; i < inputByteSize; i++) {
       inputByteArray[i] = (byte)(65 + i % 10);
     }
-    
+
     ByteBuffer inputByteBuffer = ByteBuffer.allocate(inputByteSize * 2);
     inputByteBuffer.put(inputByteArray);
-    
+
     ByteBuffer compressedBuffer = codec.compress(inputByteBuffer);
-    
+
     //Make sure something returned
     assertTrue(compressedBuffer.array().length > 0);
     //Make sure the compressed output is smaller then the original
     assertTrue(compressedBuffer.array().length < inputByteArray.length);
-    
+
     ByteBuffer decompressedBuffer = codec.decompress(compressedBuffer);
-    
+
     //The original array should be the same length as the decompressed array
     assertTrue(decompressedBuffer.array().length == inputByteArray.length);
-    
-    //Every byte in the outputByteArray should equal every byte in the input array 
+
+    //Every byte in the outputByteArray should equal every byte in the input array
     byte[] outputByteArray = decompressedBuffer.array();
     for (int i = 0; i < inputByteSize; i++) {
       inputByteArray[i] = outputByteArray[i];

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericData.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericData.java b/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericData.java
index b8b59e2..7b33971 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericData.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericData.java
@@ -47,12 +47,12 @@ import org.codehaus.jackson.map.ObjectMapper;
 import org.junit.Test;
 
 public class TestGenericData {
-  
+
   @Test(expected=AvroRuntimeException.class)
     public void testrecordConstructorNullSchema() throws Exception {
     new GenericData.Record(null);
   }
-    
+
   @Test(expected=AvroRuntimeException.class)
     public void testrecordConstructorWrongSchema() throws Exception {
     new GenericData.Record(Schema.create(Schema.Type.INT));
@@ -62,7 +62,7 @@ public class TestGenericData {
     public void testArrayConstructorNullSchema() throws Exception {
     new GenericData.Array<Object>(1, null);
   }
-    
+
   @Test(expected=AvroRuntimeException.class)
     public void testArrayConstructorWrongSchema() throws Exception {
     new GenericData.Array<Object>(1, Schema.create(Schema.Type.INT));
@@ -95,7 +95,7 @@ public class TestGenericData {
     Record r = new GenericData.Record(s);
     r.put("invalidFieldName", "someValue");
   }
-  
+
   @Test
   /** Make sure that even with nulls, hashCode() doesn't throw NPE. */
   public void testHashCode() {
@@ -109,7 +109,7 @@ public class TestGenericData {
     r.put(0, stuff);
     GenericData.get().hashCode(r, schema);
   }
-  
+
   @Test
   public void testEquals() {
     Schema s = recordSchema();
@@ -118,7 +118,7 @@ public class TestGenericData {
     GenericRecord r2 = new GenericData.Record(s);
     Collection<CharSequence> l0 = new ArrayDeque<CharSequence>();
     List<CharSequence> l1 = new ArrayList<CharSequence>();
-    GenericArray<CharSequence> l2 = 
+    GenericArray<CharSequence> l2 =
       new GenericData.Array<CharSequence>(1,s.getFields().get(0).schema());
     String foo = "foo";
     l0.add(new StringBuffer(foo));
@@ -131,13 +131,13 @@ public class TestGenericData {
     assertEquals(r0, r2);
     assertEquals(r1, r2);
   }
-  
+
   private Schema recordSchema() {
     List<Field> fields = new ArrayList<Field>();
     fields.add(new Field("anArray", Schema.createArray(Schema.create(Type.STRING)), null, null));
     Schema schema = Schema.createRecord("arrayFoo", "test", "mytest", false);
     schema.setFields(fields);
-    
+
     return schema;
   }
 
@@ -172,7 +172,7 @@ public class TestGenericData {
     GenericData.Record record = new GenericData.Record(schema);
     assertNull(record.get("does not exist"));
   }
-  
+
   @Test
   public void testArrayReversal() {
       Schema schema = Schema.createArray(Schema.create(Schema.Type.INT));
@@ -236,8 +236,8 @@ public class TestGenericData {
     assertEquals(new Integer(6), array.get(0));
     assertEquals(8, array.size());
     try {
-	array.get(9);
-	fail("Expected IndexOutOfBoundsException after adding elements");
+      array.get(9);
+      fail("Expected IndexOutOfBoundsException after adding elements");
     } catch (IndexOutOfBoundsException e){}
   }
   @Test
@@ -297,24 +297,24 @@ public class TestGenericData {
     assertEquals(10, array.size());
     assertEquals(new Integer(55), array.get(5));
   }
-  
+
   @Test
   public void testToStringIsJson() throws JsonParseException, IOException {
     Field stringField = new Field("string", Schema.create(Type.STRING), null, null);
     Field enumField = new Field("enum", Schema.createEnum("my_enum", "doc", null, Arrays.asList("a", "b", "c")), null, null);
     Schema schema = Schema.createRecord("my_record", "doc", "mytest", false);
     schema.setFields(Arrays.asList(stringField, enumField));
-    
+
     GenericRecord r = new GenericData.Record(schema);
     // \u2013 is EN DASH
     r.put(stringField.name(), "hello\nthere\"\tyou\u2013}");
     r.put(enumField.name(), new GenericData.EnumSymbol(enumField.schema(),"a"));
-    
+
     String json = r.toString();
     JsonFactory factory = new JsonFactory();
     JsonParser parser = factory.createJsonParser(json);
     ObjectMapper mapper = new ObjectMapper();
-    
+
     // will throw exception if string is not parsable json
     mapper.readTree(parser);
   }
@@ -356,7 +356,7 @@ public class TestGenericData {
     fields.add(integerField);
     Schema record = Schema.createRecord("test", null, null, false);
     record.setFields(fields);
-    
+
     ByteArrayOutputStream b1 = new ByteArrayOutputStream(5);
     ByteArrayOutputStream b2 = new ByteArrayOutputStream(5);
     BinaryEncoder b1Enc = EncoderFactory.get().binaryEncoder(b1, null);
@@ -389,7 +389,7 @@ public class TestGenericData {
       fail("IOException while writing records to output stream.");
     }
   }
-  
+
   @Test
   public void testEnumCompare() {
     Schema s = Schema.createEnum("Kind",null,null,Arrays.asList("Z","Y","X"));
@@ -410,10 +410,10 @@ public class TestGenericData {
     Field byte_field =
       new Field("bytes", Schema.create(Type.BYTES), null, null);
     schema.setFields(Arrays.asList(byte_field));
-    
+
     GenericRecord record = new GenericData.Record(schema);
     record.put(byte_field.name(), buffer);
-    
+
     GenericRecord copy = GenericData.get().deepCopy(schema, record);
     ByteBuffer buffer_copy = (ByteBuffer) copy.get(byte_field.name());
 
@@ -461,7 +461,7 @@ public class TestGenericData {
   public void validateRequiresGenericSymbolForEnumSchema() {
     final Schema schema = Schema.createEnum("my_enum", "doc", "namespace", Arrays.asList("ONE","TWO","THREE"));
     final GenericData gd = GenericData.get();
-    
+
     /* positive cases */
     assertTrue(gd.validate(schema, new GenericData.EnumSymbol(schema, "ONE")));
     assertTrue(gd.validate(schema, new GenericData.EnumSymbol(schema, anEnum.ONE)));

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericDatumWriter.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericDatumWriter.java b/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericDatumWriter.java
index ed52874..f93a326 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericDatumWriter.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericDatumWriter.java
@@ -61,7 +61,7 @@ public class TestGenericDatumWriter {
     Encoder e = EncoderFactory.get().jsonEncoder(s, bao);
     w.write(r, e);
     e.flush();
-    
+
     Object o = new GenericDatumReader<GenericRecord>(s).read(null,
         DecoderFactory.get().jsonDecoder(s, new ByteArrayInputStream(bao.toByteArray())));
     assertEquals(r, o);
@@ -81,7 +81,7 @@ public class TestGenericDatumWriter {
 
     final TestEncoder e = new TestEncoder(EncoderFactory.get()
         .directBinaryEncoder(bao, null), sizeWrittenSignal, eltAddedSignal);
-    
+
     // call write in another thread
     ExecutorService executor = Executors.newSingleThreadExecutor();
     Future<Void> result = executor.submit(new Callable<Void>() {
@@ -103,7 +103,7 @@ public class TestGenericDatumWriter {
       assertTrue(ex.getCause() instanceof ConcurrentModificationException);
     }
   }
-  
+
 
   @Test
   public void testMapConcurrentModification() throws Exception {
@@ -119,7 +119,7 @@ public class TestGenericDatumWriter {
 
     final TestEncoder e = new TestEncoder(EncoderFactory.get()
         .directBinaryEncoder(bao, null), sizeWrittenSignal, eltAddedSignal);
-    
+
     // call write in another thread
     ExecutorService executor = Executors.newSingleThreadExecutor();
     Future<Void> result = executor.submit(new Callable<Void>() {
@@ -141,20 +141,20 @@ public class TestGenericDatumWriter {
       assertTrue(ex.getCause() instanceof ConcurrentModificationException);
     }
   }
-  
+
   static class TestEncoder extends Encoder {
-    
+
     Encoder e;
     CountDownLatch sizeWrittenSignal;
     CountDownLatch eltAddedSignal;
-    
+
     TestEncoder(Encoder encoder, CountDownLatch sizeWrittenSignal,
         CountDownLatch eltAddedSignal) {
       this.e = encoder;
       this.sizeWrittenSignal = sizeWrittenSignal;
       this.eltAddedSignal = eltAddedSignal;
     }
-    
+
     @Override
     public void writeArrayStart() throws IOException {
       e.writeArrayStart();
@@ -176,7 +176,7 @@ public class TestGenericDatumWriter {
         // ignore
       }
     }
-    
+
     @Override
     public void flush() throws IOException { e.flush(); }
     @Override

http://git-wip-us.apache.org/repos/asf/avro/blob/ade55151/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericRecordBuilder.java
----------------------------------------------------------------------
diff --git a/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericRecordBuilder.java b/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericRecordBuilder.java
index 8f7dee5..cc641f7 100644
--- a/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericRecordBuilder.java
+++ b/lang/java/avro/src/test/java/org/apache/avro/generic/TestGenericRecordBuilder.java
@@ -37,15 +37,15 @@ public class TestGenericRecordBuilder {
   public void testGenericBuilder() {
     Schema schema = recordSchema();
     GenericRecordBuilder builder = new GenericRecordBuilder(schema);
-    
+
     // Verify that builder has no fields set after initialization:
     for (Field field : schema.getFields()) {
-      Assert.assertFalse("RecordBuilder should not have field " + field.name(), 
+      Assert.assertFalse("RecordBuilder should not have field " + field.name(),
           builder.has(field.name()));
       Assert.assertNull("Field " + field.name() + " should be null",
           builder.get(field.name()));
     }
-    
+
     // Set field in builder:
     builder.set("intField", 1);
     List<String> anArray = Arrays.asList(new String[] { "one", "two", "three" });
@@ -54,47 +54,47 @@ public class TestGenericRecordBuilder {
     Assert.assertEquals(anArray, builder.get("anArray"));
     Assert.assertFalse("id should not be set", builder.has("id"));
     Assert.assertNull(builder.get("id"));
-    
+
     // Build the record, and verify that fields are set:
     Record record = builder.build();
     Assert.assertEquals(new Integer(1), record.get("intField"));
     Assert.assertEquals(anArray, record.get("anArray"));
     Assert.assertNotNull(record.get("id"));
     Assert.assertEquals("0", record.get("id").toString());
-    
+
     // Test copy constructors:
     Assert.assertEquals(builder, new GenericRecordBuilder(builder));
     Assert.assertEquals(record, new GenericRecordBuilder(record).build());
-    
+
     // Test clear:
     builder.clear("intField");
     Assert.assertFalse(builder.has("intField"));
     Assert.assertNull(builder.get("intField"));
   }
-  
+
   @Test(expected=org.apache.avro.AvroRuntimeException.class)
   public void attemptToSetNonNullableFieldToNull() {
     new GenericRecordBuilder(recordSchema()).set("intField", null);
   }
-  
+
   @Test(expected=org.apache.avro.AvroRuntimeException.class)
   public void buildWithoutSettingRequiredFields1() {
     new GenericRecordBuilder(recordSchema()).build();
   }
-  
+
   @Test()
   public void buildWithoutSettingRequiredFields2() {
     try {
       new GenericRecordBuilder(recordSchema()).
       set("anArray", Arrays.asList(new String[] { "one" })).
       build();
-      Assert.fail("Should have thrown " + 
+      Assert.fail("Should have thrown " +
           AvroRuntimeException.class.getCanonicalName());
     } catch (AvroRuntimeException e) {
       Assert.assertTrue(e.getMessage().contains("intField"));
     }
   }
-  
+
   /** Creates a test record schema */
   private static Schema recordSchema() {
     List<Field> fields = new ArrayList<Field>();


Mime
View raw message