Updated all arrays after merge of #3846
Signed-off-by: Greg Wilkins <gregw@webtide.com>
This commit is contained in:
parent
5568f833e7
commit
9fe27eb8e3
|
@ -59,7 +59,7 @@ public class CookieCutterTest
|
|||
{
|
||||
String rawCookie = "$Version=\"1\"; Customer=\"WILE_E_COYOTE\"; $Path=\"/acme\"";
|
||||
|
||||
Cookie cookies[] = parseCookieHeaders(CookieCompliance.RFC2965, rawCookie);
|
||||
Cookie[] cookies = parseCookieHeaders(CookieCompliance.RFC2965, rawCookie);
|
||||
|
||||
assertThat("Cookies.length", cookies.length, is(1));
|
||||
assertCookie("Cookies[0]", cookies[0], "Customer", "WILE_E_COYOTE", 1, "/acme");
|
||||
|
@ -75,7 +75,7 @@ public class CookieCutterTest
|
|||
"Customer=\"WILE_E_COYOTE\"; $Path=\"/acme\"; " +
|
||||
"Part_Number=\"Rocket_Launcher_0001\"; $Path=\"/acme\"";
|
||||
|
||||
Cookie cookies[] = parseCookieHeaders(CookieCompliance.RFC2965, rawCookie);
|
||||
Cookie[] cookies = parseCookieHeaders(CookieCompliance.RFC2965, rawCookie);
|
||||
|
||||
assertThat("Cookies.length", cookies.length, is(2));
|
||||
assertCookie("Cookies[0]", cookies[0], "Customer", "WILE_E_COYOTE", 1, "/acme");
|
||||
|
@ -93,7 +93,7 @@ public class CookieCutterTest
|
|||
"Part_Number=\"Rocket_Launcher_0001\"; $Path=\"/acme\"; " +
|
||||
"Shipping=\"FedEx\"; $Path=\"/acme\"";
|
||||
|
||||
Cookie cookies[] = parseCookieHeaders(CookieCompliance.RFC2965, rawCookie);
|
||||
Cookie[] cookies = parseCookieHeaders(CookieCompliance.RFC2965, rawCookie);
|
||||
|
||||
assertThat("Cookies.length", cookies.length, is(3));
|
||||
assertCookie("Cookies[0]", cookies[0], "Customer", "WILE_E_COYOTE", 1, "/acme");
|
||||
|
@ -111,7 +111,7 @@ public class CookieCutterTest
|
|||
"Part_Number=\"Riding_Rocket_0023\"; $Path=\"/acme/ammo\"; " +
|
||||
"Part_Number=\"Rocket_Launcher_0001\"; $Path=\"/acme\"";
|
||||
|
||||
Cookie cookies[] = parseCookieHeaders(CookieCompliance.RFC2965, rawCookie);
|
||||
Cookie[] cookies = parseCookieHeaders(CookieCompliance.RFC2965, rawCookie);
|
||||
|
||||
assertThat("Cookies.length", cookies.length, is(2));
|
||||
assertCookie("Cookies[0]", cookies[0], "Part_Number", "Riding_Rocket_0023", 1, "/acme/ammo");
|
||||
|
@ -128,7 +128,7 @@ public class CookieCutterTest
|
|||
"session_id=\"1234\"; " +
|
||||
"session_id=\"1111\"; $Domain=\".cracker.edu\"";
|
||||
|
||||
Cookie cookies[] = parseCookieHeaders(CookieCompliance.RFC2965, rawCookie);
|
||||
Cookie[] cookies = parseCookieHeaders(CookieCompliance.RFC2965, rawCookie);
|
||||
|
||||
assertThat("Cookies.length", cookies.length, is(2));
|
||||
assertCookie("Cookies[0]", cookies[0], "session_id", "1234", 1, null);
|
||||
|
@ -144,7 +144,7 @@ public class CookieCutterTest
|
|||
String rawCookie = "$Version=\"1\"; session_id=\"1234\", " +
|
||||
"$Version=\"1\"; session_id=\"1111\"; $Domain=\".cracker.edu\"";
|
||||
|
||||
Cookie cookies[] = parseCookieHeaders(CookieCompliance.RFC2965, rawCookie);
|
||||
Cookie[] cookies = parseCookieHeaders(CookieCompliance.RFC2965, rawCookie);
|
||||
|
||||
assertThat("Cookies.length", cookies.length, is(2));
|
||||
assertCookie("Cookies[0]", cookies[0], "session_id", "1234", 1, null);
|
||||
|
@ -164,7 +164,7 @@ public class CookieCutterTest
|
|||
{
|
||||
String rawCookie = "SID=31d4d96e407aad42";
|
||||
|
||||
Cookie cookies[] = parseCookieHeaders(CookieCompliance.RFC6265, rawCookie);
|
||||
Cookie[] cookies = parseCookieHeaders(CookieCompliance.RFC6265, rawCookie);
|
||||
|
||||
assertThat("Cookies.length", cookies.length, is(1));
|
||||
assertCookie("Cookies[0]", cookies[0], "SID", "31d4d96e407aad42", 0, null);
|
||||
|
@ -178,7 +178,7 @@ public class CookieCutterTest
|
|||
{
|
||||
String rawCookie = "SID=31d4d96e407aad42; lang=en-US";
|
||||
|
||||
Cookie cookies[] = parseCookieHeaders(CookieCompliance.RFC6265, rawCookie);
|
||||
Cookie[] cookies = parseCookieHeaders(CookieCompliance.RFC6265, rawCookie);
|
||||
|
||||
assertThat("Cookies.length", cookies.length, is(2));
|
||||
assertCookie("Cookies[0]", cookies[0], "SID", "31d4d96e407aad42", 0, null);
|
||||
|
@ -193,7 +193,7 @@ public class CookieCutterTest
|
|||
{
|
||||
String rawCookie = "key=value";
|
||||
|
||||
Cookie cookies[] = parseCookieHeaders(CookieCompliance.RFC6265, rawCookie);
|
||||
Cookie[] cookies = parseCookieHeaders(CookieCompliance.RFC6265, rawCookie);
|
||||
|
||||
assertThat("Cookies.length", cookies.length, is(1));
|
||||
assertCookie("Cookies[0]", cookies[0], "key", "value", 0, null);
|
||||
|
@ -207,7 +207,7 @@ public class CookieCutterTest
|
|||
{
|
||||
String rawCookie = "$key=value";
|
||||
|
||||
Cookie cookies[] = parseCookieHeaders(CookieCompliance.RFC6265, rawCookie);
|
||||
Cookie[] cookies = parseCookieHeaders(CookieCompliance.RFC6265, rawCookie);
|
||||
|
||||
assertThat("Cookies.length", cookies.length, is(0));
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ public class GzipTester
|
|||
digester = new DigestOutputStream(uncompressedStream, digest);
|
||||
IO.copy(in, digester);
|
||||
|
||||
byte output[] = uncompressedStream.toByteArray();
|
||||
byte[] output = uncompressedStream.toByteArray();
|
||||
String actualSha1Sum = Hex.asHex(digest.digest());
|
||||
return new ContentMetadata(output.length, actualSha1Sum);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ public final class Hex
|
|||
throw new IllegalArgumentException(String.format("Invalid ID length of <%d> expected range of <0> to <%d>", id.length(), (size * 2)));
|
||||
}
|
||||
|
||||
byte buf[] = new byte[size];
|
||||
byte[] buf = new byte[size];
|
||||
byte hex;
|
||||
int len = id.length();
|
||||
|
||||
|
@ -60,7 +60,7 @@ public final class Hex
|
|||
public static String asHex(byte buf[])
|
||||
{
|
||||
int len = buf.length;
|
||||
char out[] = new char[len * 2];
|
||||
char[] out = new char[len * 2];
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
out[i * 2] = hexcodes[(buf[i] & 0xF0) >> 4];
|
||||
|
|
|
@ -42,7 +42,7 @@ public class MessageWriterTest
|
|||
FrameCapture capture = new FrameCapture();
|
||||
try (MessageWriter writer = new MessageWriter(capture, 1024))
|
||||
{
|
||||
char cbuf[] = new char[512];
|
||||
char[] cbuf = new char[512];
|
||||
Arrays.fill(cbuf, 'x');
|
||||
writer.write(cbuf);
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ public class MessageWriterTest
|
|||
FrameCapture capture = new FrameCapture();
|
||||
try (MessageWriter writer = new MessageWriter(capture, 1024))
|
||||
{
|
||||
char cbuf[] = new char[1024 * 2];
|
||||
char[] cbuf = new char[1024 * 2];
|
||||
Arrays.fill(cbuf, 'x');
|
||||
writer.write(cbuf);
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ public class MessageWriterTest
|
|||
FrameCapture capture = new FrameCapture();
|
||||
try (MessageWriter writer = new MessageWriter(capture, writerBufferSize))
|
||||
{
|
||||
char cbuf[] = new char[testSize];
|
||||
char[] cbuf = new char[testSize];
|
||||
Arrays.fill(cbuf, 'x');
|
||||
int remaining = cbuf.length;
|
||||
int offset = 0;
|
||||
|
@ -127,7 +127,7 @@ public class MessageWriterTest
|
|||
WholeMessageCapture capture = new WholeMessageCapture();
|
||||
try (MessageWriter writer = new MessageWriter(capture, writerBufferSize))
|
||||
{
|
||||
char cbuf[] = new char[testSize];
|
||||
char[] cbuf = new char[testSize];
|
||||
Arrays.fill(cbuf, 'x');
|
||||
for (int i = 0; i < testSize; i++)
|
||||
{
|
||||
|
|
|
@ -165,7 +165,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method2 = ReflectUtils.findMethod(KeyValue.class, "onEntry", int.class, String.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(int.class)
|
||||
};
|
||||
|
@ -182,7 +182,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method1 = ReflectUtils.findMethod(KeyValue.class, "onEntry", String.class, int.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(int.class)
|
||||
};
|
||||
|
@ -199,7 +199,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method1 = ReflectUtils.findMethod(KeyValue.class, "onEntry", String.class, int.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(int.class),
|
||||
new InvokerUtils.Arg(Boolean.class)
|
||||
|
@ -217,7 +217,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method1 = ReflectUtils.findMethod(KeyValue.class, "onEntry", String.class, int.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(Long.class),
|
||||
new InvokerUtils.Arg(int.class)
|
||||
|
@ -235,7 +235,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method1 = ReflectUtils.findMethod(KeyValue.class, "onEntry", String.class, int.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(Simple.class),
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(int.class)
|
||||
|
@ -253,7 +253,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method1 = ReflectUtils.findMethod(KeyValue.class, "onEntry", String.class, int.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(Simple.class),
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(Boolean.class),
|
||||
|
@ -273,7 +273,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method = ReflectUtils.findMethod(NamedParams.class, "onMessage", String.class, String.class, int.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class, "fruit"),
|
||||
new InvokerUtils.Arg(String.class, "color"),
|
||||
new InvokerUtils.Arg(int.class, "cost")
|
||||
|
@ -291,7 +291,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method = ReflectUtils.findMethod(NamedParams.class, "onMessage", String.class, String.class, int.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(int.class, "cost"),
|
||||
new InvokerUtils.Arg(String.class, "fruit"),
|
||||
new InvokerUtils.Arg(String.class, "color")
|
||||
|
@ -310,7 +310,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigEmpty");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{};
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{};
|
||||
|
||||
MethodHandle methodHandle = InvokerUtils.mutatedInvoker(SampleSignatures.class, method, callingArgs);
|
||||
String result = (String)methodHandle.invoke(samples);
|
||||
|
@ -323,7 +323,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigEmpty");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(File.class)
|
||||
};
|
||||
|
||||
|
@ -338,7 +338,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigEmpty");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(File.class)
|
||||
};
|
||||
|
||||
|
@ -353,7 +353,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigStr");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class)
|
||||
};
|
||||
|
||||
|
@ -368,7 +368,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigStr");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class)
|
||||
};
|
||||
|
@ -384,7 +384,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigStr");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(File.class)
|
||||
};
|
||||
|
@ -400,7 +400,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigStrFile");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(File.class)
|
||||
};
|
||||
|
@ -416,7 +416,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigStrFile");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class)
|
||||
};
|
||||
|
@ -432,7 +432,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigFileStr");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(File.class)
|
||||
};
|
||||
|
@ -448,7 +448,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigFileStr");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class)
|
||||
};
|
||||
|
@ -464,7 +464,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigFileStrFin");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(boolean.class, "fin")
|
||||
|
@ -481,7 +481,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigFileStrFin");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(boolean.class)
|
||||
|
@ -498,7 +498,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigFileStrFin");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(boolean.class, "fin"),
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class)
|
||||
|
@ -515,7 +515,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigFileStrFin");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(boolean.class),
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class)
|
||||
|
@ -532,7 +532,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigFileStrFin");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(boolean.class, "fin"),
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class)
|
||||
|
|
|
@ -64,7 +64,7 @@ public class InvokerUtils_StaticParamsTest
|
|||
Method method = ReflectUtils.findMethod(Foo.class, "onFruit", String.class);
|
||||
|
||||
// Declared Variable Names
|
||||
final String namedVariables[] = new String[]{
|
||||
final String[] namedVariables = new String[]{
|
||||
"fruit"
|
||||
};
|
||||
|
||||
|
@ -95,7 +95,7 @@ public class InvokerUtils_StaticParamsTest
|
|||
Method method = ReflectUtils.findMethod(Foo.class, "onCount", int.class);
|
||||
|
||||
// Declared Variable Names - as seen in url-template-pattern
|
||||
final String namedVariables[] = new String[]{
|
||||
final String[] namedVariables = new String[]{
|
||||
"count"
|
||||
};
|
||||
|
||||
|
@ -124,7 +124,7 @@ public class InvokerUtils_StaticParamsTest
|
|||
Method method = ReflectUtils.findMethod(Foo.class, "onLabeledCount", String.class, int.class);
|
||||
|
||||
// Declared Variable Names - as seen in url-template-pattern
|
||||
final String namedVariables[] = new String[]{
|
||||
final String[] namedVariables = new String[]{
|
||||
"count"
|
||||
};
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public class NameParamIdentifier implements InvokerUtils.ParamIdentifier
|
|||
@Override
|
||||
public InvokerUtils.Arg getParamArg(Method method, Class<?> paramType, int idx)
|
||||
{
|
||||
Annotation annos[] = method.getParameterAnnotations()[idx];
|
||||
Annotation[] annos = method.getParameterAnnotations()[idx];
|
||||
if (annos != null || (annos.length > 0))
|
||||
{
|
||||
for (Annotation anno : annos)
|
||||
|
|
|
@ -55,9 +55,9 @@ public class JsrBrowserSocket
|
|||
@Override
|
||||
public void run()
|
||||
{
|
||||
char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-|{}[]():".toCharArray();
|
||||
char[] letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-|{}[]():".toCharArray();
|
||||
int lettersLen = letters.length;
|
||||
char randomText[] = new char[size];
|
||||
char[] randomText = new char[size];
|
||||
Random rand = new Random(42);
|
||||
String msg;
|
||||
|
||||
|
@ -141,7 +141,7 @@ public class JsrBrowserSocket
|
|||
}
|
||||
case "many":
|
||||
{
|
||||
String parts[] = StringUtil.csvSplit(val);
|
||||
String[] parts = StringUtil.csvSplit(val);
|
||||
int size = Integer.parseInt(parts[0]);
|
||||
int count = Integer.parseInt(parts[1]);
|
||||
|
||||
|
@ -150,12 +150,12 @@ public class JsrBrowserSocket
|
|||
}
|
||||
case "manythreads":
|
||||
{
|
||||
String parts[] = StringUtil.csvSplit(val);
|
||||
String[] parts = StringUtil.csvSplit(val);
|
||||
int threadCount = Integer.parseInt(parts[0]);
|
||||
int size = Integer.parseInt(parts[1]);
|
||||
int count = Integer.parseInt(parts[2]);
|
||||
|
||||
Thread threads[] = new Thread[threadCount];
|
||||
Thread[] threads = new Thread[threadCount];
|
||||
|
||||
// Setup threads
|
||||
for (int n = 0; n < threadCount; n++)
|
||||
|
@ -194,9 +194,9 @@ public class JsrBrowserSocket
|
|||
|
||||
private void writeManyAsync(int size, int count)
|
||||
{
|
||||
char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-|{}[]():".toCharArray();
|
||||
char[] letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-|{}[]():".toCharArray();
|
||||
int lettersLen = letters.length;
|
||||
char randomText[] = new char[size];
|
||||
char[] randomText = new char[size];
|
||||
Random rand = new Random(42);
|
||||
|
||||
for (int n = 0; n < count; n++)
|
||||
|
|
|
@ -174,7 +174,7 @@ public class DecoderReaderManySmallTest
|
|||
{
|
||||
if (text.startsWith("seq|"))
|
||||
{
|
||||
String parts[] = text.split("\\|");
|
||||
String[] parts = text.split("\\|");
|
||||
int from = Integer.parseInt(parts[1]);
|
||||
int to = Integer.parseInt(parts[2]);
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ public class MessageReceivingTest
|
|||
{
|
||||
session.getBasicRemote().sendBinary(BufferUtil.toBuffer("", UTF_8));
|
||||
session.getBasicRemote().sendBinary(BufferUtil.toBuffer("Echo", UTF_8));
|
||||
byte bigBuf[] = new byte[1024 * 1024];
|
||||
byte[] bigBuf = new byte[1024 * 1024];
|
||||
Arrays.fill(bigBuf, (byte)'x');
|
||||
// allocate fresh ByteBuffer and copy array contents, not wrap
|
||||
// as the send will modify the wrapped array (for client masking purposes)
|
||||
|
@ -215,7 +215,7 @@ public class MessageReceivingTest
|
|||
.preferredSubprotocols(Collections.singletonList("echo"))
|
||||
.build();
|
||||
|
||||
byte raw[] = new byte[1024 * 1024];
|
||||
byte[] raw = new byte[1024 * 1024];
|
||||
Arrays.fill(raw, (byte)'x');
|
||||
String veryLongString = new String(raw, UTF_8);
|
||||
|
||||
|
@ -245,7 +245,7 @@ public class MessageReceivingTest
|
|||
@Override
|
||||
public void onText(String wholeMessage, Callback callback)
|
||||
{
|
||||
String parts[] = wholeMessage.split(" ");
|
||||
String[] parts = wholeMessage.split(" ");
|
||||
for (int i = 0; i < parts.length; i++)
|
||||
{
|
||||
if (i > 0)
|
||||
|
|
|
@ -188,7 +188,7 @@ public class AvailableDecodersTest
|
|||
public void testCoreDecode_ByteArray() throws IllegalAccessException, InstantiationException, DecodeException
|
||||
{
|
||||
ByteBuffer val = Hex.asByteBuffer("112233445566778899");
|
||||
byte expected[] = Hex.asByteArray("112233445566778899");
|
||||
byte[] expected = Hex.asByteArray("112233445566778899");
|
||||
assertBinaryDecoder(byte[].class, val, expected);
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ public class AvailableEncodersTest
|
|||
@Test
|
||||
public void testCoreEncoder_ByteArray() throws IllegalAccessException, InstantiationException, EncodeException
|
||||
{
|
||||
byte buf[] = Hex.asByteArray("998877665544332211");
|
||||
byte[] buf = Hex.asByteArray("998877665544332211");
|
||||
assertBinaryEncoder(byte[].class, buf, "998877665544332211");
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ public class LargeAnnotatedTest
|
|||
{
|
||||
|
||||
// The message size should be bigger than default, but smaller than the limit that LargeEchoSocket specifies
|
||||
byte txt[] = new byte[100 * 1024];
|
||||
byte[] txt = new byte[100 * 1024];
|
||||
Arrays.fill(txt, (byte)'o');
|
||||
String msg = new String(txt, StandardCharsets.UTF_8);
|
||||
coreSession.sendFrame(new Frame(OpCode.TEXT).setPayload(msg), Callback.NOOP, false);
|
||||
|
|
|
@ -111,7 +111,7 @@ public class LargeContainerTest
|
|||
try
|
||||
{
|
||||
// The message size should be bigger than default, but smaller than the limit that LargeEchoSocket specifies
|
||||
byte txt[] = new byte[100 * 1024];
|
||||
byte[] txt = new byte[100 * 1024];
|
||||
Arrays.fill(txt, (byte)'o');
|
||||
String msg = new String(txt, StandardCharsets.UTF_8);
|
||||
coreSession.sendFrame(new Frame(OpCode.TEXT).setPayload(msg), Callback.NOOP, false);
|
||||
|
|
|
@ -83,7 +83,7 @@ public class PingPongTest
|
|||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("PongSocket.onPong(): PongMessage.appData={}", BufferUtil.toDetailString(pong.getApplicationData()));
|
||||
byte buf[] = BufferUtil.toArray(pong.getApplicationData());
|
||||
byte[] buf = BufferUtil.toArray(pong.getApplicationData());
|
||||
String message = new String(buf, StandardCharsets.UTF_8);
|
||||
this.session.getAsyncRemote().sendText("PongSocket.onPong(PongMessage)[" + path + "]:" + message);
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ public class PingPongTest
|
|||
@Override
|
||||
public void onMessage(PongMessage pong)
|
||||
{
|
||||
byte buf[] = BufferUtil.toArray(pong.getApplicationData());
|
||||
byte[] buf = BufferUtil.toArray(pong.getApplicationData());
|
||||
String message = new String(buf, StandardCharsets.UTF_8);
|
||||
this.session.getAsyncRemote().sendText("PongMessageEndpoint.onMessage(PongMessage):[" + path + "]:" + message);
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public class PongSocket
|
|||
{
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("PongSocket.onPong(): PongMessage.appData={}", BufferUtil.toDetailString(pong.getApplicationData()));
|
||||
byte buf[] = BufferUtil.toArray(pong.getApplicationData());
|
||||
byte[] buf = BufferUtil.toArray(pong.getApplicationData());
|
||||
String message = new String(buf, StandardCharsets.UTF_8);
|
||||
this.session.getAsyncRemote().sendText("PongSocket.onPong(PongMessage)[" + path + "]:" + message);
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ public class PrimitivesBinaryEchoTest
|
|||
@OnMessage
|
||||
public byte[] onMessage(byte[] buf) throws IOException
|
||||
{
|
||||
byte ret[] = new byte[buf.length + 1];
|
||||
byte[] ret = new byte[buf.length + 1];
|
||||
ret[0] = (byte)0xFE; // proof that this endpoint got it
|
||||
System.arraycopy(buf, 0, ret, 1, buf.length);
|
||||
return ret;
|
||||
|
|
|
@ -62,7 +62,7 @@ public class SessionTrackingTest
|
|||
return;
|
||||
}
|
||||
|
||||
String parts[] = msg.split("\\|");
|
||||
String[] parts = msg.split("\\|");
|
||||
|
||||
if ("openSessions".equals(parts[0]))
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@ public class PongMessageEndpoint extends Endpoint implements MessageHandler.Whol
|
|||
@Override
|
||||
public void onMessage(PongMessage pong)
|
||||
{
|
||||
byte buf[] = BufferUtil.toArray(pong.getApplicationData());
|
||||
byte[] buf = BufferUtil.toArray(pong.getApplicationData());
|
||||
String message = new String(buf, StandardCharsets.UTF_8);
|
||||
this.session.getAsyncRemote().sendText("PongMessageEndpoint.onMessage(PongMessage):[" + path + "]:" + message);
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ public class ClientDemo
|
|||
op = OpCode.BINARY;
|
||||
}
|
||||
|
||||
byte data[] = null;
|
||||
byte[] data = null;
|
||||
|
||||
switch (op)
|
||||
{
|
||||
|
|
|
@ -62,7 +62,7 @@ public class MessageInputStreamTest
|
|||
stream.accept(frame, Callback.NOOP);
|
||||
|
||||
// Read entire message it from the stream.
|
||||
byte data[] = IO.readBytes(stream);
|
||||
byte[] data = IO.readBytes(stream);
|
||||
String message = new String(data, 0, data.length, StandardCharsets.UTF_8);
|
||||
|
||||
// Test it
|
||||
|
@ -106,7 +106,7 @@ public class MessageInputStreamTest
|
|||
startLatch.await();
|
||||
|
||||
// Read it from the stream.
|
||||
byte data[] = IO.readBytes(stream);
|
||||
byte[] data = IO.readBytes(stream);
|
||||
String message = new String(data, 0, data.length, StandardCharsets.UTF_8);
|
||||
|
||||
// Test it
|
||||
|
@ -204,7 +204,7 @@ public class MessageInputStreamTest
|
|||
stream.accept(msg3, Callback.NOOP);
|
||||
|
||||
// Read entire message it from the stream.
|
||||
byte data[] = IO.readBytes(stream);
|
||||
byte[] data = IO.readBytes(stream);
|
||||
String message = new String(data, 0, data.length, StandardCharsets.UTF_8);
|
||||
|
||||
// Test it
|
||||
|
@ -232,7 +232,7 @@ public class MessageInputStreamTest
|
|||
stream.accept(msg3, Callback.NOOP);
|
||||
|
||||
// Read entire message it from the stream.
|
||||
byte data[] = IO.readBytes(stream);
|
||||
byte[] data = IO.readBytes(stream);
|
||||
String message = new String(data, 0, data.length, StandardCharsets.UTF_8);
|
||||
|
||||
// Test it
|
||||
|
|
|
@ -89,7 +89,7 @@ public class MessageOutputStreamTest
|
|||
public void testWriteLarge_RequiringMultipleBuffers() throws Exception
|
||||
{
|
||||
int bufsize = (int)(OUTPUT_BUFFER_SIZE * 2.5);
|
||||
byte buf[] = new byte[bufsize];
|
||||
byte[] buf = new byte[bufsize];
|
||||
LOG.debug("Buffer sizes: max:{}, test:{}", OUTPUT_BUFFER_SIZE, bufsize);
|
||||
Arrays.fill(buf, (byte)'x');
|
||||
buf[bufsize - 1] = (byte)'o'; // mark last entry for debugging
|
||||
|
|
|
@ -83,7 +83,7 @@ public class MessageWriterTest
|
|||
public void testWriteLarge_RequiringMultipleBuffers() throws Exception
|
||||
{
|
||||
int size = (int)(OUTPUT_BUFFER_SIZE * 2.5);
|
||||
char buf[] = new char[size];
|
||||
char[] buf = new char[size];
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Buffer size: {}", size);
|
||||
Arrays.fill(buf, 'x');
|
||||
|
|
|
@ -165,7 +165,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method2 = ReflectUtils.findMethod(KeyValue.class, "onEntry", int.class, String.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(int.class)
|
||||
};
|
||||
|
@ -182,7 +182,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method1 = ReflectUtils.findMethod(KeyValue.class, "onEntry", String.class, int.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(int.class)
|
||||
};
|
||||
|
@ -199,7 +199,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method1 = ReflectUtils.findMethod(KeyValue.class, "onEntry", String.class, int.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(int.class),
|
||||
new InvokerUtils.Arg(Boolean.class)
|
||||
|
@ -217,7 +217,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method1 = ReflectUtils.findMethod(KeyValue.class, "onEntry", String.class, int.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(Long.class),
|
||||
new InvokerUtils.Arg(int.class)
|
||||
|
@ -235,7 +235,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method1 = ReflectUtils.findMethod(KeyValue.class, "onEntry", String.class, int.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(Simple.class),
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(int.class)
|
||||
|
@ -253,7 +253,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method1 = ReflectUtils.findMethod(KeyValue.class, "onEntry", String.class, int.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(Simple.class),
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(Boolean.class),
|
||||
|
@ -273,7 +273,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method = ReflectUtils.findMethod(NamedParams.class, "onMessage", String.class, String.class, int.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class, "fruit"),
|
||||
new InvokerUtils.Arg(String.class, "color"),
|
||||
new InvokerUtils.Arg(int.class, "cost")
|
||||
|
@ -291,7 +291,7 @@ public class InvokerUtilsTest
|
|||
{
|
||||
Method method = ReflectUtils.findMethod(NamedParams.class, "onMessage", String.class, String.class, int.class);
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(int.class, "cost"),
|
||||
new InvokerUtils.Arg(String.class, "fruit"),
|
||||
new InvokerUtils.Arg(String.class, "color")
|
||||
|
@ -310,7 +310,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigEmpty");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{};
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{};
|
||||
|
||||
MethodHandle methodHandle = InvokerUtils.mutatedInvoker(SampleSignatures.class, method, callingArgs);
|
||||
String result = (String)methodHandle.invoke(samples);
|
||||
|
@ -323,7 +323,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigEmpty");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(File.class)
|
||||
};
|
||||
|
||||
|
@ -338,7 +338,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigEmpty");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(File.class)
|
||||
};
|
||||
|
||||
|
@ -353,7 +353,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigStr");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class)
|
||||
};
|
||||
|
||||
|
@ -368,7 +368,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigStr");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class)
|
||||
};
|
||||
|
@ -384,7 +384,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigStr");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(File.class)
|
||||
};
|
||||
|
@ -400,7 +400,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigStrFile");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(File.class)
|
||||
};
|
||||
|
@ -416,7 +416,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigStrFile");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class)
|
||||
};
|
||||
|
@ -432,7 +432,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigFileStr");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(File.class)
|
||||
};
|
||||
|
@ -448,7 +448,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigFileStr");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class)
|
||||
};
|
||||
|
@ -464,7 +464,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigFileStrFin");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(boolean.class, "fin")
|
||||
|
@ -481,7 +481,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigFileStrFin");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class),
|
||||
new InvokerUtils.Arg(boolean.class)
|
||||
|
@ -498,7 +498,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigFileStrFin");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(boolean.class, "fin"),
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class)
|
||||
|
@ -515,7 +515,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigFileStrFin");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(boolean.class),
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class)
|
||||
|
@ -532,7 +532,7 @@ public class InvokerUtilsTest
|
|||
SampleSignatures samples = new SampleSignatures();
|
||||
Method method = findMethodByName(samples, "sigFileStrFin");
|
||||
|
||||
InvokerUtils.Arg callingArgs[] = new InvokerUtils.Arg[]{
|
||||
InvokerUtils.Arg[] callingArgs = new InvokerUtils.Arg[]{
|
||||
new InvokerUtils.Arg(boolean.class, "fin"),
|
||||
new InvokerUtils.Arg(File.class),
|
||||
new InvokerUtils.Arg(String.class)
|
||||
|
|
|
@ -32,7 +32,7 @@ public class NameParamIdentifier implements InvokerUtils.ParamIdentifier
|
|||
@Override
|
||||
public InvokerUtils.Arg getParamArg(Method method, Class<?> paramType, int idx)
|
||||
{
|
||||
Annotation annos[] = method.getParameterAnnotations()[idx];
|
||||
Annotation[] annos = method.getParameterAnnotations()[idx];
|
||||
if (annos != null || (annos.length > 0))
|
||||
{
|
||||
for (Annotation anno : annos)
|
||||
|
|
|
@ -45,8 +45,8 @@ public class Utf8CharBufferTest
|
|||
ByteBuffer buf = ByteBuffer.allocate(128);
|
||||
Utf8CharBuffer utf = Utf8CharBuffer.wrap(buf);
|
||||
|
||||
byte hellobytes[] = asUTF("Hello ");
|
||||
byte worldbytes[] = asUTF("World!");
|
||||
byte[] hellobytes = asUTF("Hello ");
|
||||
byte[] worldbytes = asUTF("World!");
|
||||
|
||||
utf.append(hellobytes, 0, hellobytes.length);
|
||||
ByteBuffer hellobuf = utf.getByteBuffer();
|
||||
|
@ -67,7 +67,7 @@ public class Utf8CharBufferTest
|
|||
int expectedSize = bufsize / 2;
|
||||
assertThat("Remaining (initial)", utf.remaining(), is(expectedSize));
|
||||
|
||||
byte hellobytes[] = asUTF("Hello World");
|
||||
byte[] hellobytes = asUTF("Hello World");
|
||||
|
||||
utf.append(hellobytes, 0, hellobytes.length);
|
||||
ByteBuffer hellobuf = utf.getByteBuffer();
|
||||
|
@ -79,7 +79,7 @@ public class Utf8CharBufferTest
|
|||
|
||||
assertThat("Remaining (after clear)", utf.remaining(), is(expectedSize));
|
||||
|
||||
byte whatnowbytes[] = asUTF("What Now?");
|
||||
byte[] whatnowbytes = asUTF("What Now?");
|
||||
utf.append(whatnowbytes, 0, whatnowbytes.length);
|
||||
ByteBuffer whatnowbuf = utf.getByteBuffer();
|
||||
|
||||
|
@ -93,7 +93,7 @@ public class Utf8CharBufferTest
|
|||
ByteBuffer buf = ByteBuffer.allocate(64);
|
||||
Utf8CharBuffer utf = Utf8CharBuffer.wrap(buf);
|
||||
|
||||
byte bb[] = asUTF("Hello A\u00ea\u00f1\u00fcC");
|
||||
byte[] bb = asUTF("Hello A\u00ea\u00f1\u00fcC");
|
||||
utf.append(bb, 0, bb.length);
|
||||
|
||||
ByteBuffer actual = utf.getByteBuffer();
|
||||
|
@ -111,7 +111,7 @@ public class Utf8CharBufferTest
|
|||
int expectedSize = bufsize / 2;
|
||||
assertThat("Remaining (initial)", utf.remaining(), is(expectedSize));
|
||||
|
||||
byte bb[] = asUTF("Hello World");
|
||||
byte[] bb = asUTF("Hello World");
|
||||
utf.append(bb, 0, bb.length);
|
||||
|
||||
expectedSize -= bb.length;
|
||||
|
|
|
@ -62,9 +62,9 @@ public class BrowserSocket
|
|||
@Override
|
||||
public void run()
|
||||
{
|
||||
char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-|{}[]():".toCharArray();
|
||||
char[] letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-|{}[]():".toCharArray();
|
||||
int lettersLen = letters.length;
|
||||
char randomText[] = new char[size];
|
||||
char[] randomText = new char[size];
|
||||
Random rand = new Random(42);
|
||||
String msg;
|
||||
|
||||
|
@ -204,7 +204,7 @@ public class BrowserSocket
|
|||
}
|
||||
case "many":
|
||||
{
|
||||
String parts[] = val.split(",");
|
||||
String[] parts = val.split(",");
|
||||
int size = Integer.parseInt(parts[0]);
|
||||
int count = Integer.parseInt(parts[1]);
|
||||
|
||||
|
@ -213,12 +213,12 @@ public class BrowserSocket
|
|||
}
|
||||
case "manythreads":
|
||||
{
|
||||
String parts[] = val.split(",");
|
||||
String[] parts = val.split(",");
|
||||
int threadCount = Integer.parseInt(parts[0]);
|
||||
int size = Integer.parseInt(parts[1]);
|
||||
int count = Integer.parseInt(parts[2]);
|
||||
|
||||
Thread threads[] = new Thread[threadCount];
|
||||
Thread[] threads = new Thread[threadCount];
|
||||
|
||||
// Setup threads
|
||||
for (int n = 0; n < threadCount; n++)
|
||||
|
@ -263,9 +263,9 @@ public class BrowserSocket
|
|||
|
||||
private void writeManyAsync(int size, int count)
|
||||
{
|
||||
char letters[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-|{}[]():".toCharArray();
|
||||
char[] letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-|{}[]():".toCharArray();
|
||||
int lettersLen = letters.length;
|
||||
char randomText[] = new char[size];
|
||||
char[] randomText = new char[size];
|
||||
Random rand = new Random(42);
|
||||
|
||||
for (int n = 0; n < count; n++)
|
||||
|
|
|
@ -34,7 +34,7 @@ public class AcceptHashTest
|
|||
{
|
||||
private static String hexAsKey(String hex)
|
||||
{
|
||||
byte key[] = TypeUtil.fromHexString(hex);
|
||||
byte[] key = TypeUtil.fromHexString(hex);
|
||||
assertThat("Key size of hex:[" + hex + "]", key.length, is(16));
|
||||
return Base64.getEncoder().encodeToString(key);
|
||||
}
|
||||
|
|
|
@ -123,7 +123,7 @@ public class CloseStatusTest
|
|||
private ByteBuffer asByteBuffer(int statusCode, String reason)
|
||||
{
|
||||
int len = 2; // status code length
|
||||
byte utf[] = null;
|
||||
byte[] utf = null;
|
||||
if (StringUtil.isNotBlank(reason))
|
||||
{
|
||||
utf = StringUtil.getUtf8Bytes(reason);
|
||||
|
|
|
@ -85,7 +85,7 @@ public class GeneratorParserRoundtripTest
|
|||
Frame frame = new Frame(OpCode.TEXT).setPayload(message);
|
||||
|
||||
// Add masking
|
||||
byte mask[] = new byte[4];
|
||||
byte[] mask = new byte[4];
|
||||
Arrays.fill(mask, (byte)0xFF);
|
||||
frame.setMask(mask);
|
||||
|
||||
|
|
|
@ -444,7 +444,7 @@ public class GeneratorTest
|
|||
ByteBuffer actual = generate(close.toFrame());
|
||||
ByteBuffer expected = ByteBuffer.allocate(132);
|
||||
|
||||
byte messageBytes[] = message.toString().getBytes(StandardCharsets.UTF_8);
|
||||
byte[] messageBytes = message.toString().getBytes(StandardCharsets.UTF_8);
|
||||
|
||||
expected.put(new byte[]
|
||||
{(byte)0x88});
|
||||
|
@ -507,7 +507,7 @@ public class GeneratorTest
|
|||
frames[pingCount] = CloseStatus.toFrame(CloseStatus.NORMAL);
|
||||
|
||||
// Mask All Frames
|
||||
byte maskingKey[] = Hex.asByteArray("11223344");
|
||||
byte[] maskingKey = Hex.asByteArray("11223344");
|
||||
for (Frame f : frames)
|
||||
{
|
||||
f.setMask(maskingKey);
|
||||
|
@ -520,7 +520,7 @@ public class GeneratorTest
|
|||
expected.append("8986").append("11223344");
|
||||
expected.append(asMaskedHex("ping-1", maskingKey)); // ping 1
|
||||
expected.append("8882").append("11223344");
|
||||
byte closure[] = Hex.asByteArray("03E8");
|
||||
byte[] closure = Hex.asByteArray("03E8");
|
||||
mask(closure, maskingKey);
|
||||
expected.append(Hex.asHex(closure)); // normal closure
|
||||
|
||||
|
@ -756,7 +756,7 @@ public class GeneratorTest
|
|||
int dataSize = 256;
|
||||
|
||||
Frame binary = new Frame(OpCode.BINARY);
|
||||
byte payload[] = new byte[dataSize];
|
||||
byte[] payload = new byte[dataSize];
|
||||
Arrays.fill(payload, (byte)0x44);
|
||||
binary.setPayload(ByteBuffer.wrap(payload));
|
||||
|
||||
|
@ -791,7 +791,7 @@ public class GeneratorTest
|
|||
int dataSize = 1024 * 64;
|
||||
|
||||
Frame binary = new Frame(OpCode.BINARY);
|
||||
byte payload[] = new byte[dataSize];
|
||||
byte[] payload = new byte[dataSize];
|
||||
Arrays.fill(payload, (byte)0x44);
|
||||
binary.setPayload(ByteBuffer.wrap(payload));
|
||||
|
||||
|
@ -866,7 +866,7 @@ public class GeneratorTest
|
|||
public void testGenerate_Text_125BytePaylod()
|
||||
{
|
||||
int length = 125;
|
||||
byte buf[] = new byte[length];
|
||||
byte[] buf = new byte[length];
|
||||
Arrays.fill(buf, (byte)'*');
|
||||
String text = new String(buf, StandardCharsets.UTF_8);
|
||||
|
||||
|
@ -1119,7 +1119,7 @@ public class GeneratorTest
|
|||
public void testGenerate_Text_Hello()
|
||||
{
|
||||
Frame frame = new Frame(OpCode.TEXT).setPayload("Hello");
|
||||
byte utf[] = StringUtil.getUtf8Bytes("Hello");
|
||||
byte[] utf = StringUtil.getUtf8Bytes("Hello");
|
||||
assertGeneratedBytes("8105" + Hex.asHex(utf), frame);
|
||||
}
|
||||
|
||||
|
@ -1127,7 +1127,7 @@ public class GeneratorTest
|
|||
public void testGenerate_Text_Masked()
|
||||
{
|
||||
Frame frame = new Frame(OpCode.TEXT).setPayload("Hello");
|
||||
byte maskingKey[] = Hex.asByteArray("11223344");
|
||||
byte[] maskingKey = Hex.asByteArray("11223344");
|
||||
frame.setMask(maskingKey);
|
||||
|
||||
// what is expected
|
||||
|
@ -1153,7 +1153,7 @@ public class GeneratorTest
|
|||
// payload does not start at position 0.
|
||||
LOG.debug("Payload = {}", BufferUtil.toDetailString(payload));
|
||||
Frame frame = new Frame(OpCode.TEXT).setPayload(payload);
|
||||
byte maskingKey[] = Hex.asByteArray("11223344");
|
||||
byte[] maskingKey = Hex.asByteArray("11223344");
|
||||
frame.setMask(maskingKey);
|
||||
|
||||
// what is expected
|
||||
|
@ -1172,7 +1172,7 @@ public class GeneratorTest
|
|||
public void testGenerate_Windowed()
|
||||
{
|
||||
// A decent sized frame, no masking
|
||||
byte payload[] = new byte[10240];
|
||||
byte[] payload = new byte[10240];
|
||||
Arrays.fill(payload, (byte)0x44);
|
||||
|
||||
Frame frame = new Frame(OpCode.BINARY).setPayload(payload);
|
||||
|
@ -1200,10 +1200,10 @@ public class GeneratorTest
|
|||
public void testGenerate_WithMasking() throws Exception
|
||||
{
|
||||
// A decent sized frame, with masking
|
||||
byte payload[] = new byte[10240];
|
||||
byte[] payload = new byte[10240];
|
||||
Arrays.fill(payload, (byte)0x55);
|
||||
|
||||
byte mask[] = new byte[]
|
||||
byte[] mask = new byte[]
|
||||
{0x2A, (byte)0xF0, 0x0F, 0x00};
|
||||
|
||||
Frame frame = new Frame(OpCode.BINARY).setPayload(payload);
|
||||
|
@ -1308,7 +1308,7 @@ public class GeneratorTest
|
|||
|
||||
private String asMaskedHex(String str, byte[] maskingKey)
|
||||
{
|
||||
byte utf[] = StringUtil.getUtf8Bytes(str);
|
||||
byte[] utf = StringUtil.getUtf8Bytes(str);
|
||||
mask(utf, maskingKey);
|
||||
return Hex.asHex(utf);
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ public class ParsePayloadLengthTest
|
|||
// Create text frame
|
||||
RawFrameBuilder.putOpFin(raw, OpCode.TEXT, true);
|
||||
RawFrameBuilder.putLength(raw, size, false); // len of closeCode
|
||||
byte payload[] = new byte[size];
|
||||
byte[] payload = new byte[size];
|
||||
Arrays.fill(payload, (byte)'x');
|
||||
raw.put(payload);
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ public class ParserReservedBitTest
|
|||
@Test
|
||||
public void testCase3_5()
|
||||
{
|
||||
byte payload[] = new byte[8];
|
||||
byte[] payload = new byte[8];
|
||||
Arrays.fill(payload, (byte)0xFF);
|
||||
|
||||
List<Frame> send = new ArrayList<>();
|
||||
|
@ -167,7 +167,7 @@ public class ParserReservedBitTest
|
|||
@Test
|
||||
public void testCase3_6()
|
||||
{
|
||||
byte payload[] = new byte[8];
|
||||
byte[] payload = new byte[8];
|
||||
Arrays.fill(payload, (byte)0xFF);
|
||||
|
||||
List<Frame> send = new ArrayList<>();
|
||||
|
|
|
@ -470,13 +470,13 @@ public class ParserTest
|
|||
public void testParse_Continuation_ManySmall()
|
||||
{
|
||||
String utf8 = "Hello-\uC2B5@\uC39F\uC3A4\uC3BC\uC3A0\uC3A1-UTF-8!!";
|
||||
byte msg[] = StringUtil.getUtf8Bytes(utf8);
|
||||
byte[] msg = StringUtil.getUtf8Bytes(utf8);
|
||||
|
||||
List<Frame> send = new ArrayList<>();
|
||||
int textCount = 0;
|
||||
int continuationCount = 0;
|
||||
int len = msg.length;
|
||||
byte mini[];
|
||||
byte[] mini;
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
Frame frame;
|
||||
|
@ -1287,7 +1287,7 @@ public class ParserTest
|
|||
// Artificially small buffer/payload
|
||||
final int maxAllowedFrameSize = 1024;
|
||||
|
||||
byte utf[] = new byte[2048];
|
||||
byte[] utf = new byte[2048];
|
||||
Arrays.fill(utf, (byte)'a');
|
||||
|
||||
assertThat("Must be a medium length payload", utf.length, allOf(greaterThan(0x7E), lessThan(0xFFFF)));
|
||||
|
@ -1317,7 +1317,7 @@ public class ParserTest
|
|||
sb.append(". The end.");
|
||||
|
||||
String expectedText = sb.toString();
|
||||
byte utf[] = expectedText.getBytes(StandardCharsets.UTF_8);
|
||||
byte[] utf = expectedText.getBytes(StandardCharsets.UTF_8);
|
||||
|
||||
assertThat("Must be a long length payload", utf.length, greaterThan(0xFFFF));
|
||||
|
||||
|
@ -1340,7 +1340,7 @@ public class ParserTest
|
|||
public void testParse_Text_ManySmallBuffers_NoAutoFragmentation() throws InterruptedException
|
||||
{
|
||||
// Create frames
|
||||
byte payload[] = new byte[65536];
|
||||
byte[] payload = new byte[65536];
|
||||
Arrays.fill(payload, (byte)'*');
|
||||
|
||||
List<Frame> frames = new ArrayList<>();
|
||||
|
@ -1389,7 +1389,7 @@ public class ParserTest
|
|||
sb.append(". The end.");
|
||||
|
||||
String expectedText = sb.toString();
|
||||
byte utf[] = expectedText.getBytes(StandardCharsets.UTF_8);
|
||||
byte[] utf = expectedText.getBytes(StandardCharsets.UTF_8);
|
||||
|
||||
assertThat("Must be a medium length payload", utf.length, allOf(greaterThan(0x7E), lessThan(0xFFFF)));
|
||||
|
||||
|
@ -1412,7 +1412,7 @@ public class ParserTest
|
|||
public void testParse_Text_ShortMasked() throws Exception
|
||||
{
|
||||
String expectedText = "Hello World";
|
||||
byte utf[] = expectedText.getBytes(StandardCharsets.UTF_8);
|
||||
byte[] utf = expectedText.getBytes(StandardCharsets.UTF_8);
|
||||
|
||||
ByteBuffer buf = ByteBuffer.allocate(24);
|
||||
buf.put((byte)0x81);
|
||||
|
@ -1468,7 +1468,7 @@ public class ParserTest
|
|||
{
|
||||
String expectedText = "Hell\uFF4f W\uFF4Frld";
|
||||
|
||||
byte utf[] = expectedText.getBytes(StandardCharsets.UTF_8);
|
||||
byte[] utf = expectedText.getBytes(StandardCharsets.UTF_8);
|
||||
|
||||
ByteBuffer buf = ByteBuffer.allocate(24);
|
||||
buf.put((byte)0x81);
|
||||
|
|
|
@ -217,7 +217,7 @@ public class DeflateFrameExtensionTest extends AbstractExtensionTest
|
|||
public void testCompress_TimeTimeTime()
|
||||
{
|
||||
// What pywebsocket produces for "time:", "time:", "time:"
|
||||
String expected[] = new String[]
|
||||
String[] expected = new String[]
|
||||
{"2AC9CC4DB50200", "2A01110000", "02130000"};
|
||||
|
||||
// Lets see what we produce
|
||||
|
@ -250,7 +250,7 @@ public class DeflateFrameExtensionTest extends AbstractExtensionTest
|
|||
|
||||
// Text to compress
|
||||
String text = "info:";
|
||||
byte uncompressed[] = StringUtil.getUtf8Bytes(text);
|
||||
byte[] uncompressed = StringUtil.getUtf8Bytes(text);
|
||||
|
||||
// Prime the compressor
|
||||
compressor.reset();
|
||||
|
@ -263,7 +263,7 @@ public class DeflateFrameExtensionTest extends AbstractExtensionTest
|
|||
|
||||
while (!compressor.finished())
|
||||
{
|
||||
byte out[] = new byte[64];
|
||||
byte[] out = new byte[64];
|
||||
int len = compressor.deflate(out, 0, out.length, Deflater.SYNC_FLUSH);
|
||||
if (len > 0)
|
||||
{
|
||||
|
@ -273,7 +273,7 @@ public class DeflateFrameExtensionTest extends AbstractExtensionTest
|
|||
compressor.end();
|
||||
|
||||
BufferUtil.flipToFlush(outbuf, 0);
|
||||
byte compressed[] = BufferUtil.toArray(outbuf);
|
||||
byte[] compressed = BufferUtil.toArray(outbuf);
|
||||
// Clear the BFINAL bit that has been set by the compressor.end() call.
|
||||
// In the real implementation we never end() the compressor.
|
||||
compressed[0] &= 0xFE;
|
||||
|
@ -305,14 +305,14 @@ public class DeflateFrameExtensionTest extends AbstractExtensionTest
|
|||
public void testInflateBasics() throws Exception
|
||||
{
|
||||
// should result in "info:" text if properly inflated
|
||||
byte rawbuf[] = TypeUtil.fromHexString("CaCc4bCbB70200"); // what pywebsocket produces
|
||||
// byte rawbuf[] = TypeUtil.fromHexString("CbCc4bCbB70200"); // what java produces
|
||||
byte[] rawbuf = TypeUtil.fromHexString("CaCc4bCbB70200"); // what pywebsocket produces
|
||||
// byte[] rawbuf = TypeUtil.fromHexString("CbCc4bCbB70200"); // what java produces
|
||||
|
||||
Inflater inflater = new Inflater(true);
|
||||
inflater.reset();
|
||||
inflater.setInput(rawbuf, 0, rawbuf.length);
|
||||
|
||||
byte outbuf[] = new byte[64];
|
||||
byte[] outbuf = new byte[64];
|
||||
int len = inflater.inflate(outbuf);
|
||||
inflater.end();
|
||||
assertThat("Inflated length", len, greaterThan(4));
|
||||
|
@ -325,7 +325,7 @@ public class DeflateFrameExtensionTest extends AbstractExtensionTest
|
|||
public void testPyWebSocketServer_Hello()
|
||||
{
|
||||
// Captured from PyWebSocket - "Hello" (echo from server)
|
||||
byte rawbuf[] = TypeUtil.fromHexString("c107f248cdc9c90700");
|
||||
byte[] rawbuf = TypeUtil.fromHexString("c107f248cdc9c90700");
|
||||
assertIncoming(rawbuf, "Hello");
|
||||
}
|
||||
|
||||
|
@ -333,7 +333,7 @@ public class DeflateFrameExtensionTest extends AbstractExtensionTest
|
|||
public void testPyWebSocketServer_Long()
|
||||
{
|
||||
// Captured from PyWebSocket - Long Text (echo from server)
|
||||
byte rawbuf[] = TypeUtil.fromHexString("c1421cca410a80300c44d1abccce9df7" + "f018298634d05631138ab7b7b8fdef1f" + "dc0282e2061d575a45f6f2686bab25e1"
|
||||
byte[] rawbuf = TypeUtil.fromHexString("c1421cca410a80300c44d1abccce9df7" + "f018298634d05631138ab7b7b8fdef1f" + "dc0282e2061d575a45f6f2686bab25e1"
|
||||
+ "3fb7296fa02b5885eb3b0379c394f461" + "98cafd03");
|
||||
assertIncoming(rawbuf, "It's a big enough umbrella but it's always me that ends up getting wet.");
|
||||
}
|
||||
|
@ -342,7 +342,7 @@ public class DeflateFrameExtensionTest extends AbstractExtensionTest
|
|||
public void testPyWebSocketServer_Medium()
|
||||
{
|
||||
// Captured from PyWebSocket - "stackoverflow" (echo from server)
|
||||
byte rawbuf[] = TypeUtil.fromHexString("c10f2a2e494ccece2f4b2d4acbc92f0700");
|
||||
byte[] rawbuf = TypeUtil.fromHexString("c10f2a2e494ccece2f4b2d4acbc92f0700");
|
||||
assertIncoming(rawbuf, "stackoverflow");
|
||||
}
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ public class ExtensionConfigTest
|
|||
@Test
|
||||
public void testParseList_Simple()
|
||||
{
|
||||
String rawHeaders[] = new String[]{
|
||||
String[] rawHeaders = new String[]{
|
||||
"permessage-compress; client_max_window_bits",
|
||||
"capture; output=\"wscapture.log\"",
|
||||
"identity"
|
||||
|
@ -147,7 +147,7 @@ public class ExtensionConfigTest
|
|||
@Test
|
||||
public void testParseList_Unsplit()
|
||||
{
|
||||
String rawHeaders[] = new String[]{
|
||||
String[] rawHeaders = new String[]{
|
||||
"permessage-compress; client_max_window_bits, identity",
|
||||
"capture; output=\"wscapture.log\""
|
||||
};
|
||||
|
|
|
@ -83,7 +83,7 @@ public class ExtensionTool
|
|||
public void parseIncomingHex(String... rawhex)
|
||||
{
|
||||
int parts = rawhex.length;
|
||||
byte net[];
|
||||
byte[] net;
|
||||
|
||||
for (int i = 0; i < parts; i++)
|
||||
{
|
||||
|
@ -105,7 +105,7 @@ public class ExtensionTool
|
|||
|
||||
public void assertHasFrames(String... textFrames)
|
||||
{
|
||||
Frame frames[] = new Frame[textFrames.length];
|
||||
Frame[] frames = new Frame[textFrames.length];
|
||||
for (int i = 0; i < frames.length; i++)
|
||||
{
|
||||
frames[i] = new Frame(OpCode.TEXT).setPayload(textFrames[i]);
|
||||
|
|
|
@ -115,7 +115,7 @@ public class MultiPartTest extends HttpServlet
|
|||
throws IOException
|
||||
{
|
||||
int bufferSize = 8192;
|
||||
byte buffer[] = new byte[bufferSize];
|
||||
byte[] buffer = new byte[bufferSize];
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue