Skip to content

Commit a316cb4

Browse files
Add type parameters in remaining internal usage.
1 parent 9152e20 commit a316cb4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

objectbox-java/src/main/java/io/objectbox/Cursor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public abstract class Cursor<T> implements Closeable {
5050

5151
static native boolean nativeSeek(long cursor, long key);
5252

53-
native Object nativeGetAllEntities(long cursor);
53+
native List<T> nativeGetAllEntities(long cursor);
5454

5555
static native Object nativeGetEntity(long cursor, long key);
5656

@@ -199,7 +199,7 @@ public T first() {
199199

200200
/** ~10% slower than iterating with {@link #first()} and {@link #next()} as done by {@link Box#getAll()}. */
201201
public List<T> getAll() {
202-
return (List) nativeGetAllEntities(cursor);
202+
return nativeGetAllEntities(cursor);
203203
}
204204

205205
public boolean deleteEntity(long key) {

objectbox-java/src/main/java/io/objectbox/Transaction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public class Transaction implements Closeable {
5656

5757
native long nativeCreateKeyValueCursor(long transaction);
5858

59-
native long nativeCreateCursor(long transaction, String entityName, Class entityClass);
59+
native long nativeCreateCursor(long transaction, String entityName, Class<?> entityClass);
6060

6161
// native long nativeGetStore(long transaction);
6262

objectbox-java/src/main/java/io/objectbox/internal/ReflectionCache.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ public static ReflectionCache getInstance() {
3232
return instance;
3333
}
3434

35-
private final Map<Class, Map<String, Field>> fields = new HashMap<>();
35+
private final Map<Class<?>, Map<String, Field>> fields = new HashMap<>();
3636

3737
@Nonnull
38-
public synchronized Field getField(Class clazz, String name) {
38+
public synchronized Field getField(Class<?> clazz, String name) {
3939
Map<String, Field> fieldsForClass = fields.get(clazz);
4040
if (fieldsForClass == null) {
4141
fieldsForClass = new HashMap<>();

0 commit comments

Comments
 (0)