diff options
author | Anton Leherbauer | 2008-10-31 12:51:38 +0000 |
---|---|---|
committer | Anton Leherbauer | 2008-10-31 12:51:38 +0000 |
commit | e1e813365b47c676f9de5873a872cce706eaa920 (patch) | |
tree | 963a75355ca5e58a6eb1a951f73937c3bd5776ef /debug | |
parent | 10f412ae8482918a418f1d656e39fb1711565a08 (diff) | |
download | org.eclipse.cdt-e1e813365b47c676f9de5873a872cce706eaa920.tar.gz org.eclipse.cdt-e1e813365b47c676f9de5873a872cce706eaa920.tar.xz org.eclipse.cdt-e1e813365b47c676f9de5873a872cce706eaa920.zip |
Bug 247853 - AbsolutePathSourceContainer does a string comparison check using !=
Patch by James Blackburn
Diffstat (limited to 'debug')
-rw-r--r-- | debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java index 38dead7aa3a..6b5a91f487c 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/sourcelookup/AbsolutePathSourceContainer.java @@ -1,12 +1,13 @@ /******************************************************************************* - * Copyright (c) 2006, 2007 Nokia and others. + * Copyright (c) 2006, 2008 Nokia 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 * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Nokia - Initial implementation (159833) + * Nokia - Initial implementation (159833) + * Broadcom - http://bugs.eclipse.org/247853 *******************************************************************************/ package org.eclipse.cdt.debug.core.sourcelookup; @@ -53,11 +54,11 @@ public class AbsolutePathSourceContainer extends AbstractSourceContainer { ISourceLookupDirector director = getDirector(); if (director != null) { - ILaunchConfiguration launch = director.getLaunchConfiguration(); - if (launch != null) + ILaunchConfiguration launchConfiguration = director.getLaunchConfiguration(); + if (launchConfiguration != null) { - String projectName = getDirector().getLaunchConfiguration().getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); //$NON-NLS-1$ - if (projectName != "") { + String projectName = launchConfiguration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); //$NON-NLS-1$ + if (projectName.length() > 0) { ICProject project = CoreModel.getDefault().getCModel().getCProject(projectName); if (project != null) { @@ -107,10 +108,12 @@ public class AbsolutePathSourceContainer extends AbstractSourceContainer { return getSourceContainerType( TYPE_ID ); } + @Override public int hashCode() { return TYPE_ID.hashCode(); } + @Override public boolean equals(Object obj) { if (!(obj instanceof AbsolutePathSourceContainer)) return false; |