aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2024-12-11 12:13:15 +0000
committerGerrit Code Review <support@gerrithub.io>2024-12-11 12:13:15 +0000
commitac0b4f8d0e60469fcc2c57379e7499eb06fb6c2d (patch)
tree14f5894b438a8bbd52b7bea67f2b5d1b93bbcb09
parentec9f955204ebbeb43d283d3980a83a74e649e4f9 (diff)
parentdbd0a6a745eaa1345aed8b1383e97eb88ac90e5f (diff)
downloadjgit-ac0b4f8d0e60469fcc2c57379e7499eb06fb6c2d.tar.gz
jgit-ac0b4f8d0e60469fcc2c57379e7499eb06fb6c2d.zip
Merge "Remove use of deprecated java.security.AccessController"
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/auth/BasicAuthentication.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/auth/BasicAuthentication.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/auth/BasicAuthentication.java
index 8866976c89..3e1fab34d9 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/auth/BasicAuthentication.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/auth/BasicAuthentication.java
@@ -17,8 +17,6 @@ import java.net.InetSocketAddress;
import java.net.PasswordAuthentication;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
import java.util.Arrays;
import java.util.concurrent.CancellationException;
@@ -113,13 +111,12 @@ public abstract class BasicAuthentication<ParameterType, TokenType>
*/
protected void askCredentials() {
clearPassword();
- PasswordAuthentication auth = AccessController.doPrivileged(
- (PrivilegedAction<PasswordAuthentication>) () -> Authenticator
- .requestPasswordAuthentication(proxy.getHostString(),
- proxy.getAddress(), proxy.getPort(),
- SshConstants.SSH_SCHEME,
- SshdText.get().proxyPasswordPrompt, "Basic", //$NON-NLS-1$
- null, RequestorType.PROXY));
+ PasswordAuthentication auth = Authenticator
+ .requestPasswordAuthentication(proxy.getHostString(),
+ proxy.getAddress(), proxy.getPort(),
+ SshConstants.SSH_SCHEME,
+ SshdText.get().proxyPasswordPrompt, "Basic", //$NON-NLS-1$
+ null, RequestorType.PROXY);
if (auth == null) {
user = ""; //$NON-NLS-1$
throw new CancellationException(