Skip to content

Commit

Permalink
Updated all arrays after merge of #3846
Browse files Browse the repository at this point in the history
Signed-off-by: Greg Wilkins <gregw@webtide.com>
  • Loading branch information
gregw committed Jul 3, 2019
1 parent 5568f83 commit 9fe27eb
Show file tree
Hide file tree
Showing 38 changed files with 151 additions and 151 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void testRFC_Single()
{
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");
Expand All @@ -75,7 +75,7 @@ public void testRFC_Double()
"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");
Expand All @@ -93,7 +93,7 @@ public void testRFC_Triple()
"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");
Expand All @@ -111,7 +111,7 @@ public void testRFC_PathExample()
"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");
Expand All @@ -128,7 +128,7 @@ public void testRFC2109_CookieSpoofingExample()
"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);
Expand All @@ -144,7 +144,7 @@ public void testRFC2965_CookieSpoofingExample()
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);
Expand All @@ -164,7 +164,7 @@ public void testRFC6265_SidExample()
{
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);
Expand All @@ -178,7 +178,7 @@ public void testRFC6265_SidLangExample()
{
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);
Expand All @@ -193,7 +193,7 @@ public void testKeyValue()
{
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);
Expand All @@ -207,7 +207,7 @@ public void testDollarName()
{
String rawCookie = "$key=value";

Cookie cookies[] = parseCookieHeaders(CookieCompliance.RFC6265, rawCookie);
Cookie[] cookies = parseCookieHeaders(CookieCompliance.RFC6265, rawCookie);

assertThat("Cookies.length", cookies.length, is(0));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ else if (contentEncoding.contains(GzipHandler.DEFLATE))
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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static byte[] asByteArray(String id, int size)
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();

Expand Down Expand Up @@ -60,7 +60,7 @@ public static byte[] asByteArray(String id, int size)
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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void testSingleByteArray_512b() throws IOException, InterruptedException
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);
}
Expand All @@ -59,7 +59,7 @@ public void testSingleByteArray_2k() throws IOException, InterruptedException
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);
}
Expand All @@ -85,7 +85,7 @@ public void testMultipleByteArrays_2k() throws IOException, InterruptedException
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;
Expand Down Expand Up @@ -127,7 +127,7 @@ public void testSlightLargerThenBufferSize() throws IOException, InterruptedExce
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++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public void testKeyValueBackwards() throws Throwable
{
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)
};
Expand All @@ -182,7 +182,7 @@ public void testKeyValueNormal() throws Throwable
{
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)
};
Expand All @@ -199,7 +199,7 @@ public void testKeyValue_ExtraArgs_AtEnd() throws Throwable
{
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)
Expand All @@ -217,7 +217,7 @@ public void testKeyValue_ExtraArgs_InMiddle() throws Throwable
{
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)
Expand All @@ -235,7 +235,7 @@ public void testKeyValue_ExtraArgs_AtStart() throws Throwable
{
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)
Expand All @@ -253,7 +253,7 @@ public void testKeyValue_ExtraArgs_Mixed() throws Throwable
{
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),
Expand All @@ -273,7 +273,7 @@ public void testNamed_AllParams() throws Throwable
{
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")
Expand All @@ -291,7 +291,7 @@ public void testNamed_AllParams_Mixed() throws Throwable
{
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")
Expand All @@ -310,7 +310,7 @@ public void testEmpty_Call_None() throws Throwable
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);
Expand All @@ -323,7 +323,7 @@ public void testEmpty_Call_File() throws Throwable
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)
};

Expand All @@ -338,7 +338,7 @@ public void testEmpty_Call_NullFile() throws Throwable
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)
};

Expand All @@ -353,7 +353,7 @@ public void testString_Call_String() throws Throwable
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)
};

Expand All @@ -368,7 +368,7 @@ public void testString_Call_File_String() throws Throwable
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)
};
Expand All @@ -384,7 +384,7 @@ public void testString_Call_String_File() throws Throwable
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)
};
Expand All @@ -400,7 +400,7 @@ public void testStringFile_Call_String_File() throws Throwable
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)
};
Expand All @@ -416,7 +416,7 @@ public void testStringFile_Call_File_String() throws Throwable
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)
};
Expand All @@ -432,7 +432,7 @@ public void testFileString_Call_String_File() throws Throwable
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)
};
Expand All @@ -448,7 +448,7 @@ public void testFileString_Call_File_String() throws Throwable
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)
};
Expand All @@ -464,7 +464,7 @@ public void testFileStringFin_Call_File_String_BoolTag() throws Throwable
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")
Expand All @@ -481,7 +481,7 @@ public void testFileStringFin_Call_File_String_Bool() throws Throwable
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)
Expand All @@ -498,7 +498,7 @@ public void testFileStringFin_Call_BoolTag_File_String() throws Throwable
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)
Expand All @@ -515,7 +515,7 @@ public void testFileStringFin_Call_Bool_File_String() throws Throwable
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)
Expand All @@ -532,7 +532,7 @@ public void testFileStringFin_Call_BoolTag_Null_String() throws Throwable
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void testOnlyParam_String() throws Throwable
Method method = ReflectUtils.findMethod(Foo.class, "onFruit", String.class);

// Declared Variable Names
final String namedVariables[] = new String[]{
final String[] namedVariables = new String[]{
"fruit"
};

Expand Down Expand Up @@ -95,7 +95,7 @@ public void testOnlyParam_Int() throws Throwable
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"
};

Expand Down Expand Up @@ -124,7 +124,7 @@ public void testLabeledParam_StringInt() throws Throwable
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"
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading

0 comments on commit 9fe27eb

Please sign in to comment.