Skip to content

Commit

Permalink
[MongoDB Persistence] Remove all unnecessary @NonNullByDefault attrib…
Browse files Browse the repository at this point in the history
…utes.

The given attributes should not be NotNullByDefault, because some may be null, too.

Signed-off-by: Stephan Brunner <s.brunner@stephan-brunner.net>
  • Loading branch information
boomer41 committed Apr 26, 2021
1 parent 292f62e commit 1f8e452
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.util.Set;

import org.bson.types.ObjectId;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.core.items.Item;
import org.openhab.core.items.ItemNotFoundException;
Expand Down Expand Up @@ -71,7 +70,6 @@
*
* @author Thorsten Hoeger - Initial contribution
*/
@NonNullByDefault
@Component(service = { PersistenceService.class,
QueryablePersistenceService.class }, configurationPid = "org.openhab.mongodb", configurationPolicy = ConfigurationPolicy.REQUIRE)
public class MongoDBPersistenceService implements QueryablePersistenceService {
Expand All @@ -84,16 +82,16 @@ public class MongoDBPersistenceService implements QueryablePersistenceService {

private final Logger logger = LoggerFactory.getLogger(MongoDBPersistenceService.class);

private @NonNullByDefault({}) String url;
private @NonNullByDefault({}) String db;
private @NonNullByDefault({}) String collection;
private String url;
private String db;
private String collection;
private boolean collectionPerItem;

private boolean initialized = false;

protected final ItemRegistry itemRegistry;

private @NonNullByDefault({}) MongoClient cl;
private MongoClient cl;

@Activate
public MongoDBPersistenceService(final @Reference ItemRegistry itemRegistry) {
Expand Down

0 comments on commit 1f8e452

Please sign in to comment.