@Test public void testParseCase515() { List<WebSocketFrame> send = new ArrayList<>(); send.add(new TextFrame().setPayload("fragment1").setFin(false)); send.add(new ContinuationFrame().setPayload("fragment2").setFin(true)); send.add(new ContinuationFrame().setPayload("fragment3").setFin(false)); send.add(new TextFrame().setPayload("fragment4").setFin(true)); send.add(new CloseInfo(StatusCode.NORMAL).asFrame()); ByteBuffer completeBuf = UnitGenerator.generate(send); UnitParser parser = new UnitParser(); IncomingFramesCapture capture = new IncomingFramesCapture(); parser.setIncomingFramesHandler(capture); ProtocolException x = assertThrows(ProtocolException.class, () -> parser.parseQuietly(completeBuf)); assertTrue(x.getMessage().contains("CONTINUATION frame without prior !FIN")); }
public void setIncomingFramesHandler(IncomingFrames incoming) { this.incomingFramesHandler = incoming; }
Parser { public void setIncomingFramesHandler(IncomingFrames incoming) { this.incomingFramesHandler = incoming; } }
Parser { public void setIncomingFramesHandler(IncomingFrames incoming) { this.incomingFramesHandler = incoming; } Parser(WebSocketPolicy wspolicy); }
Parser { public void setIncomingFramesHandler(IncomingFrames incoming) { this.incomingFramesHandler = incoming; } Parser(WebSocketPolicy wspolicy); void configureFromExtensions(List<? extends Extension> exts); IncomingFrames getIncomingFramesHandler(); WebSocketPolicy getPolicy(); boolean isRsv1InUse(); boolean isRsv2InUse(); boolean isRsv3InUse(); void parse(ByteBuffer buffer); void parseSingleFrame(ByteBuffer buffer); void setIncomingFramesHandler(IncomingFrames incoming); long getMessagesIn(); @Override String toString(); }
Parser { public void setIncomingFramesHandler(IncomingFrames incoming) { this.incomingFramesHandler = incoming; } Parser(WebSocketPolicy wspolicy); void configureFromExtensions(List<? extends Extension> exts); IncomingFrames getIncomingFramesHandler(); WebSocketPolicy getPolicy(); boolean isRsv1InUse(); boolean isRsv2InUse(); boolean isRsv3InUse(); void parse(ByteBuffer buffer); void parseSingleFrame(ByteBuffer buffer); void setIncomingFramesHandler(IncomingFrames incoming); long getMessagesIn(); @Override String toString();  }