Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions main/android/uk/co/real_logic/sbe/codec/java/BitUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,30 +93,6 @@ static MemoryAccess getMemoryAccess()
return MEMORY_ACCESS;
}

/**
* Gets the value of a static field.
*
* @param clazz from which to get the field value
* @param name the name of the field
* @return the value of the field.
* @throws PrivilegedActionException
*/
static <T> T getStaticFieldValue(final Class<?> clazz, final String name) throws PrivilegedActionException
{
final PrivilegedExceptionAction<T> action = new PrivilegedExceptionAction<T>()
{
@SuppressWarnings("unchecked")
public T run() throws Exception
{
Field field = clazz.getDeclaredField(name);
field.setAccessible(true);
return (T) field.get(null);
}
};

return AccessController.doPrivileged(action);
}

/**
* Extracts a field from a class using reflection.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ public int getBytes(final int index, final DirectBuffer dst, final int offset, f
else
{
final long address = dst.effectiveDirectAddress + offset;
DirectBuffer.MEMORY_ACCESS.pokeByteArray(address, byteArray, this.offset + index, count);
MEMORY_ACCESS.pokeByteArray(address, byteArray, this.offset + index, count);
}
}
else
Expand Down