diff options
author | Tomasz Zarna | 2008-08-04 11:06:48 +0000 |
---|---|---|
committer | Tomasz Zarna | 2008-08-04 11:06:48 +0000 |
commit | aabb01d891bbab3ef5faf6bb0ed58b464430973d (patch) | |
tree | 0aaa6380ad109fcb1080bbfc94c135c5e588fc98 | |
parent | d96c0317353f720d99e0c33c9e1723365e434743 (diff) | |
download | eclipse.platform.team-aabb01d891bbab3ef5faf6bb0ed58b464430973d.tar.gz eclipse.platform.team-aabb01d891bbab3ef5faf6bb0ed58b464430973d.tar.xz eclipse.platform.team-aabb01d891bbab3ef5faf6bb0ed58b464430973d.zip |
bug 218288: [Wizards] NPE while sharing a project that already exists in the repository
3 files changed, 13 insertions, 10 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/CachedResourceVariant.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/CachedResourceVariant.java index 78b645a2b..a451da8e9 100644 --- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/CachedResourceVariant.java +++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/variants/CachedResourceVariant.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2008 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 @@ -181,9 +181,9 @@ public abstract class CachedResourceVariant extends PlatformObject implements IR * cached contents can be retrieved from any handle to a resource variant whose * cache path (as returned by <code>getCachePath()</code>) match but other * state information may only be accessible from the cached copy. - * <p> - * This method is not intended to be overridden by clients. + * * @return whether the variant is cached + * @nooverride This method is not intended to be overridden by clients. */ protected boolean isHandleCached() { return (getCache().hasEntry(getCachePath())); @@ -241,9 +241,9 @@ public abstract class CachedResourceVariant extends PlatformObject implements IR * one. If there isn't one, then <code>null</code> is returned. * If there is no cached handle and one is desired, then <code>cacheHandle()</code> * should be called. - * <p> - * This method is not intended to be overridden by clients. + * * @return a cached copy of this resource variant or <code>null</code> + * @nooverride This method is not intended to be overridden by clients. */ protected CachedResourceVariant getCachedHandle() { ResourceVariantCacheEntry entry = getCacheEntry(); @@ -260,8 +260,8 @@ public abstract class CachedResourceVariant extends PlatformObject implements IR * resource version (or revision). The ability to replace the handle itself * is provided so that additional state may be cached before or after the contents * are fetched. - * <p> - * This method is not intended to be overridden by clients. + * + * @nooverride This method is not intended to be overridden by clients. */ protected void cacheHandle() { getCache().add(getCachePath(), this); diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java index 0a9dc85c1..b4a1d846c 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2008 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 @@ -96,7 +96,7 @@ public interface ICVSFile extends ICVSResource, ICVSStorage { boolean isReadOnly() throws CVSException; /** - * Sets the file to be executable (<code>ture</code>) or not executable + * Sets the file to be executable (<code>true</code>) or not executable * (<code>false</code>) if the platform supports it. */ public void setExecutable(boolean executable) throws CVSException; diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java index f4aef830e..ab4712ab4 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2008 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 @@ -656,6 +656,9 @@ public class RemoteFile extends RemoteResource implements ICVSRemoteFile { public void setExecutable(boolean executable) throws CVSException { // store executable bit; this.executable = executable; + if (!isHandleCached()) { + cacheHandle(); + } RemoteFile file = (RemoteFile)getCachedHandle(); if (file != this) { file.setExecutable(executable); |