@@ -141,18 +141,14 @@ private Product createS2ClassificationProduct(Map<String, Product> inputProducts
141141
142142 private Product computePostProcessProduct (Product l1cProduct , Product classificationProduct ) {
143143
144- // todo: Shouldn't this be actually within the if clause?
145144 HashMap <String , Product > input = new HashMap <>();
146- input .put ("l1c" , l1cProduct );
147- input .put ("s2Cloud" , classificationProduct );
148145 input .put ("classifiedProduct" , classificationProduct );
149146 Map <String , Object > paramsBuffer = new HashMap <>();
150147 paramsBuffer .put ("cloudBufferWidth" , cloudBufferWidth );
151148 paramsBuffer .put ("computeCloudBufferForCloudAmbiguous" , computeCloudBufferForCloudAmbiguous );
152149 Product cloudBufferProduct = GPF .createProduct (OperatorSpi .getOperatorAlias (S2IdepixCloudPostProcessOp .class ),
153150 paramsBuffer , input );
154151
155- Product postProduct = cloudBufferProduct ;
156152
157153 if (computeCloudShadow || computeMountainShadow || computeCloudBuffer ) {
158154 HashMap <String , Product > inputShadow = new HashMap <>();
@@ -167,11 +163,12 @@ private Product computePostProcessProduct(Product l1cProduct, Product classifica
167163 params .put ("computeCloudBufferForCloudAmbiguous" , computeCloudBufferForCloudAmbiguous );
168164 params .put ("mode" , "LandWater" );
169165 params .put ("demName" , demName );
170- postProduct = GPF .createProduct (OperatorSpi .getOperatorAlias (S2IdepixPostProcessOp .class ),
166+ return GPF .createProduct (OperatorSpi .getOperatorAlias (S2IdepixPostProcessOp .class ),
171167 params , inputShadow );
168+ } else {
169+ return cloudBufferProduct ;
172170 }
173171
174- return postProduct ;
175172 }
176173
177174
0 commit comments