I am new to java 8 lambdas. From my research i found that the curly brackets are optional around a single statement. But sonar complains top remove the unnecessary brackets around the lamda. The below change removed the issue from sonar but is it same as with and without curly brackets?
code before:
preparedStatement ->
{preparedStatement.setString(1, "name");}
code after:
preparedStatement ->
preparedStatement.setString(1, "name")
Can i use the modified lamda? or is anything different from the before?