@@ -80,7 +80,7 @@ private Html buildHtml() throws IOException, ParseException {
8080
8181 new Div (this , new Style ("width: 100%; background-color: rgb(0,191,255); color: white; padding: 10px" )) {{
8282 new H1 (this ) {{
83- new NoTag (this , "Results from: " + new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss" ).format (new Date ()));
83+ new NoTag (this , String . format ( "Results from: %s" , new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss" ).format (new Date () )));
8484 }};
8585 }};
8686 File folder = new File (TARGET_AUTOMOTION_JSON );
@@ -95,12 +95,12 @@ private Html buildHtml() throws IOException, ParseException {
9595 JSONObject jsonObject = (JSONObject ) obj ;
9696 JSONArray details = (JSONArray ) jsonObject .get (DETAILS );
9797 new H1 (this ,
98- new Style ("color: rgb(47,79,79); margin-top: 50px; " )) {{
99- new NoTag (this , "Scenario: \" " + jsonObject .get (SCENARIO ) + " \" " );
98+ new Style ("color: rgb(47,79,79); margin-top: 50px" )) {{
99+ new NoTag (this , String . format ( "Scenario: \" %s \" " , jsonObject .get (SCENARIO )) );
100100 }};
101101 new H2 (this ,
102- new Style ("color: rgb(0,139,139); " )) {{
103- new NoTag (this , "Element: \" " + jsonObject .get (ELEMENT_NAME ) + " \" " );
102+ new Style ("color: rgb(0,139,139)" )) {{
103+ new NoTag (this , String . format ( "Element: \" %s \" " , jsonObject .get (ELEMENT_NAME )) );
104104 }};
105105 new H3 (this ,
106106 new Style ("color: rgb(255,69,0)" )) {{
@@ -119,11 +119,11 @@ private Html buildHtml() throws IOException, ParseException {
119119 }};
120120 new H4 (this ,
121121 new Style ("color: rgb(105,105,105)" )) {{
122- new NoTag (this , "Time execution: " + jsonObject .get (TIME_EXECUTION ));
122+ new NoTag (this , String . format ( "Time execution: %s" , jsonObject .get (TIME_EXECUTION ) ));
123123 }};
124124 new P (this ) {{
125125 new Img (this ,
126- new Src ("img/" + jsonObject .get (SCREENSHOT )),
126+ new Src (String . format ( "img/%s" , jsonObject .get (SCREENSHOT ) )),
127127 new Alt ("screenshot" ),
128128 new Style ("width: 96%; margin-left:2%" ));
129129 }};
0 commit comments