@Test(expected = MessageEOFException.class) public void testPeekWithNewMessageToSendThrowsMEOFE() throws Exception { AmqpJmsStreamMessageFacade amqpStreamMessageFacade = createNewStreamMessageFacade(); amqpStreamMessageFacade.peek(); }
@Override public Object peek() throws MessageEOFException { if (list.isEmpty() || position >= list.size()) { throw new MessageEOFException("Attempt to read past end of stream"); } Object object = list.get(position); if (object instanceof Binary) { Binary bin = ((Binary) object); object = Arrays.copyOfRange(bin.getArray(), bin.getArrayOffset(), bin.getLength()); } return object; }
AmqpJmsStreamMessageFacade extends AmqpJmsMessageFacade implements JmsStreamMessageFacade { @Override public Object peek() throws MessageEOFException { if (list.isEmpty() || position >= list.size()) { throw new MessageEOFException("Attempt to read past end of stream"); } Object object = list.get(position); if (object instanceof Binary) { Binary bin = ((Binary) object); object = Arrays.copyOfRange(bin.getArray(), bin.getArrayOffset(), bin.getLength()); } return object; } }
AmqpJmsStreamMessageFacade extends AmqpJmsMessageFacade implements JmsStreamMessageFacade { @Override public Object peek() throws MessageEOFException { if (list.isEmpty() || position >= list.size()) { throw new MessageEOFException("Attempt to read past end of stream"); } Object object = list.get(position); if (object instanceof Binary) { Binary bin = ((Binary) object); object = Arrays.copyOfRange(bin.getArray(), bin.getArrayOffset(), bin.getLength()); } return object; }  }
AmqpJmsStreamMessageFacade extends AmqpJmsMessageFacade implements JmsStreamMessageFacade { @Override public Object peek() throws MessageEOFException { if (list.isEmpty() || position >= list.size()) { throw new MessageEOFException("Attempt to read past end of stream"); } Object object = list.get(position); if (object instanceof Binary) { Binary bin = ((Binary) object); object = Arrays.copyOfRange(bin.getArray(), bin.getArrayOffset(), bin.getLength()); } return object; }  @Override AmqpJmsStreamMessageFacade copy(); @Override byte getJmsMsgType(); @Override boolean hasNext(); @Override Object peek(); @Override void pop(); @Override void put(Object value); @Override void reset(); @Override void clearBody(); @Override boolean hasBody(); @Override JmsStreamMessage asJmsMessage(); }
AmqpJmsStreamMessageFacade extends AmqpJmsMessageFacade implements JmsStreamMessageFacade { @Override public Object peek() throws MessageEOFException { if (list.isEmpty() || position >= list.size()) { throw new MessageEOFException("Attempt to read past end of stream"); } Object object = list.get(position); if (object instanceof Binary) { Binary bin = ((Binary) object); object = Arrays.copyOfRange(bin.getArray(), bin.getArrayOffset(), bin.getLength()); } return object; }  @Override AmqpJmsStreamMessageFacade copy(); @Override byte getJmsMsgType(); @Override boolean hasNext(); @Override Object peek(); @Override void pop(); @Override void put(Object value); @Override void reset(); @Override void clearBody(); @Override boolean hasBody(); @Override JmsStreamMessage asJmsMessage();  }