mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[MongoDB Persistence] Remove all unnecessary @NonNullByDefault attributes.
The given attributes should not be NotNullByDefault, because some may be null, too. Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
This commit is contained in:
parent
292f62ef92
commit
1f8e4525c4
@ -23,7 +23,6 @@ import java.util.Map;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.bson.types.ObjectId;
|
import org.bson.types.ObjectId;
|
||||||
import org.eclipse.jdt.annotation.NonNullByDefault;
|
|
||||||
import org.eclipse.jdt.annotation.Nullable;
|
import org.eclipse.jdt.annotation.Nullable;
|
||||||
import org.openhab.core.items.Item;
|
import org.openhab.core.items.Item;
|
||||||
import org.openhab.core.items.ItemNotFoundException;
|
import org.openhab.core.items.ItemNotFoundException;
|
||||||
@ -71,7 +70,6 @@ import com.mongodb.MongoClientURI;
|
|||||||
*
|
*
|
||||||
* @author Thorsten Hoeger - Initial contribution
|
* @author Thorsten Hoeger - Initial contribution
|
||||||
*/
|
*/
|
||||||
@NonNullByDefault
|
|
||||||
@Component(service = { PersistenceService.class,
|
@Component(service = { PersistenceService.class,
|
||||||
QueryablePersistenceService.class }, configurationPid = "org.openhab.mongodb", configurationPolicy = ConfigurationPolicy.REQUIRE)
|
QueryablePersistenceService.class }, configurationPid = "org.openhab.mongodb", configurationPolicy = ConfigurationPolicy.REQUIRE)
|
||||||
public class MongoDBPersistenceService implements QueryablePersistenceService {
|
public class MongoDBPersistenceService implements QueryablePersistenceService {
|
||||||
@ -84,16 +82,16 @@ public class MongoDBPersistenceService implements QueryablePersistenceService {
|
|||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(MongoDBPersistenceService.class);
|
private final Logger logger = LoggerFactory.getLogger(MongoDBPersistenceService.class);
|
||||||
|
|
||||||
private @NonNullByDefault({}) String url;
|
private String url;
|
||||||
private @NonNullByDefault({}) String db;
|
private String db;
|
||||||
private @NonNullByDefault({}) String collection;
|
private String collection;
|
||||||
private boolean collectionPerItem;
|
private boolean collectionPerItem;
|
||||||
|
|
||||||
private boolean initialized = false;
|
private boolean initialized = false;
|
||||||
|
|
||||||
protected final ItemRegistry itemRegistry;
|
protected final ItemRegistry itemRegistry;
|
||||||
|
|
||||||
private @NonNullByDefault({}) MongoClient cl;
|
private MongoClient cl;
|
||||||
|
|
||||||
@Activate
|
@Activate
|
||||||
public MongoDBPersistenceService(final @Reference ItemRegistry itemRegistry) {
|
public MongoDBPersistenceService(final @Reference ItemRegistry itemRegistry) {
|
||||||
|
Loading…
Reference in New Issue
Block a user