Fix checkstyle

This commit is contained in:
Trustin Lee 2013-03-08 10:39:52 +09:00
parent 12f1d96914
commit 096e4c95ef
3 changed files with 15 additions and 6 deletions

View File

@ -38,9 +38,12 @@ public abstract class AbstractMessageBuf<T> extends AbstractQueue<T> implements
long refCntFieldOffset = -1; long refCntFieldOffset = -1;
try { try {
if (PlatformDependent.hasUnsafe()) { if (PlatformDependent.hasUnsafe()) {
refCntFieldOffset = PlatformDependent.objectFieldOffset(AbstractMessageBuf.class.getDeclaredField("refCnt")); refCntFieldOffset = PlatformDependent.objectFieldOffset(
AbstractMessageBuf.class.getDeclaredField("refCnt"));
}
} catch (Throwable t) {
// Ignored
} }
} catch (Throwable ignored) { }
REFCNT_FIELD_OFFSET = refCntFieldOffset; REFCNT_FIELD_OFFSET = refCntFieldOffset;
} }

View File

@ -30,9 +30,12 @@ public abstract class AbstractReferenceCounted implements ReferenceCounted {
long refCntFieldOffset = -1; long refCntFieldOffset = -1;
try { try {
if (PlatformDependent.hasUnsafe()) { if (PlatformDependent.hasUnsafe()) {
refCntFieldOffset = PlatformDependent.objectFieldOffset(AbstractReferenceCounted.class.getDeclaredField("refCnt")); refCntFieldOffset = PlatformDependent.objectFieldOffset(
AbstractReferenceCounted.class.getDeclaredField("refCnt"));
}
} catch (Throwable t) {
// Ignored
} }
} catch (Throwable ignored) { }
REFCNT_FIELD_OFFSET = refCntFieldOffset; REFCNT_FIELD_OFFSET = refCntFieldOffset;
} }

View File

@ -34,9 +34,12 @@ public abstract class AbstractReferenceCountedByteBuf extends AbstractByteBuf {
long refCntFieldOffset = -1; long refCntFieldOffset = -1;
try { try {
if (PlatformDependent.hasUnsafe()) { if (PlatformDependent.hasUnsafe()) {
refCntFieldOffset = PlatformDependent.objectFieldOffset(AbstractReferenceCountedByteBuf.class.getDeclaredField("refCnt")); refCntFieldOffset = PlatformDependent.objectFieldOffset(
AbstractReferenceCountedByteBuf.class.getDeclaredField("refCnt"));
}
} catch (Throwable t) {
// Ignored
} }
} catch (Throwable ignored) { }
REFCNT_FIELD_OFFSET = refCntFieldOffset; REFCNT_FIELD_OFFSET = refCntFieldOffset;
} }