fix problems found by -Xlink:unchecked

This commit is contained in:
David Renshaw 2020-05-12 20:41:36 -04:00
parent e89dfd9f74
commit 94d15d7720
4 changed files with 25 additions and 12 deletions

View file

@ -37,4 +37,17 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<compilerArgument>-Xlint:unchecked</compilerArgument>
</configuration>
</plugin>
</plugins>
</build>
</project>

View file

@ -93,10 +93,10 @@ public class EnumList {
}
public final Reader<T> asReader() {
return new Reader(this.values,
this.segment, this.ptr, this.elementCount, this.step,
this.structDataSize, this.structPointerCount,
java.lang.Integer.MAX_VALUE);
return new Reader<T>(this.values,
this.segment, this.ptr, this.elementCount, this.step,
this.structDataSize, this.structPointerCount,
java.lang.Integer.MAX_VALUE);
}
}
}

View file

@ -89,10 +89,10 @@ public final class ListList {
// TODO: rework generics so that we don't need this factory parameter
public final <U extends ListReader> Reader<U> asReader(ListFactory<T, U> factor) {
return new Reader(factor,
this.segment, this.ptr, this.elementCount, this.step,
this.structDataSize, this.structPointerCount,
java.lang.Integer.MAX_VALUE);
return new Reader<U>(factor,
this.segment, this.ptr, this.elementCount, this.step,
this.structDataSize, this.structPointerCount,
java.lang.Integer.MAX_VALUE);
}
}
}

View file

@ -149,10 +149,10 @@ public final class StructList {
* TODO: rework generics, so that we don't need this factory parameter
*/
public final <U extends StructReader> Reader<U> asReader(StructFactory<T, U> factory) {
return new Reader(factory,
this.segment, this.ptr, this.elementCount, this.step,
this.structDataSize, this.structPointerCount,
java.lang.Integer.MAX_VALUE);
return new Reader<U>(factory,
this.segment, this.ptr, this.elementCount, this.step,
this.structDataSize, this.structPointerCount,
java.lang.Integer.MAX_VALUE);
}
public final class Iterator implements java.util.Iterator<T> {