@@ -99,13 +99,13 @@ protected void execute(String host, Integer port) {
9999 .flatMap (result -> {
100100 log .debug ("Processing match {}" , result );
101101 List <String > parts = Arrays .stream (result .substring (5 ).replace ("\n " , "" ).split ("\\ ." )).toList ();
102- List <String > usedParts = parts .size () > 1 ? parts .subList (0 , parts .size () - 1 ) : List .of ("" );
102+ List <String > usedParts = parts .size () > 1 ? parts .subList (0 , parts .size () - 1 ) : List .of ("" );
103103 log .trace ("Context parts: {}" , usedParts );
104104 return IntStream .range (0 , usedParts .size ()).boxed ()
105105 .map (i -> String .join ("." , usedParts .subList (0 , i + 1 )));
106106 })
107107 .collect (toSet ());
108- codeObject .setAvailableContexts (matches .isEmpty ()? "-" : String .join ("," , matches ));
108+ codeObject .setAvailableContexts (matches .isEmpty () ? "-" : String .join ("," , matches ));
109109 if (dryRun ) {
110110 log .info ("Auto-detected contexts: {}" , codeObject .getAvailableContexts ());
111111 } else {
@@ -151,21 +151,21 @@ protected void execute(String host, Integer port) {
151151 log .error ("{} function '{}' deployment failed." , type , polyFunction .getName ());
152152 exceptions .put (polyFunction , e );
153153 }
154- if (exceptions .isEmpty ()) {
155- log .info ("Deployment of {} functions complete." , methods .size ());
156- } else {
157- log .error ("{} Errors occurred while deploying a total of {} functions." , exceptions .size (), methods .size ());
158- exceptions .forEach ((polyFunctionMetadata , exception ) -> {
159- try {
160- log .error (IOUtils .toString (HttpResponseException .class .cast (exception ).getResponse ().body (), defaultCharset ()));
161- } catch (IOException e ) {
162- throw new RuntimeException (e );
163- }
164- });
165- throw new DeploymentWrapperException (exceptions .values ());
166- }
167154 }
168155 });
156+ if (exceptions .isEmpty ()) {
157+ log .info ("Deployment of {} functions complete." , methods .size ());
158+ } else {
159+ log .error ("{} Errors occurred while deploying a total of {} functions." , exceptions .size (), methods .size ());
160+ exceptions .forEach ((polyFunctionMetadata , exception ) -> {
161+ try {
162+ log .error (IOUtils .toString (HttpResponseException .class .cast (exception ).getResponse ().body (), defaultCharset ()));
163+ } catch (IOException e ) {
164+ throw new RuntimeException (e );
165+ }
166+ });
167+ throw new DeploymentWrapperException (exceptions .values ());
168+ }
169169 }
170170
171171 private String getPolyType (Type type ) {
0 commit comments