Skip to content

Commit

Permalink
Merge pull request #12097 from chadlwilson/bump-tee
Browse files Browse the repository at this point in the history
Bump Team Explorer/TFS SDK to 14.138.0
  • Loading branch information
chadlwilson committed Oct 12, 2023
2 parents 68ebe6e + 3e9d222 commit 0dfa3ab
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@
import java.nio.file.Files;
import java.nio.file.Path;

import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class LogConfiguratorTest {
Expand All @@ -42,7 +40,7 @@ public class LogConfiguratorTest {
private PrintStream originalOut;

@BeforeEach
public void setUp() throws Exception {
public void setUp() {
originalErr = System.err;
originalOut = System.out;

Expand All @@ -51,13 +49,13 @@ public void setUp() throws Exception {
}

@AfterEach
public void tearDown() throws Exception {
public void tearDown() {
System.setErr(originalErr);
System.setOut(originalOut);
}

@Test
public void shouldUseDefaultLog4jConfigIfUserSpecifiedConfigFileIsNotFound() throws Exception {
public void shouldUseDefaultConfigIfUserSpecifiedConfigFileIsNotFound() {
final boolean[] defaultLoggingInvoked = {false};
LogConfigurator logConfigurator = new LogConfigurator("non-existant-dir", "non-existant.properties") {
@Override
Expand All @@ -75,7 +73,7 @@ protected void configureDefaultLogging() {
}

@Test
public void shouldUseDefaultLog4jConfigFromClasspathIfUserSpecifiedConfigFileIsNotFound() throws Exception {
public void shouldUseDefaultConfigFromClasspathIfUserSpecifiedConfigFileIsNotFound() {
final URL[] initializeFromPropertyResource = {null};
LogConfigurator logConfigurator = new LogConfigurator("xxx", "logging-test-logback.xml") {
@Override
Expand All @@ -93,7 +91,7 @@ protected void configureWith(URL resource) {
}

@Test
public void shouldFallbackToDefaultFileIfLog4jConfigFound(@TempDir Path temporaryFolder) throws Exception {
public void shouldFallbackToDefaultFileIfConfigFound(@TempDir Path temporaryFolder) throws Exception {
Path configFile = Files.createTempFile(temporaryFolder, "config", null);
final URL[] initializeFromPropertiesFile = {null};
LogConfigurator logConfigurator = new LogConfigurator(temporaryFolder.toAbsolutePath().toString(), configFile.getFileName().toString()) {
Expand Down
9 changes: 4 additions & 5 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ final Map<String, String> v = [
ztExec : versionOf(libraries.ztExec),

// misc
tanuki : '3.5.54-st',
tanuki : '3.5.54-st', // https://wrapper.tanukisoftware.com/doc/english/download.jsp#stable
tanukiSha256sum : '37cc32b74004c14651c5039d5e6491e1c0912570cf7706aa772a66c6ed69cbe6',
tfsSdk : '14.137.0',
tfsSdkSha256sum : '1f3a5a29b777511e06b5f88e8bea5a670426ee0e01a0e649f160bc493e306e91',
tini : '0.19.0',
tfsSdk : '14.138.0', // https://github.com/microsoft/team-explorer-everywhere/releases
tfsSdkSha256sum : '89b417c181d8194bfbf64f3d6cc933b724429ff7b79ee38e7238e99c7dda1602',
tini : '0.19.0', // https://github.com/krallin/tini/releases
]

// While Dependabot won't be able to parse these deps, these will get upgraded for free anyway since they share versions
Expand Down Expand Up @@ -208,7 +208,6 @@ final Map<String, String> related = [
mockitoJunit5 : "org.mockito:mockito-junit-jupiter",
slf4jJcl : "org.slf4j:jcl-over-slf4j:${v.slf4j}",
slf4jJul : "org.slf4j:jul-to-slf4j:${v.slf4j}",
slf4jLog4j : "org.slf4j:log4j-over-slf4j:${v.slf4j}",
springContext : "org.springframework:spring-context:${v.spring}",
springContextSupport : "org.springframework:spring-context-support:${v.spring}",
springOrm : "org.springframework:spring-orm:${v.spring}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private ClassLoader initSdkLoader() throws IOException {

explodeNatives();
setNativePath(tempFolder);
return new NestedJarClassLoader(getJarURL(), "org/apache/log4j/", "org/apache/commons/logging/");
return new NestedJarClassLoader(getJarURL(), "org/apache/commons/logging/");
}

private void setNativePath(File tempFolder) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ private WebAppContext createWebAppContext() {

// delegate all logging to parent classloader to avoid initialization of loggers in multiple classloaders
context.addSystemClassMatcher(new ClassMatcher(
"org.apache.log4j.",
"org.slf4j.",
"org.apache.commons.logging.")
"org.slf4j.",
"org.apache.commons.logging."
)
);

context.setWar(getWarFile());
Expand Down
2 changes: 0 additions & 2 deletions server-launcher/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ dependencies {

// Not needed for compilation, but we want to centralize all logging using logback
packagingInLibDir project.deps.slf4j
packagingInLibDir project.deps.slf4jLog4j
packagingInLibDir project.deps.slf4jJcl
packagingInLibDir project.deps.slf4jJul
packagingInLibDir project.deps.logback
Expand Down Expand Up @@ -225,7 +224,6 @@ task verifyFatJar(type: VerifyJarTask) {
"jetty-xml-${project.versions.jetty}.jar",
"joda-time-${project.versions.jodaTime}.jar",
"jul-to-slf4j-${project.versions.slf4j}.jar",
"log4j-over-slf4j-${project.versions.slf4j}.jar",
"logback-classic-${project.versions.logback}.jar",
"logback-core-${project.versions.logback}.jar",
"server-launcher-${project.version}-main.jar",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class NestedJarClassLoaderTest {
* └── nestedhelloworld.jar
* └── NestedHelloWorld.class
*/
private URL testJar = getClass().getResource("/helloworld.jar");
private final URL testJar = getClass().getResource("/helloworld.jar");

private NestedJarClassLoader nestedJarClassLoader;

Expand Down

0 comments on commit 0dfa3ab

Please sign in to comment.