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@b0d59c2fd3
This commit is contained in:
javanna 2014-11-25 16:55:39 +01:00 committed by Luca Cavanna
parent 22eabc19b2
commit a62a11f430
1 changed files with 1 additions and 6 deletions

View File

@ -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<ClusterService> with ClusterService";
}
@Inject
//TODO replace Provider<ClusterService> with ClusterService once 1.4.1 is out, see https://github.com/elasticsearch/elasticsearch/pull/8415
public InternalAuthorizationService(Settings settings, RolesStore rolesStore, Provider<ClusterService> clusterServiceProvider, AuditTrail auditTrail) {
super(settings);
this.rolesStore = rolesStore;