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>
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 ef117df..bed4f48 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 @@
 	}
 
 	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);
 		}
 	}