Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
This commit is contained in:
commit
d6ec96fe1b
|
@ -107,6 +107,11 @@
|
|||
</module>
|
||||
-->
|
||||
|
||||
<!-- Enforced Whitespace After specific tokens -->
|
||||
<module name="WhitespaceAfter">
|
||||
<property name="tokens" value="COMMA, SEMI, LITERAL_IF, LITERAL_ELSE, LITERAL_WHILE, LITERAL_DO, LITERAL_FOR, DO_WHILE" />
|
||||
</module>
|
||||
|
||||
<!-- No Whitespace After specific tokens -->
|
||||
<module name="NoWhitespaceAfter">
|
||||
<property name="tokens" value="ARRAY_INIT, AT, INC, DEC, UNARY_MINUS, UNARY_PLUS, BNOT, LNOT, DOT, ARRAY_DECLARATOR, INDEX_OP, TYPECAST" />
|
||||
|
|
|
@ -113,7 +113,7 @@ public class DispatchServletTest
|
|||
context.addServlet(DefaultServlet.class, "/");
|
||||
|
||||
String[] selfRefs =
|
||||
{"/dispatch/forward", "/dispatch/includeS", "/dispatch/includeW", "/dispatch/includeN",};
|
||||
{"/dispatch/forward", "/dispatch/includeS", "/dispatch/includeW", "/dispatch/includeN"};
|
||||
|
||||
/*
|
||||
* Number of nested dispatch requests. 220 is a good value, as it won't
|
||||
|
|
|
@ -272,7 +272,7 @@ public abstract class AbstractWebAppMojo extends AbstractMojo
|
|||
* Extra environment variables to be passed to the forked process
|
||||
*/
|
||||
@Parameter
|
||||
protected Map<String,String> env = new HashMap<String,String>();
|
||||
protected Map<String, String> env = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Arbitrary jvm args to pass to the forked process
|
||||
|
|
|
@ -190,7 +190,7 @@ public class ServerSupport
|
|||
if (files == null || files.isEmpty())
|
||||
return server;
|
||||
|
||||
Map<String,Object> lastMap = new HashMap<String,Object>();
|
||||
Map<String, Object> lastMap = new HashMap<>();
|
||||
|
||||
if (server != null)
|
||||
lastMap.put("Server", server);
|
||||
|
|
|
@ -97,7 +97,7 @@ public class OpenIdAuthenticationTest
|
|||
OpenIdConfiguration configuration = new OpenIdConfiguration(openIdProvider.getProvider(), CLIENT_ID, CLIENT_SECRET);
|
||||
|
||||
// Configure OpenIdLoginService optionally providing a base LoginService to provide user roles
|
||||
OpenIdLoginService loginService = new OpenIdLoginService(configuration);//, hashLoginService);
|
||||
OpenIdLoginService loginService = new OpenIdLoginService(configuration);
|
||||
securityHandler.setLoginService(loginService);
|
||||
|
||||
Authenticator authenticator = new OpenIdAuthenticator(configuration, "/error");
|
||||
|
|
|
@ -30,7 +30,6 @@ import org.eclipse.jetty.security.ConstraintMapping;
|
|||
import org.eclipse.jetty.security.ConstraintSecurityHandler;
|
||||
import org.eclipse.jetty.security.HashLoginService;
|
||||
import org.eclipse.jetty.security.authentication.BasicAuthenticator;
|
||||
import org.eclipse.jetty.server.AbstractConnector;
|
||||
import org.eclipse.jetty.server.Connector;
|
||||
import org.eclipse.jetty.server.CustomRequestLog;
|
||||
import org.eclipse.jetty.server.Handler;
|
||||
|
|
|
@ -153,7 +153,7 @@ public class ClassLoaderDumpTest
|
|||
{
|
||||
Server server = new Server();
|
||||
ClassLoader middleLoader = new URLClassLoader(new URL[]
|
||||
{new URL("file:/one"), new URL("file:/two"), new URL("file:/three"),},
|
||||
{new URL("file:/one"), new URL("file:/two"), new URL("file:/three")},
|
||||
Server.class.getClassLoader())
|
||||
{
|
||||
public String toString()
|
||||
|
@ -162,7 +162,7 @@ public class ClassLoaderDumpTest
|
|||
}
|
||||
};
|
||||
ClassLoader loader = new URLClassLoader(new URL[]
|
||||
{new URL("file:/ONE"), new URL("file:/TWO"), new URL("file:/THREE"),},
|
||||
{new URL("file:/ONE"), new URL("file:/TWO"), new URL("file:/THREE")},
|
||||
middleLoader)
|
||||
{
|
||||
public String toString()
|
||||
|
|
|
@ -94,7 +94,7 @@ public class IncludeJettyDirTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1");
|
||||
|
||||
// Simple command line - no reference to include-jetty-dirs
|
||||
|
@ -124,7 +124,7 @@ public class IncludeJettyDirTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1");
|
||||
|
||||
// Simple command line reference to include-jetty-dir
|
||||
|
@ -158,7 +158,7 @@ public class IncludeJettyDirTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1");
|
||||
|
||||
// Simple command line reference to include-jetty-dir via property (also on command line)
|
||||
|
@ -198,7 +198,7 @@ public class IncludeJettyDirTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1");
|
||||
|
||||
String dirRef = "${my.opt}" + File.separator + "common";
|
||||
|
@ -240,7 +240,7 @@ public class IncludeJettyDirTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1");
|
||||
|
||||
String dirRef = "${my.opt}" + File.separator + "${my.dir}";
|
||||
|
@ -280,8 +280,8 @@ public class IncludeJettyDirTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
"jetty.http.host=127.0.0.1",//
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1",
|
||||
"--include-jetty-dir=" + common.toString());
|
||||
|
||||
MainResult result = runMain(base, home);
|
||||
|
@ -316,9 +316,9 @@ public class IncludeJettyDirTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
"jetty.http.host=127.0.0.1",//
|
||||
"--include-jetty-dir=" + common.toString(), //
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1",
|
||||
"--include-jetty-dir=" + common.toString(),
|
||||
"--include-jetty-dir=" + corp.toString());
|
||||
|
||||
MainResult result = runMain(base, home);
|
||||
|
@ -350,15 +350,15 @@ public class IncludeJettyDirTest
|
|||
// Create common
|
||||
Path common = testdir.getPathFile("common");
|
||||
FS.ensureEmpty(common);
|
||||
TestEnv.makeFile(common, "start.ini", //
|
||||
"--include-jetty-dir=" + corp.toString(), //
|
||||
TestEnv.makeFile(common, "start.ini",
|
||||
"--include-jetty-dir=" + corp.toString(),
|
||||
"jetty.http.port=8080");
|
||||
|
||||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
"jetty.http.host=127.0.0.1",//
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1",
|
||||
"--include-jetty-dir=" + common.toString());
|
||||
|
||||
MainResult result = runMain(base, home);
|
||||
|
@ -385,23 +385,23 @@ public class IncludeJettyDirTest
|
|||
// Create corp
|
||||
Path corp = testdir.getPathFile("corp");
|
||||
FS.ensureEmpty(corp);
|
||||
TestEnv.makeFile(corp, "start.ini", //
|
||||
TestEnv.makeFile(corp, "start.ini",
|
||||
"jetty.http.port=9090");
|
||||
|
||||
// Create common
|
||||
Path common = testdir.getPathFile("common");
|
||||
FS.ensureEmpty(common);
|
||||
TestEnv.makeFile(common, "start.ini", //
|
||||
"my.corp=" + corp.toString(), //
|
||||
"--include-jetty-dir=${my.corp}", //
|
||||
TestEnv.makeFile(common, "start.ini",
|
||||
"my.corp=" + corp.toString(),
|
||||
"--include-jetty-dir=${my.corp}",
|
||||
"jetty.http.port=8080");
|
||||
|
||||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
"jetty.http.host=127.0.0.1",//
|
||||
"my.common=" + common.toString(), //
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1",
|
||||
"my.common=" + common.toString(),
|
||||
"--include-jetty-dir=${my.common}");
|
||||
|
||||
MainResult result = runMain(base, home);
|
||||
|
@ -428,28 +428,28 @@ public class IncludeJettyDirTest
|
|||
// Create devops
|
||||
Path devops = testdir.getPathFile("devops");
|
||||
FS.ensureEmpty(devops);
|
||||
TestEnv.makeFile(devops, "start.ini", //
|
||||
"--module=optional", //
|
||||
TestEnv.makeFile(devops, "start.ini",
|
||||
"--module=optional",
|
||||
"jetty.http.port=2222");
|
||||
|
||||
// Create corp
|
||||
Path corp = testdir.getPathFile("corp");
|
||||
FS.ensureEmpty(corp);
|
||||
TestEnv.makeFile(corp, "start.ini", //
|
||||
TestEnv.makeFile(corp, "start.ini",
|
||||
"jetty.http.port=9090");
|
||||
|
||||
// Create common
|
||||
Path common = testdir.getPathFile("common");
|
||||
FS.ensureEmpty(common);
|
||||
TestEnv.makeFile(common, "start.ini", //
|
||||
"--include-jetty-dir=" + corp.toString(), //
|
||||
TestEnv.makeFile(common, "start.ini",
|
||||
"--include-jetty-dir=" + corp.toString(),
|
||||
"jetty.http.port=8080");
|
||||
|
||||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
"jetty.http.host=127.0.0.1",//
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1",
|
||||
"--include-jetty-dir=" + common.toString());
|
||||
|
||||
MainResult result = runMain(base, home,
|
||||
|
@ -479,21 +479,21 @@ public class IncludeJettyDirTest
|
|||
// Create corp
|
||||
Path corp = testdir.getPathFile("corp");
|
||||
FS.ensureEmpty(corp);
|
||||
TestEnv.makeFile(corp, "start.ini", //
|
||||
TestEnv.makeFile(corp, "start.ini",
|
||||
"jetty.http.port=9090");
|
||||
|
||||
// Create common
|
||||
Path common = testdir.getPathFile("common");
|
||||
FS.ensureEmpty(common);
|
||||
TestEnv.makeFile(common, "start.ini", //
|
||||
"--include-jetty-dir=" + corp.toString(), //
|
||||
TestEnv.makeFile(common, "start.ini",
|
||||
"--include-jetty-dir=" + corp.toString(),
|
||||
"jetty.http.port=8080");
|
||||
|
||||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
"jetty.http.host=127.0.0.1",//
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1",
|
||||
"--include-jetty-dir=" + common.toString());
|
||||
|
||||
MainResult result = runMain(base, home,
|
||||
|
@ -542,8 +542,8 @@ public class IncludeJettyDirTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
"jetty.http.host=127.0.0.1",//
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1",
|
||||
"--include-jetty-dir=" + common.toString());
|
||||
|
||||
UsageException e = assertThrows(UsageException.class, () -> runMain(base, home));
|
||||
|
|
|
@ -88,7 +88,7 @@ public class ConfigSourcesTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1");
|
||||
|
||||
ConfigSources sources = new ConfigSources();
|
||||
|
@ -117,8 +117,8 @@ public class ConfigSourcesTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
"jetty.http.host=127.0.0.1",//
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1",
|
||||
"--include-jetty-dir=" + common.toString());
|
||||
|
||||
ConfigSources sources = new ConfigSources();
|
||||
|
@ -147,7 +147,7 @@ public class ConfigSourcesTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1");
|
||||
|
||||
ConfigSources sources = new ConfigSources();
|
||||
|
@ -193,7 +193,7 @@ public class ConfigSourcesTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1");
|
||||
|
||||
String dirRef = "${my.opt}" + File.separator + "common";
|
||||
|
@ -240,7 +240,7 @@ public class ConfigSourcesTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1");
|
||||
|
||||
String dirRef = "${my.opt}" + File.separator + "${my.dir}";
|
||||
|
@ -286,8 +286,8 @@ public class ConfigSourcesTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
"jetty.http.host=127.0.0.1",//
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1",
|
||||
"--include-jetty-dir=" + common.toString());
|
||||
|
||||
ConfigSources sources = new ConfigSources();
|
||||
|
@ -325,9 +325,9 @@ public class ConfigSourcesTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
"jetty.http.host=127.0.0.1",//
|
||||
"--include-jetty-dir=" + common.toString(), //
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1",
|
||||
"--include-jetty-dir=" + common.toString(),
|
||||
"--include-jetty-dir=" + corp.toString());
|
||||
|
||||
ConfigSources sources = new ConfigSources();
|
||||
|
@ -359,21 +359,21 @@ public class ConfigSourcesTest
|
|||
// Create corp
|
||||
Path corp = testdir.getPathFile("corp");
|
||||
FS.ensureEmpty(corp);
|
||||
TestEnv.makeFile(corp, "start.ini", //
|
||||
TestEnv.makeFile(corp, "start.ini",
|
||||
"jetty.http.port=9090");
|
||||
|
||||
// Create common
|
||||
Path common = testdir.getPathFile("common");
|
||||
FS.ensureEmpty(common);
|
||||
TestEnv.makeFile(common, "start.ini", //
|
||||
"--include-jetty-dir=" + corp.toString(), //
|
||||
TestEnv.makeFile(common, "start.ini",
|
||||
"--include-jetty-dir=" + corp.toString(),
|
||||
"jetty.http.port=8080");
|
||||
|
||||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
"jetty.http.host=127.0.0.1",//
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1",
|
||||
"--include-jetty-dir=" + common.toString());
|
||||
|
||||
ConfigSources sources = new ConfigSources();
|
||||
|
@ -405,23 +405,23 @@ public class ConfigSourcesTest
|
|||
// Create corp
|
||||
Path corp = testdir.getPathFile("corp");
|
||||
FS.ensureEmpty(corp);
|
||||
TestEnv.makeFile(corp, "start.ini", //
|
||||
TestEnv.makeFile(corp, "start.ini",
|
||||
"jetty.http.port=9090");
|
||||
|
||||
// Create common
|
||||
Path common = testdir.getPathFile("common");
|
||||
FS.ensureEmpty(common);
|
||||
TestEnv.makeFile(common, "start.ini", //
|
||||
"my.corp=" + corp.toString(), //
|
||||
"--include-jetty-dir=${my.corp}", //
|
||||
TestEnv.makeFile(common, "start.ini",
|
||||
"my.corp=" + corp.toString(),
|
||||
"--include-jetty-dir=${my.corp}",
|
||||
"jetty.http.port=8080");
|
||||
|
||||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
"jetty.http.host=127.0.0.1",//
|
||||
"my.common=" + common.toString(), //
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1",
|
||||
"my.common=" + common.toString(),
|
||||
"--include-jetty-dir=${my.common}");
|
||||
|
||||
ConfigSources sources = new ConfigSources();
|
||||
|
@ -454,28 +454,28 @@ public class ConfigSourcesTest
|
|||
// Create devops
|
||||
Path devops = testdir.getPathFile("devops");
|
||||
FS.ensureEmpty(devops);
|
||||
TestEnv.makeFile(devops, "start.ini", //
|
||||
"--module=logging", //
|
||||
TestEnv.makeFile(devops, "start.ini",
|
||||
"--module=logging",
|
||||
"jetty.http.port=2222");
|
||||
|
||||
// Create corp
|
||||
Path corp = testdir.getPathFile("corp");
|
||||
FS.ensureEmpty(corp);
|
||||
TestEnv.makeFile(corp, "start.ini", //
|
||||
TestEnv.makeFile(corp, "start.ini",
|
||||
"jetty.http.port=9090");
|
||||
|
||||
// Create common
|
||||
Path common = testdir.getPathFile("common");
|
||||
FS.ensureEmpty(common);
|
||||
TestEnv.makeFile(common, "start.ini", //
|
||||
"--include-jetty-dir=" + corp.toString(), //
|
||||
TestEnv.makeFile(common, "start.ini",
|
||||
"--include-jetty-dir=" + corp.toString(),
|
||||
"jetty.http.port=8080");
|
||||
|
||||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
"jetty.http.host=127.0.0.1",//
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1",
|
||||
"--include-jetty-dir=" + common.toString());
|
||||
|
||||
ConfigSources sources = new ConfigSources();
|
||||
|
@ -512,21 +512,21 @@ public class ConfigSourcesTest
|
|||
// Create corp
|
||||
Path corp = testdir.getPathFile("corp");
|
||||
FS.ensureEmpty(corp);
|
||||
TestEnv.makeFile(corp, "start.ini", //
|
||||
TestEnv.makeFile(corp, "start.ini",
|
||||
"jetty.http.port=9090");
|
||||
|
||||
// Create common
|
||||
Path common = testdir.getPathFile("common");
|
||||
FS.ensureEmpty(common);
|
||||
TestEnv.makeFile(common, "start.ini", //
|
||||
"--include-jetty-dir=" + corp.toString(), //
|
||||
TestEnv.makeFile(common, "start.ini",
|
||||
"--include-jetty-dir=" + corp.toString(),
|
||||
"jetty.http.port=8080");
|
||||
|
||||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
"jetty.http.host=127.0.0.1",//
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1",
|
||||
"--include-jetty-dir=" + common.toString());
|
||||
|
||||
ConfigSources sources = new ConfigSources();
|
||||
|
@ -581,8 +581,8 @@ public class ConfigSourcesTest
|
|||
// Create base
|
||||
Path base = testdir.getPathFile("base");
|
||||
FS.ensureEmpty(base);
|
||||
TestEnv.makeFile(base, "start.ini", //
|
||||
"jetty.http.host=127.0.0.1",//
|
||||
TestEnv.makeFile(base, "start.ini",
|
||||
"jetty.http.host=127.0.0.1",
|
||||
"--include-jetty-dir=" + common.toString());
|
||||
|
||||
ConfigSources sources = new ConfigSources();
|
||||
|
|
|
@ -219,11 +219,13 @@ public class SearchPatternTest
|
|||
public void testExampleFrom4673()
|
||||
{
|
||||
SearchPattern pattern = SearchPattern.compile("\r\n------WebKitFormBoundaryhXfFAMfUnUKhmqT8".getBytes(StandardCharsets.US_ASCII));
|
||||
byte[] data = new byte[]{118,97,108,117,101,49,
|
||||
byte[] data = new byte[]{
|
||||
118, 97, 108, 117, 101, 49,
|
||||
'\r', '\n', '-', '-', '-', '-',
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0,0,0,0,0,0,0,0,0,0};
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||
};
|
||||
int length = 12;
|
||||
|
||||
int partialMatch = pattern.endsWith(data, 0, length);
|
||||
|
|
Loading…
Reference in New Issue