Skip to content

Conversation

@ShipilA
Copy link
Contributor

@ShipilA ShipilA commented Oct 9, 2025

@ShipilA ShipilA requested a review from a team as a code owner October 9, 2025 12:46
@ShipilA ShipilA requested a review from jenschude October 9, 2025 12:46
@ShipilA ShipilA marked this pull request as draft October 9, 2025 13:30
@codecov
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

❌ Patch coverage is 52.05993% with 128 lines in your changes missing coverage. Please review.
✅ Project coverage is 9.66%. Comparing base (136be4d) to head (5efe30b).
⚠️ Report is 32 commits behind head on main.

Files with missing lines Patch % Lines
...c/main/java/com/commercetools/sdk/ProductUtil.java 51.69% 116 Missing and 12 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              main   #1000      +/-   ##
==========================================
+ Coverage     9.51%   9.66%   +0.14%     
- Complexity    2016    2059      +43     
==========================================
  Files         7717    7719       +2     
  Lines        75665   75932     +267     
  Branches       302     347      +45     
==========================================
+ Hits          7202    7341     +139     
- Misses       68286   68402     +116     
- Partials       177     189      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ShipilA ShipilA marked this pull request as ready for review October 13, 2025 07:12
@ShipilA
Copy link
Contributor Author

ShipilA commented Oct 13, 2025

Comment on lines 27 to 30
public final class ProductUtil {
private static KeyResolverService keyResolverService = new ExpandObjResolverService();

public static ProductDraftImport toProductDraftImport(ProductProjection product) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public final class ProductUtil {
private static KeyResolverService keyResolverService = new ExpandObjResolverService();
public static ProductDraftImport toProductDraftImport(ProductProjection product) {
public class ProductUtil {
private final KeyResolverService keyResolverService;
public ProductUtil() {
keyResolverService = new ExpandObjResolverService();
}
public ProductUtil(final KeyResolverService resolverService) {
keyResolverService = resolverService;
}
public ProductDraftImport toProductDraftImport(ProductProjection product) {

It should be possible to inject the resolver service. You will have to rewrite some method signatures and remove the static keyword

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

ShipilA and others added 4 commits October 29, 2025 12:09
…-product-to-import-API-product' into DEVX-640-helper-method-from-Coco-product-to-import-API-product

# Conflicts:
#	commercetools/commercetools-importapi-utils/src/main/java/com/commercetools/sdk/ProductUtil.java
Copy link
Contributor

@jenschude jenschude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 👍

@ShipilA ShipilA merged commit d6b65b8 into main Oct 30, 2025
15 checks passed
@ShipilA ShipilA deleted the DEVX-640-helper-method-from-Coco-product-to-import-API-product branch October 30, 2025 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants