diff --git a/marketplace-service/src/main/java/com/axonivy/market/controller/ProductController.java b/marketplace-service/src/main/java/com/axonivy/market/controller/ProductController.java index 7358c13dd..483f97b41 100644 --- a/marketplace-service/src/main/java/com/axonivy/market/controller/ProductController.java +++ b/marketplace-service/src/main/java/com/axonivy/market/controller/ProductController.java @@ -86,7 +86,7 @@ public ResponseEntity> findProducts( @PutMapping(SYNC) @Operation(hidden = true) public ResponseEntity syncProducts(@RequestHeader(value = AUTHORIZATION) String authorizationHeader, - @RequestParam(value = RESET_SYNC, required = false) Boolean resetSync) { + @RequestParam(value = RESET_SYNC, required = false) Boolean resetSync) { String token = getBearerToken(authorizationHeader); gitHubService.validateUserOrganization(token, GitHubConstants.AXONIVY_MARKET_ORGANIZATION_NAME); if (Boolean.TRUE.equals(resetSync)) { diff --git a/marketplace-service/src/main/java/com/axonivy/market/entity/ProductModuleContent.java b/marketplace-service/src/main/java/com/axonivy/market/entity/ProductModuleContent.java index 278667623..7ccfd90a0 100644 --- a/marketplace-service/src/main/java/com/axonivy/market/entity/ProductModuleContent.java +++ b/marketplace-service/src/main/java/com/axonivy/market/entity/ProductModuleContent.java @@ -7,8 +7,6 @@ import lombok.NoArgsConstructor; import lombok.Setter; import org.springframework.data.annotation.Id; -import org.springframework.data.mongodb.core.index.CompoundIndex; -import org.springframework.data.mongodb.core.index.CompoundIndexes; import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serial; diff --git a/marketplace-service/src/main/java/com/axonivy/market/service/impl/ProductServiceImpl.java b/marketplace-service/src/main/java/com/axonivy/market/service/impl/ProductServiceImpl.java index 4ac982eda..3ca3478b3 100644 --- a/marketplace-service/src/main/java/com/axonivy/market/service/impl/ProductServiceImpl.java +++ b/marketplace-service/src/main/java/com/axonivy/market/service/impl/ProductServiceImpl.java @@ -342,7 +342,7 @@ private void syncProductsFromGitHubRepo() { for (var content : ghContentEntity.getValue()) { ProductFactory.mappingByGHContent(product, content); } - if (!Objects.isNull(productRepository.findById(product.getId()).orElse(null))) { + if (Objects.nonNull(productRepository.findById(product.getId()).orElse(null))) { return; } if (StringUtils.isNotBlank(product.getRepositoryName())) {