File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 2424import java .util .Arrays ;
2525import java .util .Base64 ;
2626import java .util .List ;
27+ import java .util .Locale ;
2728import java .util .Optional ;
2829import java .util .concurrent .ExecutionException ;
2930import java .util .concurrent .ExecutorService ;
@@ -308,11 +309,11 @@ private static boolean isWindowsDefenderActive(IProgressMonitor monitor) throws
308309 try {
309310 List <String > lines = runPowershell (monitor , "-Command" , "(Get-MpComputerStatus).AMRunningMode" ); //$NON-NLS-1$ //$NON-NLS-2$
310311 String onlyLine = lines .size () == 1 ? lines .get (0 ) : "" ; //$NON-NLS-1$
311- return switch (onlyLine ) {
312+ return switch (onlyLine . toLowerCase ( Locale . ENGLISH ) ) {
312313 // Known values as listed in
313314 // https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/microsoft-defender-antivirus-windows#use-powershell-to-check-the-status-of-microsoft-defender-antivirus
314- case "SxS Passive Mode " , "Passive mode" -> false ; //$NON-NLS-1$ //$NON-NLS-2$
315- case "Normal " , "EDR Block Mode " -> true ; //$NON-NLS-1$//$NON-NLS-2$
315+ case "sxs passive mode " , "passive mode" -> false ; //$NON-NLS-1$ //$NON-NLS-2$
316+ case "normal " , "edr block mode " -> true ; //$NON-NLS-1$//$NON-NLS-2$
316317 default -> throw new IOException ("Process terminated with unexpected result:\n " + String .join ("\n " , lines )); //$NON-NLS-1$//$NON-NLS-2$
317318 };
318319 } catch (IOException e ) {
You can’t perform that action at this time.
0 commit comments