From de71944b3c2c14ac8d0774cc07ece837ca6ea0c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 27 Jul 2024 00:00:28 -0300 Subject: [PATCH] Bump org.jetbrains.kotlin:kotlin-bom from 1.6.21 to 1.9.25 in /generators/kotlin/resources (#406) * Bump org.jetbrains.kotlin:kotlin-bom in /generators/kotlin/resources Bumps [org.jetbrains.kotlin:kotlin-bom](https://github.com/JetBrains/kotlin) from 1.6.21 to 1.9.25. - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v1.9.25/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v1.6.21...v1.9.25) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-bom dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * drop @JvmDefault annotations * drop @JvmDefault annotations * drop @JvmDefault annotations --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marcelo Shima --- .../kotlin/resources/gradle/libs.versions.toml | 2 +- .../package/repository/EntityRepository.kt.ejs | 6 +++--- .../kotlin/package/repository/UserRepository.kt.ejs | 13 ------------- .../package/service/mapper/EntityMapper.kt.ejs | 5 ++--- 4 files changed, 6 insertions(+), 20 deletions(-) diff --git a/generators/kotlin/resources/gradle/libs.versions.toml b/generators/kotlin/resources/gradle/libs.versions.toml index 78d584c0c..21af0bef8 100644 --- a/generators/kotlin/resources/gradle/libs.versions.toml +++ b/generators/kotlin/resources/gradle/libs.versions.toml @@ -1,4 +1,4 @@ [libraries] -kotlin = { module = 'org.jetbrains.kotlin:kotlin-bom', version = '1.8.22' } +kotlin = { module = 'org.jetbrains.kotlin:kotlin-bom', version = '1.9.25' } mockito-kotlin = { module = 'org.mockito.kotlin:mockito-kotlin', version = '4.0.0' } diff --git a/generators/spring-boot/templates/src/main/kotlin/package/repository/EntityRepository.kt.ejs b/generators/spring-boot/templates/src/main/kotlin/package/repository/EntityRepository.kt.ejs index 3dc145df3..7bcfbb26b 100644 --- a/generators/spring-boot/templates/src/main/kotlin/package/repository/EntityRepository.kt.ejs +++ b/generators/spring-boot/templates/src/main/kotlin/package/repository/EntityRepository.kt.ejs @@ -77,15 +77,15 @@ interface <%=entityClass%>Repository : <% if (containsBagRelationships && databa <%_ if (databaseTypeSql) { _%> <%_ const containsToOneEagerRelationship = relationships.some(relationship => relationship.relationshipEagerLoad && !relationship.bagRelationship); _%> - @JvmDefault fun findOneWithEagerRelationships(<%= primaryKey.name %>: <%= primaryKey.type %>): Optional<<%= persistClass %>> { + fun findOneWithEagerRelationships(<%= primaryKey.name %>: <%= primaryKey.type %>): Optional<<%= persistClass %>> { return <% if (containsBagRelationships) { %>this.fetchBagRelationships(<% } %>this.<% if (containsToOneEagerRelationship) { %>findOneWithToOneRelationships<% } else { %>findById<% } %>(<%= primaryKey.name %>)<% if (containsBagRelationships) { %>)<% } %> } - @JvmDefault fun findAllWithEagerRelationships(): MutableList<<%= persistClass %>> { + fun findAllWithEagerRelationships(): MutableList<<%= persistClass %>> { return <% if (containsBagRelationships) { %>this.fetchBagRelationships(<% } %>this.<% if (containsToOneEagerRelationship) { %>findAllWithToOneRelationships<% } else { %>findAll<% } %>()<% if (containsBagRelationships) { %>)<% } %> } - @JvmDefault fun findAllWithEagerRelationships(pageable: Pageable): Page<<%= persistClass %>> { + fun findAllWithEagerRelationships(pageable: Pageable): Page<<%= persistClass %>> { return <% if (containsBagRelationships) { %>this.fetchBagRelationships(<% } %>this.<% if (containsToOneEagerRelationship) { %>findAllWithToOneRelationships<% } else { %>findAll<% } %>(pageable)<% if (containsBagRelationships) { %>)<% } %> } <%_ if (containsToOneEagerRelationship) { _%> diff --git a/generators/spring-boot/templates/src/main/kotlin/package/repository/UserRepository.kt.ejs b/generators/spring-boot/templates/src/main/kotlin/package/repository/UserRepository.kt.ejs index a3b5eaf2e..ef69fe695 100644 --- a/generators/spring-boot/templates/src/main/kotlin/package/repository/UserRepository.kt.ejs +++ b/generators/spring-boot/templates/src/main/kotlin/package/repository/UserRepository.kt.ejs @@ -152,9 +152,6 @@ _%> interface UserRepository : <% if (databaseTypeSql) { %>JpaRepository<<%= asEntity('User') %>, <%= user.primaryKey.type %>><% } %><% if (reactive && !databaseTypeCouchbase) { %>Reactive<% } %><% if (databaseTypeMongodb) { %>MongoRepository<<%= asEntity('User') %>, String><% } %><% if (databaseTypeNeo4j) { %>Neo4jRepository<<%= asEntity('User') %>, String><% } %><% if (databaseTypeCouchbase) { %>JHipsterCouchbaseRepository<<%= asEntity('User') %>, String><%if (searchEngineCouchbase) { %>, CouchbaseSearchRepository<<%= asEntity('User') %>, String><% } } %> { <%_ if (!authenticationTypeOauth2) { _%> - <%_ if (databaseTypeCouchbase) { _%> - @JvmDefault - <%_ } _%> fun findOneByActivationKey(activationKey: String): <%= optionalOrMono %><<%= asEntity('User') %>><% if (databaseTypeCouchbase) { %> { return findIdByActivationKey(activationKey) .map(User::id) @@ -166,9 +163,6 @@ interface UserRepository : <% if (databaseTypeSql) { %>JpaRepository<<%= asEntit <%_ } _%> <%_ if (!authenticationTypeOauth2) { _%> - <%_ if (databaseTypeCouchbase) { _%> - @JvmDefault - <%_ } _%> fun findAllByActivatedIsFalseAndActivationKeyIsNotNullAndCreatedDateBefore(dateTime: Instant): <%= listOrFlux %><<%= asEntity('User') %>><% if (databaseTypeCouchbase) { %> { return findAllById(toIds(findAllIdsByActivatedIsFalseAndActivationKeyIsNotNullAndCreatedDateBefore(dateTime)<%= toListSuffix %>)) } @@ -180,7 +174,6 @@ interface UserRepository : <% if (databaseTypeSql) { %>JpaRepository<<%= asEntit <%_ if (!authenticationTypeOauth2) { _%> <%_ if (databaseTypeCouchbase) { _%> - @JvmDefault <%_ } _%> fun findOneByResetKey(resetKey: String): <%= optionalOrMono %><<%= asEntity('User') %>><% if (databaseTypeCouchbase) { %> { return findIdByResetKey(resetKey) @@ -199,9 +192,6 @@ interface UserRepository : <% if (databaseTypeSql) { %>JpaRepository<<%= asEntit @Cacheable(cacheNames = [USERS_BY_EMAIL_CACHE]) <%_ } _%> <%_ } _%> - <%_ if (databaseTypeCouchbase) { _%> - @JvmDefault - <%_ } _%> fun findOneByEmailIgnoreCase(email: String?): <%= optionalOrMono %><<%= asEntity('User') %>><% if (databaseTypeCouchbase) { %> { return findIdByEmailIgnoreCase(email!!) .map(User::id) @@ -217,7 +207,6 @@ interface UserRepository : <% if (databaseTypeSql) { %>JpaRepository<<%= asEntit <%_ if (cacheManagerIsAvailable) { _%> @Cacheable(cacheNames = [USERS_BY_LOGIN_CACHE]) <%_ } _%> - @JvmDefault fun findOneByLogin(login: String): <%= optionalOrMono %><<%= asEntity('User') %>> { return findById(login) } @@ -257,7 +246,6 @@ interface UserRepository : <% if (databaseTypeSql) { %>JpaRepository<<%= asEntit <%_ } _%> <%_ if (databaseTypeCouchbase) { _%> - @JvmDefault fun findAllByActivatedIsTrue(pageable: Pageable): Flux{ return findAllById(toIds(findAllIdsByActivatedIsTrue(pageable))) } @@ -271,7 +259,6 @@ interface UserRepository : <% if (databaseTypeSql) { %>JpaRepository<<%= asEntit override fun count(): Mono <% } else { %> <%_ if (databaseTypeCouchbase) { _%> - @JvmDefault fun findAllByActivatedIsTrue(pageable: Pageable): Page<<%= asEntity('User') %>> { val page = findAllIdsByActivatedIsTrue(pageable); return PageImpl<<%= asEntity('User') %>>(findAllById(toIds(page.content)), pageable, page.totalElements) diff --git a/generators/spring-boot/templates/src/main/kotlin/package/service/mapper/EntityMapper.kt.ejs b/generators/spring-boot/templates/src/main/kotlin/package/service/mapper/EntityMapper.kt.ejs index ae98e2944..5cf467fcf 100644 --- a/generators/spring-boot/templates/src/main/kotlin/package/service/mapper/EntityMapper.kt.ejs +++ b/generators/spring-boot/templates/src/main/kotlin/package/service/mapper/EntityMapper.kt.ejs @@ -143,7 +143,7 @@ interface <%= entityClass %>Mapper : <%_ const collectionMapperName = otherEntity.entityInstance + _.upperFirst(relatedField.propertyName) + 'Set'; _%> @Named("<%= collectionMapperName %>") - @JvmDefault fun toDto<%= _.upperFirst(mapperName) %>Set(<%= otherEntity.persistInstance %>: Set<<%- otherEntity.persistClass %>>): Set<<%- otherEntity.dtoClass %>> { + fun toDto<%= _.upperFirst(mapperName) %>Set(<%= otherEntity.persistInstance %>: Set<<%- otherEntity.persistClass %>>): Set<<%- otherEntity.dtoClass %>> { return <%= otherEntity.persistInstance %>.map(this::toDto<%= _.upperFirst(mapperName) %>).toSet() } <%_ } _%> @@ -153,11 +153,10 @@ interface <%= entityClass %>Mapper : <%_ if (uuidMapMethod) { _%> - @JvmDefault fun map(value: UUID) = Objects.toString(value, null) <%_ } _%> <%_ if (byteMapMethod) { _%> - @JvmDefault + fun map(value: byteArray) = String(value) <%_ } _%> <%_ } _%>