pixee/codemodder-java

Add transform to merge stacked try statements

andrecsilva opened this issue · 0 comments

As an example, the following input:

try(var stmt = conn.createStatement()){
  try(var rs = stmt.executeQuery(query)){
    a;
    b;
 }
}

should result in:

try(var stmt = conn.createStatement(); var rs = stmt.executeQuery(query)){
    a;
    b;
}