Remove deprecated methods from Configuration, UID and ThingHelper (#1629)

Removes the following deprecated methods:

* org.openhab.core.config.core.Configuration.get​(Object)
* org.openhab.core.config.core.Configuration.remove​(Object)
* org.openhab.core.thing.UID.getSegments()
* org.openhab.core.thing.util.ThingHelper.ensureUnique​(Collection<Channel>)

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born 2020-09-09 09:22:27 +02:00 committed by GitHub
parent 695647c7f6
commit b3880ebe88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 38 deletions

View File

@ -91,14 +91,6 @@ public class Configuration {
return properties.containsKey(key);
}
/**
* @deprecated Use {@link #get(String)} instead.
*/
@Deprecated
public Object get(Object key) {
return this.get((String) key);
}
public Object get(String key) {
return properties.get(key);
}
@ -107,14 +99,6 @@ public class Configuration {
return properties.put(key, ConfigUtil.normalizeType(value, null));
}
/**
* @deprecated Use {@link #remove(String)} instead.
*/
@Deprecated
public Object remove(Object key) {
return remove((String) key);
}
public Object remove(String key) {
return properties.remove(key);
}

View File

@ -75,15 +75,6 @@ public abstract class UID extends AbstractUID {
return getSegment(0);
}
/**
* @deprecated use {@link #getAllSegments()} instead
*/
@Deprecated
protected String[] getSegments() {
final List<String> segments = super.getAllSegments();
return segments.toArray(new String[segments.size()]);
}
@Override
// Avoid subclasses to require importing the o.e.sh.core.common package
protected List<String> getAllSegments() {

View File

@ -108,19 +108,6 @@ public class ThingHelper {
}
}
/**
* @deprecated Use {@link ThingHelper#ensureUniqueChannels(Collection)} instead.
*/
@Deprecated
public static void ensureUnique(Collection<Channel> channels) {
Set<UID> ids = new HashSet<>();
for (Channel channel : channels) {
if (!ids.add(channel.getUID())) {
throw new IllegalArgumentException("Duplicate channels " + channel.getUID().getAsString());
}
}
}
/**
* Ensures that there are no duplicate channels in the array (i.e. not using the same ChannelUID)
*