Skip to content

Commit

Permalink
9472: remove guards and fix compilation problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefania Alborghetti committed Jan 26, 2016
1 parent a648edd commit f035a5a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
6 changes: 0 additions & 6 deletions src/java/org/apache/cassandra/db/NativeDecoratedKey.java
Expand Up @@ -46,10 +46,4 @@ public ByteBuffer getKey()
{
return MemoryUtil.getByteBuffer(peer + 4, MemoryUtil.getInt(peer), ByteOrder.BIG_ENDIAN);
}

@Override
public DecoratedKey onHeapCopy()
{
return new BufferDecoratedKey(getToken(), HeapAllocator.instance.clone(getKey()));
}
}
12 changes: 0 additions & 12 deletions src/java/org/apache/cassandra/db/rows/NativeCell.java
Expand Up @@ -109,39 +109,27 @@ private static long simpleSize(int length)

public long timestamp()
{
if (peer == 0)
throw new IllegalStateException();
return MemoryUtil.getLong(peer + TIMESTAMP);
}

public int ttl()
{
if (peer == 0)
throw new IllegalStateException();
return MemoryUtil.getInt(peer + TTL);
}

public int localDeletionTime()
{
if (peer == 0)
throw new IllegalStateException();
return MemoryUtil.getInt(peer + DELETION);
}

public ByteBuffer value()
{
if (peer == 0)
throw new IllegalStateException();

int length = MemoryUtil.getInt(peer + LENGTH);
return MemoryUtil.getByteBuffer(peer + VALUE, length, ByteOrder.BIG_ENDIAN);
}

public CellPath path()
{
if (peer == 0)
throw new IllegalStateException();

if (MemoryUtil.getByte(peer+ HAS_CELLPATH) == 0)
return null;

Expand Down

0 comments on commit f035a5a

Please sign in to comment.