Enable and fix Eclipse warnings about redundant type arguments

Since Java 7 it is possible to replace the type arguments required to
invoke the constructor of a generic class with an empty set of type
parameters (<>) as long as the compiler can infer the type arguments
from the context [1].

Enable the Eclipse warning about redundant type arguments, and remove
the ones it warns about.

[1] http://goo.gl/SG21kM

Change-Id: I422882949a6a6a57391580d881f73120b2843a0e
This commit is contained in:
David Pursehouse
2014-10-31 11:24:52 +09:00
parent 51e708c464
commit 41abb376ca
26 changed files with 38 additions and 41 deletions

View File

@@ -93,7 +93,7 @@ public class AccessSectionEditor extends Composite implements
public AccessSectionEditor(ProjectAccess access) {
projectAccess = access;
permissionSelector = new ValueListBox<String>(
permissionSelector = new ValueListBox<>(
new PermissionNameRenderer(access.getCapabilities()));
permissionSelector.addValueChangeHandler(new ValueChangeHandler<String>() {
@Override

View File

@@ -90,7 +90,7 @@ public class GroupListScreen extends AccountScreen implements FilteredUserInterf
// Retrieve one more group than page size to determine if there are more
// groups to display
GroupMap.match(subname, pageSize + 1, startPosition,
new IgnoreOutdatedFilterResultsCallbackWrapper<GroupMap>(this,
new IgnoreOutdatedFilterResultsCallbackWrapper<>(this,
new GerritCallback<GroupMap>() {
@Override
public void onSuccess(GroupMap result) {

View File

@@ -104,7 +104,7 @@ public class ProjectListScreen extends Screen implements FilteredUserInterface {
// Retrieve one more project than page size to determine if there are more
// projects to display
ProjectMap.match(subname, pageSize + 1, startPosition,
new IgnoreOutdatedFilterResultsCallbackWrapper<ProjectMap>(this,
new IgnoreOutdatedFilterResultsCallbackWrapper<>(this,
new GerritCallback<ProjectMap>() {
@Override
public void onSuccess(ProjectMap result) {