Commit 8f511c27 authored by Tobias Meuser's avatar Tobias Meuser
Browse files

Minor change in generics

parent 7cd2df46
......@@ -112,13 +112,14 @@ public class EnvironmentInformation<T extends LocationBasedEnvironmentProperty>
return null;
}
public static List<Attribute<?>> createAttributeList(
public static <T extends Object> List<Attribute<?>> createAttributeList(
EnvironmentInformation<? extends LocationBasedEnvironmentProperty> pInformation, PubSubComponent pPubSub) {
List<Attribute<?>> attributes = new LinkedList<>();
for (AvailableInformationAttributes attribute : pInformation.getAvailableAttributes()) {
Object value = pInformation.getAttribute(attribute);
attributes.add(pPubSub.createAttribute(Object.class, attribute.getAttributeID(), value));
Class<T> expectedClass = (Class<T>) attribute.getExpectedClass();
T value = pInformation.getAttribute(attribute);
attributes.add(pPubSub.createAttribute(expectedClass, attribute.getAttributeID(), value));
}
Attribute<EnvironmentInformation> ATTR_VALUE = pPubSub.createAttribute(EnvironmentInformation.class,
AvailableInformationAttributes.VALUE.getAttributeID(), null);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment