From b70005d03a9b1a105037e1ea44e941f7f2cedc9d Mon Sep 17 00:00:00 2001 From: clun Date: Sat, 2 Jan 2016 18:12:47 +0100 Subject: [PATCH] fix travis --- README.md | 6 +++++- .../java/org/ff4j/store/FeatureStoreMongoCollection.java | 2 ++ .../src/main/java/org/ff4j/store/FeatureStoreMongoDB.java | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e634e030..7e2803604 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,12 @@ FF4J, standing as Feature Flipping for Java, implements the [Feature Toggle](http://martinfowler.com/bliki/FeatureToggle.html) agile development practice. It allows you to enable and disable features through configuration at runtime with dedicated consoles and services. -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.ff4j/ff4j-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.ff4j/ff4j-core/) ![License Apache2](https://go-shields.herokuapp.com/license-apache2-blue.png) +[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.ff4j/ff4j-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.ff4j/ff4j-core/) + +[![Hex.pm](https://img.shields.io/hexpm/l/plug.svg)]() + [![Coverage Status](https://coveralls.io/repos/clun/ff4j/badge.svg?branch=master&service=github)](https://coveralls.io/github/clun/ff4j?branch=master) + [![Live Demo](https://img.shields.io/badge/demo-online-green.svg)](http://cannys.com/ff4j-demo/) diff --git a/ff4j-store-mongodb-v3/src/main/java/org/ff4j/store/FeatureStoreMongoCollection.java b/ff4j-store-mongodb-v3/src/main/java/org/ff4j/store/FeatureStoreMongoCollection.java index e51f1816d..1d98e1d44 100644 --- a/ff4j-store-mongodb-v3/src/main/java/org/ff4j/store/FeatureStoreMongoCollection.java +++ b/ff4j-store-mongodb-v3/src/main/java/org/ff4j/store/FeatureStoreMongoCollection.java @@ -26,6 +26,7 @@ import org.ff4j.store.mongodb.FeatureDocumentBuilder; import org.ff4j.store.mongodb.FeatureDocumentMapper; import org.ff4j.store.mongodb.FeatureStoreMongoConstants; +import org.ff4j.utils.Util; /** * Implementation of {@link FeatureStore} to work with MongoDB. @@ -100,6 +101,7 @@ private void updateStatus(String uid, boolean enable) { /** {@inheritDoc} */ @Override public boolean exist(String featId) { + Util.assertHasLength(featId); return 1 == collection.count(BUILDER.getFeatUid(featId)); } diff --git a/ff4j-store-mongodb/src/main/java/org/ff4j/store/FeatureStoreMongoDB.java b/ff4j-store-mongodb/src/main/java/org/ff4j/store/FeatureStoreMongoDB.java index c355c0e74..634e3ddb4 100644 --- a/ff4j-store-mongodb/src/main/java/org/ff4j/store/FeatureStoreMongoDB.java +++ b/ff4j-store-mongodb/src/main/java/org/ff4j/store/FeatureStoreMongoDB.java @@ -24,6 +24,7 @@ import org.ff4j.store.mongodb.FeatureDBObjectBuilder; import org.ff4j.store.mongodb.FeatureDBObjectMapper; import org.ff4j.store.mongodb.FeatureStoreMongoConstants; +import org.ff4j.utils.Util; import com.mongodb.BasicDBObject; import com.mongodb.BasicDBObjectBuilder; @@ -103,6 +104,7 @@ private void updateStatus(String uid, boolean enable) { /** {@inheritDoc} */ @Override public boolean exist(String featId) { + Util.assertHasLength(featId); return 1 == collection.count(BUILDER.getFeatUid(featId)); }