GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — ByteBufInputStream#readByte(); should use checkAvailable(); method · Issue #15305 · netty/netty Closed Milestone DescriptionIs there any particular reason not to use the checkAvailable(); method in the #readByte(); method ? It makes inconsistenty in error messages : ByteBufInputStream in = new ByteBufInputStream(Unpooled.buffer()); try { in.readByte(); } catch (IOException e) { System.out.println("Message: " + e.getMessage()); // null } try { in.readShort(); } catch (IOException e) { System.out.println("Message: " + e.getMessage()); // "fieldSize is too long! Length is 2, but maximum is 0" } Can the metod look like : @Override public byte readByte() throws IOException { checkAvailable(1); return buffer.readByte(); } or : @Override public byte readByte() throws IOException { int available = available(); if (available == 0) { throw new EOFException("fieldSize is too long! Length is 1, but maximum is 0"); } return buffer.readByte(); } Activity
MetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |