Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2002-04-04 21:30:53 +0000
committerMichael Valenta2002-04-04 21:30:53 +0000
commit349496b6307709b707597c991f02519be67c6d1f (patch)
tree00c928977e7731346c8bc881b8b59dab0f2dc635
parent777de9fd274aaafcbb04c3155a52d4fe3336fa13 (diff)
downloadeclipse.platform.team-349496b6307709b707597c991f02519be67c6d1f.tar.gz
eclipse.platform.team-349496b6307709b707597c991f02519be67c6d1f.tar.xz
eclipse.platform.team-349496b6307709b707597c991f02519be67c6d1f.zip
12667: IllegalStateException after "Replace with Latest"
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java
index 8168d6b94..887b03f47 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java
@@ -81,6 +81,7 @@ public class Session {
private boolean createBackups = true;
private List expansions;
private Collection /* of ICVSFile */ textTransferOverrideSet = null;
+ private boolean hasBeenConnected = false;
// a shared buffer used for file transfers
private byte[] transferBuffer = null;
@@ -143,6 +144,7 @@ public class Session {
monitor.beginTask(null, 100);
try {
connection = location.openConnection(Policy.subMonitorFor(monitor, 50));
+ hasBeenConnected = true;
// tell the server the names of the responses we can handle
connection.writeLine("Valid-responses " + Request.makeResponseList()); //$NON-NLS-1$
@@ -163,7 +165,13 @@ public class Session {
* @throws IllegalStateException if the Session is not in the OPEN state
*/
public void close() throws CVSException {
- if (connection == null) throw new IllegalStateException();
+ if (connection == null) {
+ if (hasBeenConnected) {
+ throw new IllegalStateException();
+ } else {
+ return;
+ }
+ }
connection.close();
connection = null;
validRequests = null;

Back to the top