File tree Expand file tree Collapse file tree
src/main/java/io/github/intisy/docker Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,9 +31,7 @@ private WindowsElevation() {
3131
3232 /**
3333 * Whether the current process runs with administrator privileges.
34- *
35- * @implNote {@code net session} succeeds only in an elevated context; this is the
36- * same probe both libraries previously carried as private copies.
34+ * Probes with {@code net session}, which succeeds only in an elevated context.
3735 */
3836 public static boolean isAdministrator () {
3937 try {
@@ -51,11 +49,12 @@ public static boolean isAdministrator() {
5149 * elevation (UAC) dialog when the current process is not elevated.
5250 * Blocks until the elevated process exits and returns its exit code.
5351 *
52+ * The script travels as {@code -EncodedCommand} (Base64 UTF-16LE), so no quoting
53+ * or escaping of the script content is ever needed.
54+ *
5455 * @param powershellScript script to execute elevated; its {@code exit} code is propagated
5556 * @return the elevated script's exit code; a declined UAC dialog yields a non-zero
5657 * code from the launcher, {@link #EXIT_LAUNCH_FAILED} if nothing could be started
57- * @implNote the script travels as {@code -EncodedCommand} (Base64 UTF-16LE), so no
58- * quoting or escaping of the script content is ever needed
5958 */
6059 public static int runElevated (String powershellScript ) {
6160 String launcher = launcherCommand (toEncodedCommand (powershellScript ));
Original file line number Diff line number Diff line change @@ -39,9 +39,8 @@ private WindowsFeatures() {
3939
4040 /**
4141 * Whether the given Windows optional feature is enabled.
42- *
43- * @implNote {@code Get-WindowsOptionalFeature -Online} itself requires elevation,
44- * so in a non-elevated process this returns false even for enabled features; use
42+ * {@code Get-WindowsOptionalFeature -Online} itself requires elevation, so in a
43+ * non-elevated process this returns false even for enabled features; use
4544 * {@link #isServiceInstalled} with a witness service for a non-elevated probe.
4645 */
4746 public static boolean isEnabled (String featureName ) {
You can’t perform that action at this time.
0 commit comments