From a62a11f430dcd361ad659e68c2111b3830f26278 Mon Sep 17 00:00:00 2001 From: javanna Date: Tue, 25 Nov 2014 16:55:39 +0100 Subject: [PATCH] Internal: remove static assert that will trip once we upgrade to 1.4.1 or any new version Although it is nice to be alerted through assert as soon as we upgrade the es core dependency, this can be done only in test code, in production code it prevents us from supporting any future version once the code gets released. Replaced the assert with a TODO. Original commit: elastic/x-pack-elasticsearch@b0d59c2fd3aac56d19f851ec504a07473395f916 --- .../shield/authz/InternalAuthorizationService.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/org/elasticsearch/shield/authz/InternalAuthorizationService.java b/src/main/java/org/elasticsearch/shield/authz/InternalAuthorizationService.java index df5e0a1676b..404a6c0dbf0 100644 --- a/src/main/java/org/elasticsearch/shield/authz/InternalAuthorizationService.java +++ b/src/main/java/org/elasticsearch/shield/authz/InternalAuthorizationService.java @@ -5,7 +5,6 @@ */ package org.elasticsearch.shield.authz; -import org.elasticsearch.Version; import org.elasticsearch.action.CompositeIndicesRequest; import org.elasticsearch.action.IndicesRequest; import org.elasticsearch.cluster.ClusterService; @@ -38,12 +37,8 @@ public class InternalAuthorizationService extends AbstractComponent implements A private final AuditTrail auditTrail; private final IndicesResolver[] indicesResolvers; - static { - //see https://github.com/elasticsearch/elasticsearch/pull/8415 - assert Version.CURRENT.onOrBefore(Version.V_1_4_0) : "replace the Provider with ClusterService"; - } - @Inject + //TODO replace Provider with ClusterService once 1.4.1 is out, see https://github.com/elasticsearch/elasticsearch/pull/8415 public InternalAuthorizationService(Settings settings, RolesStore rolesStore, Provider clusterServiceProvider, AuditTrail auditTrail) { super(settings); this.rolesStore = rolesStore;