Skip to content

Commit 1777d2c

Browse files
committed
fix: non null assertions, hibernate bytecode enhancer
1 parent d2ee34b commit 1777d2c

File tree

6 files changed

+28
-6
lines changed

6 files changed

+28
-6
lines changed

backend/data/build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,3 +267,8 @@ ktlint {
267267
exclude("**/PluralData.kt")
268268
}
269269
}
270+
271+
hibernate {
272+
// Block is required for Bytecode Enhancement to happen
273+
enhancement {}
274+
}

ee/backend/app/build.gradle

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ dependencies {
9898
/**
9999
* Excel file generation
100100
*/
101-
implementation 'org.apache.poi:poi-ooxml:5.3.0'
101+
implementation 'org.apache.poi:poi-ooxml:5.4.0'
102102
implementation 'org.apache.commons:commons-collections4:4.4'
103103

104104
/**
@@ -107,8 +107,16 @@ dependencies {
107107
implementation('com.github.jknack:handlebars:4.4.0')
108108
}
109109

110+
java {
111+
toolchain {
112+
languageVersion = JavaLanguageVersion.of(21)
113+
}
114+
}
115+
110116
kotlin {
111-
jvmToolchain(21)
117+
compilerOptions {
118+
freeCompilerArgs.addAll("-Xjsr305=strict")
119+
}
112120
}
113121

114122
dependencyManagement {

ee/backend/tests/build.gradle

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,16 @@ dependencies {
6363
testImplementation libs.jacksonModuleKotlin
6464
}
6565

66+
java {
67+
toolchain {
68+
languageVersion = JavaLanguageVersion.of(21)
69+
}
70+
}
71+
6672
kotlin {
67-
jvmToolchain(21)
73+
compilerOptions {
74+
freeCompilerArgs.addAll("-Xjsr305=strict")
75+
}
6876
}
6977

7078
dependencyManagement {

ee/backend/tests/src/test/kotlin/io/tolgee/ee/WebhookAutomationTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class WebhookAutomationTest : ProjectAuthControllerTest("/v2/projects/") {
113113
val signature = httpEntity.headers["Tolgee-Signature"]
114114
signature.assert.isNotNull
115115
verifyWebhookSignatureHeader(
116-
httpEntity.body,
116+
httpEntity.body!!,
117117
signature!!.single(),
118118
secret,
119119
300000,

ee/backend/tests/src/test/kotlin/io/tolgee/ee/api/v2/controllers/EeSubscriptionUsageControllerTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class EeSubscriptionUsageControllerTest : AuthorizedControllerTest() {
9696
node("isPayAsYouGo").isEqualTo(true)
9797
}
9898

99-
val body = this.captor.allValues.single().body
99+
val body = this.captor.allValues.single().body!!
100100
assertThatJson(body) {
101101
node("licenseKey").isEqualTo("mock")
102102
}

ee/backend/tests/src/test/kotlin/io/tolgee/ee/selfHostedLimitsAndReporting/CreditLimitTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import org.springframework.boot.test.context.SpringBootTest
2727
import org.springframework.boot.test.mock.mockito.MockBean
2828
import org.springframework.boot.test.mock.mockito.SpyBean
2929
import org.springframework.boot.web.client.RestTemplateBuilder
30+
import org.springframework.http.HttpHeaders
3031
import org.springframework.http.HttpMethod.POST
3132
import org.springframework.http.HttpStatus
3233
import org.springframework.web.client.HttpClientErrorException
@@ -116,7 +117,7 @@ class CreditLimitTest : ProjectAuthControllerTest("/v2/projects/") {
116117
HttpClientErrorException.create(
117118
HttpStatus.BAD_REQUEST,
118119
"Mocked response",
119-
null,
120+
HttpHeaders(),
120121
"""{"code": "$errorCode"}""".toByteArray(),
121122
null,
122123
)

0 commit comments

Comments
 (0)