Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2015-11-10 05:41:49 +0000
committerThomas Wolf2015-11-10 05:41:49 +0000
commite7ec8c0886de3f11a322ffebecc73f2b512c238a (patch)
tree5ab659d2e295d21b33d0ead832c42a957f481432
parentf68da0b542ba099cb095b62f38a9ebcd8768dcd8 (diff)
downloadegit-e7ec8c0886de3f11a322ffebecc73f2b512c238a.tar.gz
egit-e7ec8c0886de3f11a322ffebecc73f2b512c238a.tar.xz
egit-e7ec8c0886de3f11a322ffebecc73f2b512c238a.zip
Do not log expected FileNotFoundException
Bug: 474981 Change-Id: Icb779f30e4dc6b92d160c955090c2b8721aa5090 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/compare/LocalNonWorkspaceTypedElement.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/compare/LocalNonWorkspaceTypedElement.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/compare/LocalNonWorkspaceTypedElement.java
index 7792d6e010..f846d94954 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/compare/LocalNonWorkspaceTypedElement.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/compare/LocalNonWorkspaceTypedElement.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (C) 2011, 2012 Dariusz Luksza <dariusz@luksza.org> and others.
+ * Copyright (C) 2011, 2012, 2015 Dariusz Luksza <dariusz@luksza.org> and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* IBM Corporation - initial implementation of some methods
+ * Thomas Wolf <thomas.wolf@paranor.ch> - Bug 474981
*******************************************************************************/
package org.eclipse.egit.ui.internal.synchronize.compare;
@@ -68,12 +69,13 @@ public class LocalNonWorkspaceTypedElement extends LocalResourceTypedElement {
@Override
public InputStream getContents() throws CoreException {
- try {
- return new FileInputStream(path.toFile());
- } catch (FileNotFoundException e) {
- Activator.error(e.getMessage(), e);
+ if (exists) {
+ try {
+ return new FileInputStream(path.toFile());
+ } catch (FileNotFoundException e) {
+ Activator.error(e.getMessage(), e);
+ }
}
-
return null;
}

Back to the top