GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Reuse stream-text variables in the concatenated FEXTRA test · netty/netty@4254ff0

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • codec-compression/src/test/java/io/netty/handler/codec/compression
    • JdkZlibTest.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎codec-compression/src/test/java/io/netty/handler/codec/compression/JdkZlibTest.java‎

Copy file name to clipboardExpand all lines: codec-compression/src/test/java/io/netty/handler/codec/compression/JdkZlibTest.java
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,10 @@ public void testConcatenatedGzipFirstStreamHasExtraField() throws Exception {
170170
// leak its XLEN into the second stream's header parsing. The xlen state has to be reset
171171
// between streams; otherwise the second stream (which has no extra field) would skip
172172
// xlen bytes that are actually deflate data and fail to decode.
173-
byte[] first = "first stream".getBytes(CharsetUtil.UTF_8);
174-
byte[] second = "second stream".getBytes(CharsetUtil.UTF_8);
173+
String firstText = "first stream";
174+
String secondText = "second stream";
175+
byte[] first = firstText.getBytes(CharsetUtil.UTF_8);
176+
byte[] second = secondText.getBytes(CharsetUtil.UTF_8);
175177
byte[] extra = { 0x42, 0x43, 0x02, 0x00, (byte) 0x99, 0x00 };
176178

177179
byte[] firstGz = gzipWithExtraField(first, extra); // first stream HAS an extra field
@@ -189,7 +191,7 @@ public void testConcatenatedGzipFirstStreamHasExtraField() throws Exception {
189191
msg.readBytes(decoded, msg.readableBytes());
190192
msg.release();
191193
}
192-
assertArrayEquals("first streamsecond stream".getBytes(CharsetUtil.UTF_8),
194+
assertArrayEquals((firstText + secondText).getBytes(CharsetUtil.UTF_8),
193195
decoded.toByteArray());
194196
decoded.close();
195197
} finally {

0 commit comments

Comments
0 (0)
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.