Move o.e.dltk.ssh.core to Java 8.
Bring codebase to newer java constructs.
Change-Id: I29eb4af7766c2c079fda08612f527214be288bc8
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
diff --git a/rse/plugins/org.eclipse.dltk.ssh.core/.classpath b/rse/plugins/org.eclipse.dltk.ssh.core/.classpath
index 64c5e31..eca7bdb 100644
--- a/rse/plugins/org.eclipse.dltk.ssh.core/.classpath
+++ b/rse/plugins/org.eclipse.dltk.ssh.core/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/rse/plugins/org.eclipse.dltk.ssh.core/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.dltk.ssh.core/.settings/org.eclipse.jdt.core.prefs
index 5e61341..4d0eab9 100644
--- a/rse/plugins/org.eclipse.dltk.ssh.core/.settings/org.eclipse.jdt.core.prefs
+++ b/rse/plugins/org.eclipse.dltk.ssh.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,8 +1,104 @@
-#Wed Jul 15 08:39:33 NOVST 2009
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.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+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=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+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.missingOverrideAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+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=warning
+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=ignore
+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=warning
+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.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=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+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.unusedDeclaredThrownException=ignore
+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=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+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=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/rse/plugins/org.eclipse.dltk.ssh.core/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.dltk.ssh.core/META-INF/MANIFEST.MF
index 03a4ab4..01835a8 100644
--- a/rse/plugins/org.eclipse.dltk.ssh.core/META-INF/MANIFEST.MF
+++ b/rse/plugins/org.eclipse.dltk.ssh.core/META-INF/MANIFEST.MF
@@ -9,7 +9,7 @@
org.eclipse.dltk.core;bundle-version="0.0.0",
com.jcraft.jsch,
org.eclipse.jsch.core
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.dltk.ssh.core
Bundle-Localization: plugin
diff --git a/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/core/SshConnectionManager.java b/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/core/SshConnectionManager.java
index d7a0aa5..39c4470 100644
--- a/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/core/SshConnectionManager.java
+++ b/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/core/SshConnectionManager.java
@@ -14,7 +14,7 @@
/**
* Contain path of location to connection.
*/
- private static Map<String, SshConnection> connections = new HashMap<String, SshConnection>();
+ private static Map<String, SshConnection> connections = new HashMap<>();
/**
* Return connection associated with specified location. Location should be
diff --git a/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/Activator.java b/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/Activator.java
index a246c6a..b18933d 100644
--- a/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/Activator.java
+++ b/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/Activator.java
@@ -19,7 +19,7 @@
// The shared instance
private static Activator plugin;
- private ServiceTracker tracker;
+ private ServiceTracker<IJSchService, IJSchService> tracker;
/**
* The constructor
@@ -32,7 +32,7 @@
super.start(context);
plugin = this;
tracker = new ServiceTracker(getBundle().getBundleContext(),
- org.eclipse.jsch.core.IJSchService.class.getName(), null);
+ org.eclipse.jsch.core.IJSchService.class, null);
tracker.open();
}
@@ -54,7 +54,7 @@
}
public IJSchService getJSch() {
- return (IJSchService) tracker.getService();
+ return tracker.getService();
}
public static void log(IStatus status) {
diff --git a/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/ChannelPool.java b/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/ChannelPool.java
index 932c232..cf58827 100644
--- a/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/ChannelPool.java
+++ b/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/ChannelPool.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 xored software, Inc.
+ * Copyright (c) 2009, 2017 xored software, Inc.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -34,8 +34,8 @@
private String password;
private Session session;
- private final List<ChannelSftp> freeChannels = new ArrayList<ChannelSftp>();
- private final Map<ChannelSftp, ChannelUsageInfo> usedChannels = new IdentityHashMap<ChannelSftp, ChannelUsageInfo>();
+ private final List<ChannelSftp> freeChannels = new ArrayList<>();
+ private final Map<ChannelSftp, ChannelUsageInfo> usedChannels = new IdentityHashMap<>();
private static class ChannelUsageInfo {
final Object context;
@@ -71,29 +71,36 @@
private final class LocalUserInfo implements UserInfo,
UIKeyboardInteractive {
+ @Override
public void showMessage(String arg0) {
}
+ @Override
public boolean promptYesNo(String arg0) {
return false;
}
+ @Override
public boolean promptPassword(String arg0) {
return true;
}
+ @Override
public boolean promptPassphrase(String arg0) {
return false;
}
+ @Override
public String getPassword() {
return password;
}
+ @Override
public String getPassphrase() {
return ""; //$NON-NLS-1$
}
+ @Override
public String[] promptKeyboardInteractive(String destination,
String name, String instruction, String[] prompt, boolean[] echo) {
final String p = password;
diff --git a/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/SshConnection.java b/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/SshConnection.java
index ff2e6e3..dbe1007 100644
--- a/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/SshConnection.java
+++ b/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/SshConnection.java
@@ -136,7 +136,6 @@
SftpATTRS attrs = channel.stat(path.toString());
boolean isRoot = (path.segmentCount() == 0);
String linkTarget = null;
- String canonicalPath;
String parentPath = path.removeLastSegments(1).toString();
if (attrs.isLink() && !isRoot) {
try {
@@ -148,7 +147,6 @@
} catch (Throwable t) {
channel.cd(fullPath);
linkTarget = channel.pwd();
- canonicalPath = linkTarget;
}
if (linkTarget != null && !linkTarget.equals(fullPath)) {
if (readlinkDone) {
@@ -160,7 +158,6 @@
SftpATTRS attrsTarget = channel.stat(linkTarget);
if (readlinkDone && attrsTarget.isDir()) {
channel.cd(fullPath);
- canonicalPath = channel.pwd();
}
} else {
linkTarget = null;
@@ -220,10 +217,12 @@
return stream;
}
+ @Override
public boolean isActiveCall() {
return stream != null && stream.activeCalls != 0;
}
+ @Override
public long getLastActivity() {
if (stream != null) {
return stream.lastActivity;
@@ -334,10 +333,12 @@
return stream;
}
+ @Override
public boolean isActiveCall() {
return stream != null && stream.activeCalls != 0;
}
+ @Override
public long getLastActivity() {
if (stream != null) {
return stream.lastActivity;
@@ -435,7 +436,6 @@
}
@Override
- @SuppressWarnings("unchecked")
public void perform(ChannelSftp channel) throws SftpException {
v = channel.ls(path.toString());
}
@@ -470,6 +470,7 @@
super(userName, hostName, port, DEFAULT_INACTIVITY_TIMEOUT);
}
+ @Override
public boolean connect() {
try {
final ChannelSftp channel = acquireChannel("connect()"); //$NON-NLS-1$
@@ -543,6 +544,7 @@
* @see org.eclipse.dltk.ssh.core.ISshConnection#getHandle(org.eclipse.core
* .runtime .IPath)
*/
+ @Override
public ISshFileHandle getHandle(IPath path) throws Exception {
if (isDisabled()) {
return null;
@@ -555,10 +557,12 @@
return new SshFileHandle(this, path, null);
}
+ @Override
public boolean isDisabled() {
return disabledTime > System.currentTimeMillis();
}
+ @Override
public void setDisabled(int timeout) {
disabledTime = System.currentTimeMillis() + timeout;
}
diff --git a/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/SshFileHandle.java b/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/SshFileHandle.java
index c3e2432..22bb66a 100644
--- a/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/SshFileHandle.java
+++ b/rse/plugins/org.eclipse.dltk.ssh.core/src/org/eclipse/dltk/ssh/internal/core/SshFileHandle.java
@@ -30,13 +30,13 @@
}
- private static final Map<SshFileHandle, CacheEntry> attrCache = new HashMap<SshFileHandle, CacheEntry>();
+ private static final Map<SshFileHandle, CacheEntry> attrCache = new HashMap<>();
private SshConnection connection = null;
private IPath path;
// private IPath linkTarget;
private SftpATTRS attrs;
- private Map<String, SshFileHandle> children = new HashMap<String, SshFileHandle>();
+ private Map<String, SshFileHandle> children = new HashMap<>();
private boolean childrenFetched = false;
public SshFileHandle(SshConnection connection, IPath path, SftpATTRS attrs) {
@@ -45,13 +45,7 @@
this.attrs = attrs;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.dltk.ssh.internal.core.ISshFileHandle#createFolder(java.lang
- * .String, org.eclipse.core.runtime.IProgressMonitor)
- */
+ @Override
public ISshFileHandle createFolder(String newEntryName,
IProgressMonitor monitor) throws CoreException {
ISshFileHandle child = getChild(newEntryName);
@@ -62,21 +56,13 @@
return child;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.dltk.ssh.internal.core.ISshFileHandle#mkdir()
- */
+ @Override
public void mkdir() {
connection.mkdir(path);
cleanAttrs();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.dltk.ssh.internal.core.ISshFileHandle#delete()
- */
+ @Override
public void delete() throws CoreException {
fetchAttrs();
if (attrs != null) {
@@ -85,11 +71,7 @@
}
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.dltk.ssh.internal.core.ISshFileHandle#exists()
- */
+ @Override
public boolean exists() {
fetchAttrs();
return attrs != null;
@@ -141,6 +123,7 @@
return attrs;
}
+ @Override
public synchronized ISshFileHandle getChild(String newEntryName) {
if (children.containsKey(newEntryName)) {
return children.get(newEntryName);
@@ -150,13 +133,7 @@
return child;
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.dltk.ssh.internal.core.ISshFileHandle#getChildren(org.eclipse
- * .core.runtime.IProgressMonitor)
- */
+ @Override
public synchronized ISshFileHandle[] getChildren(IProgressMonitor monitor)
throws CoreException {
if (!childrenFetched) {
@@ -195,13 +172,7 @@
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.dltk.ssh.internal.core.ISshFileHandle#getInputStream(org.
- * eclipse.core.runtime.IProgressMonitor)
- */
+ @Override
public InputStream getInputStream(IProgressMonitor monitor)
throws CoreException {
// fetchAttrs();
@@ -217,56 +188,34 @@
// return null;
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.dltk.ssh.internal.core.ISshFileHandle#getName()
- */
+ @Override
public String getName() {
return path.lastSegment();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.dltk.ssh.core.ISshFileHandle#getPath()
- */
+ @Override
public IPath getPath() {
return path;
}
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
@Override
public String toString() {
return path.toString();
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.dltk.ssh.internal.core.ISshFileHandle#getOutputStream(org
- * .eclipse.core.runtime.IProgressMonitor)
- */
+ @Override
public OutputStream getOutputStream(IProgressMonitor monitor)
throws CoreException {
final OutputStream stream = connection.put(this.path, this);
return stream;
}
+ @Override
public void streamClosed() {
cleanAttrs();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.dltk.ssh.internal.core.ISshFileHandle#isDirectory()
- */
+ @Override
public boolean isDirectory() {
fetchAttrs();
if (attrs != null) {
@@ -279,12 +228,7 @@
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.dltk.ssh.internal.core.ISshFileHandle#lastModificationTime()
- */
+ @Override
public long lastModificationTime() {
fetchAttrs();
if (attrs != null) {
@@ -297,24 +241,14 @@
}
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.dltk.ssh.internal.core.ISshFileHandle#setLastModified(long,
- * org.eclipse.core.runtime.IProgressMonitor)
- */
+ @Override
public void setLastModified(long timestamp, IProgressMonitor monitor)
throws CoreException {
connection.setLastModified(path, timestamp);
cleanAttrs();
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.dltk.ssh.internal.core.ISshFileHandle#getSize()
- */
+ @Override
public long getSize() {
fetchAttrs();
if (attrs != null) {
@@ -323,6 +257,7 @@
return 0;
}
+ @Override
public boolean isSymlink() {
final SftpATTRS attrs = connection.getLAttrs(path);
return attrs != null && attrs.isLink();
@@ -360,10 +295,12 @@
return true;
}
+ @Override
public String readLink() {
return connection.readLink(path);
}
+ @Override
public void move(IPath destination) throws CoreException {
connection.move(path, destination);
}