Skip to content

Commit 13fd3c0

Browse files
committed
code clean-up
1 parent b523469 commit 13fd3c0

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

main/android/uk/co/real_logic/sbe/codec/java/BitUtil.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -93,30 +93,6 @@ static MemoryAccess getMemoryAccess()
9393
return MEMORY_ACCESS;
9494
}
9595

96-
/**
97-
* Gets the value of a static field.
98-
*
99-
* @param clazz from which to get the field value
100-
* @param name the name of the field
101-
* @return the value of the field.
102-
* @throws PrivilegedActionException
103-
*/
104-
static <T> T getStaticFieldValue(final Class<?> clazz, final String name) throws PrivilegedActionException
105-
{
106-
final PrivilegedExceptionAction<T> action = new PrivilegedExceptionAction<T>()
107-
{
108-
@SuppressWarnings("unchecked")
109-
public T run() throws Exception
110-
{
111-
Field field = clazz.getDeclaredField(name);
112-
field.setAccessible(true);
113-
return (T) field.get(null);
114-
}
115-
};
116-
117-
return AccessController.doPrivileged(action);
118-
}
119-
12096
/**
12197
* Extracts a field from a class using reflection.
12298
*

main/android/uk/co/real_logic/sbe/codec/java/DirectBuffer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ public int getBytes(final int index, final DirectBuffer dst, final int offset, f
457457
else
458458
{
459459
final long address = dst.effectiveDirectAddress + offset;
460-
DirectBuffer.MEMORY_ACCESS.pokeByteArray(address, byteArray, this.offset + index, count);
460+
MEMORY_ACCESS.pokeByteArray(address, byteArray, this.offset + index, count);
461461
}
462462
}
463463
else

0 commit comments

Comments
 (0)