Skip to content

Commit 17d7df6

Browse files
committed
Fix deprecations
1 parent abb3b50 commit 17d7df6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/test/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/BaseTransformerTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ abstract class BaseTransformerTest<T : Transformer> {
6666
* choice to test for improper case-less string comparisons.
6767
*/
6868
fun setupTurkishLocale() {
69+
@Suppress("DEPRECATION")
6970
Locale.setDefault(Locale("tr"))
7071
}
7172
}

src/test/kotlin/com/github/jengelman/gradle/plugins/shadow/transformers/Log4j2PluginsCacheFileTransformerTest.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import assertk.assertions.isTrue
66
import com.github.jengelman.gradle.plugins.shadow.relocation.SimpleRelocator
77
import com.github.jengelman.gradle.plugins.shadow.util.SimpleRelocator
88
import java.io.File
9-
import java.net.URL
9+
import java.net.URI
1010
import java.util.Collections
1111
import org.apache.logging.log4j.core.config.plugins.processor.PluginCache
1212
import org.apache.tools.zip.ZipOutputStream
@@ -39,8 +39,9 @@ class Log4j2PluginsCacheFileTransformerTest : BaseTransformerTest<Log4j2PluginsC
3939

4040
// Pull the data back out and make sure it was transformed
4141
val cache = PluginCache()
42-
val urlString = "jar:" + testableZipFile.toURI().toURL() + "!/" + PLUGIN_CACHE_FILE
43-
cache.loadCacheFiles(Collections.enumeration(listOf(URL(urlString))))
42+
val url = URI("jar:" + testableZipFile.toURI().toURL() + "!/" + PLUGIN_CACHE_FILE).toURL()
43+
val resources = Collections.enumeration(listOf(url))
44+
cache.loadCacheFiles(resources)
4445

4546
assertThat(cache.getCategory("lookup")["date"]?.className)
4647
.isEqualTo("new.location.org.apache.logging.log4j.core.lookup.DateLookup")

0 commit comments

Comments
 (0)