Skip to content

Commit a2a4192

Browse files
JayBazuzistagg54isidore
committed
- r cleanup
Co-Authored-By: Samuel Taggart <[email protected]> Co-Authored-By: Llewellyn Falco <[email protected]>
1 parent 2d0bbaa commit a2a4192

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

approvaltests/src/main/java/org/approvaltests/reporters/intellij/IntelliJReporter.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ private static String[] getRunningPrograms()
4141
Class<?> processHandleClass = Class.forName("java.lang.ProcessHandle");
4242
Method allProcessesMethod = processHandleClass.getMethod("allProcesses");
4343
Method infoMethod = processHandleClass.getMethod("info");
44-
// Get the ProcessHandle.Info interface to access the command() method
4544
Class<?> processInfoClass = Class.forName("java.lang.ProcessHandle$Info");
4645
Method commandMethod = processInfoClass.getMethod("command");
4746
@SuppressWarnings("unchecked")
@@ -58,11 +57,10 @@ private static String[] getRunningPrograms()
5857
}
5958
catch (Exception e)
6059
{
61-
System.out.println("Failed to get command for process: " + e.getMessage());
6260
return Optional.<String> empty();
6361
}
6462
});
65-
return processes.filter(Optional::isPresent).map(c -> c.get()).toArray(String[]::new);
63+
return processes.filter(Optional::isPresent).map(Optional::get).toArray(String[]::new);
6664
}
6765
finally
6866
{
@@ -71,7 +69,6 @@ private static String[] getRunningPrograms()
7169
}
7270
catch (Exception e)
7371
{
74-
System.out.println("Failed to get running programs: " + e.getMessage());
7572
return new String[0];
7673
}
7774
}

0 commit comments

Comments
 (0)