Java: Edited documentation for "Unwrap 'else' branch" intention (IDEA-165428)

This commit is contained in:
Pavel Dolgov
2017-01-20 13:17:24 +03:00
parent e25ed4062b
commit d7c3c84c78
3 changed files with 15 additions and 10 deletions
@@ -1,6 +1,8 @@
void f(boolean b) {
if (b) {
System.out.println("When true");
public class X {
void f(boolean b) {
if (b) {
System.out.println("When true");
}
System.out.println("Otherwise");
}
System.out.println("Otherwise");
}
@@ -1,7 +1,9 @@
void f(boolean b) {
if (b) {
System.out.println("When true");
} <spot>else</spot> {
System.out.println("Otherwise");
public class X {
void f(boolean b) {
if (b) {
System.out.println("When true");
} <spot>else</spot> {
System.out.println("Otherwise");
}
}
}
@@ -1,5 +1,6 @@
<html>
<body>
This intention moves the code of the <b>else</b> branch after the <b>if</b> statement.
This intention moves the code of the <b>else</b> branch after the <b>if</b> statement.<br>
Note that it changes the code semantics.
</body>
</html>