8000 simplify code, remove unnecessary conditions · utPLSQL/utPLSQL-SQLDeveloper@89666ff · GitHub
[go: up one dir, main page]

Skip to content

Commit 89666ff

Browse files
simplify code, remove unnecessary conditions
1 parent 762b4ba commit 89666ff

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sqldev/src/main/java/org/utplsql/sqldev/coverage/CodeCoverageReporter.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public static void openInBrowser(String html) {
174174
final URL url = file.toURI().toURL();
175175
logger.fine(() -> "Opening " + url.toExternalForm() + " in browser...");
176176
final Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
177-
if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE) && url != null) {
177+
if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {
178178
desktop.browse(url.toURI());
179179
logger.fine(() -> url.toExternalForm() + " opened in browser.");
180180
} else {
@@ -229,9 +229,7 @@ public void setExcludeObjects(final String excludeObjects) {
229229
}
230230

231231
public Thread runAsync() {
232-
final Thread thread = new Thread(() -> {
233-
run();
234-
});
232+
final Thread thread = new Thread(this::run);
235233
thread.setName("code coverage reporter");
236234
thread.start();
237235
return thread;

0 commit comments

Comments
 (0)
0