1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-12 14:01:08 +01:00

Fix minor codestyle issues

This commit is contained in:
Paul Schaub 2017-12-13 23:10:11 +01:00 committed by Florian Schmaus
parent 200f90ffdc
commit cb18056613
422 changed files with 1404 additions and 1444 deletions

View file

@ -52,7 +52,7 @@ public class JivePropertiesExtension implements ExtensionElement {
private final Map<String, Object> properties;
public JivePropertiesExtension() {
properties = new HashMap<String, Object>();
properties = new HashMap<>();
}
public JivePropertiesExtension(Map<String, Object> properties) {
@ -84,7 +84,7 @@ public class JivePropertiesExtension implements ExtensionElement {
*/
public synchronized void setProperty(String name, Object value) {
if (!(value instanceof Serializable)) {
throw new IllegalArgumentException("Value must be serialiazble");
throw new IllegalArgumentException("Value must be serializable");
}
properties.put(name, value);
}
@ -110,7 +110,7 @@ public class JivePropertiesExtension implements ExtensionElement {
if (properties == null) {
return Collections.emptySet();
}
return Collections.unmodifiableSet(new HashSet<String>(properties.keySet()));
return Collections.unmodifiableSet(new HashSet<>(properties.keySet()));
}
/**
@ -122,7 +122,7 @@ public class JivePropertiesExtension implements ExtensionElement {
if (properties == null) {
return Collections.emptyMap();
}
return Collections.unmodifiableMap(new HashMap<String, Object>(properties));
return Collections.unmodifiableMap(new HashMap<>(properties));
}
@Override

View file

@ -55,7 +55,7 @@ public class JivePropertiesExtensionProvider extends ExtensionElementProvider<Ji
public JivePropertiesExtension parse(XmlPullParser parser,
int initialDepth) throws XmlPullParserException,
IOException {
Map<String, Object> properties = new HashMap<String, Object>();
Map<String, Object> properties = new HashMap<>();
while (true) {
int eventType = parser.next();
if (eventType == XmlPullParser.START_TAG && parser.getName().equals("property")) {