0

Sometimes (!?) Android Studio inserts line breaks into empty Java blocks ({}). For instance, if I copy this:

Log.d(TAG, new Object(){}.getClass().getEnclosingClass().getName());

when pasting, it may turn it into:

Log.d(TAG, new Object(){
}.getClass().getEnclosingClass().getName());

Which is super annoying. Sometimes it does, sometimes it does not. I'm tempted to think it may be a bug. I've not yet been able to reproduce deterministically. I'd like to get rid this behaviour. Any clue? Bug or hard to set feature?

cuihtlauac
  • 1,758
  • 2
  • 18
  • 37
  • 2
    Check this http://stackoverflow.com/questions/11118204/how-to-remove-unnecessary-blank-line-on-code-formatting-in-intellij and http://stackoverflow.com/questions/16580171/code-formatting-shortcut-in-android-studio – hagrawal Dec 02 '15 at 13:40
  • Android Studio does not create an empty line, as the first version of my question may have suggested. It only breaks the line. – cuihtlauac Dec 04 '15 at 10:51

0 Answers0