mirror of
https://github.com/apple/pkl.git
synced 2026-01-17 08:57:01 +01:00
Support building with JDK 21 (#234)
- Update google-java-format to a version compatible with JDK 21 and run "gw spotlessApply". - Fix wrong test assumption JavaCodeGenerator writes a properties file using java.util.Properties, which doesn't guarantee order of entries. - Fix most deprecation warnings - Add CI job for JDK 21
This commit is contained in:
@@ -97,22 +97,21 @@ class CliJavaCodeGeneratorTest {
|
||||
|
||||
val module1PropertiesFile = resourcesDir.resolve("org.mod1.properties")
|
||||
|
||||
val module1PropertiesString = module1PropertiesFile.readString()
|
||||
// use two assertions because java.util.Properties doesn't guarantee order
|
||||
assertContains(
|
||||
"""
|
||||
org.pkl.config.java.mapper.org.mod1\#Person=org.Mod1${dollar}Person
|
||||
org.pkl.config.java.mapper.org.mod1\#ModuleClass=org.Mod1
|
||||
"""
|
||||
.trimIndent(),
|
||||
module1PropertiesFile.readString()
|
||||
"""org.pkl.config.java.mapper.org.mod1\#Person=org.Mod1${dollar}Person""",
|
||||
module1PropertiesString
|
||||
)
|
||||
assertContains(
|
||||
"""org.pkl.config.java.mapper.org.mod1\#ModuleClass=org.Mod1""",
|
||||
module1PropertiesString
|
||||
)
|
||||
|
||||
val module2PropertiesFile = resourcesDir.resolve("org.mod2.properties")
|
||||
|
||||
assertContains(
|
||||
"""
|
||||
org.pkl.config.java.mapper.org.mod2\#ModuleClass=org.Mod2
|
||||
"""
|
||||
.trimIndent(),
|
||||
"""org.pkl.config.java.mapper.org.mod2\#ModuleClass=org.Mod2""",
|
||||
module2PropertiesFile.readString()
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user