diff options
author | Pawel Pogorzelski | 2010-04-26 12:23:03 +0000 |
---|---|---|
committer | Pawel Pogorzelski | 2010-04-26 12:23:03 +0000 |
commit | 8fca3b2c418add41f88ab4c386568f18825f6de5 (patch) | |
tree | 7c56d4881b08eb9e3bf64cee6d682ebbe0592032 /bundles/org.eclipse.team.cvs.core | |
parent | a87467205299255c152ea70327ed51ec0049c3da (diff) | |
download | eclipse.platform.team-8fca3b2c418add41f88ab4c386568f18825f6de5.tar.gz eclipse.platform.team-8fca3b2c418add41f88ab4c386568f18825f6de5.tar.xz eclipse.platform.team-8fca3b2c418add41f88ab4c386568f18825f6de5.zip |
Bug 294747 - StringIndexOutOfBoundsException during synchronize operation
Diffstat (limited to 'bundles/org.eclipse.team.cvs.core')
-rw-r--r-- | bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java index b4063e8dc..337d61373 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/LogListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -163,9 +163,10 @@ public class LogListener extends CommandOutputListener { // get the author name int endOfAuthorIndex = line.indexOf(';', endOfDateIndex + 1); author = internAndCopyString(line.substring(endOfDateIndex + 11, endOfAuthorIndex)); - + // get the file state (because this revision might be "dead") - fileState = internAndCopyString(line.substring(endOfAuthorIndex + 10, line.indexOf(';', endOfAuthorIndex + 1))); + int endOfStateIndex = line.indexOf(';', endOfAuthorIndex + 1) < 0 ? line.length() : line.indexOf(';', endOfAuthorIndex + 1); + fileState = internAndCopyString(line.substring(endOfAuthorIndex + 10, endOfStateIndex)); comment = new StringBuffer(); state = COMMENT; break; |