[ 
https://issues.apache.org/jira/browse/GEODE-1296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15291879#comment-15291879
 ] 

ASF GitHub Bot commented on GEODE-1296:
---------------------------------------

Github user dschneider-pivotal commented on a diff in the pull request:

    https://github.com/apache/incubator-geode/pull/145#discussion_r63930434
  
    --- Diff: 
geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStoredObject.java
 ---
    @@ -417,11 +417,13 @@ public void setSerializedValue(byte[] value) {
           MemoryAllocatorImpl.getAllocator().getStats().incReads();
           return result;
         }
    +    /**
    +     * This method should only be called on uncompressed objects
    +     * @return byte array of the StoredObject value. 
    +     */
         protected byte[] getRawBytes() {
    +      assert !isCompressed();
           byte[] result = getCompressedBytes();
    --- End diff --
    
    Combine these two lines into "return getCompressedBytes();"


> OffHeapStoredObject.getRawBytes should assert that it is not called on 
> compressed data
> --------------------------------------------------------------------------------------
>
>                 Key: GEODE-1296
>                 URL: https://issues.apache.org/jira/browse/GEODE-1296
>             Project: Geode
>          Issue Type: Bug
>          Components: offheap
>            Reporter: Darrel Schneider
>            Assignee: Kenneth Howe
>
> The current code does this:
>       if (isCompressed()) {
>         throw new UnsupportedOperationException();
>       }
> It would be more clear if it just did this:
>       assert !isCompressed();



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to