Open brunoborges opened 3 weeks ago
Examples:
// Example 1 private static SpringApplicationBuilder configureApplication(SpringApplicationBuilder builder) { System.setProperty("org.jboss.logging.provider", "slf4j"); return builder.sources(SpringInitializer.class); } // Example 2 List<String> profiles = new ArrayList<>(); if (Boolean.parseBoolean(System.getProperty("profile.eventScheduler", Boolean.toString(true)))) { profiles.add("EventScheduler"); } if (Boolean.parseBoolean(System.getProperty("profile.taskScheduler", Boolean.toString(true)))) { profiles.add("TaskScheduler"); } // Example 3 private String getSuffix() { String suffix = ""; String instance = System.getenv("INSTANCE_ID"); if (StringUtils.isNotEmpty(instance)) { String[] split = StringUtils.split(instance, "-"); if (split.length > 0) { suffix = "-" + split[0]; } } return suffix; } // Example 4 static { String port; if ((port = System.getProperty("test.port")) != null) { TEST_PORT = Integer.parseInt(port); } } // Example 5 HttpClient httpClient = HttpClient.create() .proxy(proxy -> proxy .type(ProxyProvider.Proxy.HTTP) .host(System.getProperty("https.proxyHost")) .port(Integer.valueOf(System.getProperty("https.proxyPort"))) .nonProxyHosts(createNonProxyPattern(System.getProperty("http.nonProxyHosts"))) );
No change in the pattern in both the versions. The above examples should have been triggered by the existing pattern.
What about adding some more tests to make sure these patterns are triggered ?
Examples: