Skip to content

Commit

Permalink
Addressed JavaDoc build failures
Browse files Browse the repository at this point in the history
Also added the javadoc gradle task to the Travis CI for every commit.
  • Loading branch information
FelixGV committed Jun 12, 2020
1 parent 0b1468f commit e955b20
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ addons:
install: true

script:
- ./gradlew clean build
- ./gradlew clean build javadoc

# required for gradle artifact caching (see https://docs.travis-ci.com/user/languages/java/#caching)
before_cache:
Expand All @@ -46,4 +46,4 @@ deploy:
on:
all_branches: true
tags: true
# the condition on the tag name (should be a semantic version) is inside the script, for ease of development
# the condition on the tag name (should be a semantic version) is inside the script, for ease of development
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,17 @@ public FastAvroConcurrentHashMap(int initialCapacity) {
* optimization might not be ideal for the workload that most keys are unique, so be cautious
* about the workload before adopting the FastAvroConcurrentHashMap.
*
* @param key
* @param mappingFunction
* @return
* @param key key with which the specified value is to be associated
* @param mappingFunction the function to compute a value
* @return the current (existing or computed) value associated with
* the specified key, or null if the computed value is null
* @throws NullPointerException if the specified key or mappingFunction
* is null
* @throws IllegalStateException if the computation detectably
* attempts a recursive update to this map that would
* otherwise never complete
* @throws RuntimeException or Error if the mappingFunction does so,
* in which case the mapping is left unestablished
*/
@Override
public V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public FastSerdeBase(String description, boolean useGenericTypes, Class defaultS
* schema pair).
*
* @param prefix String to serve as a prefix for the unique name
* @return a unique prefix composed of the {@param prefix} appended by a unique number
* @return a unique prefix composed of the prefix appended by a unique number
*/
protected String getUniqueName(String prefix) {
String uncapitalizedPrefix = StringUtils.uncapitalize(prefix);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ public abstract class PrimitiveArrayList<T, L> extends AbstractList<T>
/**
* @param that an instance of primitive list to use for comparison
* @param index the index of the element to compare
* @return the comparison result between element of this and {@param that} list at the provided {@param index}
* @return the comparison result between element of this and that list at the provided index
*/
protected abstract int compareElementAtIndex(L that, int index);

/**
* @param o instance of an Object that may or may not be a primitive list
* @return true if {@param o} instanceof the right type of primitive list for comparison
* @param object instance of an Object that may or may not be a primitive list
* @return true if the passed in object is an instance of the right type of primitive list for comparison
*/
protected abstract boolean isInstanceOfCorrectPrimitiveList(Object o);
protected abstract boolean isInstanceOfCorrectPrimitiveList(Object object);

// Public API

Expand Down Expand Up @@ -138,12 +138,12 @@ public String toString() {
* instance had a larger number of elements than the new one, in which case, we will reuse the array, but
* use the {@link #size} as a boundary within the larger array.
*
* @param i an index position which may or may not be within bound of the current list
* @throws IndexOutOfBoundsException if {@param i} is larger than the index of the last valid element
* @param index an index position which may or may not be within bound of the current list
* @throws IndexOutOfBoundsException if the index param is larger than the index of the last valid element
*/
protected void checkIfLargerThanSize(int i) {
if (i >= size) {
throw new IndexOutOfBoundsException("Index " + i + " out of bounds.");
protected void checkIfLargerThanSize(int index) {
if (index >= size) {
throw new IndexOutOfBoundsException("Index " + index + " out of bounds.");
}
}

Expand All @@ -167,7 +167,11 @@ protected void capacityCheck() {
}
}

/** Create an empty space in the array at the index specified by {@param location} by shifting the elements to the right */
/**
* Create an empty space in the array at the index specified by shifting the elements to the right
*
* @param location index where the element will be added
*/
protected void addInternal(int location) {
if (location > size || location < 0) {
throw new IndexOutOfBoundsException("Index " + location + " out of bounds.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected int compareElementAtIndex(PrimitiveBooleanList that, int index) {
}

@Override
protected boolean isInstanceOfCorrectPrimitiveList(Object o) {
return o instanceof PrimitiveBooleanList;
protected boolean isInstanceOfCorrectPrimitiveList(Object object) {
return object instanceof PrimitiveBooleanList;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected int compareElementAtIndex(PrimitiveDoubleList that, int index) {
}

@Override
protected boolean isInstanceOfCorrectPrimitiveList(Object o) {
return o instanceof PrimitiveBooleanList;
protected boolean isInstanceOfCorrectPrimitiveList(Object object) {
return object instanceof PrimitiveBooleanList;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected int compareElementAtIndex(PrimitiveFloatList that, int index) {
}

@Override
protected boolean isInstanceOfCorrectPrimitiveList(Object o) {
return o instanceof PrimitiveBooleanList;
protected boolean isInstanceOfCorrectPrimitiveList(Object object) {
return object instanceof PrimitiveBooleanList;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected int compareElementAtIndex(PrimitiveIntList that, int index) {
}

@Override
protected boolean isInstanceOfCorrectPrimitiveList(Object o) {
return o instanceof PrimitiveBooleanList;
protected boolean isInstanceOfCorrectPrimitiveList(Object object) {
return object instanceof PrimitiveBooleanList;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected int compareElementAtIndex(PrimitiveLongList that, int index) {
}

@Override
protected boolean isInstanceOfCorrectPrimitiveList(Object o) {
return o instanceof PrimitiveBooleanList;
protected boolean isInstanceOfCorrectPrimitiveList(Object object) {
return object instanceof PrimitiveBooleanList;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ public static String transformEnumClass(String code, AvroVersion minSupportedVer
* producing uncompilable code (see see AVRO-1316). this was only fixed in avro 1.7.5+
*
* also - avro 1.6+ issues "new org.apache.avro.Schema.Parser().parse(...)" calls which will not compile
* under avro < 1.6
* under {@literal avro < 1.6}
*
* in addition, avro < 1.6 fails to properly escape control characters in the schema string (like newlines
* in addition, {@literal avro < 1.6} fails to properly escape control characters in the schema string (like newlines
* in doc properties) which will result in a json parse error when trying to instantiate the
* generated java class (because at that point it will fail to parse the avsc in SCHEMA$)
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* a utility class that (in combination with {@link AvroSchemaUtil#traverseSchema(Schema, SchemaVisitor)})
* can validate avro schemas vs the avro specification. <br>
* this class exists because historically avro has been very bad at validating its own specification
* and this allows proper validation under older (<1.9) versions of avro
* and this allows proper validation under versions of {@literal avro < 1.9}
*/
public class SchemaValidator implements SchemaVisitor {
private final static Set<Schema.Type> NAMED_TYPES = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(
Expand Down

0 comments on commit e955b20

Please sign in to comment.