java - Missing semicolon in JSONWithPadding -


the result of jsonwithpadding missing semicolon in end:

 jsonwithpadding jsonwithpadding = new jsonwithpadding({"key":"value"}, "cb");  return response.status(200).entity(jsonwithpadding).build(); 

expected:

cb({"key":"value"});  --> semicolon 

actual:

cb({"key":"value"})  --> without semicolon 

any ideas?

the semicolon not missing, optional in (this example and) situations. jsonwithpadding class working correctly.

the ecmascript language specification defines 7.9.1 rules of automatic semicolon insertion, summarised javascript , semicolons as

certain ecmascript statements (empty statement, variable statement, expression statement, do-while statement, continue statement, break statement, return statement, , throw statement) must terminated semicolons

this covered @ what rules javascript's automatic semicolon insertion (asi)?


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -