diff options
author | John Liu | 2011-07-21 15:46:50 +0000 |
---|---|---|
committer | Vivian Kong | 2011-07-21 15:46:50 +0000 |
commit | f636cb6bcce395b2bbbd0d4402c9c340f4ae75d1 (patch) | |
tree | 9736d2bb5e62d347e2eb97bcdd345a6db2e2f6ce | |
parent | 24988efc3885d8b8befe1f7401eb0881c88f0f4f (diff) | |
download | org.eclipse.cdt-f636cb6bcce395b2bbbd0d4402c9c340f4ae75d1.tar.gz org.eclipse.cdt-f636cb6bcce395b2bbbd0d4402c9c340f4ae75d1.tar.xz org.eclipse.cdt-f636cb6bcce395b2bbbd0d4402c9c340f4ae75d1.zip |
Bug 352775 - The function registerFileEncoding in FileEncodingRegistry
should check default encoding first
Change-Id: I33b736103707dfcb3848d1d1671487c7b1995e77
-rw-r--r-- | core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/FileEncodingRegistry.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/FileEncodingRegistry.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/FileEncodingRegistry.java index c54544e7f2e..5bb71551283 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/FileEncodingRegistry.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/indexer/FileEncodingRegistry.java @@ -1,12 +1,12 @@ /******************************************************************************* - * Copyright (c) 2010 IBM Corporation and others. + * Copyright (c) 2010, 2011 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 * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * IBM Rational Software - Initial API and implementation + * IBM Corporation - Initial API and implementation *******************************************************************************/ package org.eclipse.cdt.internal.core.indexer; @@ -41,6 +41,9 @@ public class FileEncodingRegistry implements Serializable { } public void registerFileEncoding(String filename, String encoding) { + if(defaultEncoding.equals(encoding)){ + return; + } if (fFilePathToEncodingMap != null) { fFilePathToEncodingMap.put(filename, encoding); } |