Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2018-06-18 07:51:58 +0000
committerThomas Wolf2018-06-18 07:51:58 +0000
commit58121218af755e028768d8bb28a489b53652a09c (patch)
treea0875a8f011d2ab2bc24a6ad8622feb7d3ac23bb
parentd83b42807f460584ebc1767866a17c40f6d8c16a (diff)
downloadegit-58121218af755e028768d8bb28a489b53652a09c.tar.gz
egit-58121218af755e028768d8bb28a489b53652a09c.tar.xz
egit-58121218af755e028768d8bb28a489b53652a09c.zip
Don't warn about LFS if LFS bundle is not present.
Bug: 535954 Change-Id: Ib26d895085cebe537f0cdf30a8a355a81ac472bc Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/Activator.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/Activator.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/Activator.java
index ef117df429..bed4f48eca 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/Activator.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/Activator.java
@@ -274,16 +274,18 @@ public class Activator extends Plugin implements DebugOptionsListener {
}
private void registerBuiltinLFS() {
- Class<?> lfs;
- try {
- lfs = Class.forName("org.eclipse.jgit.lfs.BuiltinLFS"); //$NON-NLS-1$
- if (lfs != null) {
- lfs.getMethod("register").invoke(null); //$NON-NLS-1$
+ if (Platform.getBundle("org.eclipse.jgit.lfs") != null) { //$NON-NLS-1$
+ Class<?> lfs;
+ try {
+ lfs = Class.forName("org.eclipse.jgit.lfs.BuiltinLFS"); //$NON-NLS-1$
+ if (lfs != null) {
+ lfs.getMethod("register").invoke(null); //$NON-NLS-1$
+ }
+ } catch (ClassNotFoundException | IllegalAccessException
+ | IllegalArgumentException | InvocationTargetException
+ | NoSuchMethodException | SecurityException e1) {
+ logWarning(CoreText.Activator_noBuiltinLfsSupportDetected, e1);
}
- } catch (ClassNotFoundException | IllegalAccessException
- | IllegalArgumentException | InvocationTargetException
- | NoSuchMethodException | SecurityException e1) {
- logWarning(CoreText.Activator_noBuiltinLfsSupportDetected, e1);
}
}

Back to the top