Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-02-27 21:46:40 +0000
committerMichael Valenta2004-02-27 21:46:40 +0000
commit02107f23fb2f4ffe351b9462ec133587f40de869 (patch)
treea0faa6e2b02cb43c251cbfd82300b7ee7b5ef8c2
parent6fd8ebc76379f3e5701b69ca221016281598e267 (diff)
downloadeclipse.platform.team-02107f23fb2f4ffe351b9462ec133587f40de869.tar.gz
eclipse.platform.team-02107f23fb2f4ffe351b9462ec133587f40de869.tar.xz
eclipse.platform.team-02107f23fb2f4ffe351b9462ec133587f40de869.zip
49307: blankline in .ssh/known_hosts caused accessing CVS to hangs
-rw-r--r--bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java
index 470308f4d..489798852 100644
--- a/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java
+++ b/bundles/org.eclipse.team.cvs.ssh/src/org/eclipse/team/internal/ccvs/ssh/KnownHosts.java
@@ -76,7 +76,7 @@ public class KnownHosts {
boolean found = false;
String line;
while ((line = r.readLine()) != null) {
- if (line.length()==0) continue;
+ if (line.trim().length()==0) continue;
if (line.startsWith("#")) continue; //$NON-NLS-1$
String[] tokens=subStrings(line);
if (tokens.length==4 && Character.isDigit(tokens[1].charAt(0)) && tokens[0].equalsIgnoreCase(hostname)) {

Back to the top