diff options
9 files changed, 101 insertions, 73 deletions
diff --git a/bundles/org.eclipse.jsch.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.jsch.core/.settings/org.eclipse.jdt.core.prefs index 19f5bee64..42b4ddddf 100644 --- a/bundles/org.eclipse.jsch.core/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/org.eclipse.jsch.core/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,13 @@ eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 @@ -8,15 +17,20 @@ org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.problem.APILeak=warning org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=error +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning org.eclipse.jdt.core.compiler.problem.deprecation=warning org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore org.eclipse.jdt.core.compiler.problem.fallthroughCase=error org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore @@ -24,6 +38,7 @@ org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning @@ -34,44 +49,81 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=error org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=error +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,NORMAL diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchCorePlugin.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchCorePlugin.java index cecf38532..fcc4a0bd0 100644 --- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchCorePlugin.java +++ b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchCorePlugin.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -240,6 +240,7 @@ public class JSchCorePlugin extends Plugin{ return (IProxyService)tracker.getService(); } + @Override public void start(BundleContext context) throws Exception{ super.start(context); tracker=new ServiceTracker<Object, Object>(getBundle().getBundleContext(), @@ -250,6 +251,7 @@ public class JSchCorePlugin extends Plugin{ new Hashtable<String, Object>()); } + @Override public void stop(BundleContext context) throws Exception{ super.stop(context); tracker.close(); diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchLocation.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchLocation.java index 6417cffb0..0ef56f5fb 100644 --- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchLocation.java +++ b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchLocation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 JCraft,Inc. and others. + * Copyright (c) 2007, 2019 JCraft,Inc. and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -48,82 +48,60 @@ public class JSchLocation extends PlatformObject implements IJSchLocation{ this(user, host, DEFAULT_PORT); } - /** - * @see IJSchLocation#getHost() - */ + @Override public String getHost(){ return host; } - /** - * @see IJSchLocation#getPort() - */ + @Override public int getPort(){ return port; } - /* - * @see IJSchLocation#setUsername(String) - */ + @Override public void setUsername(String user){ if(userFixed) throw new UnsupportedOperationException(); this.user=user; } - /** - * @see IJSchLocation#getUsername() - */ + @Override public String getUsername(){ return user==null ? "" : user; //$NON-NLS-1$ } - /** - * @see IJSchLocation#setPassword(String) - */ + @Override public void setPassword(String password){ if(password!=null) this.password=password; } - /** - * @see IJSchLocation#getPassword() - */ + @Override public String getPassword(){ return password; } - /** - * @see IJSchLocation#setComment(String comment) - */ + @Override public void setComment(String comment){ this.comment=comment; } - /** - * @see IJSchLocation#getComment() - */ + @Override public String getComment(){ return comment; } - /** - * @see IJSchLocation#setPasswordStore(IPasswordStore store) - */ + @Override public void setPasswordStore(IPasswordStore store){ this.passwordStore=store; } - /** - * @see IJSchLocation#getPasswordStore() - */ + @Override public IPasswordStore getPasswordStore(){ return passwordStore; } - /** - * Implementation of inherited toString() - */ + @Override public String toString(){ return user +"@"+host+((port==DEFAULT_PORT) ? "" : ":"+(Integer.valueOf(port).toString())); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchProvider.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchProvider.java index bff9274d8..7680bb71f 100644 --- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchProvider.java +++ b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/JSchProvider.java @@ -35,9 +35,7 @@ class JSchProvider implements IJSchService { private static JSchProvider instance; - /* (non-Javadoc) - * @see org.eclipse.jsch.core.IJSchService#createSession(java.lang.String, int, java.lang.String) - */ + @Override public Session createSession(String host, int port, String username) throws JSchException { if(JSchCorePlugin.getPlugin().isNeedToLoadKnownHosts()){ @@ -51,9 +49,7 @@ class JSchProvider implements IJSchService { return Utils.createSession(JSchCorePlugin.getPlugin().getJSch(), username, host, port); } - /* (non-Javadoc) - * @see org.eclipse.jsch.core.IJSchService#createSession(IJSchLocation location, UserInfo uinfo) - */ + @Override public Session createSession(IJSchLocation location, UserInfo uinfo) throws JSchException { Session session=createSession(location.getHost(), location.getPort(), location.getUsername()); @@ -74,9 +70,7 @@ class JSchProvider implements IJSchService { return createSession(location, null); } - /** - * @see org.eclipse.jsch.core.IJSchService#connect(com.jcraft.jsch.Session, int, org.eclipse.core.runtime.IProgressMonitor) - */ + @Override public void connect(Session session, int timeout, IProgressMonitor monitor) throws JSchException{ session.setSocketFactory(new ResponsiveSocketFactory(monitor, timeout)); @@ -122,9 +116,7 @@ class JSchProvider implements IJSchService { ((UserInfoImpl)ui).connectionMade(); } - /** - * @see org.eclipse.jsch.core.IJSchService#getProxyForHost(java.lang.String, java.lang.String) - */ + @Override public Proxy getProxyForHost(String host, String proxyType) { return Utils.getProxyForHost(host, proxyType); } @@ -135,9 +127,7 @@ class JSchProvider implements IJSchService { return instance; } - /* (non-Javadoc) - * @see org.eclipse.jsch.core.IJSchService#connect(com.jcraft.jsch.Proxy, java.lang.String, int, int, org.eclipse.core.runtime.IProgressMonitor) - */ + @Override public void connect(Proxy proxy, String host, int port, int timeout, IProgressMonitor monitor) throws JSchException { try{ @@ -187,6 +177,7 @@ class JSchProvider implements IJSchService { } } + @Override public JSch getJSch(){ return JSchCorePlugin.getPlugin().getJSch(); } @@ -201,9 +192,7 @@ class JSchProvider implements IJSchService { return ((UserInfoImpl)session.getUserInfo()).hasPromptExceededTimeout(); } - /** - * @see org.eclipse.jsch.core.IJSchService#getLocation(String user, String host, int port) - */ + @Override public IJSchLocation getLocation(String user, String host, int port){ IJSchLocation location=null; location=new JSchLocation(user, host, port); diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/NullUserAuthenticator.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/NullUserAuthenticator.java index cc7f97b06..30965a992 100644 --- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/NullUserAuthenticator.java +++ b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/NullUserAuthenticator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 JCraft,Inc. and others. + * Copyright (c) 2007, 2019 JCraft,Inc. and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -22,34 +22,25 @@ import org.eclipse.jsch.core.IJSchLocation; */ class NullUserAuthenticator implements IUserAuthenticator{ - /** - * @see IUserAuthenticator#prompt(IJSchLocation location, int promptType, String title, - String message, int[] promptResponses, int defaultResponseIndex) - */ + @Override public int prompt(IJSchLocation location, int promptType, String title, String message, int[] promptResponses, int defaultResponseIndex){ return IUserAuthenticator.CANCEL_ID; } - /** - * @see IUserAuthenticator#promptForHostKeyChange(IJSchLocation location) - */ + @Override public boolean promptForHostKeyChange(IJSchLocation location){ return false; } - /** - * @see IUserAuthenticator#promptForKeyboradInteractive(IJSchLocation location, String destination, String name, String instruction, String[] prompt, boolean[] echo) - */ + @Override public String[] promptForKeyboradInteractive(IJSchLocation location, String destination, String name, String instruction, String[] prompt, boolean[] echo){ return null; } - /** - * @see IUserAuthenticator#promptForUserInfo(IJSchLocation, IUserInfo, String) - */ + @Override public void promptForUserInfo(IJSchLocation location, IUserInfo userInfo, String message){ // no operation diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceInitializer.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceInitializer.java index fb2730665..86505f0bc 100644 --- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceInitializer.java +++ b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceInitializer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -41,6 +41,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer{ } } + @Override public void initializeDefaultPreferences(){ IEclipsePreferences defaultNode=DefaultScope.INSTANCE .getNode(JSchCorePlugin.ID); diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceModifyListener.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceModifyListener.java index 5baebca1e..4e3337fd6 100644 --- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceModifyListener.java +++ b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/PreferenceModifyListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 IBM Corporation and others. + * Copyright (c) 2007, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -25,6 +25,7 @@ public class PreferenceModifyListener extends // Nothing to do } + @Override public IEclipsePreferences preApply(IEclipsePreferences node){ // the node does not need to be the root of the hierarchy Preferences root=node.node("/"); //$NON-NLS-1$ diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/ResponsiveSocketFactory.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/ResponsiveSocketFactory.java index 3f93d8fe6..c224e4bd5 100644 --- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/ResponsiveSocketFactory.java +++ b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/ResponsiveSocketFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2018 IBM Corporation and others. + * Copyright (c) 2007, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -37,16 +37,19 @@ public class ResponsiveSocketFactory implements SocketFactory { this.monitor = monitor; this.timeout=timeout; } + @Override public InputStream getInputStream(Socket socket) throws IOException { if (in == null) in = socket.getInputStream(); return in; } + @Override public OutputStream getOutputStream(Socket socket) throws IOException { if (out == null) out = socket.getOutputStream(); return out; } + @Override public Socket createSocket(String host, int port) throws IOException, UnknownHostException { Socket socket = null; socket = createSocket(host, port, timeout / 1000, monitor); diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/UserInfoImpl.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/UserInfoImpl.java index db2429a4d..482ee292d 100644 --- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/UserInfoImpl.java +++ b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/UserInfoImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2019 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -49,14 +49,17 @@ class UserInfoImpl implements com.jcraft.jsch.UserInfo, UIKeyboardInteractive{ this.timeout=timeout; } + @Override public String getPassword(){ return password; } + @Override public String getPassphrase(){ return passphrase; } + @Override public boolean promptYesNo(String str){ int prompt=authenticator.prompt(location, IUserAuthenticator.QUESTION, Messages.JSchSession_5, str, new int[] {IUserAuthenticator.YES_ID, @@ -69,18 +72,22 @@ class UserInfoImpl implements com.jcraft.jsch.UserInfo, UIKeyboardInteractive{ final String[] _password=new String[1]; final String username=location.getUsername(); IUserInfo info=new IUserInfo(){ + @Override public String getUsername(){ return username; } + @Override public boolean isUsernameMutable(){ return false; } + @Override public void setPassword(String password){ _password[0]=password; } + @Override public void setUsername(String username){ // } @@ -95,6 +102,7 @@ class UserInfoImpl implements com.jcraft.jsch.UserInfo, UIKeyboardInteractive{ return _password[0]; } + @Override public boolean promptPassphrase(String message){ try{ startTimer(); @@ -114,6 +122,7 @@ class UserInfoImpl implements com.jcraft.jsch.UserInfo, UIKeyboardInteractive{ } } + @Override public boolean promptPassword(String message){ try{ startTimer(); @@ -132,12 +141,14 @@ class UserInfoImpl implements com.jcraft.jsch.UserInfo, UIKeyboardInteractive{ } } + @Override public void showMessage(String message){ authenticator.prompt(location, IUserAuthenticator.INFORMATION, Messages.JSchSession_5, message, new int[] {IUserAuthenticator.OK_ID}, IUserAuthenticator.OK_ID); } + @Override public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt, boolean[] echo){ if(prompt.length==0){ |