From a8cd87b8a581cf7294ea3787a10e5230f09b63c1 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Thu, 24 Apr 2008 01:14:10 +0000 Subject: [PATCH] [cleanup] Improve hash code --- .../terminals/core/elements/TerminalElement.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/TerminalElement.java b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/TerminalElement.java index ad87ead2e9e..a90966c24b3 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/TerminalElement.java +++ b/rse/plugins/org.eclipse.rse.subsystems.terminals.core/src/org/eclipse/rse/subsystems/terminals/core/elements/TerminalElement.java @@ -1,9 +1,9 @@ /******************************************************************************** * Copyright (c) 2008 MontaVista Software, Inc. * 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 + * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * Yu-Fen Kuo (MontaVista) - initial API and implementation * Anna Dushistova (MontaVista) - initial API and implementation @@ -24,7 +24,7 @@ public class TerminalElement extends AbstractResource { super(terminalServiceSubSystem); this.name = name; } - + public String getName() { return name; } @@ -47,7 +47,7 @@ public class TerminalElement extends AbstractResource { public int hashCode() { if (terminalShell != null) - return terminalShell.hashCode() + name.hashCode(); + return terminalShell.hashCode() * 37 + name.hashCode(); return name.hashCode() ; }