From 31a72f5da70454c7e7d567df82225cb871e39f2d Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Wed, 15 Aug 2018 00:31:37 +0200 Subject: [PATCH] Declare ConfigConstants and GitProtocolConstants final This avoids that we have to suppress API errors whenever we add a new constant in a minor release. This change affects implementors only which is ok to do in a minor release following OSGi semantic versioning rules. Change-Id: Iece841886fbe00f1ba567c5ff68093c542ba265e Signed-off-by: Matthias Sohn --- org.eclipse.jgit/.settings/.api_filters | 14 ++++++++++++++ .../src/org/eclipse/jgit/lib/ConfigConstants.java | 2 +- .../jgit/transport/GitProtocolConstants.java | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters index e51bf20c2..b7b49bc65 100644 --- a/org.eclipse.jgit/.settings/.api_filters +++ b/org.eclipse.jgit/.settings/.api_filters @@ -1,5 +1,12 @@ + + + + + + + @@ -16,4 +23,11 @@ + + + + + + + diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java index 5a790350b..d4a0280da 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java @@ -49,7 +49,7 @@ package org.eclipse.jgit.lib; * configuration keys */ @SuppressWarnings("nls") -public class ConfigConstants { +public final class ConfigConstants { /** The "core" section */ public static final String CONFIG_CORE_SECTION = "core"; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/GitProtocolConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/GitProtocolConstants.java index 86740d42c..760ac6c1d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/GitProtocolConstants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/GitProtocolConstants.java @@ -50,7 +50,7 @@ package org.eclipse.jgit.transport; * * @since 3.2 */ -public class GitProtocolConstants { +public final class GitProtocolConstants { /** * Include tags if we are also including the referenced objects. *