< prev index next >

src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WindowsDefender.java

Print this page

        

*** 23,65 **** * questions. */ package jdk.jpackage.internal; - import jdk.jpackage.internal.Platform; import java.util.List; final class WindowsDefender { private WindowsDefender() {} ! static final boolean isThereAPotentialWindowsDefenderIssue() { boolean result = false; if (Platform.getPlatform() == Platform.WINDOWS && Platform.getMajorVersion() == 10) { // If DisableRealtimeMonitoring is not enabled then there // may be a problem. if (!WindowsRegistry.readDisableRealtimeMonitoring() && ! !isTempDirectoryInExclusionPath()) { result = true; } } return result; } ! private static boolean isTempDirectoryInExclusionPath() { boolean result = false; // If the user temp directory is not found in the exclusion // list then there may be a problem. List<String> paths = WindowsRegistry.readExclusionsPaths(); - String tempDirectory = getUserTempDirectory(); - for (String s : paths) { ! if (s.equals(tempDirectory)) { result = true; break; } } --- 23,62 ---- * questions. */ package jdk.jpackage.internal; import java.util.List; final class WindowsDefender { private WindowsDefender() {} ! static final boolean isThereAPotentialWindowsDefenderIssue(String dir) { boolean result = false; if (Platform.getPlatform() == Platform.WINDOWS && Platform.getMajorVersion() == 10) { // If DisableRealtimeMonitoring is not enabled then there // may be a problem. if (!WindowsRegistry.readDisableRealtimeMonitoring() && ! !isDirectoryInExclusionPath(dir)) { result = true; } } return result; } ! private static boolean isDirectoryInExclusionPath(String dir) { boolean result = false; // If the user temp directory is not found in the exclusion // list then there may be a problem. List<String> paths = WindowsRegistry.readExclusionsPaths(); for (String s : paths) { ! if (WindowsRegistry.comparePaths(s, dir)) { result = true; break; } }
< prev index next >