Skip to content

Commit

Permalink
AVRO-2117: Cleanup Java - Remove trailing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsbasjes committed Dec 29, 2017
1 parent 4b69cb2 commit 706d8ce
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ public void testReaderWriterDecodingCompatibility() throws Exception {
expectedDecodedDatum, decodedDatum);
}
}

Deque<String> asDeqeue(String... args) {
Deque<String> dq = new ArrayDeque<String>();
List<String> x = Arrays.asList(args);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,21 +246,21 @@ public void testCopyUuidRaw() {
UUID.randomUUID().toString(), // use raw type
GenericData.get()); // with no conversions
}

@Test
public void testCopyDecimal() {
testCopy(LogicalTypes.decimal(9, 2).addToSchema(Schema.create(Schema.Type.BYTES)),
new BigDecimal("-34.34"),
GENERIC);
}

@Test
public void testCopyDecimalRaw() {
testCopy(LogicalTypes.decimal(9, 2).addToSchema(Schema.create(Schema.Type.BYTES)),
ByteBuffer.wrap(new BigDecimal("-34.34").unscaledValue().toByteArray()),
GenericData.get()); // no conversions
}

private void testCopy(Schema schema, Object value, GenericData model) {
// test direct copy of instance
checkCopy(value, model.deepCopy(schema, value), false);
Expand Down Expand Up @@ -288,7 +288,7 @@ private void testCopy(Schema schema, Object value, GenericData model) {
}

private void checkCopy(Object original, Object copy, boolean notSame) {
if (notSame)
if (notSame)
Assert.assertNotSame(original, copy);
Assert.assertEquals(original, copy);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private static Object[][] dataForResolvingTests() {
+ "{\"name\":\"f3\", \"type\":\"double\"}]}", "BLD",
new Object[] { true, 100L, 10.75d } },
// Array of record with arrays.
{ "{ \"type\": \"array\", \"items\":" +
{ "{ \"type\": \"array\", \"items\":" +
"{\"type\":\"record\",\"name\":\"r\",\"fields\":["
+ "{\"name\":\"f0\", \"type\":\"boolean\"},"
+ "{\"name\":\"f1\", \"type\": {\"type\":\"array\", \"items\": \"boolean\" }}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Autogenerated by Avro
*
*
* DO NOT EDIT DIRECTLY
*/
package org.apache.avro.specific;
Expand Down Expand Up @@ -50,7 +50,7 @@ public static TestRecordWithLogicalTypes fromByteBuffer(
/**
* 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 TestRecordWithLogicalTypes() {}

Expand Down Expand Up @@ -80,7 +80,7 @@ public TestRecordWithLogicalTypes(java.lang.Boolean b,
}

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 b;
Expand All @@ -96,7 +96,7 @@ public java.lang.Object get(int field$) {
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$) {
Expand Down Expand Up @@ -292,17 +292,17 @@ public org.apache.avro.Conversion<?> getConversion(int field) {
public static TestRecordWithLogicalTypes.Builder newBuilder() {
return new TestRecordWithLogicalTypes.Builder();
}

/** Creates a new TestRecordWithLogicalTypes RecordBuilder by copying an existing Builder */
public static TestRecordWithLogicalTypes.Builder newBuilder(TestRecordWithLogicalTypes.Builder other) {
return new TestRecordWithLogicalTypes.Builder(other);
}

/** Creates a new TestRecordWithLogicalTypes RecordBuilder by copying an existing TestRecordWithLogicalTypes instance */
public static TestRecordWithLogicalTypes.Builder newBuilder(TestRecordWithLogicalTypes other) {
return new TestRecordWithLogicalTypes.Builder(other);
}

/**
* RecordBuilder for TestRecordWithLogicalTypes instances.
*/
Expand All @@ -324,7 +324,7 @@ public static class Builder extends org.apache.avro.specific.SpecificRecordBuild
private Builder() {
super(TestRecordWithLogicalTypes.SCHEMA$);
}

/** Creates a Builder by copying an existing Builder */
private Builder(TestRecordWithLogicalTypes.Builder other) {
super(other);
Expand Down Expand Up @@ -369,7 +369,7 @@ private Builder(TestRecordWithLogicalTypes.Builder other) {
fieldSetFlags()[9] = true;
}
}

/** Creates a Builder by copying an existing TestRecordWithLogicalTypes instance */
private Builder(TestRecordWithLogicalTypes other) {
super(TestRecordWithLogicalTypes.SCHEMA$);
Expand Down Expand Up @@ -430,7 +430,7 @@ public TestRecordWithLogicalTypes.Builder setB(boolean value) {
validate(fields()[0], value);
this.b = value;
fieldSetFlags()[0] = true;
return this;
return this;
}

/**
Expand Down Expand Up @@ -464,7 +464,7 @@ public TestRecordWithLogicalTypes.Builder setI32(int value) {
validate(fields()[1], value);
this.i32 = value;
fieldSetFlags()[1] = true;
return this;
return this;
}

/**
Expand Down Expand Up @@ -498,7 +498,7 @@ public TestRecordWithLogicalTypes.Builder setI64(long value) {
validate(fields()[2], value);
this.i64 = value;
fieldSetFlags()[2] = true;
return this;
return this;
}

/**
Expand Down Expand Up @@ -532,7 +532,7 @@ public TestRecordWithLogicalTypes.Builder setF32(float value) {
validate(fields()[3], value);
this.f32 = value;
fieldSetFlags()[3] = true;
return this;
return this;
}

/**
Expand Down Expand Up @@ -566,7 +566,7 @@ public TestRecordWithLogicalTypes.Builder setF64(double value) {
validate(fields()[4], value);
this.f64 = value;
fieldSetFlags()[4] = true;
return this;
return this;
}

/**
Expand Down Expand Up @@ -600,7 +600,7 @@ public TestRecordWithLogicalTypes.Builder setS(java.lang.CharSequence value) {
validate(fields()[5], value);
this.s = value;
fieldSetFlags()[5] = true;
return this;
return this;
}

/**
Expand Down Expand Up @@ -635,7 +635,7 @@ public TestRecordWithLogicalTypes.Builder setD(org.joda.time.LocalDate value) {
validate(fields()[6], value);
this.d = value;
fieldSetFlags()[6] = true;
return this;
return this;
}

/**
Expand Down Expand Up @@ -669,7 +669,7 @@ public TestRecordWithLogicalTypes.Builder setT(org.joda.time.LocalTime value) {
validate(fields()[7], value);
this.t = value;
fieldSetFlags()[7] = true;
return this;
return this;
}

/**
Expand Down Expand Up @@ -703,7 +703,7 @@ public TestRecordWithLogicalTypes.Builder setTs(org.joda.time.DateTime value) {
validate(fields()[8], value);
this.ts = value;
fieldSetFlags()[8] = true;
return this;
return this;
}

/**
Expand Down
Loading

0 comments on commit 706d8ce

Please sign in to comment.