forked from cheptsov/AdvancedExpressionFolding
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
let return and elvis return support returned variable
- Loading branch information
1 parent
ee203d4
commit 2fc82a8
Showing
7 changed files
with
183 additions
and
543 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package data; | ||
|
||
import java.time.LocalDate; | ||
|
||
class LetReturnIt { | ||
static String buildExpression(String someString) { | ||
String var1 = getData(someString); | ||
if (var1 != null) { | ||
return var1; | ||
} | ||
String var2 = getData(someString); | ||
if (var2 == null) { | ||
return null; | ||
} | ||
String var4 = getData(someString); | ||
if (var4 != null) { | ||
return var4; | ||
} | ||
var4.toString(); | ||
String var5 = getData(someString); | ||
if (var5 == null) { | ||
return null; | ||
} | ||
System.out.println(var5 + "1"); | ||
|
||
|
||
String var6 = getData(someString); | ||
if (var6 == null) { | ||
return null; | ||
} | ||
while (true) { | ||
if (LocalDate.now().isAfter(LocalDate.now())) { | ||
if (var6 == null) { | ||
System.out.println("1"); | ||
} | ||
} | ||
break; | ||
} | ||
|
||
|
||
String var7 = getData(someString); | ||
if (var7 != null) { | ||
return var7; | ||
} | ||
new Thread(new Runnable() { | ||
@Override | ||
public void run() { | ||
System.out.println(var7 + "1"); | ||
} | ||
}); | ||
return null; | ||
} | ||
|
||
private static String getData(String someString) { | ||
try { | ||
return ClassLoader.getSystemResource("a").toString(); | ||
} catch (Exception e) { | ||
return null; | ||
} | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.