refactor: remove explicit type arguments

This commit is contained in:
broDom
2017-07-03 17:12:41 +02:00
parent b73040771a
commit 0cff0e7e7a
78 changed files with 116 additions and 119 deletions

View File

@@ -199,7 +199,7 @@ public class XmlGroupDatabase implements XmlDatabase<Group>
/** Field description */
@XmlJavaTypeAdapter(XmlGroupMapAdapter.class)
@XmlElement(name = "groups")
private Map<String, Group> groupMap = new LinkedHashMap<String, Group>();
private Map<String, Group> groupMap = new LinkedHashMap<>();
/** Field description */
private Long lastModified;

View File

@@ -72,7 +72,7 @@ public class XmlGroupList implements Iterable<Group>
*/
public XmlGroupList(Map<String, Group> groupMap)
{
this.groups = new LinkedList<Group>(groupMap.values());
this.groups = new LinkedList<>(groupMap.values());
}
//~--- methods --------------------------------------------------------------

View File

@@ -81,7 +81,7 @@ public class XmlGroupMapAdapter
@Override
public Map<String, Group> unmarshal(XmlGroupList groups) throws Exception
{
Map<String, Group> groupMap = new LinkedHashMap<String, Group>();
Map<String, Group> groupMap = new LinkedHashMap<>();
for (Group group : groups)
{

View File

@@ -298,6 +298,5 @@ public class XmlRepositoryDatabase implements XmlDatabase<Repository>
/** Field description */
@XmlJavaTypeAdapter(XmlRepositoryMapAdapter.class)
@XmlElement(name = "repositories")
private Map<String, Repository> repositoryMap = new LinkedHashMap<String,
Repository>();
private Map<String, Repository> repositoryMap = new LinkedHashMap<>();
}

View File

@@ -72,7 +72,7 @@ public class XmlRepositoryList implements Iterable<Repository>
*/
public XmlRepositoryList(Map<String, Repository> repositoryMap)
{
this.repositories = new LinkedList<Repository>(repositoryMap.values());
this.repositories = new LinkedList<>(repositoryMap.values());
}
//~--- methods --------------------------------------------------------------

View File

@@ -83,8 +83,7 @@ public class XmlRepositoryMapAdapter
public Map<String, Repository> unmarshal(XmlRepositoryList repositories)
throws Exception
{
Map<String, Repository> repositoryMap = new LinkedHashMap<String,
Repository>();
Map<String, Repository> repositoryMap = new LinkedHashMap<>();
for (Repository repository : repositories)
{

View File

@@ -436,8 +436,8 @@ public class JAXBConfigurationEntryStore<V> implements ConfigurationEntryStore<V
writer.writeEndElement();
// value
JAXBElement<V> je = new JAXBElement<V>(QName.valueOf(TAG_VALUE), type,
e.getValue());
JAXBElement<V> je = new JAXBElement<>(QName.valueOf(TAG_VALUE), type,
e.getValue());
m.marshal(je, writer);

View File

@@ -102,9 +102,9 @@ public class JAXBConfigurationEntryStoreFactory
type, name);
//J-
return new JAXBConfigurationEntryStore<T>(
new File(directory,name.concat(StoreConstants.FILE_EXTENSION)),
keyGenerator,
return new JAXBConfigurationEntryStore<>(
new File(directory, name.concat(StoreConstants.FILE_EXTENSION)),
keyGenerator,
type
);
//J+

View File

@@ -202,5 +202,5 @@ public class XmlUserDatabase implements XmlDatabase<User>
/** Field description */
@XmlJavaTypeAdapter(XmlUserMapAdapter.class)
@XmlElement(name = "users")
private Map<String, User> userMap = new LinkedHashMap<String, User>();
private Map<String, User> userMap = new LinkedHashMap<>();
}

View File

@@ -72,7 +72,7 @@ public class XmlUserList implements Iterable<User>
*/
public XmlUserList(Map<String, User> userMap)
{
this.users = new LinkedList<User>(userMap.values());
this.users = new LinkedList<>(userMap.values());
}
//~--- methods --------------------------------------------------------------

View File

@@ -81,7 +81,7 @@ public class XmlUserMapAdapter
@Override
public Map<String, User> unmarshal(XmlUserList users) throws Exception
{
Map<String, User> userMap = new LinkedHashMap<String, User>();
Map<String, User> userMap = new LinkedHashMap<>();
for (User user : users)
{