StaticInitializer.prettyPrint print static for empty block

Issue #140 resolved
Loïc Girault created an issue

Code of StaticInitializer.prettyPrint in java4/frontend/PrettyPrint.jadd print the keyword static even for an empty body. Its code is the following

public void StaticInitializer.prettyPrint(PrettyPrinter out) {
    out.print("static ");    
    if (!blockIsEmpty()) {
      out.print(getBlock());
    }
  }

it should be replaced by

public void StaticInitializer.prettyPrint(PrettyPrinter out) {
    if (!blockIsEmpty()) {
      out.print("static ");
      out.print(getBlock());
    }
  }

Comments (1)

  1. Log in to comment