File tree Expand file tree Collapse file tree
commercetools/commercetools-importapi-utils/src/main/java/com/commercetools/sdk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,3 +37,4 @@ cd4bb52247f964cdb924e28f32a6cd888d25ccea
37373fcbbbaa899976c15f805febd6864d70d260f830
38386f16c4a0cc66ed69ab5769595332d984c4abff9f
39398453de765b5576178f2e5d5ea6b6c1a5c6668027
40+ 1f7b152196e439257d3307b749bbe9546b05fc66
Original file line number Diff line number Diff line change 1818import com .commercetools .importapi .models .common .*;
1919import com .commercetools .importapi .models .customfields .CustomField ;
2020
21- import com .commercetools .importapi .models .productvariants .Attribute ;
2221import io .vrap .rmf .base .client .Builder ;
2322
2423public class CommonImportUtil {
@@ -130,9 +129,7 @@ static CustomField mapCustomField(Object value) {
130129 return CustomField .dateSetBuilder ().value ((ArrayList <LocalDate >) list ).build ();
131130 }
132131 if (list .get (0 ) instanceof ZonedDateTime ) {
133- return CustomField .dateTimeSetBuilder ()
134- .value ((ArrayList <ZonedDateTime >) list )
135- .build ();
132+ return CustomField .dateTimeSetBuilder ().value ((ArrayList <ZonedDateTime >) list ).build ();
136133 }
137134 if (list .get (0 ) instanceof LocalTime ) {
138135 return CustomField .timeSetBuilder ().value ((ArrayList <LocalTime >) list ).build ();
@@ -177,7 +174,7 @@ static CustomField mapCustomField(Object value) {
177174 return CustomField .moneySetBuilder ()
178175 .value (list .stream ()
179176 .map (v -> importApiTypedMoney ((com .commercetools .api .models .common .TypedMoney ) v ,
180- new TypedMoneyBuilder ()).build ())
177+ new TypedMoneyBuilder ()).build ())
181178 .collect (Collectors .toList ()))
182179 .build ();
183180 }
Original file line number Diff line number Diff line change 11
22package com .commercetools .sdk ;
33
4- import static java .lang .Integer .parseInt ;
5-
64import java .util .List ;
75
86import com .commercetools .api .models .common .Address ;
@@ -69,7 +67,8 @@ private AuthenticationMode toImportApiAuthenticationMode(
6967 }
7068
7169 public CustomerGroupKeyReference toCustomerGroupKeyReference (CustomerGroupReference customerGroup ) {
72- if (customerGroup == null ) return null ;
70+ if (customerGroup == null )
71+ return null ;
7372 return CustomerGroupKeyReference .builder ().key (keyResolverService .resolveKey (customerGroup )).build ();
7473 }
7574
@@ -83,9 +82,11 @@ private List<Integer> getAddressesIds(List<Address> shippingAddresses) {
8382 }
8483
8584 private Integer getAddressesId (List <Address > addresses , String addressId ) {
86- if (addressId == null ) return null ;
85+ if (addressId == null )
86+ return null ;
8787 for (int i = 0 ; i < addresses .size (); i ++) {
88- if (addressId .equals (addresses .get (i ).getId ())) return i ;
88+ if (addressId .equals (addresses .get (i ).getId ()))
89+ return i ;
8990 }
9091 return null ;
9192 }
You can’t perform that action at this time.
0 commit comments