diff options
author | Ryan D. Brooks | 2015-09-28 18:49:18 +0000 |
---|---|---|
committer | Ryan D. Brooks | 2015-09-28 18:49:18 +0000 |
commit | 071fcbc5cca4e22e650bb459701f5fc9be701013 (patch) | |
tree | ac629d866ecfea675bc4e134c68315440282d560 | |
parent | b4f6f62b0d3af365b67a3786dbb24c97fa638536 (diff) | |
download | org.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.tar.gz org.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.tar.xz org.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.zip |
refactor: Use type inference when invoking a generic constructor
Change-Id: I5afeb235038dcf1dd0496930d15d6b42aeb46fec
1873 files changed, 4102 insertions, 4105 deletions
diff --git a/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/AccountAdminImplTest.java b/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/AccountAdminImplTest.java index 8d07c1bdcb1..7ee4611986f 100644 --- a/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/AccountAdminImplTest.java +++ b/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/AccountAdminImplTest.java @@ -324,10 +324,10 @@ public class AccountAdminImplTest { @Test public void testSetAccountPreferencesModified() { - Map<String, String> original = new HashMap<String, String>(); + Map<String, String> original = new HashMap<>(); original.put("1", "2"); - Map<String, String> newMap = new HashMap<String, String>(); + Map<String, String> newMap = new HashMap<>(); newMap.put("1", "3"); ResultSet<AccountPreferences> resultSet = ResultSets.singleton(preferences); @@ -345,10 +345,10 @@ public class AccountAdminImplTest { @Test public void testSetAccountPreferencesNotModified() { - Map<String, String> original = new HashMap<String, String>(); + Map<String, String> original = new HashMap<>(); original.put("1", "2"); - Map<String, String> newMap = new HashMap<String, String>(); + Map<String, String> newMap = new HashMap<>(); newMap.put("1", "2"); ResultSet<AccountPreferences> resultSet = ResultSets.singleton(preferences); @@ -387,7 +387,7 @@ public class AccountAdminImplTest { @Test public void testSetAccountPreferenceModified() { - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); map.put("a", "1"); map.put("b", "2"); map.put("c", "3"); @@ -412,7 +412,7 @@ public class AccountAdminImplTest { @Test public void testSetAccountPreferenceNotModified() { - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); map.put("a", "1"); map.put("b", "123412"); map.put("c", "3"); @@ -445,7 +445,7 @@ public class AccountAdminImplTest { @Test public void testDeleteAccountPreferenceModified() { - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); map.put("a", "1"); map.put("b", "123412"); map.put("c", "3"); @@ -469,7 +469,7 @@ public class AccountAdminImplTest { @Test public void testDeleteAccountPreferenceNotModified() { - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); map.put("a", "1"); map.put("c", "3"); @@ -538,11 +538,11 @@ public class AccountAdminImplTest { @Test public void testSetAccountPreferencesByUniqueField() { - Map<String, String> original = new HashMap<String, String>(); + Map<String, String> original = new HashMap<>(); original.put("a", "1"); original.put("c", "3"); - Map<String, String> newMap = new HashMap<String, String>(); + Map<String, String> newMap = new HashMap<>(); newMap.put("a", "1"); ResultSet<Account> resultSet = ResultSets.singleton(account); @@ -560,7 +560,7 @@ public class AccountAdminImplTest { @Test public void testAccountPreferenceByUniqueField() { - Map<String, String> original = new HashMap<String, String>(); + Map<String, String> original = new HashMap<>(); original.put("a", "1"); original.put("c", "3"); @@ -585,7 +585,7 @@ public class AccountAdminImplTest { @Test public void testDeleteAccountPreferenceByUniqueField() { - Map<String, String> original = new HashMap<String, String>(); + Map<String, String> original = new HashMap<>(); original.put("a", "1"); original.put("b", "2"); original.put("c", "3"); @@ -757,7 +757,7 @@ public class AccountAdminImplTest { assertEquals(true, validator.isValid(AccountField.USERNAME, "abcde")); assertEquals(true, validator.isValid(AccountField.DISPLAY_NAME, "1234")); - Map<String, Object> props = new HashMap<String, Object>(); + Map<String, Object> props = new HashMap<>(); props.put(ACCOUNT_USERNAME_VALIDATION_PATTERN, userNamePattern); props.put(ACCOUNT_EMAIL_VALIDATION_PATTERN, emailPattern); props.put(ACCOUNT_DISPLAY_NAME_VALIDATION_PATTERN, displayNamePattern); diff --git a/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/SubscriptionAdminImplTest.java b/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/SubscriptionAdminImplTest.java index cbf1632f869..f8c8b57d159 100644 --- a/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/SubscriptionAdminImplTest.java +++ b/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/SubscriptionAdminImplTest.java @@ -285,7 +285,7 @@ public class SubscriptionAdminImplTest { Validator validator = manager.getValidator(); assertEquals(true, validator.isValid(AccountField.SUBSCRIPTION_GROUP_NAME, "group-12313")); - Map<String, Object> props = new HashMap<String, Object>(); + Map<String, Object> props = new HashMap<>(); props.put(SUBSCRIPTION_GROUP_NAME_VALIDATION_PATTERN, namePattern); manager.update(props); diff --git a/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/validator/ValidatorTest.java b/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/validator/ValidatorTest.java index dc2abf5fe83..f6d91b5d0f3 100644 --- a/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/validator/ValidatorTest.java +++ b/plugins/org.eclipse.osee.account.admin.test/src/org/eclipse/osee/account/admin/internal/validator/ValidatorTest.java @@ -63,7 +63,7 @@ public class ValidatorTest { public void testSetup() { initMocks(this); - Map<AccountField, FieldValidator> delegates = new HashMap<AccountField, FieldValidator>(); + Map<AccountField, FieldValidator> delegates = new HashMap<>(); delegates.put(FIELD_1, delegate1); delegates.put(FIELD_2, delegate2); diff --git a/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/CreateAccountRequestBuilder.java b/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/CreateAccountRequestBuilder.java index 2d0adfc65ab..a3ca6ae6373 100644 --- a/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/CreateAccountRequestBuilder.java +++ b/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/CreateAccountRequestBuilder.java @@ -22,7 +22,7 @@ public final class CreateAccountRequestBuilder { private String userName; private String email; private String displayName; - private final Map<String, String> preferences = new HashMap<String, String>(); + private final Map<String, String> preferences = new HashMap<>(); private CreateAccountRequestBuilder() { // @@ -65,7 +65,7 @@ public final class CreateAccountRequestBuilder { } public CreateAccountRequest build() { - Map<String, String> prefs = new HashMap<String, String>(preferences); + Map<String, String> prefs = new HashMap<>(preferences); return new CreateAccountRequestImpl(active, userName, email, displayName, prefs); } diff --git a/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/AccountAdminImpl.java b/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/AccountAdminImpl.java index bac80c8c109..7a755bf006d 100644 --- a/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/AccountAdminImpl.java +++ b/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/AccountAdminImpl.java @@ -256,7 +256,7 @@ public class AccountAdminImpl implements AccountAdmin { boolean modified = false; AccountPreferences prefs = result.getExactlyOne(); Map<String, String> original = prefs.asMap(); - HashMap<String, String> newPrefs = new HashMap<String, String>(original); + HashMap<String, String> newPrefs = new HashMap<>(original); newPrefs.put(key, value); if (Compare.isDifferent(original, newPrefs)) { getStorage().setAccountPreferences(prefs, newPrefs); @@ -283,7 +283,7 @@ public class AccountAdminImpl implements AccountAdmin { boolean modified = false; AccountPreferences prefs = result.getExactlyOne(); Map<String, String> original = prefs.asMap(); - HashMap<String, String> newPrefs = new HashMap<String, String>(original); + HashMap<String, String> newPrefs = new HashMap<>(original); newPrefs.remove(key); if (Compare.isDifferent(original, newPrefs)) { getStorage().setAccountPreferences(prefs, newPrefs); diff --git a/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/validator/Validator.java b/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/validator/Validator.java index ae8a1b656ac..816382f92a7 100644 --- a/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/validator/Validator.java +++ b/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/validator/Validator.java @@ -81,7 +81,7 @@ public class Validator { public Iterable<FieldValidator> getOrdered() { if (ordered == null) { - List<FieldValidator> list = new LinkedList<FieldValidator>(validators.values()); + List<FieldValidator> list = new LinkedList<>(validators.values()); list.add(DEFAULT_VALIDATOR); Collections.sort(list, Validators.VALIDATOR_PRIORITY_ORDER_COMPARATOR); ordered = list; diff --git a/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/validator/Validators.java b/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/validator/Validators.java index 4f10e8fb877..381c366cca6 100644 --- a/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/validator/Validators.java +++ b/plugins/org.eclipse.osee.account.admin/src/org/eclipse/osee/account/admin/internal/validator/Validators.java @@ -28,7 +28,7 @@ public final class Validators { } public static Validator newAccountValidator(Log logger, AccountStorage storage) { - Map<AccountField, FieldValidator> data = new HashMap<AccountField, FieldValidator>(); + Map<AccountField, FieldValidator> data = new HashMap<>(); addValidator(data, new UuidValidator()); addValidator(data, new LocalIdValidator()); addValidator(data, new DisplayNameValidator(storage)); @@ -38,7 +38,7 @@ public final class Validators { } public static Validator newSubscriptionValidator(Log logger, SubscriptionStorage storage) { - Map<AccountField, FieldValidator> data = new HashMap<AccountField, FieldValidator>(); + Map<AccountField, FieldValidator> data = new HashMap<>(); addValidator(data, new UuidValidator()); addValidator(data, new LocalIdValidator()); addValidator(data, new SubscriptionGroupNameValidator(storage)); diff --git a/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/internal/AccountClientImpl.java b/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/internal/AccountClientImpl.java index e583e8191f8..5f9226ec1b5 100644 --- a/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/internal/AccountClientImpl.java +++ b/plugins/org.eclipse.osee.account.rest.client/src/org/eclipse/osee/account/rest/client/internal/AccountClientImpl.java @@ -248,7 +248,7 @@ public class AccountClientImpl implements AccountClient { ResultSet<UnsubscribeInfo> toReturn = ResultSets.emptyResultSet(); ResultSet<SubscriptionData> results = getSubscriptionsForAccount(userUuid); if (!results.isEmpty()) { - List<UnsubscribeInfo> infos = new ArrayList<UnsubscribeInfo>(); + List<UnsubscribeInfo> infos = new ArrayList<>(); UriBuilder builder = UriBuilder.fromUri(baseUri).path("unsubscribe").path("ui").path("{subscription-uuid}"); for (SubscriptionData subscription : results) { diff --git a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountInput.java b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountInput.java index 604df783997..9f6851d0b14 100644 --- a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountInput.java +++ b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountInput.java @@ -51,7 +51,7 @@ public class AccountInput { public Map<String, String> getPreferences() { if (preferences == null) { - preferences = new HashMap<String, String>(); + preferences = new HashMap<>(); } return preferences; } diff --git a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountPreferencesData.java b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountPreferencesData.java index f8c4c5db943..e7ecda77eef 100644 --- a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountPreferencesData.java +++ b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountPreferencesData.java @@ -33,7 +33,7 @@ public class AccountPreferencesData { public Map<String, String> getMap() { if (preferences == null) { - preferences = new HashMap<String, String>(); + preferences = new HashMap<>(); } return preferences; } diff --git a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountPreferencesInput.java b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountPreferencesInput.java index 442cd5977b1..7930c1de655 100644 --- a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountPreferencesInput.java +++ b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountPreferencesInput.java @@ -24,7 +24,7 @@ public class AccountPreferencesInput { public Map<String, String> getMap() { if (preferences == null) { - preferences = new HashMap<String, String>(); + preferences = new HashMap<>(); } return preferences; } diff --git a/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountOpsTest.java b/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountOpsTest.java index 149ae9299b5..ed547da583f 100644 --- a/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountOpsTest.java +++ b/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountOpsTest.java @@ -82,7 +82,7 @@ public class AccountOpsTest { String name = "myName"; boolean active = true; - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); map.put("a", "1"); map.put("b", "2"); map.put("c", "3"); @@ -240,7 +240,7 @@ public class AccountOpsTest { @Test public void testGetAccountDetailsData() { Account account = mockAccount(789L, "GHI", "acc3", "acc3@email.com", "u3", true); - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); map.put("a", "1"); map.put("b", "2"); map.put("c", "3"); @@ -270,7 +270,7 @@ public class AccountOpsTest { @Test public void testGetAccountPreferencesData() { - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); map.put("a", "1"); map.put("b", "2"); map.put("c", "3"); @@ -352,7 +352,7 @@ public class AccountOpsTest { @Test public void testSetAccountPreferences() { - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); map.put("a", "1"); map.put("b", "2"); map.put("c", "3"); diff --git a/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountPreferencesResourceTest.java b/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountPreferencesResourceTest.java index 3e1a7431fcd..e6a40bca39a 100644 --- a/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountPreferencesResourceTest.java +++ b/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountPreferencesResourceTest.java @@ -60,7 +60,7 @@ public class AccountPreferencesResourceTest { @Test public void testSetAccountPreferences() { - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); map.put("a", "1"); map.put("b", "2"); map.put("c", "3"); @@ -76,7 +76,7 @@ public class AccountPreferencesResourceTest { @Test public void testSetAccountPreferencesNotModified() { - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); map.put("a", "1"); map.put("b", "2"); map.put("c", "3"); diff --git a/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountSessionsResourceTest.java b/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountSessionsResourceTest.java index eafdd3579ad..93ce04f5b87 100644 --- a/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountSessionsResourceTest.java +++ b/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountSessionsResourceTest.java @@ -46,7 +46,7 @@ public class AccountSessionsResourceTest { @Test public void testGetAccountSessions() { - List<AccountSessionDetailsData> accesses = new ArrayList<AccountSessionDetailsData>(); + List<AccountSessionDetailsData> accesses = new ArrayList<>(); accesses.add(details); AccountSessionDetailsData[] expected = accesses.toArray(new AccountSessionDetailsData[] {}); when(accountOps.getAccountSessionById(ACCOUNT_ID)).thenReturn(accesses); diff --git a/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountsResourceTest.java b/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountsResourceTest.java index 928b80d17de..37c2ad9a949 100644 --- a/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountsResourceTest.java +++ b/plugins/org.eclipse.osee.account.rest.test/src/org/eclipse/osee/account/rest/internal/AccountsResourceTest.java @@ -49,7 +49,7 @@ public class AccountsResourceTest { @Test public void testGetAccounts() { - List<AccountInfoData> accesses = new ArrayList<AccountInfoData>(); + List<AccountInfoData> accesses = new ArrayList<>(); accesses.add(account); AccountInfoData[] expected = accesses.toArray(new AccountInfoData[] {}); when(accountOps.getAllAccounts()).thenReturn(accesses); diff --git a/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/AccountApplication.java b/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/AccountApplication.java index 03131978346..bc8f22263e3 100644 --- a/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/AccountApplication.java +++ b/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/AccountApplication.java @@ -22,7 +22,7 @@ import org.eclipse.osee.account.admin.SubscriptionAdmin; */ @ApplicationPath("/") public class AccountApplication extends Application { - private final Set<Object> singletons = new HashSet<Object>(); + private final Set<Object> singletons = new HashSet<>(); private AccountAdmin accountAdmin; private SubscriptionAdmin subscriptionAdmin; diff --git a/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/AccountOps.java b/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/AccountOps.java index 64da5ecb041..96e36ec9e6c 100644 --- a/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/AccountOps.java +++ b/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/AccountOps.java @@ -65,7 +65,7 @@ public class AccountOps { public List<AccountSessionDetailsData> getAccountSessionById(String accountId) { ResultSet<AccountSession> result = accountAdmin.getAccountSessionByUniqueField(accountId); - List<AccountSessionDetailsData> toReturn = new ArrayList<AccountSessionDetailsData>(); + List<AccountSessionDetailsData> toReturn = new ArrayList<>(); for (AccountSession session : result) { toReturn.add(AccountDataUtil.asAccountAccessData(session)); } @@ -120,7 +120,7 @@ public class AccountOps { } public List<AccountInfoData> getAllAccounts() { - List<AccountInfoData> toReturn = new ArrayList<AccountInfoData>(); + List<AccountInfoData> toReturn = new ArrayList<>(); ResultSet<Account> result = accountAdmin.getAllAccounts(); for (Account account : result) { toReturn.add(AccountDataUtil.asAccountData(account)); diff --git a/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/JaxRsAuthenticatorImpl.java b/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/JaxRsAuthenticatorImpl.java index 71d60a1bd53..9b36cd43043 100644 --- a/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/JaxRsAuthenticatorImpl.java +++ b/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/JaxRsAuthenticatorImpl.java @@ -81,7 +81,7 @@ public class JaxRsAuthenticatorImpl implements JaxRsAuthenticator { OseePrincipal anonymous = null; Account account = result.getOneOrNull(); if (account != null) { - Set<String> roles = new LinkedHashSet<String>(); + Set<String> roles = new LinkedHashSet<>(); roles.add(SystemRoles.ROLES_ANONYMOUS); // Get additional roles/permissions from authorization service; @@ -102,7 +102,7 @@ public class JaxRsAuthenticatorImpl implements JaxRsAuthenticator { AuthenticatedUser subject = authenticationAdmin.authenticate(request); Account account = resolveAccount(username, subject, automaticAccountCreationAllowed); - Set<String> roles = new LinkedHashSet<String>(); + Set<String> roles = new LinkedHashSet<>(); if (subject.isAuthenticated()) { roles.add(SystemRoles.ROLES_AUTHENTICATED); } else { diff --git a/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/ClientApplication.java b/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/ClientApplication.java index 14c1f574458..9cbb6ede20d 100644 --- a/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/ClientApplication.java +++ b/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/ClientApplication.java @@ -30,7 +30,7 @@ public final class ClientApplication extends Application { } public void start() { - singletons = new HashSet<Object>(); + singletons = new HashSet<>(); singletons.add(new ClientResource(jdbcService)); } diff --git a/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/ClientResource.java b/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/ClientResource.java index 2ee0e228d02..354ce4a1ac2 100644 --- a/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/ClientResource.java +++ b/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/ClientResource.java @@ -80,7 +80,7 @@ public class ClientResource { @Produces({MediaType.APPLICATION_JSON}) public Response getClientsForUser(@PathParam("userId") String userId) { Sessions sessions = new Sessions(); - Map<String, Boolean> portToAlive = new HashMap<String, Boolean>(); + Map<String, Boolean> portToAlive = new HashMap<>(); String queryStr = "select * from osee_session where user_id = '" + userId + "' order by created_on desc"; int x = 0; for (IVariantData data : jdbcService.getClient().runQuery(queryStr)) { @@ -112,10 +112,10 @@ public class ClientResource { } private Map<ClientSession, ClientInfo> getActiveSessions() { - Map<ClientSession, ClientInfo> sessionToInfo = new HashMap<ClientSession, ClientInfo>(200); + Map<ClientSession, ClientInfo> sessionToInfo = new HashMap<>(200); String queryStr = "select * from osee_session where created_on > CURRENT_DATE - INTERVAL '7' DAY order by created_on desc "; - Set<String> pinged = new HashSet<String>(200); + Set<String> pinged = new HashSet<>(200); for (IVariantData data : jdbcService.getClient().runQuery(queryStr)) { ClientSession session = new ClientSession(data); String key = session.getClientAddress() + session.getClientPort(); @@ -135,7 +135,7 @@ public class ClientResource { private void addUserId(Map<String, Collection<String>> releaseToUserId, String release, String userId) { Collection<String> userIds = releaseToUserId.get(release); if (userIds == null) { - userIds = new HashSet<String>(100); + userIds = new HashSet<>(100); } userIds.add(userId); releaseToUserId.put(release, userIds); diff --git a/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/model/ClientDetails.java b/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/model/ClientDetails.java index fb689970591..d0cb489a4c1 100644 --- a/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/model/ClientDetails.java +++ b/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/model/ClientDetails.java @@ -25,10 +25,10 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class ClientDetails { - public List<ClientSession> sessions = new LinkedList<ClientSession>(); - public Map<String, Integer> releaseCount = new HashMap<String, Integer>(); - public Map<String, Collection<String>> releaseToUserId = new HashMap<String, Collection<String>>(10); - public Set<String> networkReleaseUserIds = new HashSet<String>(); + public List<ClientSession> sessions = new LinkedList<>(); + public Map<String, Integer> releaseCount = new HashMap<>(); + public Map<String, Collection<String>> releaseToUserId = new HashMap<>(10); + public Set<String> networkReleaseUserIds = new HashSet<>(); public ClientDetails() { } diff --git a/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/model/Sessions.java b/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/model/Sessions.java index 39334b6beba..a618b4f3bfa 100644 --- a/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/model/Sessions.java +++ b/plugins/org.eclipse.osee.account.rest/src/org/eclipse/osee/account/rest/internal/client/model/Sessions.java @@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class Sessions { - public List<ClientSession> sessions = new LinkedList<ClientSession>(); + public List<ClientSession> sessions = new LinkedList<>(); public void add(ClientSession clientSession) { sessions.add(clientSession); diff --git a/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityLogImpl.java b/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityLogImpl.java index d04572ecd65..c2dcfc40b90 100644 --- a/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityLogImpl.java +++ b/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityLogImpl.java @@ -65,8 +65,8 @@ public class ActivityLogImpl implements ActivityLog, Callable<Void> { } }; - private final ConcurrentHashMap<Long, Object[]> newEntities = new ConcurrentHashMap<Long, Object[]>(); - private final ConcurrentHashMap<Long, Object[]> updatedEntities = new ConcurrentHashMap<Long, Object[]>(); + private final ConcurrentHashMap<Long, Object[]> newEntities = new ConcurrentHashMap<>(); + private final ConcurrentHashMap<Long, Object[]> updatedEntities = new ConcurrentHashMap<>(); private static final Object[] EMPTY_ARRAY = new Object[0]; private Log logger; @@ -360,7 +360,7 @@ public class ActivityLogImpl implements ActivityLog, Callable<Void> { private void initialize() { try { - final Map<Long, ActivityType> types = new HashMap<Long, ActivityType>(4); + final Map<Long, ActivityType> types = new HashMap<>(4); for (Activity type : Activity.values()) { types.put(type.getTypeId(), type); } diff --git a/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityMonitorImpl.java b/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityMonitorImpl.java index 68cb015b1e8..d6c0e5530a3 100644 --- a/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityMonitorImpl.java +++ b/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityMonitorImpl.java @@ -19,7 +19,7 @@ import java.util.concurrent.ConcurrentHashMap; */ public final class ActivityMonitorImpl implements ActivityMonitor { - private final ConcurrentHashMap<Thread, Object[]> threadToUser = new ConcurrentHashMap<Thread, Object[]>(); + private final ConcurrentHashMap<Thread, Object[]> threadToUser = new ConcurrentHashMap<>(); @Override public Object[] getThreadRootEntry() { diff --git a/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/jaxrs/ActivityLogApplication.java b/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/jaxrs/ActivityLogApplication.java index 0e527d14be0..1cafe2a9cc2 100644 --- a/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/jaxrs/ActivityLogApplication.java +++ b/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/jaxrs/ActivityLogApplication.java @@ -31,7 +31,7 @@ public final class ActivityLogApplication extends Application { } public void start() { - singletons = new HashSet<Object>(); + singletons = new HashSet<>(); singletons.add(new ActivityLogResource(activityLog)); } diff --git a/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/jaxrs/ActivityLogResource.java b/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/jaxrs/ActivityLogResource.java index 27c2dd15ded..f316847f2f7 100644 --- a/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/jaxrs/ActivityLogResource.java +++ b/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/jaxrs/ActivityLogResource.java @@ -80,7 +80,7 @@ public final class ActivityLogResource implements ActivityLogEndpoint { @Override public DefaultActivityType[] getActivityTypes() { - final List<DefaultActivityType> types = new ArrayList<DefaultActivityType>(); + final List<DefaultActivityType> types = new ArrayList<>(); activityLog.queryActivityTypes(new ActivityTypeDataHandler() { @Override diff --git a/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppResourceTokens.java b/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppResourceTokens.java index 15907100ec5..c6632c61b45 100644 --- a/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppResourceTokens.java +++ b/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppResourceTokens.java @@ -22,7 +22,7 @@ import org.eclipse.osee.template.engine.OseeTemplateTokens; * @author Ryan D. Brooks */ public final class OseeAppResourceTokens { - private static final List<ResourceToken> tokens = new ArrayList<ResourceToken>(); + private static final List<ResourceToken> tokens = new ArrayList<>(); // @formatter:off public static final ResourceToken OseeAppHtml = createToken(0x405EE00000000003L, "oseeApplet.html"); diff --git a/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppletPage.java b/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppletPage.java index d74157d7e99..157a5ce61d6 100644 --- a/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppletPage.java +++ b/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppletPage.java @@ -68,7 +68,7 @@ public class OseeAppletPage { CharSequence widgets = page.getValue("widgets"); Matcher matcher = listAttributePattern.matcher(widgets); - CompositeRule<BranchReadable> dataListsRule = new CompositeRule<BranchReadable>("dataLists"); + CompositeRule<BranchReadable> dataListsRule = new CompositeRule<>("dataLists"); while (matcher.find()) { String listId = matcher.group(1); if (listId.equals("baselineBranches") || listId.equals("workingAndBaselineBranches")) { diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/JaxAgileItem.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/JaxAgileItem.java index 553df28cfa3..f650edb1062 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/JaxAgileItem.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/JaxAgileItem.java @@ -20,8 +20,8 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class JaxAgileItem { - private final List<Long> uuids = new ArrayList<Long>(); - private final List<Long> features = new ArrayList<Long>(); + private final List<Long> uuids = new ArrayList<>(); + private final List<Long> features = new ArrayList<>(); private long sprintUuid = 0; private long backlogUuid = 0; private boolean setFeatures = false; diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/JaxAgileTeam.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/JaxAgileTeam.java index 0c952907ddf..cc8dc5f5c1c 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/JaxAgileTeam.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/JaxAgileTeam.java @@ -21,7 +21,7 @@ import org.eclipse.osee.ats.api.config.JaxAtsObject; @XmlRootElement public class JaxAgileTeam extends JaxAtsObject { - private List<Long> atsTeamUuids = new ArrayList<Long>(); + private List<Long> atsTeamUuids = new ArrayList<>(); private long backlogUuid = 0; private String description = ""; diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/AtsConfigurations.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/AtsConfigurations.java index e035071cbe4..a7b8b82f7f4 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/AtsConfigurations.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/AtsConfigurations.java @@ -21,7 +21,7 @@ import org.eclipse.osee.ats.api.util.ColorColumns; @XmlRootElement public class AtsConfigurations { - private final List<AtsConfiguration> configs = new ArrayList<AtsConfiguration>(); + private final List<AtsConfiguration> configs = new ArrayList<>(); private AtsViews views = new AtsViews(); private ColorColumns colorColumns = new ColorColumns(); diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/AtsViews.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/AtsViews.java index 3e55d9cb4c4..c04021feb83 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/AtsViews.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/config/AtsViews.java @@ -19,7 +19,7 @@ import javax.xml.bind.annotation.XmlRootElement; */ @XmlRootElement public class AtsViews { - private final List<AtsAttributeValueColumn> attrColumns = new ArrayList<AtsAttributeValueColumn>(); + private final List<AtsAttributeValueColumn> attrColumns = new ArrayList<>(); public List<AtsAttributeValueColumn> getAttrColumns() { return attrColumns; diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/cpa/CpaConfig.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/cpa/CpaConfig.java index fa94b0011d6..80974f2e4ee 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/cpa/CpaConfig.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/cpa/CpaConfig.java @@ -20,9 +20,9 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class CpaConfig { - private final List<String> applicabilityOptions = new ArrayList<String>(); + private final List<String> applicabilityOptions = new ArrayList<>(); - private final List<CpaConfigTool> tools = new ArrayList<CpaConfigTool>(); + private final List<CpaConfigTool> tools = new ArrayList<>(); public List<String> getApplicabilityOptions() { return applicabilityOptions; diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsAttributeTypes.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsAttributeTypes.java index d87f5ae63a4..90443a43deb 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsAttributeTypes.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsAttributeTypes.java @@ -22,7 +22,7 @@ import org.eclipse.osee.framework.core.enums.CoreAttributeTypes; */ public final class AtsAttributeTypes { - public static final Map<String, IAttributeType> nameToTypeMap = new HashMap<String, IAttributeType>(); + public static final Map<String, IAttributeType> nameToTypeMap = new HashMap<>(); // @formatter:off public static final IAttributeType Actionable = createType(0x10000000000000B8L, "Actionable", "True if item can have Action written against or assigned to."); public static final IAttributeType ActionableItem = createType(0x10000000000000E0L, "Actionable Item", "Actionable Items that are impacted by this change."); diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsNotificationCollector.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsNotificationCollector.java index fda0acaf767..9fd9814d321 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsNotificationCollector.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsNotificationCollector.java @@ -27,7 +27,7 @@ import javax.xml.bind.annotation.XmlRootElement; public class AtsNotificationCollector { private String subject, body; - private final List<AtsNotificationEvent> notificationEvents = new ArrayList<AtsNotificationEvent>(); + private final List<AtsNotificationEvent> notificationEvents = new ArrayList<>(); private final List<AtsWorkItemNotificationEvent> workItemNotificationEvents = new ArrayList<AtsWorkItemNotificationEvent>(); diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsNotificationEvent.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsNotificationEvent.java index 0b72ba91429..f894079378e 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsNotificationEvent.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsNotificationEvent.java @@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class AtsNotificationEvent { - private Collection<String> userIds = new HashSet<String>(); + private Collection<String> userIds = new HashSet<>(); private String id; private String fromUserId; private String type; diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsWorkItemNotificationEvent.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsWorkItemNotificationEvent.java index 1ba10c538c0..c630fb2e1d6 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsWorkItemNotificationEvent.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsWorkItemNotificationEvent.java @@ -22,9 +22,9 @@ import javax.xml.bind.annotation.XmlRootElement; public class AtsWorkItemNotificationEvent { private String fromUserId; - private final Collection<String> userIds = new HashSet<String>(); - private final Collection<String> atsIds = new HashSet<String>(); - private final Set<AtsNotifyType> notifyTypes = new HashSet<AtsNotifyType>(); + private final Collection<String> userIds = new HashSet<>(); + private final Collection<String> atsIds = new HashSet<>(); + private final Set<AtsNotifyType> notifyTypes = new HashSet<>(); public Collection<String> getAtsIds() { return atsIds; diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/review/Role.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/review/Role.java index 946ba6fe983..a510b9cedcd 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/review/Role.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/review/Role.java @@ -19,7 +19,7 @@ public enum Role { Reviewer, Author; public static Collection<String> strValues() { - Set<String> values = new HashSet<String>(); + Set<String> values = new HashSet<>(); for (Enum<Role> e : values()) { values.add(e.name()); } diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/ChangeType.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/ChangeType.java index d5341e2ac60..c98a2bfef4d 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/ChangeType.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/ChangeType.java @@ -24,7 +24,7 @@ public enum ChangeType { Refinement; public static String[] getChangeTypes() { - ArrayList<String> types = new ArrayList<String>(); + ArrayList<String> types = new ArrayList<>(); for (ChangeType type : values()) { if (type != None) { types.add(type.name()); diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/CreateTeamData.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/CreateTeamData.java index 3a3bde255be..bec8fe48c93 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/CreateTeamData.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/team/CreateTeamData.java @@ -31,7 +31,7 @@ public class CreateTeamData { public CreateTeamData(IAtsTeamDefinition teamDef, Collection<IAtsActionableItem> actionableItems, List<? extends IAtsUser> assignees, Date createdDate, IAtsUser createdBy, CreateTeamOption... createTeamOption) { this.teamDef = teamDef; - this.actionableItems = new ArrayList<IAtsActionableItem>(actionableItems); + this.actionableItems = new ArrayList<>(actionableItems); this.assignees = assignees; this.createdDate = createdDate; this.createdBy = createdBy; diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/DecisionReviewRuleDefinition.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/DecisionReviewRuleDefinition.java index e2911022c23..07740f68f44 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/DecisionReviewRuleDefinition.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/DecisionReviewRuleDefinition.java @@ -23,7 +23,7 @@ public class DecisionReviewRuleDefinition extends RuleDefinition implements IAts private String relatedState; private ReviewBlockType blockingType; private boolean autoTransitionToDecision = false; - private List<IAtsDecisionReviewOption> options = new ArrayList<IAtsDecisionReviewOption>(); + private List<IAtsDecisionReviewOption> options = new ArrayList<>(); private String title = ""; @Override diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/RuleDefinitionOption.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/RuleDefinitionOption.java index b18a9c42893..8222c2eeecc 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/RuleDefinitionOption.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/RuleDefinitionOption.java @@ -32,7 +32,7 @@ public enum RuleDefinitionOption { AllowTransitionWithoutTaskCompletion("StateDefinition Option: Allow tasks to transition to other InWork states without completion.", RuleLocations.StateDefinition); public final String description; - public List<RuleLocations> ruleLocs = new ArrayList<RuleLocations>(); + public List<RuleLocations> ruleLocs = new ArrayList<>(); public String getDescription() { return description; diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/WidgetOptionHandler.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/WidgetOptionHandler.java index 0c3710a5afe..7b8ccb33437 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/WidgetOptionHandler.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/WidgetOptionHandler.java @@ -19,7 +19,7 @@ import java.util.Set; */ public class WidgetOptionHandler implements IAtsWidgetOptionHandler { - private final Set<WidgetOption> options = new HashSet<WidgetOption>(); + private final Set<WidgetOption> options = new HashSet<>(); public WidgetOptionHandler(WidgetOption... xOption) { for (WidgetOption item : xOption) { @@ -28,7 +28,7 @@ public class WidgetOptionHandler implements IAtsWidgetOptionHandler { } public static Collection<WidgetOption> getCollection(WidgetOption... ats) { - Set<WidgetOption> items = new HashSet<WidgetOption>(); + Set<WidgetOption> items = new HashSet<>(); for (WidgetOption item : ats) { items.add(item); } diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/transition/TransitionResults.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/transition/TransitionResults.java index 0d0d13c5853..4207a6f4d2a 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/transition/TransitionResults.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/transition/TransitionResults.java @@ -26,7 +26,7 @@ public class TransitionResults { boolean cancelled; - private final List<ITransitionResult> results = new ArrayList<ITransitionResult>(); + private final List<ITransitionResult> results = new ArrayList<>(); private final Map<IAtsWorkItem, List<ITransitionResult>> workItemToResults = new HashMap<IAtsWorkItem, List<ITransitionResult>>(); @@ -34,7 +34,7 @@ public class TransitionResults { public void addResult(IAtsWorkItem workItem, ITransitionResult result) { List<ITransitionResult> results = workItemToResults.get(workItem); if (results == null) { - results = new ArrayList<ITransitionResult>(); + results = new ArrayList<>(); workItemToResults.put(workItem, results); } results.add(result); diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoSubsystems.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoSubsystems.java index dfd3e2fb96c..f09b6a61f43 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoSubsystems.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoSubsystems.java @@ -37,7 +37,7 @@ public enum DemoSubsystems { } public static Collection<String> getSubsystems() { - ArrayList<String> subsystems = new ArrayList<String>(); + ArrayList<String> subsystems = new ArrayList<>(); for (DemoSubsystems subsystem : DemoSubsystems.values()) { subsystems.add(subsystem.name()); } diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoUtil.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoUtil.java index ec0258227bf..4c1069d9a54 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoUtil.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/DemoUtil.java @@ -77,7 +77,7 @@ public class DemoUtil { } public static Collection<TeamWorkFlowArtifact> getSawWfs(String name) { - List<TeamWorkFlowArtifact> teamWfs = new ArrayList<TeamWorkFlowArtifact>(); + List<TeamWorkFlowArtifact> teamWfs = new ArrayList<>(); for (Artifact art : ArtifactQuery.getArtifactListFromName(name, AtsUtilCore.getAtsBranch(), DeletionFlag.EXCLUDE_DELETED)) { if (art.isOfType(AtsArtifactTypes.TeamWorkflow)) { diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java index 3ed53b47b74..c8527505f83 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/PopulateDemoActions.java @@ -279,7 +279,7 @@ public class PopulateDemoActions extends XNavigateItemAction { } private Set<ActionArtifact> createActions(List<DemoDbActionData> actionDatas, IArtifactToken versionToken, TeamState toStateOverride, IAtsChangeSet changes) throws Exception { - Set<ActionArtifact> actionArts = new HashSet<ActionArtifact>(); + Set<ActionArtifact> actionArts = new HashSet<>(); int currNum = 1; for (DemoDbActionData aData : actionDatas) { if (DEBUG) { @@ -428,7 +428,7 @@ public class PopulateDemoActions extends XNavigateItemAction { } // Create Test Script Artifacts - Set<Artifact> verificationTests = new HashSet<Artifact>(); + Set<Artifact> verificationTests = new HashSet<>(); Artifact verificationHeader = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Folder, "Verification Tests", branch); if (verificationHeader == null) { @@ -445,7 +445,7 @@ public class PopulateDemoActions extends XNavigateItemAction { Artifact verificationTestsArray[] = verificationTests.toArray(new Artifact[verificationTests.size()]); // Create Validation Test Procedure Artifacts - Set<Artifact> validationTests = new HashSet<Artifact>(); + Set<Artifact> validationTests = new HashSet<>(); Artifact validationHeader = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Folder, "Validation Tests", branch); if (validationHeader == null) { @@ -462,7 +462,7 @@ public class PopulateDemoActions extends XNavigateItemAction { Artifact validationTestsArray[] = validationTests.toArray(new Artifact[validationTests.size()]); // Create Integration Test Procedure Artifacts - Set<Artifact> integrationTests = new HashSet<Artifact>(); + Set<Artifact> integrationTests = new HashSet<>(); Artifact integrationHeader = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Folder, "Integration Tests", branch); if (integrationHeader == null) { diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/AtsConfigAddDemoUsers.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/AtsConfigAddDemoUsers.java index 0e42756cefd..995e104ccd9 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/AtsConfigAddDemoUsers.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/AtsConfigAddDemoUsers.java @@ -31,7 +31,7 @@ public class AtsConfigAddDemoUsers implements IDbInitializationTask { @Override public void run() throws OseeCoreException { - List<User> admins = new ArrayList<User>(); + List<User> admins = new ArrayList<>(); SkynetTransaction transaction = TransactionManager.createTransaction(BranchManager.getCommonBranch(), "Add Dev Users"); diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbActionData.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbActionData.java index 9bbc1a097f2..7b128506b7b 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbActionData.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbActionData.java @@ -47,7 +47,7 @@ public class DemoDbActionData { } public static List<DemoDbActionData> getNonReqSawActionData() { - List<DemoDbActionData> actionDatas = new ArrayList<DemoDbActionData>(); + List<DemoDbActionData> actionDatas = new ArrayList<>(); actionDatas.add(new DemoDbActionData(new String[] {"Workaround for"}, "Graph View", "1", new String[] {DemoDbAIs.Adapter.getAIName()}, TeamState.Implement)); actionDatas.add(new DemoDbActionData(new String[] {"Working with"}, "Diagram Tree", "3", @@ -56,7 +56,7 @@ public class DemoDbActionData { } public static List<DemoDbActionData> getGenericActionData() { - List<DemoDbActionData> actionDatas = new ArrayList<DemoDbActionData>(); + List<DemoDbActionData> actionDatas = new ArrayList<>(); actionDatas.add(new DemoDbActionData(new String[] {"Problem with the", "Can't see the"}, "Graph View", "1", new String[] {DemoDbAIs.Adapter.getAIName()}, TeamState.Implement)); actionDatas.add(new DemoDbActionData(new String[] {"Problem in", "Can't load"}, "Diagram Tree", "3", diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbGroups.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbGroups.java index 92a25b7d510..df0f7bd9e7a 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbGroups.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbGroups.java @@ -38,7 +38,7 @@ public class DemoDbGroups { TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), "Populate Demo DB - Create Groups"); // Create group of all resulting objects - List<TeamWorkFlowArtifact> codeWorkflows = new ArrayList<TeamWorkFlowArtifact>(); + List<TeamWorkFlowArtifact> codeWorkflows = new ArrayList<>(); if (DEBUG) { OseeLog.log(Activator.class, Level.INFO, "Create Groups and add objects"); } diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java index 15e58eca311..eea85cd5345 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbReviews.java @@ -97,7 +97,7 @@ public class DemoDbReviews { private static List<TeamWorkFlowArtifact> getSampleReviewTestWorkflows() throws Exception { if (reviewTestArts == null) { - reviewTestArts = new ArrayList<TeamWorkFlowArtifact>(); + reviewTestArts = new ArrayList<>(); for (String actionName : new String[] {"Button W doesn't work on", "Diagram Tree"}) { for (Artifact art : ArtifactQuery.getArtifactListFromName(actionName, AtsUtilCore.getAtsBranch(), EXCLUDE_DELETED, QueryOption.CONTAINS_MATCH_OPTIONS)) { @@ -134,7 +134,7 @@ public class DemoDbReviews { reviewArt = PeerToPeerReviewManager.createNewPeerToPeerReview(firstCodeArt, "Peer Review algorithm used in code", firstCodeArt.getStateMgr().getCurrentStateName(), changes); - List<UserRole> roles = new ArrayList<UserRole>(); + List<UserRole> roles = new ArrayList<>(); roles.add(new UserRole(Role.Author, AtsClientService.get().getUserServiceClient().getUserFromToken( DemoUsers.Joe_Smith))); roles.add(new UserRole(Role.Reviewer, AtsClientService.get().getUserServiceClient().getUserFromToken( @@ -158,7 +158,7 @@ public class DemoDbReviews { new Date(), AtsClientService.get().getUserServiceClient().getUserFromOseeUser( DemoDbUtil.getDemoUser(DemoUsers.Kay_Jones)), changes); - roles = new ArrayList<UserRole>(); + roles = new ArrayList<>(); roles.add(new UserRole(Role.Author, AtsClientService.get().getUserServiceClient().getUserFromToken( DemoUsers.Kay_Jones), 2.3, true)); roles.add(new UserRole(Role.Reviewer, AtsClientService.get().getUserServiceClient().getUserFromToken( @@ -166,7 +166,7 @@ public class DemoDbReviews { roles.add(new UserRole(Role.Reviewer, AtsClientService.get().getUserServiceClient().getUserFromToken( DemoUsers.Alex_Kay), 2.0, true)); - List<ReviewDefectItem> defects = new ArrayList<ReviewDefectItem>(); + List<ReviewDefectItem> defects = new ArrayList<>(); defects.add(new ReviewDefectItem(AtsClientService.get().getUserServiceClient().getUserFromToken( DemoUsers.Alex_Kay), Severity.Issue, Disposition.Accept, InjectionActivity.Code, "Problem with logic", "Fixed", "Line 234", new Date())); diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbTasks.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbTasks.java index 4a77ceb91ac..2beffc26454 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbTasks.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbTasks.java @@ -38,7 +38,7 @@ public class DemoDbTasks { AtsChangeSet changes = new AtsChangeSet("Populate Demo DB - Create Tasks"); boolean firstTaskWorkflow = true; for (TeamWorkFlowArtifact codeArt : DemoDbUtil.getSampleCodeWorkflows()) { - List<IAtsUser> demoUsers = new ArrayList<IAtsUser>(); + List<IAtsUser> demoUsers = new ArrayList<>(); if (firstTaskWorkflow) { demoUsers.add(AtsClientService.get().getUserServiceClient().getUserFromOseeUser( DemoDbUtil.getDemoUser(DemoUsers.Joe_Smith))); diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java index 8e287098a00..e36ee0864ae 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoDbUtil.java @@ -49,7 +49,7 @@ public class DemoDbUtil { public static List<TeamWorkFlowArtifact> getSampleCodeWorkflows() throws OseeCoreException { if (codeArts == null) { - codeArts = new ArrayList<TeamWorkFlowArtifact>(); + codeArts = new ArrayList<>(); for (String actionName : new String[] { "SAW (committed) Reqt Changes for Diagram View", "SAW (uncommitted) More Reqt Changes for Diagram View"}) { @@ -121,7 +121,7 @@ public class DemoDbUtil { } public static Collection<IAtsActionableItem> getActionableItems(String[] aiasNames) throws OseeCoreException { - Set<IAtsActionableItem> aias = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> aias = new HashSet<>(); for (String str : aiasNames) { for (IAtsActionableItem aia : ActionableItems.getActionableItemsAll(AtsClientService.get().getConfig())) { if (str.equals(aia.getName())) { diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoWorkDefinitionSheetProvider.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoWorkDefinitionSheetProvider.java index 5bd92c184b2..f122c77fb40 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoWorkDefinitionSheetProvider.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/config/DemoWorkDefinitionSheetProvider.java @@ -25,7 +25,7 @@ public class DemoWorkDefinitionSheetProvider implements IAtsWorkDefinitionSheetP @Override public Collection<WorkDefinitionSheet> getWorkDefinitionSheets() { - List<WorkDefinitionSheet> sheets = new ArrayList<WorkDefinitionSheet>(); + List<WorkDefinitionSheet> sheets = new ArrayList<>(); sheets.add(new WorkDefinitionSheet("WorkDef_Demo_AIs_And_Team_Definitions", AtsWorkDefinitionSheetProviders.getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Demo_AIs_And_Team_Definitions.ats"))); diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/navigate/DemoNavigateViewItems.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/navigate/DemoNavigateViewItems.java index 60145495ced..073fce5cde3 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/navigate/DemoNavigateViewItems.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/navigate/DemoNavigateViewItems.java @@ -72,7 +72,7 @@ public class DemoNavigateViewItems implements IAtsNavigateItem { @Override public List<XNavigateItem> getNavigateItems(XNavigateItem parentItem) throws OseeCoreException { - List<XNavigateItem> items = new ArrayList<XNavigateItem>(); + List<XNavigateItem> items = new ArrayList<>(); if (DbConnectionUtility.areOSEEServicesAvailable().isFalse()) { return items; diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/traceability/DemoTraceParser.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/traceability/DemoTraceParser.java index 9fd1aa6d8e9..6e4ca282393 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/traceability/DemoTraceParser.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/traceability/DemoTraceParser.java @@ -23,7 +23,7 @@ public class DemoTraceParser implements ITraceParser { @Override public Collection<TraceMark> getTraceMarks(CharBuffer fileBuffer) { - Collection<TraceMark> traceMarks = new HashSet<TraceMark>(); + Collection<TraceMark> traceMarks = new HashSet<>(); String type = "Uses"; traceMarks.add(new TraceMark(type, "Collaborative Robot")); traceMarks.add(new TraceMark(type, "Robot Object")); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java index c527603f29a..32d2ee7fb2b 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/PopulateDemoActionsTest.java @@ -116,7 +116,7 @@ public class PopulateDemoActionsTest { "Joe Smith"); // test tasks - List<String> taskNames = new ArrayList<String>(); + List<String> taskNames = new ArrayList<>(); taskNames.addAll(DemoTestUtil.getTaskTitles(true)); for (TaskArtifact task : codeTeamArt.getTaskArtifacts()) { testTaskContents(task, TaskStates.InWork.getName(), TeamState.Implement.getName()); @@ -178,7 +178,7 @@ public class PopulateDemoActionsTest { testReviewContents(revArt, "Review new logic", PeerToPeerReviewState.Completed.getName()); // - test tasks - List<String> taskNames = new ArrayList<String>(); + List<String> taskNames = new ArrayList<>(); taskNames.addAll(DemoTestUtil.getTaskTitles(false)); for (TaskArtifact task : codeTeam.getTaskArtifacts()) { testTaskContents(task, TaskStates.InWork.getName(), TeamState.Implement.getName()); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/DuplicateWorkflowActionTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/DuplicateWorkflowActionTest.java index e78d3426a43..a30822877d5 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/DuplicateWorkflowActionTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/actions/DuplicateWorkflowActionTest.java @@ -88,7 +88,7 @@ public class DuplicateWorkflowActionTest extends AbstractAtsActionRunTest { } private List<IAtsUser> setupAssignees(TeamWorkFlowArtifact teamWf) { - List<IAtsUser> assignees = new LinkedList<IAtsUser>(); + List<IAtsUser> assignees = new LinkedList<>(); assignees.addAll(teamWf.getAssignees()); IAtsUser lead = AtsClientService.get().getUserServiceClient().getUserFromOseeUser(DemoDbUtil.getDemoUser(DemoUsers.Kay_Jones)); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/NumberOfTasksAndInWorkTasksColumnsTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/NumberOfTasksAndInWorkTasksColumnsTest.java index 6ad77287b8f..02bc0f23782 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/NumberOfTasksAndInWorkTasksColumnsTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/column/NumberOfTasksAndInWorkTasksColumnsTest.java @@ -44,7 +44,7 @@ public class NumberOfTasksAndInWorkTasksColumnsTest { Assert.assertEquals("6", NumberOfTasksRemainingColumn.getInstance().getColumnText(codeArt, null, 0)); TaskArtifact taskArt = codeArt.getTaskArtifacts().iterator().next(); - Collection<IAtsUser> taskAssignees = new HashSet<IAtsUser>(); + Collection<IAtsUser> taskAssignees = new HashSet<>(); taskAssignees.addAll(codeArt.getStateMgr().getAssignees()); AtsChangeSet changes = new AtsChangeSet(getClass().getSimpleName()); Result result = TaskManager.transitionToCompleted(taskArt, 0.0, 2, changes); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java index caf72a886e2..f38a612a00d 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java @@ -75,7 +75,7 @@ public class AtsBranchConfigurationTest { private final boolean DEBUG = false; private static Collection<String> appendToName(IOseeBranch branch, String... postFixes) { - Collection<String> data = new ArrayList<String>(); + Collection<String> data = new ArrayList<>(); for (String postFix : postFixes) { data.add(String.format("%s - %s", branch.getName(), postFix)); } diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/CopyAtsConfigurationOperationTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/CopyAtsConfigurationOperationTest.java index 528b51569c0..39d657e69c6 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/CopyAtsConfigurationOperationTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/copy/CopyAtsConfigurationOperationTest.java @@ -65,7 +65,7 @@ public class CopyAtsConfigurationOperationTest { } public static Set<IAtsActionableItem> getActionableItemsNameStartsWith(String prefix) throws OseeCoreException { - Set<IAtsActionableItem> artifacts = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> artifacts = new HashSet<>(); for (IAtsActionableItem aia : AtsClientService.get().getConfig().get(IAtsActionableItem.class)) { if (aia.getName().startsWith(prefix)) { artifacts.add(aia); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java index db5ee229e55..12451e5e6d9 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/AtsTestUtil.java @@ -420,7 +420,7 @@ public class AtsTestUtil { public static DecisionReviewArtifact getOrCreateDecisionReview(ReviewBlockType reviewBlockType, AtsTestUtilState relatedToState, IAtsChangeSet changes) throws OseeCoreException { ensureLoaded(); if (decRevArt == null) { - List<IAtsDecisionReviewOption> options = new ArrayList<IAtsDecisionReviewOption>(); + List<IAtsDecisionReviewOption> options = new ArrayList<>(); options.add(new SimpleDecisionReviewOption(DecisionReviewState.Completed.getName(), false, null)); options.add(new SimpleDecisionReviewOption(DecisionReviewState.Followup.getName(), true, Arrays.asList(AtsClientService.get().getUserService().getCurrentUser().getUserId()))); @@ -567,7 +567,7 @@ public class AtsTestUtil { * Deletes all artifacts with names that start with any title given */ public static void cleanupSimpleTest(Collection<String> titles) throws Exception { - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); for (String title : titles) { artifacts.addAll(ArtifactQuery.getArtifactListFromName(title, AtsUtilCore.getAtsBranch(), EXCLUDE_DELETED, QueryOption.CONTAINS_MATCH_OPTIONS)); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsBranchServiceImplTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsBranchServiceImplTest.java index dc598ee4994..27c6871d386 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsBranchServiceImplTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/branch/AtsBranchServiceImplTest.java @@ -105,8 +105,8 @@ public class AtsBranchServiceImplTest { TransactionRecord txRecord = new TransactionRecord(1234, branch.getUuid(), "comment", new Date(), UserManager.getUser().getArtId(), UserManager.getUser().getArtId(), TransactionDetailsType.Baselined, branchCache); - Collection<ITransaction> commitTxs = new ArrayList<ITransaction>(); - Collection<ICommitConfigItem> configArtSet = new HashSet<ICommitConfigItem>(); + Collection<ITransaction> commitTxs = new ArrayList<>(); + Collection<ICommitConfigItem> configArtSet = new HashSet<>(); commitTxs.add(txRecord); Collection<Object> commitObjs = AtsClientService.get().getBranchService().combineCommitTransactionsAndConfigItems(configArtSet, commitTxs); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/DecisionReviewManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/DecisionReviewManagerTest.java index 3d5e8f84172..92f22a37c95 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/DecisionReviewManagerTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/review/DecisionReviewManagerTest.java @@ -58,7 +58,7 @@ public class DecisionReviewManagerTest extends DecisionReviewManager { AtsTestUtil.cleanupAndReset("DecisionReviewManagerTest - Normal"); TeamWorkFlowArtifact teamWf = AtsTestUtil.getTeamWf(); - List<IAtsDecisionReviewOption> options = new ArrayList<IAtsDecisionReviewOption>(); + List<IAtsDecisionReviewOption> options = new ArrayList<>(); options.add(new MockDecisionReviewOption(DecisionReviewState.Completed.getName(), false, null)); options.add(new MockDecisionReviewOption(DecisionReviewState.Followup.getName(), true, Arrays.asList(AtsClientService.get().getUserService().getCurrentUser().getUserId()))); @@ -87,7 +87,7 @@ public class DecisionReviewManagerTest extends DecisionReviewManager { AtsTestUtil.cleanupAndReset("DecisionReviewManagerTest - UnAssigned"); TeamWorkFlowArtifact teamWf = AtsTestUtil.getTeamWf(); - List<IAtsDecisionReviewOption> options = new ArrayList<IAtsDecisionReviewOption>(); + List<IAtsDecisionReviewOption> options = new ArrayList<>(); options.add(new MockDecisionReviewOption(DecisionReviewState.Completed.getName(), false, null)); options.add(new MockDecisionReviewOption(DecisionReviewState.Followup.getName(), true, Arrays.asList(AtsClientService.get().getUserService().getCurrentUser().getUserId()))); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsUserTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsUserTest.java index b3d75f8540e..cd88dd59344 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsUserTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/util/AtsUserTest.java @@ -65,7 +65,7 @@ public class AtsUserTest { @org.junit.Test public void testRemove() throws OseeCoreException { - Collection<IAtsUser> assignees = new HashSet<IAtsUser>(); + Collection<IAtsUser> assignees = new HashSet<>(); assignees.add(AtsClientService.get().getUserServiceClient().getUserFromToken(DemoUsers.Alex_Kay)); assignees.add(AtsClientService.get().getUserServiceClient().getUserFromToken(DemoUsers.Joe_Smith)); Assert.assertTrue(Collections.isEqual( diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/ConvertWorkflowStatesOperationTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/ConvertWorkflowStatesOperationTest.java index 727a9ba0f82..db04ef32a9c 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/ConvertWorkflowStatesOperationTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/ConvertWorkflowStatesOperationTest.java @@ -55,8 +55,8 @@ public class ConvertWorkflowStatesOperationTest { @Test public void testDoWork_errorChecking() throws Exception { - Map<String, String> fromStateToStateMap = new HashMap<String, String>(); - List<AbstractWorkflowArtifact> workflows = new ArrayList<AbstractWorkflowArtifact>(); + Map<String, String> fromStateToStateMap = new HashMap<>(); + List<AbstractWorkflowArtifact> workflows = new ArrayList<>(); boolean persist = false; XResultData rd = new XResultData(false); ConvertWorkflowStatesOperation operation = @@ -82,11 +82,11 @@ public class ConvertWorkflowStatesOperationTest { @Test public void testDoWork() throws Exception { - Map<String, String> fromStateToStateMap = new HashMap<String, String>(); + Map<String, String> fromStateToStateMap = new HashMap<>(); fromStateToStateMap.put("Endorse", "NewEndorse"); fromStateToStateMap.put("Analyze", "NewAnalyze"); - List<AbstractWorkflowArtifact> workflows = new ArrayList<AbstractWorkflowArtifact>(); + List<AbstractWorkflowArtifact> workflows = new ArrayList<>(); Artifact teamWf = ArtifactTypeManager.addArtifact(AtsArtifactTypes.TeamWorkflow, AtsUtilCore.getAtsBranch(), "ConvertWorkflowStatesOperationTest.testDoWork"); @@ -123,10 +123,10 @@ public class ConvertWorkflowStatesOperationTest { @Test public void testDoWork_persist() throws Exception { - Map<String, String> fromStateToStateMap = new HashMap<String, String>(); + Map<String, String> fromStateToStateMap = new HashMap<>(); fromStateToStateMap.put("Endorse", "NewEndorse"); - List<AbstractWorkflowArtifact> workflows = new ArrayList<AbstractWorkflowArtifact>(); + List<AbstractWorkflowArtifact> workflows = new ArrayList<>(); Artifact teamWf = ArtifactTypeManager.addArtifact(AtsArtifactTypes.TeamWorkflow, AtsUtilCore.getAtsBranch(), "ConvertWorkflowStatesOperationTest.testDoWork_persist"); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/TransitionManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/TransitionManagerTest.java index 9946d2a421c..f66a41b7ff8 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/TransitionManagerTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/core/client/workflow/transition/TransitionManagerTest.java @@ -59,7 +59,7 @@ import org.junit.BeforeClass; */ public class TransitionManagerTest { - private static List<AbstractWorkflowArtifact> EMPTY_AWAS = new ArrayList<AbstractWorkflowArtifact>(); + private static List<AbstractWorkflowArtifact> EMPTY_AWAS = new ArrayList<>(); @BeforeClass @AfterClass diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/ev/EarnedValueReportOperationTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/ev/EarnedValueReportOperationTest.java index 10581510270..2f2b89c9722 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/ev/EarnedValueReportOperationTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/ev/EarnedValueReportOperationTest.java @@ -42,7 +42,7 @@ public class EarnedValueReportOperationTest { @Test public void test() throws OseeCoreException { - List<IAtsTeamDefinition> teamDefs = new ArrayList<IAtsTeamDefinition>(); + List<IAtsTeamDefinition> teamDefs = new ArrayList<>(); IAtsTeamDefinition teamDef = (IAtsTeamDefinition) AtsClientService.get().getConfig().getSoleByUuid(DemoArtifactToken.SAW_SW.getUuid()); teamDefs.add(teamDef); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/ev/SearchWorkPackageOperationTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/ev/SearchWorkPackageOperationTest.java index 603636452ea..76cd919f6c8 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/ev/SearchWorkPackageOperationTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/ev/SearchWorkPackageOperationTest.java @@ -59,8 +59,8 @@ public class SearchWorkPackageOperationTest { @Parameters public static Collection<Object[]> data() { - List<Object[]> data = new ArrayList<Object[]>(); - List<Long> EMPYT_RESULTS = new ArrayList<Long>(); + List<Object[]> data = new ArrayList<>(); + List<Long> EMPYT_RESULTS = new ArrayList<>(); Long WP_01 = DemoArtifactToken.SAW_Code_Team_WorkPackage_01.getUuid(); Long WP_02 = DemoArtifactToken.SAW_Code_Team_WorkPackage_02.getUuid(); Long WP_03 = DemoArtifactToken.SAW_Code_Team_WorkPackage_03.getUuid(); @@ -98,14 +98,14 @@ public class SearchWorkPackageOperationTest { @Test public void testSearchResults() throws OseeCoreException { - List<IAtsTeamDefinition> teamDefs = new ArrayList<IAtsTeamDefinition>(); + List<IAtsTeamDefinition> teamDefs = new ArrayList<>(); for (Long teamDefUuid : teamDefUuids) { IAtsTeamDefinition teamDef = (IAtsTeamDefinition) AtsClientService.get().getConfig().getSoleByUuid(teamDefUuid); teamDefs.add(teamDef); } - List<IAtsActionableItem> ais = new ArrayList<IAtsActionableItem>(); + List<IAtsActionableItem> ais = new ArrayList<>(); for (Long aiUuid : aiUuids) { IAtsActionableItem ai = (IAtsActionableItem) AtsClientService.get().getConfig().getSoleByUuid(aiUuid); ais.add(ai); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToTaskEditorTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToTaskEditorTest.java index 7c08a027791..7927975c336 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToTaskEditorTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToTaskEditorTest.java @@ -70,7 +70,7 @@ public class AtsNavigateItemsToTaskEditorTest { runGeneralTaskSearchOnCompletedCancelledTest(item, false, 0); runGeneralTaskSearchOnTeamTest(item, selectedUsers, 0); selectedUsers.clear(); - List<String> teamDefs = new ArrayList<String>(); + List<String> teamDefs = new ArrayList<>(); teamDefs.add("SAW Code"); Set<IAtsTeamDefinition> tda = TeamDefinitions.getTeamDefinitions(teamDefs, AtsClientService.get().getConfig()); runGeneralTaskSearchOnTeamTest(item, tda, 14); @@ -116,7 +116,7 @@ public class AtsNavigateItemsToTaskEditorTest { Artifact groupArt = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.UniversalGroup, "Test Group", AtsUtilCore.getAtsBranch()); - Set<Artifact> selectedUsers = new HashSet<Artifact>(); + Set<Artifact> selectedUsers = new HashSet<>(); TaskEditor editor = getSingleEditorOrFail(); ((TaskSearchWorldSearchItem) editor.getTaskActionPage().getDynamicWidgetLayoutListener()).setIncludeCompletedCheckbox(selected); ((TaskSearchWorldSearchItem) editor.getTaskActionPage().getDynamicWidgetLayoutListener()).setIncludeCancelledCheckbox(selected); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToWorldViewTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToWorldViewTest.java index f9ce27d5602..d091d5edb14 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToWorldViewTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/navigate/AtsNavigateItemsToWorldViewTest.java @@ -433,7 +433,7 @@ public class AtsNavigateItemsToWorldViewTest { runGeneralTeamWorkflowSearchOnAssigneeTest(item, "Kay Jones", 10); runGeneralTeamWorkflowSearchOnReleasedTest(item, ReleasedOption.Released, 0); runGeneralTeamWorkflowSearchOnReleasedTest(item, ReleasedOption.Both, 10); - List<String> teamDefs = new ArrayList<String>(); + List<String> teamDefs = new ArrayList<>(); teamDefs.add("SAW Test"); teamDefs.add("SAW Design"); Set<IAtsTeamDefinition> tda = TeamDefinitions.getTeamDefinitions(teamDefs, AtsClientService.get().getConfig()); @@ -576,8 +576,8 @@ public class AtsNavigateItemsToWorldViewTest { } private void runGeneralXColTest(int expected, boolean isErrorCheck, IAttributeType attributeTypeToDelete, boolean testTaskTab) throws OseeCoreException { - List<Artifact> arts = new ArrayList<Artifact>(); - List<Artifact> taskArts = new ArrayList<Artifact>(); + List<Artifact> arts = new ArrayList<>(); + List<Artifact> taskArts = new ArrayList<>(); List<XViewerColumn> columns = getXViewer().getCustomizeMgr().getCurrentTableColumns(); ITableLabelProvider labelProv = (ITableLabelProvider) getXViewer().getLabelProvider(); // want to check all valid children @@ -629,7 +629,7 @@ public class AtsNavigateItemsToWorldViewTest { } private void deleteAttributesForXColErrorTest(Collection<Artifact> arts, IAttributeType attributeTypeToDelete) throws Exception { - Map<Artifact, Object> attributeValues = new HashMap<Artifact, Object>(); + Map<Artifact, Object> attributeValues = new HashMap<>(); handleTableCustomization(); getXViewer().expandAll(); // necessary after table customization for linux cause customization change collapsesAll SkynetTransaction transaction = TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), "Navigate Test"); @@ -654,7 +654,7 @@ public class AtsNavigateItemsToWorldViewTest { } private void verifyXColumnsHasErrors(ITableLabelProvider labelProv, List<Artifact> arts, List<XViewerColumn> columns, IAttributeType attributeTypeToDelete) { - List<String> actualErrorCols = new ArrayList<String>(); + List<String> actualErrorCols = new ArrayList<>(); for (XViewerColumn xCol : columns) { verifyArtifactsHasErrors(labelProv, arts, xCol, getXViewer().getCustomizeMgr().getColumnNumFromXViewerColumn(xCol), actualErrorCols); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/render/RendererManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/render/RendererManagerTest.java index 1d4eb3ce571..9231c8dfde4 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/render/RendererManagerTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/render/RendererManagerTest.java @@ -120,7 +120,7 @@ public class RendererManagerTest { @Parameters public static Collection<Object[]> getData() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); addTest(data, Folder, GENERALIZED_EDIT, DefaultArtifactRenderer.class, Both); addTest(data, Folder, SPECIALIZED_EDIT, DefaultArtifactRenderer.class, Both); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsDeleteManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsDeleteManagerTest.java index 3bd774cb5da..2b19bb6580f 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsDeleteManagerTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsDeleteManagerTest.java @@ -164,7 +164,7 @@ public class AtsDeleteManagerTest { private void verifyExists(TestNames testName, int expectedNumActions, int expectedNumCodeWorkflows, int expectedNumReqWorkflows, int expectedNumTasks, int expectedNumReviews) throws OseeCoreException { List<Artifact> artifacts = ArtifactQuery.getArtifactListFromName(testName.toString(), AtsUtilCore.getAtsBranch(), EXCLUDE_DELETED, QueryOption.CONTAINS_MATCH_OPTIONS); - CountingMap<IArtifactType> countMap = new CountingMap<IArtifactType>(); + CountingMap<IArtifactType> countMap = new CountingMap<>(); for (Artifact artifact : artifacts) { countMap.put(artifact.getArtifactType()); } @@ -218,7 +218,7 @@ public class AtsDeleteManagerTest { } private static void cleanup() throws Exception { - List<String> names = new ArrayList<String>(); + List<String> names = new ArrayList<>(); for (TestNames testName : TestNames.values()) { names.add(testName.name()); } diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/DemoTeamWorkflowTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/DemoTeamWorkflowTest.java index 36114647f10..aff6547c914 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/DemoTeamWorkflowTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/DemoTeamWorkflowTest.java @@ -49,7 +49,7 @@ public class DemoTeamWorkflowTest { @Test public void testCreateSawTestWf() throws Exception { - Collection<IAtsActionableItem> aias = new HashSet<IAtsActionableItem>(); + Collection<IAtsActionableItem> aias = new HashSet<>(); aias.add(AtsClientService.get().getConfig().getSoleByUuid(DemoArtifactToken.SAW_Test_AI.getUuid(), IAtsActionableItem.class)); String title = getClass().getSimpleName() + " testCreateSawTestWf"; diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java index 5e449b1e065..e4cd5ba2ac2 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/DemoTestUtil.java @@ -144,7 +144,7 @@ public class DemoTestUtil { * Create tasks named title + <num> */ public static Collection<TaskArtifact> createSimpleTasks(TeamWorkFlowArtifact teamArt, String title, int numTasks, String relatedToState) throws Exception { - List<String> names = new ArrayList<String>(); + List<String> names = new ArrayList<>(); for (int x = 1; x < numTasks + 1; x++) { names.add(title + " " + x); } @@ -169,7 +169,7 @@ public class DemoTestUtil { public static Artifact getUncommittedActionWorkflow(DemoWorkType demoWorkType) throws OseeCoreException { if (unCommittedWorkflows == null) { - unCommittedWorkflows = new HashMap<DemoWorkType, Artifact>(); + unCommittedWorkflows = new HashMap<>(); for (Artifact art : ArtifactQuery.getArtifactListFromName( "SAW (uncommitted) More Reqt Changes for Diagram View", AtsUtilCore.getAtsBranch(), EXCLUDE_DELETED)) { if (art.isOfType(DemoArtifactTypes.DemoCodeTeamWorkflow)) { @@ -188,7 +188,7 @@ public class DemoTestUtil { public static Artifact getCommittedActionWorkflow(DemoWorkType demoWorkType) throws OseeCoreException { if (committedWorkflows == null) { - committedWorkflows = new HashMap<DemoWorkType, Artifact>(); + committedWorkflows = new HashMap<>(); for (Artifact art : ArtifactQuery.getArtifactListFromName("SAW (committed) Reqt Changes for Diagram View", AtsUtilCore.getAtsBranch(), EXCLUDE_DELETED)) { if (art.isOfType(DemoArtifactTypes.DemoCodeTeamWorkflow)) { diff --git a/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/defect/MockDefectValueProvider.java b/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/defect/MockDefectValueProvider.java index 30cfa34c604..9c785148fd7 100644 --- a/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/defect/MockDefectValueProvider.java +++ b/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/defect/MockDefectValueProvider.java @@ -40,7 +40,7 @@ public class MockDefectValueProvider implements IValueProvider { @Override public Collection<String> getValues() { - List<String> values = new ArrayList<String>(); + List<String> values = new ArrayList<>(); for (ReviewDefectItem item : defectItems) { values.add(AXml.addTagData("Item", item.toXml())); } diff --git a/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/MockUserRoleValueProvider.java b/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/MockUserRoleValueProvider.java index d492f629150..acdd3d3cd47 100644 --- a/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/MockUserRoleValueProvider.java +++ b/plugins/org.eclipse.osee.ats.core.client.test/src/org/eclipse/osee/ats/core/client/review/role/MockUserRoleValueProvider.java @@ -41,7 +41,7 @@ public class MockUserRoleValueProvider implements IValueProvider { @Override public Collection<String> getValues() { - List<String> values = new ArrayList<String>(); + List<String> values = new ArrayList<>(); for (UserRole item : roles) { values.add(AXml.addTagData("Role", item.toXml())); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionArtifact.java index b75665751cb..b91ac2374de 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/action/ActionArtifact.java @@ -40,7 +40,7 @@ public class ActionArtifact extends Artifact implements IAtsAction { } public Set<IAtsActionableItem> getActionableItems() throws OseeCoreException { - Set<IAtsActionableItem> aias = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> aias = new HashSet<>(); for (TeamWorkFlowArtifact team : getTeams()) { aias.addAll(team.getActionableItemsDam().getActionableItems()); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/agile/AgileTeam.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/agile/AgileTeam.java index aa13bcf60ec..1940fcc5ef7 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/agile/AgileTeam.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/agile/AgileTeam.java @@ -35,7 +35,7 @@ public class AgileTeam extends AtsConfigObject implements IAgileTeam { @Override public List<Long> getAtsTeamUuids() { - List<Long> uuids = new ArrayList<Long>(); + List<Long> uuids = new ArrayList<>(); for (Artifact atsTeam : artifact.getRelatedArtifacts(AtsRelationTypes.AgileTeamToAtsTeam_AtsTeam)) { uuids.add(new Long(atsTeam.getArtId())); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactChecks.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactChecks.java index 3a4281bf613..e4a9f37b448 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactChecks.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactChecks.java @@ -150,7 +150,7 @@ public class AtsArtifactChecks extends ArtifactCheck { } private IStatus checkTeamDefinitions(boolean isAtsAdmin, Collection<Artifact> artifacts) throws OseeCoreException { - List<String> guids = new ArrayList<String>(); + List<String> guids = new ArrayList<>(); for (Artifact art : artifacts) { if (art.isOfType(AtsArtifactTypes.TeamDefinition)) { guids.add(art.getGuid()); @@ -192,7 +192,7 @@ public class AtsArtifactChecks extends ArtifactCheck { } private IStatus checkUsers(Collection<Artifact> artifacts) throws OseeCoreException { - Set<User> users = new HashSet<User>(); + Set<User> users = new HashSet<>(); for (Artifact art : artifacts) { if (art instanceof User) { users.add((User) art); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactFactory.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactFactory.java index 583c55301ec..c2568337129 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactFactory.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/artifact/AtsArtifactFactory.java @@ -78,7 +78,7 @@ public class AtsArtifactFactory extends ArtifactFactory { @Override public Collection<IArtifactType> getEternalArtifactTypes() { - List<IArtifactType> artifactTypes = new ArrayList<IArtifactType>(); + List<IArtifactType> artifactTypes = new ArrayList<>(); artifactTypes.add(AtsArtifactTypes.WorkDefinition); artifactTypes.add(AtsArtifactTypes.Version); artifactTypes.add(AtsArtifactTypes.TeamDefinition); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/internal/AtsBranchServiceImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/internal/AtsBranchServiceImpl.java index 8fa325f59af..7cc9f317428 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/internal/AtsBranchServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/branch/internal/AtsBranchServiceImpl.java @@ -106,7 +106,7 @@ public class AtsBranchServiceImpl extends AbstractAtsBranchService { @Override public Collection<ITransaction> getCommittedArtifactTransactionIds(IAtsTeamWorkflow teamWf) { - List<ITransaction> transactions = new ArrayList<ITransaction>(); + List<ITransaction> transactions = new ArrayList<>(); for (TransactionRecord trans : TransactionManager.getCommittedArtifactTransactionIds((Artifact) teamWf.getStoreObject())) { transactions.add(trans); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/ActionableItemManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/ActionableItemManager.java index 67716e50416..4ce0a0ec1bf 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/ActionableItemManager.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/ActionableItemManager.java @@ -39,7 +39,7 @@ public class ActionableItemManager { } public Set<IAtsActionableItem> getActionableItems() throws OseeCoreException { - Set<IAtsActionableItem> ais = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> ais = new HashSet<>(); if (!artifact.isDeleted()) { for (Long uuid : getActionableItemUuids()) { IAtsActionableItem aia = AtsClientService.get().getConfig().getSoleByUuid(uuid, IAtsActionableItem.class); @@ -64,7 +64,7 @@ public class ActionableItemManager { * Definitions and AIs are referenced by uuid instead of guid in DB Store. */ public List<Long> getActionableItemUuids() throws OseeCoreException { - List<Long> uuids = new LinkedList<Long>(); + List<Long> uuids = new LinkedList<>(); for (String guid : artifact.getAttributesToStringList(AtsAttributeTypes.ActionableItem)) { Long uuid = AtsClientService.get().getStoreService().getUuidFromGuid(guid); if (uuid != null) { diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/AtsBulkLoad.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/AtsBulkLoad.java index b98c3028bac..887efa58ab2 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/AtsBulkLoad.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/AtsBulkLoad.java @@ -40,7 +40,7 @@ public class AtsBulkLoad { private static AtomicBoolean atsTypeDataLoadedStarted = new AtomicBoolean(false); public static List<IOperation> getConfigLoadingOperations() { - List<IOperation> ops = new ArrayList<IOperation>(); + List<IOperation> ops = new ArrayList<>(); if (atsTypeDataLoadedStarted.compareAndSet(false, true) && DbConnectionUtility.isVersionSupported()) { IOperation op = new AbstractOperation("Re-load ATS Config", Activator.PLUGIN_ID) { @Override @@ -64,8 +64,8 @@ public class AtsBulkLoad { } public static Set<Artifact> bulkLoadArtifacts(Collection<? extends Artifact> artifacts) throws OseeCoreException { - List<Artifact> actions = new ArrayList<Artifact>(); - List<Artifact> teams = new ArrayList<Artifact>(); + List<Artifact> actions = new ArrayList<>(); + List<Artifact> teams = new ArrayList<>(); for (Artifact art : artifacts) { if (art instanceof ActionArtifact) { actions.add(art); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/ProgramManagers.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/ProgramManagers.java index 121b7a0018f..5a935fb22f3 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/ProgramManagers.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/config/ProgramManagers.java @@ -38,7 +38,7 @@ public abstract class ProgramManagers { @SuppressWarnings("rawtypes") public static Set<IAtsProgramManager> getAtsProgramManagers() { - Set<IAtsProgramManager> lbaProgramItems = new HashSet<IAtsProgramManager>(); + Set<IAtsProgramManager> lbaProgramItems = new HashSet<>(); IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.osee.ats.core.client.AtsProgramManager"); if (point == null) { diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportOperation.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportOperation.java index cec0c1ce31f..67f3c8aa441 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportOperation.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportOperation.java @@ -39,7 +39,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; public class EarnedValueReportOperation extends AbstractOperation { private final Collection<IAtsWorkPackage> workPackages; - private final List<EarnedValueReportResult> results = new ArrayList<EarnedValueReportResult>(); + private final List<EarnedValueReportResult> results = new ArrayList<>(); // @formatter:off public static final IColumn Work_Package_Id = new ColumnAdapter("ats.work.package.id", "Work Package Id", ColumnType.String, ""); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportResult.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportResult.java index 474fb89fbd4..657d8472b36 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportResult.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/EarnedValueReportResult.java @@ -18,7 +18,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact; public class EarnedValueReportResult { - private final Map<IColumn, String> values = new HashMap<IColumn, String>(9); + private final Map<IColumn, String> values = new HashMap<>(9); private Artifact artifact; private final IAtsWorkPackage workPackage; diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/SearchWorkPackageOperation.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/SearchWorkPackageOperation.java index d5d769c2640..1bcd0c38c9e 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/SearchWorkPackageOperation.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/ev/SearchWorkPackageOperation.java @@ -39,7 +39,7 @@ public class SearchWorkPackageOperation extends AbstractOperation { private final Collection<IAtsTeamDefinition> teamDefs; private final Collection<IAtsActionableItem> ais; private final Active activeWorkPkgs; - private final Set<Artifact> results = new HashSet<Artifact>(); + private final Set<Artifact> results = new HashSet<>(); private final boolean includeChildrenTeamDefs; private final boolean includeChildrenAis; @@ -61,7 +61,7 @@ public class SearchWorkPackageOperation extends AbstractOperation { throw new OseeArgumentException("ERROR", "Must provide Team Definitions or Actionable Items"); } checkForCancelledStatus(monitor); - List<String> guids = new ArrayList<String>(); + List<String> guids = new ArrayList<>(); addAllTeamDefGuids(monitor, teamDefs, includeChildrenTeamDefs, guids); addAllAisGuids(monitor, ais, includeChildrenAis, guids); @@ -102,7 +102,7 @@ public class SearchWorkPackageOperation extends AbstractOperation { } public Set<IAtsWorkPackage> getResults() { - Set<IAtsWorkPackage> resultWorkPgks = new HashSet<IAtsWorkPackage>(); + Set<IAtsWorkPackage> resultWorkPgks = new HashSet<>(); for (Artifact art : results) { resultWorkPgks.add(new WorkPackageArtifact(art)); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ArtifactCollectorsCache.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ArtifactCollectorsCache.java index ddb89001d48..d8c3bb6c584 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ArtifactCollectorsCache.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ArtifactCollectorsCache.java @@ -50,9 +50,9 @@ public class ArtifactCollectorsCache<T extends CollectorArtifact> implements IAr private void initializeStructures() { if (!initialized) { initialized = true; - cache = new HashMap<Integer, List<Artifact>>(); - registered = new HashSet<Integer>(); - collectorMemberOrderMap = new DoubleKeyHashMap<Integer, Integer, String>(); + cache = new HashMap<>(); + registered = new HashSet<>(); + collectorMemberOrderMap = new DoubleKeyHashMap<>(); } } @@ -91,7 +91,7 @@ public class ArtifactCollectorsCache<T extends CollectorArtifact> implements IAr fillOrderCache(collector, members); } } - LinkedList<Artifact> linkedList = new LinkedList<Artifact>(members); + LinkedList<Artifact> linkedList = new LinkedList<>(members); return linkedList; } @@ -142,7 +142,7 @@ public class ArtifactCollectorsCache<T extends CollectorArtifact> implements IAr private void clearOrderCache(T collectorArt) { if (initialized) { - List<Integer> memberIds = new ArrayList<Integer>(); + List<Integer> memberIds = new ArrayList<>(); Map<Integer, String> subHash = collectorMemberOrderMap.getSubHash(collectorArt.getArtId()); if (subHash != null) { memberIds.addAll(subHash.keySet()); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java index abf4d3e32e3..7808adbef72 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsClientImpl.java @@ -315,7 +315,7 @@ public class AtsClientImpl implements IAtsClient { @Override public <T extends IAtsConfigObject> Collection<T> getConfigObjects(Collection<? extends Artifact> artifacts, Class<T> clazz) throws OseeCoreException { IAtsConfig config = getConfig(); - List<T> objects = new ArrayList<T>(); + List<T> objects = new ArrayList<>(); for (Artifact art : artifacts) { objects.addAll(config.getByTag(art.getGuid(), clazz)); } @@ -657,7 +657,7 @@ public class AtsClientImpl implements IAtsClient { @Override public Collection<IArtifactType> getArtifactTypes() { - List<IArtifactType> types = new ArrayList<IArtifactType>(); + List<IArtifactType> types = new ArrayList<>(); types.addAll(ArtifactTypeManager.getAllTypes()); return types; } @@ -750,7 +750,7 @@ public class AtsClientImpl implements IAtsClient { @Override public IArtifactMembersCache<GoalArtifact> getGoalMembersCache() { if (goalMembersCache == null) { - goalMembersCache = new ArtifactCollectorsCache<GoalArtifact>(AtsRelationTypes.Goal_Member); + goalMembersCache = new ArtifactCollectorsCache<>(AtsRelationTypes.Goal_Member); } return goalMembersCache; } @@ -758,7 +758,7 @@ public class AtsClientImpl implements IAtsClient { @Override public IArtifactMembersCache<SprintArtifact> getSprintItemsCache() { if (sprintItemsCache == null) { - sprintItemsCache = new ArtifactCollectorsCache<SprintArtifact>(AtsRelationTypes.AgileSprintToItem_AtsItem); + sprintItemsCache = new ArtifactCollectorsCache<>(AtsRelationTypes.AgileSprintToItem_AtsItem); } return sprintItemsCache; } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java index b127acf9016..00b61f12aea 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/AtsStoreService.java @@ -48,7 +48,7 @@ public class AtsStoreService implements IAtsStoreService { Long result = AtsUtilCore.getUuidFromGuid(guid); if (result == null) { if (guidToUuid == null) { - guidToUuid = new HashMap<String, Long>(200); + guidToUuid = new HashMap<>(200); } if (guidToUuid.containsKey(guid)) { result = guidToUuid.get(guid); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/ActionableItem.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/ActionableItem.java index b43cc5f0381..90da1196846 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/ActionableItem.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/ActionableItem.java @@ -31,10 +31,10 @@ public class ActionableItem extends AtsObject implements IAtsActionableItem { private boolean active = true; private IAtsTeamDefinition teamDefinition; private IAtsActionableItem parentActionableItem; - private final Set<String> staticIds = new HashSet<String>(); - private final Set<IAtsUser> leads = new HashSet<IAtsUser>(); - private final Set<IAtsUser> subscribed = new HashSet<IAtsUser>(); - private final Set<IAtsActionableItem> childrenActionableItems = new HashSet<IAtsActionableItem>(); + private final Set<String> staticIds = new HashSet<>(); + private final Set<IAtsUser> leads = new HashSet<>(); + private final Set<IAtsUser> subscribed = new HashSet<>(); + private final Set<IAtsActionableItem> childrenActionableItems = new HashSet<>(); private final RuleManager ruleMgr = new RuleManager(); public ActionableItem(String name, String guid, long uuid) { diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsArtifactConfigCache.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsArtifactConfigCache.java index 7559414c0d1..2b2dd9380ee 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsArtifactConfigCache.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsArtifactConfigCache.java @@ -29,8 +29,8 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact; public class AtsArtifactConfigCache extends AtsConfigCache { public List<Artifact> getArtifacts(Collection<? extends IAtsObject> atsObjects) throws OseeCoreException { - List<Artifact> artifacts = new LinkedList<Artifact>(); - List<Long> uuids = new ArrayList<Long>(); + List<Artifact> artifacts = new LinkedList<>(); + List<Long> uuids = new ArrayList<>(); for (IAtsObject atsObject : atsObjects) { Artifact artifact = getArtifact(atsObject); if (artifact != null) { @@ -44,7 +44,7 @@ public class AtsArtifactConfigCache extends AtsConfigCache { } public <A extends IAtsConfigObject> Collection<A> getConfigObjects(Collection<? extends Artifact> artifacts, Class<A> clazz) { - List<A> objects = new ArrayList<A>(); + List<A> objects = new ArrayList<>(); for (Artifact art : artifacts) { objects.addAll(getByTag(art.getGuid(), clazz)); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsConfigCacheProvider.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsConfigCacheProvider.java index b0ee5d1ef97..50afa2f0090 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsConfigCacheProvider.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsConfigCacheProvider.java @@ -32,7 +32,7 @@ public class AtsConfigCacheProvider extends LazyObject<AtsArtifactConfigCache> i @Override protected FutureTask<AtsArtifactConfigCache> createLoaderTask() { Callable<AtsArtifactConfigCache> newCallable = new LoadAtsConfigCacheCallable(artifactStore); - FutureTask<AtsArtifactConfigCache> newTask = new FutureTask<AtsArtifactConfigCache>(newCallable); + FutureTask<AtsArtifactConfigCache> newTask = new FutureTask<>(newCallable); return newTask; } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsConfigObject.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsConfigObject.java index 4b80434fa68..e81828a7289 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsConfigObject.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/AtsConfigObject.java @@ -102,7 +102,7 @@ public abstract class AtsConfigObject extends AtsObject implements IAtsConfigObj } protected Collection<IAtsUser> getRelatedUsers(IRelationTypeSide relation) { - Set<IAtsUser> results = new HashSet<IAtsUser>(); + Set<IAtsUser> results = new HashSet<>(); try { for (Artifact userArt : artifact.getRelatedArtifacts(relation)) { IAtsUser lead = diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/TeamDefinition.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/TeamDefinition.java index c6c97b1729b..c4d6da7b917 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/TeamDefinition.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/TeamDefinition.java @@ -48,17 +48,17 @@ public class TeamDefinition extends AtsObject implements IAtsTeamDefinition { private IAtsTeamDefinition parentTeamDef; - private final Set<String> staticIds = new HashSet<String>(); + private final Set<String> staticIds = new HashSet<>(); private final RuleManager ruleMgr = new RuleManager(); - private final Set<IAtsUser> leads = new HashSet<IAtsUser>(); - private final Set<IAtsUser> members = new HashSet<IAtsUser>(); - private final Set<IAtsUser> priviledgedMembers = new HashSet<IAtsUser>(); - private final Set<IAtsUser> subscribed = new HashSet<IAtsUser>(); + private final Set<IAtsUser> leads = new HashSet<>(); + private final Set<IAtsUser> members = new HashSet<>(); + private final Set<IAtsUser> priviledgedMembers = new HashSet<>(); + private final Set<IAtsUser> subscribed = new HashSet<>(); - private final Set<IAtsTeamDefinition> childrenTeamDefinitions = new HashSet<IAtsTeamDefinition>(); - private final Set<IAtsActionableItem> actionableItems = new HashSet<IAtsActionableItem>(); - private final Set<IAtsVersion> versions = new HashSet<IAtsVersion>(); + private final Set<IAtsTeamDefinition> childrenTeamDefinitions = new HashSet<>(); + private final Set<IAtsActionableItem> actionableItems = new HashSet<>(); + private final Set<IAtsVersion> versions = new HashSet<>(); private String relatedPeerWorkflowDefinition; @Override @@ -175,7 +175,7 @@ public class TeamDefinition extends AtsObject implements IAtsTeamDefinition { @Override public Collection<IAtsUser> getLeads(Collection<IAtsActionableItem> actionableItems) throws OseeCoreException { - Set<IAtsUser> leads = new HashSet<IAtsUser>(); + Set<IAtsUser> leads = new HashSet<>(); for (IAtsActionableItem aia : actionableItems) { if (this.equals(aia.getTeamDefinitionInherited())) { // If leads are specified for this aia, add them @@ -227,7 +227,7 @@ public class TeamDefinition extends AtsObject implements IAtsTeamDefinition { @Override public Collection<IAtsVersion> getVersionsReleased(VersionReleaseType releaseType) { - ArrayList<IAtsVersion> versions = new ArrayList<IAtsVersion>(); + ArrayList<IAtsVersion> versions = new ArrayList<>(); for (IAtsVersion version : getVersions()) { if (version.isReleased() && (releaseType == VersionReleaseType.Released || releaseType == VersionReleaseType.Both)) { versions.add(version); @@ -240,7 +240,7 @@ public class TeamDefinition extends AtsObject implements IAtsTeamDefinition { @Override public Collection<IAtsVersion> getVersionsLocked(VersionLockedType lockType) { - ArrayList<IAtsVersion> versions = new ArrayList<IAtsVersion>(); + ArrayList<IAtsVersion> versions = new ArrayList<>(); for (IAtsVersion version : getVersions()) { if (version.isVersionLocked() && (lockType == VersionLockedType.Locked || lockType == VersionLockedType.Both)) { versions.add(version); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/Version.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/Version.java index 52631c38ee0..6967b686c86 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/Version.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/config/Version.java @@ -49,8 +49,8 @@ public class Version extends AtsObject implements IAtsVersion { private Date releaseDate; private Date estimatedReleaseDate; - private List<IAtsVersion> parallelVersions = new ArrayList<IAtsVersion>(); - private final Set<String> staticIds = new HashSet<String>(); + private List<IAtsVersion> parallelVersions = new ArrayList<>(); + private final Set<String> staticIds = new HashSet<>(); private final IAtsVersionService versionService; @@ -161,7 +161,7 @@ public class Version extends AtsObject implements IAtsVersion { @Override public String getCommitFullDisplayName() { - List<String> strs = new ArrayList<String>(); + List<String> strs = new ArrayList<>(); strs.add(getName()); if (Strings.isValid(fullName)) { strs.add(fullName); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ev/AtsEarnedValueImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ev/AtsEarnedValueImpl.java index 09bdce108c3..dc4d0c111ae 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ev/AtsEarnedValueImpl.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/ev/AtsEarnedValueImpl.java @@ -56,7 +56,7 @@ public class AtsEarnedValueImpl implements IAtsEarnedValueService { @Override public Collection<IAtsWorkPackage> getWorkPackageOptions(IAtsObject object) throws OseeCoreException { - List<IAtsWorkPackage> workPackageOptions = new ArrayList<IAtsWorkPackage>(); + List<IAtsWorkPackage> workPackageOptions = new ArrayList<>(); getWorkPackageOptions(object, workPackageOptions); return workPackageOptions; } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/query/AtsQueryImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/query/AtsQueryImpl.java index 4cad146bc2e..cc16d1c09f1 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/query/AtsQueryImpl.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/query/AtsQueryImpl.java @@ -62,7 +62,7 @@ public class AtsQueryImpl extends AbstractAtsQueryImpl { } if (uuids != null && uuids.length > 0) { - List<Integer> artIds = new LinkedList<Integer>(); + List<Integer> artIds = new LinkedList<>(); for (Long uuid : uuids) { artIds.add(uuid.intValue()); } @@ -76,7 +76,7 @@ public class AtsQueryImpl extends AbstractAtsQueryImpl { // state if (stateType != null) { - List<String> stateTypes = new ArrayList<String>(); + List<String> stateTypes = new ArrayList<>(); for (StateType type : stateType) { stateTypes.add(type.name()); } @@ -91,7 +91,7 @@ public class AtsQueryImpl extends AbstractAtsQueryImpl { } } - Set<T> workItems = new HashSet<T>(); + Set<T> workItems = new HashSet<>(); Iterator<Artifact> iterator = query.getResults().iterator(); while (iterator.hasNext()) { workItems.add((T) atsClient.getWorkItemFactory().getWorkItem(iterator.next())); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/review/AtsReviewServiceImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/review/AtsReviewServiceImpl.java index c09dfcebf40..aa56504f575 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/review/AtsReviewServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/review/AtsReviewServiceImpl.java @@ -77,7 +77,7 @@ public class AtsReviewServiceImpl implements IAtsReviewService { @Override public Collection<IAtsAbstractReview> getReviews(IAtsTeamWorkflow teamWf) { - List<IAtsAbstractReview> reviews = new ArrayList<IAtsAbstractReview>(); + List<IAtsAbstractReview> reviews = new ArrayList<>(); for (AbstractReviewArtifact reviewArt : ReviewManager.getReviews((TeamWorkFlowArtifact) teamWf.getStoreObject())) { reviews.add(atsClient.getWorkItemFactory().getReview(reviewArt)); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AbstractAtsArtifactWriter.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AbstractAtsArtifactWriter.java index f8aa20cd2b8..f98f82c1ff3 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AbstractAtsArtifactWriter.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/store/AbstractAtsArtifactWriter.java @@ -40,7 +40,7 @@ public abstract class AbstractAtsArtifactWriter<T extends IAtsConfigObject> impl */ protected Collection<Artifact> setRelationsOfType(AtsArtifactConfigCache cache, Artifact artifact, Collection<? extends IAtsObject> atsObjects, IRelationTypeSide side) throws OseeCoreException { Conditions.checkNotNull(artifact, "artifact"); - List<Artifact> newArts = new ArrayList<Artifact>(); + List<Artifact> newArts = new ArrayList<>(); for (IAtsObject version : atsObjects) { Artifact verArt = cache.getArtifact(version); newArts.add(verArt); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/user/AtsUserServiceImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/user/AtsUserServiceImpl.java index 596f88f933c..c5a59c7a549 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/user/AtsUserServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/user/AtsUserServiceImpl.java @@ -98,7 +98,7 @@ public class AtsUserServiceImpl extends AbstractAtsUserService implements IAtsUs @Override public List<IAtsUser> getUsers(Active active) { ensureLoaded(); - List<IAtsUser> users = new ArrayList<IAtsUser>(); + List<IAtsUser> users = new ArrayList<>(); for (Artifact user : ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.User, AtsUtilCore.getAtsBranch())) { Boolean activeFlag = user.getSoleAttributeValue(CoreAttributeTypes.Active, true); if (active == Active.Both || ((active == Active.Active) && activeFlag) || ((active == Active.InActive) && !activeFlag)) { @@ -165,7 +165,7 @@ public class AtsUserServiceImpl extends AbstractAtsUserService implements IAtsUs @Override public Collection<? extends User> toOseeUsers(Collection<? extends IAtsUser> users) throws OseeCoreException { ensureLoaded(); - List<User> results = new LinkedList<User>(); + List<User> results = new LinkedList<>(); for (IAtsUser user : users) { results.add(getOseeUser(user)); } @@ -175,7 +175,7 @@ public class AtsUserServiceImpl extends AbstractAtsUserService implements IAtsUs @Override public Collection<IAtsUser> getAtsUsers(Collection<? extends Artifact> artifacts) throws OseeCoreException { ensureLoaded(); - List<IAtsUser> users = new LinkedList<IAtsUser>(); + List<IAtsUser> users = new LinkedList<>(); for (Artifact artifact : artifacts) { if (artifact instanceof User) { User user = (User) artifact; @@ -189,7 +189,7 @@ public class AtsUserServiceImpl extends AbstractAtsUserService implements IAtsUs @Override public Collection<User> getOseeUsers(Collection<? extends IAtsUser> users) throws OseeCoreException { ensureLoaded(); - List<User> results = new LinkedList<User>(); + List<User> results = new LinkedList<>(); for (IAtsUser user : users) { results.add(getOseeUser(user)); } @@ -219,7 +219,7 @@ public class AtsUserServiceImpl extends AbstractAtsUserService implements IAtsUs @Override public List<User> getOseeUsersSorted(Active active) { List<IAtsUser> activeUsers = getUsers(active); - List<User> oseeUsers = new ArrayList<User>(); + List<User> oseeUsers = new ArrayList<>(); oseeUsers.addAll(getOseeUsers(activeUsers)); Collections.sort(oseeUsers); return oseeUsers; @@ -227,7 +227,7 @@ public class AtsUserServiceImpl extends AbstractAtsUserService implements IAtsUs @Override public List<IAtsUser> getSubscribed(IAtsWorkItem workItem) throws OseeCoreException { - ArrayList<IAtsUser> arts = new ArrayList<IAtsUser>(); + ArrayList<IAtsUser> arts = new ArrayList<>(); for (Artifact art : ((Artifact) workItem.getStoreObject()).getRelatedArtifacts( AtsRelationTypes.SubscribedUser_User)) { arts.add(getUserById((String) art.getSoleAttributeValue(CoreAttributeTypes.UserId))); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workdef/ArtifactResolverImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workdef/ArtifactResolverImpl.java index e393941a875..08b5b0b6129 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workdef/ArtifactResolverImpl.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workdef/ArtifactResolverImpl.java @@ -58,7 +58,7 @@ public class ArtifactResolverImpl implements IArtifactResolver { @SuppressWarnings("unchecked") public <A extends ArtifactId> List<A> get(Collection<? extends IAtsWorkItem> workItems, Class<?> clazz) throws OseeCoreException { Assert.isNotNull(workItems, "Work Items can not be null"); - List<A> arts = new ArrayList<A>(); + List<A> arts = new ArrayList<>(); for (IAtsWorkItem workItem : workItems) { Artifact artifact = get(workItem, clazz); if (artifact != null) { diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workdef/AtsWorkDefinitionCacheProvider.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workdef/AtsWorkDefinitionCacheProvider.java index c90ab0d3485..22ffff7a719 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workdef/AtsWorkDefinitionCacheProvider.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workdef/AtsWorkDefinitionCacheProvider.java @@ -34,7 +34,7 @@ public class AtsWorkDefinitionCacheProvider extends LazyObject<AtsWorkDefinition @Override protected FutureTask<AtsWorkDefinitionCache> createLoaderTask() { Callable<AtsWorkDefinitionCache> newCallable = new LoadAtsWorkDefinitionCacheCallable(workDefinitionService); - FutureTask<AtsWorkDefinitionCache> newTask = new FutureTask<AtsWorkDefinitionCache>(newCallable); + FutureTask<AtsWorkDefinitionCache> newTask = new FutureTask<>(newCallable); return newTask; } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workdef/AtsWorkDefinitionStore.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workdef/AtsWorkDefinitionStore.java index 0c81f70d072..17f2222315a 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workdef/AtsWorkDefinitionStore.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workdef/AtsWorkDefinitionStore.java @@ -32,7 +32,7 @@ public class AtsWorkDefinitionStore implements IAtsWorkDefinitionStore { @Override public List<Pair<String, String>> getWorkDefinitionStrings() throws OseeCoreException { - List<Pair<String, String>> nameToWorkDefStr = new ArrayList<Pair<String, String>>(15); + List<Pair<String, String>> nameToWorkDefStr = new ArrayList<>(15); for (Artifact workDefArt : ArtifactQuery.getArtifactListFromType(Arrays.asList(AtsArtifactTypes.WorkDefinition), AtsUtilCore.getAtsBranch(), DeletionFlag.EXCLUDE_DELETED)) { nameToWorkDefStr.add( diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsAttributeResolverServiceImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsAttributeResolverServiceImpl.java index bf748932692..1dbf475e93c 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsAttributeResolverServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsAttributeResolverServiceImpl.java @@ -120,7 +120,7 @@ public class AtsAttributeResolverServiceImpl implements IAttributeResolver { @SuppressWarnings({"unchecked", "deprecation"}) @Override public <T> Collection<IAttribute<T>> getAttributes(IAtsWorkItem workItem, IAttributeType attributeType) throws OseeCoreException { - List<IAttribute<T>> attrs = new ArrayList<IAttribute<T>>(); + List<IAttribute<T>> attrs = new ArrayList<>(); for (Attribute<Object> attr : AtsClientService.get().getArtifact(workItem).getAttributes(attributeType)) { attrs.add(new AttributeWrapper<T>((Attribute<T>) attr)); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java index 9f532b80e13..a8a7e0d0f98 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/internal/workflow/AtsRelationResolverServiceImpl.java @@ -36,7 +36,7 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver { @Override public Collection<ArtifactId> getRelated(ArtifactId artifact, IRelationTypeSide relationType) { - List<ArtifactId> results = new ArrayList<ArtifactId>(); + List<ArtifactId> results = new ArrayList<>(); Artifact useArt = getArtifact(artifact); if (useArt != null) { for (Artifact art : useArt.getRelatedArtifacts(relationType)) { @@ -49,7 +49,7 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver { @SuppressWarnings("unchecked") @Override public <T extends IAtsObject> Collection<T> getRelated(IAtsObject atsObject, IRelationTypeSide relationType, Class<T> clazz) { - List<T> results = new ArrayList<T>(); + List<T> results = new ArrayList<>(); Artifact useArt = getArtifact(atsObject); if (useArt != null) { for (Artifact art : useArt.getRelatedArtifacts(relationType)) { diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java index 8bd423f8555..486237420fd 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/AbstractReviewArtifact.java @@ -67,7 +67,7 @@ public abstract class AbstractReviewArtifact extends AbstractWorkflowArtifact im } public static List<IAtsUser> getImplementersByState(AbstractWorkflowArtifact workflow, IStateToken state) throws OseeCoreException { - List<IAtsUser> users = new ArrayList<IAtsUser>(); + List<IAtsUser> users = new ArrayList<>(); if (workflow.isCancelled()) { users.add(workflow.getCancelledBy()); } else { @@ -104,7 +104,7 @@ public abstract class AbstractReviewArtifact extends AbstractWorkflowArtifact im } public Set<IAtsTeamDefinition> getCorrespondingTeamDefinition() throws OseeCoreException { - Set<IAtsTeamDefinition> teamDefs = new HashSet<IAtsTeamDefinition>(); + Set<IAtsTeamDefinition> teamDefs = new HashSet<>(); if (getParentTeamWorkflow() != null) { teamDefs.add(getParentTeamWorkflow().getTeamDefinition()); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionOption.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionOption.java index f8aeeafb603..57ea6e736fa 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionOption.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionOption.java @@ -27,7 +27,7 @@ import org.eclipse.osee.framework.logging.OseeLog; */ public class DecisionOption { private String name; - private Collection<IAtsUser> assignees = new HashSet<IAtsUser>(); + private Collection<IAtsUser> assignees = new HashSet<>(); private boolean followupRequired; @Override diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewDefinitionManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewDefinitionManager.java index 08bebf11a5f..993d45e035f 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewDefinitionManager.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewDefinitionManager.java @@ -47,7 +47,7 @@ public class DecisionReviewDefinitionManager extends TransitionAdapter { return null; } // Add current user if no valid users specified - List<IAtsUser> users = new LinkedList<IAtsUser>(); + List<IAtsUser> users = new LinkedList<>(); users.addAll(AtsClientService.get().getUserService().getUsersByUserIds(revDef.getAssignees())); if (users.isEmpty()) { users.add(AtsClientService.get().getUserService().getCurrentUser()); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewManager.java index ae7fbcbe305..4c5bc8e0313 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewManager.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/DecisionReviewManager.java @@ -162,7 +162,7 @@ public class DecisionReviewManager { } public static List<IAtsDecisionReviewOption> getDefaultDecisionReviewOptions() throws OseeCoreException { - List<IAtsDecisionReviewOption> options = new ArrayList<IAtsDecisionReviewOption>(); + List<IAtsDecisionReviewOption> options = new ArrayList<>(); options.add(new SimpleDecisionReviewOption("Yes", true, Arrays.asList(AtsClientService.get().getUserService().getCurrentUser().getUserId()))); options.add(new SimpleDecisionReviewOption("No", false, null)); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ReviewManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ReviewManager.java index dab9e55d12c..3f141dc5024 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ReviewManager.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ReviewManager.java @@ -84,7 +84,7 @@ public class ReviewManager { } public static Collection<AbstractReviewArtifact> getReviews(TeamWorkFlowArtifact teamArt, IStateToken state) throws OseeCoreException { - Set<AbstractReviewArtifact> arts = new HashSet<AbstractReviewArtifact>(); + Set<AbstractReviewArtifact> arts = new HashSet<>(); for (AbstractReviewArtifact revArt : getReviews(teamArt)) { if (revArt.getSoleAttributeValue(AtsAttributeTypes.RelatedToState, "").equals(state.getName())) { arts.add(revArt); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ValidateReviewManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ValidateReviewManager.java index fe514927d3c..7f4feef00f2 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ValidateReviewManager.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/ValidateReviewManager.java @@ -118,7 +118,7 @@ public class ValidateReviewManager { } public static Collection<IAtsUser> getValidateReviewFollowupUsers(TeamWorkFlowArtifact teamArt) throws OseeCoreException { - Collection<IAtsUser> users = new HashSet<IAtsUser>(); + Collection<IAtsUser> users = new HashSet<>(); users.addAll(teamArt.getStateMgr().getAssignees(TeamState.Implement)); if (users.size() > 0) { return users; diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/XDecisionOptions.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/XDecisionOptions.java index 5f1197eaae5..5d2ca739465 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/XDecisionOptions.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/XDecisionOptions.java @@ -40,7 +40,7 @@ public class XDecisionOptions { } public XDecisionOptions(AbstractWorkflowArtifact sma) { - this.smaRef = new WeakReference<AbstractWorkflowArtifact>(sma); + this.smaRef = new WeakReference<>(sma); this.attributeType = AtsAttributeTypes.DecisionReviewOptions; } @@ -61,7 +61,7 @@ public class XDecisionOptions { } public static Set<DecisionOption> getDecisionOptions(String decisionOptions) { - Set<DecisionOption> decOptions = new LinkedHashSet<DecisionOption>(); + Set<DecisionOption> decOptions = new LinkedHashSet<>(); for (String decsionOpt : decisionOptions.split("[\n\r]+")) { DecisionOption state = new DecisionOption(); Result result = state.setFromXml(decsionOpt); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/defect/ReviewDefectItem.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/defect/ReviewDefectItem.java index 7ae426ff678..60e862c41fb 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/defect/ReviewDefectItem.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/defect/ReviewDefectItem.java @@ -44,7 +44,7 @@ public class ReviewDefectItem { Minor, Issue; public static Collection<String> strValues() { - Set<String> values = new HashSet<String>(); + Set<String> values = new HashSet<>(); for (Enum<Severity> e : values()) { values.add(e.name()); } @@ -100,7 +100,7 @@ public class ReviewDefectItem { Reject, Duplicate; public static Collection<String> strValues() { - Set<String> values = new HashSet<String>(); + Set<String> values = new HashSet<>(); for (Enum<Disposition> e : values()) { values.add(e.name()); } @@ -119,7 +119,7 @@ public class ReviewDefectItem { Test, Other; public static Collection<String> strValues() { - Set<String> values = new HashSet<String>(); + Set<String> values = new HashSet<>(); for (Enum<InjectionActivity> e : values()) { values.add(e.name()); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/defect/ReviewDefectManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/defect/ReviewDefectManager.java index 53914b468ae..2fabffcdde9 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/defect/ReviewDefectManager.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/defect/ReviewDefectManager.java @@ -68,7 +68,7 @@ public class ReviewDefectManager { public void ensureLoaded() throws OseeCoreException { if (defectItems == null) { - defectItems = new HashSet<ReviewDefectItem>(); + defectItems = new HashSet<>(); for (String xml : valueProvider.getValues()) { defectMatcher.reset(xml); while (defectMatcher.find()) { @@ -147,7 +147,7 @@ public class ReviewDefectManager { @SuppressWarnings("deprecation") private List<ReviewDefectItem> getStoredDefectItems(Artifact artifact) throws OseeCoreException { // Add new ones: items in userRoles that are not in dbuserRoles - List<ReviewDefectItem> storedDefectItems = new ArrayList<ReviewDefectItem>(); + List<ReviewDefectItem> storedDefectItems = new ArrayList<>(); for (Attribute<?> attr : artifact.getAttributes(REVIEW_STORAGE_TYPE)) { ReviewDefectItem storedRole = new ReviewDefectItem((String) attr.getValue()); storedDefectItems.add(storedRole); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRoleManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRoleManager.java index f02c67192fc..2bf3a94af8b 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRoleManager.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/review/role/UserRoleManager.java @@ -80,7 +80,7 @@ public class UserRoleManager { public void ensureLoaded() throws OseeCoreException { if (roles == null) { - roles = new ArrayList<UserRole>(); + roles = new ArrayList<>(); for (String xml : valueProvider.getValues()) { roleMatcher.reset(xml); while (roleMatcher.find()) { @@ -97,7 +97,7 @@ public class UserRoleManager { } public List<UserRole> getUserRoles(Role role) throws OseeCoreException { - List<UserRole> roles = new ArrayList<UserRole>(); + List<UserRole> roles = new ArrayList<>(); for (UserRole uRole : getUserRoles()) { if (uRole.getRole() == role) { roles.add(uRole); @@ -107,7 +107,7 @@ public class UserRoleManager { } public List<IAtsUser> getRoleUsers(Role role) throws OseeCoreException { - List<IAtsUser> users = new ArrayList<IAtsUser>(); + List<IAtsUser> users = new ArrayList<>(); for (UserRole uRole : getUserRoles()) { if (uRole.getRole() == role && !users.contains(getUser(uRole))) { users.add(getUser(uRole)); @@ -119,7 +119,7 @@ public class UserRoleManager { @SuppressWarnings("deprecation") private List<UserRole> getStoredUserRoles(Artifact artifact) throws OseeCoreException { // Add new ones: items in userRoles that are not in dbuserRoles - List<UserRole> storedUserRoles = new ArrayList<UserRole>(); + List<UserRole> storedUserRoles = new ArrayList<>(); for (Attribute<?> attr : artifact.getAttributes(ATS_ROLE_STORAGE_TYPE)) { UserRole storedRole = new UserRole((String) attr.getValue()); storedUserRoles.add(storedRole); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/search/AtsArtifactQuery.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/search/AtsArtifactQuery.java index 06fc1692401..6b298856212 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/search/AtsArtifactQuery.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/search/AtsArtifactQuery.java @@ -29,7 +29,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; public class AtsArtifactQuery { public static Artifact getArtifactFromId(String guidOrAtsId) throws OseeCoreException { - List<Artifact> artifacts = new LinkedList<Artifact>(); + List<Artifact> artifacts = new LinkedList<>(); if (GUID.isValid(guidOrAtsId)) { artifacts.add(ArtifactQuery.getArtifactFromId(guidOrAtsId, AtsUtilCore.getAtsBranch())); @@ -48,9 +48,9 @@ public class AtsArtifactQuery { } public static List<Artifact> getArtifactListFromIds(Collection<String> guidsOrAtsIds) throws OseeCoreException { - List<Artifact> toReturn = new LinkedList<Artifact>(); - List<String> guids = new LinkedList<String>(); - List<String> atsIds = new LinkedList<String>(); + List<Artifact> toReturn = new LinkedList<>(); + List<String> guids = new LinkedList<>(); + List<String> atsIds = new LinkedList<>(); for (String guidOrAtsId : guidsOrAtsIds) { if (GUID.isValid(guidOrAtsId)) { guids.add(guidOrAtsId); @@ -79,8 +79,8 @@ public class AtsArtifactQuery { } public static List<Artifact> getArtifactListFromIds(List<Long> uuids) { - List<Artifact> toReturn = new LinkedList<Artifact>(); - List<Integer> artIds = new LinkedList<Integer>(); + List<Artifact> toReturn = new LinkedList<>(); + List<Integer> artIds = new LinkedList<>(); for (Long uuid : uuids) { artIds.add(uuid.intValue()); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/search/UserRelatedToAtsObjectSearch.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/search/UserRelatedToAtsObjectSearch.java index 695a9cf681f..8a483c0fc59 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/search/UserRelatedToAtsObjectSearch.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/search/UserRelatedToAtsObjectSearch.java @@ -40,7 +40,7 @@ public class UserRelatedToAtsObjectSearch { } public Collection<Artifact> getResults() throws OseeCoreException { - List<Artifact> arts = new ArrayList<Artifact>(); + List<Artifact> arts = new ArrayList<>(); if (activeObjectsOnly) { arts.addAll(ArtifactQuery.getArtifactListFromAttributeKeywords(AtsUtilCore.getAtsBranch(), diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/AbstractTaskableArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/AbstractTaskableArtifact.java index bfd4b2aed08..1ff69e21bfc 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/AbstractTaskableArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/AbstractTaskableArtifact.java @@ -76,7 +76,7 @@ public abstract class AbstractTaskableArtifact extends AbstractWorkflowArtifact } public Collection<TaskArtifact> getTaskArtifacts(IStateToken state) throws OseeCoreException { - List<TaskArtifact> arts = new ArrayList<TaskArtifact>(); + List<TaskArtifact> arts = new ArrayList<>(); for (TaskArtifact taskArt : getTaskArtifacts()) { if (taskArt.getSoleAttributeValue(AtsAttributeTypes.RelatedToState, "").equals(state.getName())) { arts.add(taskArt); @@ -246,11 +246,11 @@ public abstract class AbstractTaskableArtifact extends AbstractWorkflowArtifact * @param relatedToState State name Tasks must be completed in or null */ public Collection<TaskArtifact> createTasks(List<String> titles, List<IAtsUser> assignees, Date createdDate, IAtsUser createdBy, String relatedToState, IAtsChangeSet changes) throws OseeCoreException { - List<TaskArtifact> tasks = new ArrayList<TaskArtifact>(); + List<TaskArtifact> tasks = new ArrayList<>(); for (String title : titles) { TaskArtifact taskArt = createNewTask(title, createdDate, createdBy, relatedToState, changes); if (assignees != null && !assignees.isEmpty()) { - Set<IAtsUser> users = new HashSet<IAtsUser>(); // NOPMD by b0727536 on 9/29/10 8:51 AM + Set<IAtsUser> users = new HashSet<>(); // NOPMD by b0727536 on 9/29/10 8:51 AM for (IAtsUser art : assignees) { users.add(art); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/CreateTasksOperation.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/CreateTasksOperation.java index ae060c67ee3..48104a5a9ad 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/CreateTasksOperation.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/CreateTasksOperation.java @@ -69,7 +69,7 @@ public class CreateTasksOperation extends AbstractOperation { } private Map<TaskEnum, ITaskOperation> createTaskOperationMap() { - Map<TaskEnum, ITaskOperation> toReturn = new HashMap<TaskEnum, ITaskOperation>(); + Map<TaskEnum, ITaskOperation> toReturn = new HashMap<>(); toReturn.put(TaskEnum.CREATE, new TaskOpCreate(taskTitleProvider)); toReturn.put(TaskEnum.MODIFY, new TaskOpModify()); @@ -78,7 +78,7 @@ public class CreateTasksOperation extends AbstractOperation { } private Map<TaskEnum, ITaskOperation> createReportOnlyTaskOperationMap() { - Map<TaskEnum, ITaskOperation> toReturn = new HashMap<TaskEnum, ITaskOperation>(); + Map<TaskEnum, ITaskOperation> toReturn = new HashMap<>(); toReturn.put(TaskEnum.CREATE, new TaskOpDoNothing(taskTitleProvider)); toReturn.put(TaskEnum.MODIFY, new TaskOpDoNothing(taskTitleProvider)); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/ExecuteTaskOpList.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/ExecuteTaskOpList.java index 3816cac6574..da25f986ac9 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/ExecuteTaskOpList.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/ExecuteTaskOpList.java @@ -22,7 +22,7 @@ import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; */ public class ExecuteTaskOpList { public Map<TaskMetadata, IStatus> execute(List<TaskMetadata> metadatas, Map<TaskEnum, ITaskOperation> ops, IAtsChangeSet changes) throws OseeCoreException { - Map<TaskMetadata, IStatus> statusMap = new HashMap<TaskMetadata, IStatus>(); + Map<TaskMetadata, IStatus> statusMap = new HashMap<>(); for (TaskMetadata metadata : metadatas) { ITaskOperation operation = ops.get(metadata.getTaskEnum()); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/GenerateTaskOpList.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/GenerateTaskOpList.java index 06aa5162aaa..fb85fc9c482 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/GenerateTaskOpList.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/task/createtasks/GenerateTaskOpList.java @@ -39,7 +39,7 @@ public class GenerateTaskOpList { * If destTeamWf is NULL then all tasks will be CREATE. */ public List<TaskMetadata> generate(ChangeData changeData, TeamWorkFlowArtifact destTeamWf) throws OseeCoreException { - List<TaskMetadata> metadatas = new ArrayList<TaskMetadata>(); + List<TaskMetadata> metadatas = new ArrayList<>(); // If task doesn't exist yet for a change then create it for (Change change : changeData.getChanges()) { diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/AtsTeamDefinitionService.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/AtsTeamDefinitionService.java index 73d951cd932..a59abfa94ff 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/AtsTeamDefinitionService.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/AtsTeamDefinitionService.java @@ -53,7 +53,7 @@ public class AtsTeamDefinitionService implements IAtsTeamDefinitionService { @Override public Collection<IAtsVersion> getVersions(IAtsTeamDefinition teamDef) { - List<IAtsVersion> versions = new ArrayList<IAtsVersion>(); + List<IAtsVersion> versions = new ArrayList<>(); for (Artifact verArt : ((Artifact) teamDef.getStoreObject()).getRelatedArtifacts(AtsRelationTypes.TeamDefinitionToVersion_Version)) { versions.add(configFactory.getVersion(verArt)); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowArtifact.java index 6eb7110585c..5db53177692 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowArtifact.java @@ -50,7 +50,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.IATSStateMachineArtifact; */ public class TeamWorkFlowArtifact extends AbstractTaskableArtifact implements IAtsTeamWorkflow, IATSStateMachineArtifact { - private static final Set<Integer> teamArtsWithNoAction = new HashSet<Integer>(); + private static final Set<Integer> teamArtsWithNoAction = new HashSet<>(); private final ActionableItemManager actionableItemsDam; private boolean creatingWorkingBranch = false; private boolean committingWorkingBranch = false; diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowManager.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowManager.java index dbe1d03a20f..18c75b297e7 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowManager.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/team/TeamWorkFlowManager.java @@ -294,7 +294,7 @@ public class TeamWorkFlowManager { * Uses artifact type inheritance to retrieve all TeamWorkflow artifact types */ public static Set<IArtifactType> getTeamWorkflowArtifactTypes() throws OseeCoreException { - Set<IArtifactType> artifactTypes = new HashSet<IArtifactType>(); + Set<IArtifactType> artifactTypes = new HashSet<>(); getTeamWorkflowArtifactTypesRecursive(ArtifactTypeManager.getType(AtsArtifactTypes.TeamWorkflow), artifactTypes); return artifactTypes; } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsChangeSet.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsChangeSet.java index 07effb0be22..94c807be82a 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsChangeSet.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsChangeSet.java @@ -135,7 +135,7 @@ public class AtsChangeSet extends AbstractAtsChangeSet { Conditions.checkNotNull(art, "artifact"); Collection<Object> objects = relChange.getObjects(); Conditions.checkNotNullOrEmpty(objects, "objects"); - Set<Artifact> arts = new HashSet<Artifact>(); + Set<Artifact> arts = new HashSet<>(); for (Object obj2 : objects) { Artifact art2 = getArtifact(obj2); Conditions.checkNotNull(art2, "toArtifact"); @@ -293,7 +293,7 @@ public class AtsChangeSet extends AbstractAtsChangeSet { @Override public void setRelations(Object object, IRelationTypeSide relationSide, Collection<? extends Object> objects) { Artifact artifact = getArtifact(object); - Set<Artifact> artifacts = new HashSet<Artifact>(objects.size()); + Set<Artifact> artifacts = new HashSet<>(objects.size()); for (Object obj : objects) { Artifact art = getArtifact(obj); if (art != null) { diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsUtilClient.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsUtilClient.java index 7214b63a586..9fc2191f346 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsUtilClient.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/util/AtsUtilClient.java @@ -49,7 +49,7 @@ public class AtsUtilClient { AtsArtifactTypes.PeerToPeerReview, AtsArtifactTypes.DecisionReview); private static ArtifactTypeEventFilter teamWorkflowArtifactTypesFilter = new ArtifactTypeEventFilter( AtsArtifactTypes.TeamWorkflow); - private static List<IEventFilter> atsObjectEventFilter = new ArrayList<IEventFilter>(2); + private static List<IEventFilter> atsObjectEventFilter = new ArrayList<>(2); private static boolean emailEnabled = true; private static BranchUuidEventFilter commonBranchGuidEventFilter; @@ -92,7 +92,7 @@ public class AtsUtilClient { */ @SuppressWarnings("unchecked") public static <A extends Artifact> List<A> getActive(Collection<A> artifacts, Active active, Class<? extends Artifact> clazz) throws OseeCoreException { - List<A> results = new ArrayList<A>(); + List<A> results = new ArrayList<>(); Collection<? extends Artifact> artsOfClass = clazz != null ? Collections.castMatching(clazz, artifacts) : artifacts; for (Artifact art : artsOfClass) { diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/validator/ArtifactValueProvider.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/validator/ArtifactValueProvider.java index 34f90ebffa5..3a2cebfa850 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/validator/ArtifactValueProvider.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/validator/ArtifactValueProvider.java @@ -80,7 +80,7 @@ public class ArtifactValueProvider implements IValueProvider { public Collection<Date> getDateValues() throws OseeCoreException { AttributeType attributeType = getAtributeType(); if (attributeType != null) { - List<Date> dates = new ArrayList<Date>(); + List<Date> dates = new ArrayList<>(); for (Attribute<?> attr : artifact.getAttributes(attributeType)) { if (attr instanceof DateAttribute) { dates.add(((DateAttribute) attr).getValue()); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/validator/AtsXWidgetValidateManagerClient.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/validator/AtsXWidgetValidateManagerClient.java index 66b1ab60ee0..f779224fd0d 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/validator/AtsXWidgetValidateManagerClient.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/validator/AtsXWidgetValidateManagerClient.java @@ -42,7 +42,7 @@ public class AtsXWidgetValidateManagerClient implements AtsXWidgetValidatorProvi @Override public Collection<IAtsXWidgetValidator> getValidators() { if (atsValidators == null) { - atsValidators = new ArrayList<IAtsXWidgetValidator>(); + atsValidators = new ArrayList<>(); atsValidators.add(new AtsXHyperlinkMemberSelValidator()); atsValidators.add(new AtsXDefectValidator()); atsValidators.add(new AtsXUserRoleValidator()); @@ -70,7 +70,7 @@ public class AtsXWidgetValidateManagerClient implements AtsXWidgetValidatorProvi public Collection<WidgetResult> validateTransition(AbstractWorkflowArtifact awa, IAtsStateDefinition toStateDef) throws OseeStateException { ensureLoaded(); - List<WidgetResult> results = new ArrayList<WidgetResult>(); + List<WidgetResult> results = new ArrayList<>(); for (IAtsWidgetDefinition widgetDef : AtsClientService.get().getWorkDefinitionAdmin().getWidgetsFromLayoutItems( awa.getStateDefinition())) { ArtifactValueProvider provider = new ArtifactValueProvider(awa, widgetDef); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java index 2e739aff8b8..a10f6f05fcb 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/AbstractWorkflowArtifact.java @@ -123,7 +123,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple @Override public List<IAtsUser> getImplementers() throws OseeCoreException { - List<IAtsUser> implementers = new ArrayList<IAtsUser>(); + List<IAtsUser> implementers = new ArrayList<>(); if (isCompleted()) { String completedFromState = getSoleAttributeValue(AtsAttributeTypes.CompletedFromState, ""); if (Strings.isValid(completedFromState)) { @@ -196,7 +196,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple } private List<Artifact> getBSideArtifacts() throws OseeCoreException { - List<Artifact> sideBArtifacts = new ArrayList<Artifact>(); + List<Artifact> sideBArtifacts = new ArrayList<>(); List<RelationLink> relatives = getRelationsAll(DeletionFlag.EXCLUDE_DELETED); for (RelationLink link : relatives) { Artifact sideB = link.getArtifactB(); @@ -305,7 +305,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple */ public Result isSMAEditorDirty() { try { - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); getSmaArtifactsOneLevel(this, artifacts); for (Artifact artifact : artifacts) { if (artifact instanceof AbstractWorkflowArtifact) { @@ -344,7 +344,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple public void saveSMA(IAtsChangeSet changes) { try { - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); getSmaArtifactsOneLevel(this, artifacts); for (Artifact artifact : artifacts) { if (artifact instanceof AbstractWorkflowArtifact) { @@ -358,7 +358,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple public void revertSMA() { try { - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); getSmaArtifactsOneLevel(this, artifacts); for (Artifact artifact : artifacts) { artifact.reloadAttributesAndRelations(); @@ -748,7 +748,7 @@ public abstract class AbstractWorkflowArtifact extends AbstractAtsArtifact imple } public List<IAtsStateDefinition> getToStatesWithCompleteCancelReturnStates() throws OseeCoreException { - List<IAtsStateDefinition> allPages = new ArrayList<IAtsStateDefinition>(); + List<IAtsStateDefinition> allPages = new ArrayList<>(); IAtsStateDefinition currState = getStateDefinition(); allPages.addAll(currState.getToStates()); if (currState.getStateType().isCompletedState()) { diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/ArtifactNote.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/ArtifactNote.java index e1dc1dc9f6a..82db8a3789f 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/ArtifactNote.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/ArtifactNote.java @@ -29,7 +29,7 @@ public class ArtifactNote implements INoteStorageProvider { private final WeakReference<Artifact> artifactRef; public ArtifactNote(Artifact artifact) { - this.artifactRef = new WeakReference<Artifact>(artifact); + this.artifactRef = new WeakReference<>(artifact); } @Override diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/AtsNote.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/AtsNote.java index bdf41332927..feab6813d8f 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/AtsNote.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/AtsNote.java @@ -87,7 +87,7 @@ public class AtsNote { if (!storeProvder.isNoteable()) { return ""; } - ArrayList<NoteItem> showNotes = new ArrayList<NoteItem>(); + ArrayList<NoteItem> showNotes = new ArrayList<>(); List<NoteItem> noteItems = getNoteItems(); for (NoteItem li : noteItems) { diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/NoteItem.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/NoteItem.java index 77d724d921a..463550811fb 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/NoteItem.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/NoteItem.java @@ -107,7 +107,7 @@ public class NoteItem { } public static List<NoteItem> fromXml(String xml, String atsId) { - List<NoteItem> logItems = new ArrayList<NoteItem>(); + List<NoteItem> logItems = new ArrayList<>(); try { if (Strings.isValid(xml)) { NodeList nodes = Jaxp.readXmlDocument(xml).getElementsByTagName(LOG_ITEM_TAG); diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/NoteType.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/NoteType.java index 1fadf24fda2..478e2a55d2b 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/NoteType.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/note/NoteType.java @@ -33,7 +33,7 @@ public enum NoteType { } public static List<String> getNames() { - List<String> names = new ArrayList<String>(); + List<String> names = new ArrayList<>(); for (NoteType e : NoteType.values()) { names.add(e.name()); } diff --git a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/transition/TransitionListeners.java b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/transition/TransitionListeners.java index c3e1778bffc..8341c3175ba 100644 --- a/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/transition/TransitionListeners.java +++ b/plugins/org.eclipse.osee.ats.core.client/src/org/eclipse/osee/ats/core/client/workflow/transition/TransitionListeners.java @@ -49,7 +49,7 @@ public final class TransitionListeners { */ public synchronized static List<ITransitionListener> getListeners() { if (!loaded) { - listeners = new ArrayList<ITransitionListener>(); + listeners = new ArrayList<>(); listeners.add(new DecisionReviewDefinitionManager()); listeners.add(new PeerReviewDefinitionManager()); diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ActivityIdColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ActivityIdColumnTest.java index d2f1deff0eb..c2eb0e39dfc 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ActivityIdColumnTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ActivityIdColumnTest.java @@ -76,7 +76,7 @@ public class ActivityIdColumnTest { public void testGetWorkPackages_teamWf1() throws OseeCoreException { ActivityIdUtility col = new ActivityIdUtility(earnedValueServiceProvider); - Set<IAtsWorkPackage> workPackages = new HashSet<IAtsWorkPackage>(); + Set<IAtsWorkPackage> workPackages = new HashSet<>(); col.getWorkPackages(teamWf1, workPackages); Assert.assertEquals(1, workPackages.size()); @@ -87,7 +87,7 @@ public class ActivityIdColumnTest { public void testGetWorkPackages_task() throws OseeCoreException { ActivityIdUtility col = new ActivityIdUtility(earnedValueServiceProvider); - Set<IAtsWorkPackage> workPackages = new HashSet<IAtsWorkPackage>(); + Set<IAtsWorkPackage> workPackages = new HashSet<>(); col.getWorkPackages(task1, workPackages); // Each work flow stores it's own work package, so none should be returned diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/AssigneeColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/AssigneeColumnTest.java index fc96fa4485e..6e5c59212ea 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/AssigneeColumnTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/AssigneeColumnTest.java @@ -58,7 +58,7 @@ public class AssigneeColumnTest extends AbstractUserTest { @org.junit.Test public void testGetAssigneeStrFromInWorkWorkflow() throws OseeCoreException { - List<IAtsUser> assigneesToReturn = new ArrayList<IAtsUser>(); + List<IAtsUser> assigneesToReturn = new ArrayList<>(); assigneesToReturn.addAll(Arrays.asList(joe, steve, alice)); when(stateMgr.getStateType()).thenReturn(StateType.Working); when(workItem.getAssignees()).thenReturn(assigneesToReturn); @@ -68,12 +68,12 @@ public class AssigneeColumnTest extends AbstractUserTest { @org.junit.Test public void testGetAssigneeStrFromCompletedWorkflow() throws OseeCoreException { - List<IAtsUser> assigneesToReturn = new ArrayList<IAtsUser>(); + List<IAtsUser> assigneesToReturn = new ArrayList<>(); when(stateMgr.getStateType()).thenReturn(StateType.Working); when(workItem.getAssignees()).thenReturn(assigneesToReturn); Assert.assertEquals("", AssigneeColumn.instance.getAssigneeStr(workItem)); - List<IAtsUser> implementersToReturn = new ArrayList<IAtsUser>(); + List<IAtsUser> implementersToReturn = new ArrayList<>(); when(workItem.getImplementers()).thenReturn(implementersToReturn); when(stateMgr.getStateType()).thenReturn(StateType.Completed); when(workItem.getCompletedBy()).thenReturn(steve); @@ -83,7 +83,7 @@ public class AssigneeColumnTest extends AbstractUserTest { // add alice as completedFromState assignee implementersToReturn.add(steve); when(workItem.getCompletedFromState()).thenReturn("Implement"); - List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>(); + List<IAtsUser> implementStateImplementers = new ArrayList<>(); implementStateImplementers.add(alice); when(stateMgr.getAssigneesForState("Implement")).thenReturn(implementStateImplementers); Assert.assertTrue(AssigneeColumn.instance.getAssigneeStr(workItem).contains("alice")); @@ -97,12 +97,12 @@ public class AssigneeColumnTest extends AbstractUserTest { @org.junit.Test public void testGetAssigneeStrFromCancelledWorkflow() throws OseeCoreException { - List<IAtsUser> assigneesToReturn = new ArrayList<IAtsUser>(); + List<IAtsUser> assigneesToReturn = new ArrayList<>(); when(stateMgr.getStateType()).thenReturn(StateType.Working); when(workItem.getAssignees()).thenReturn(assigneesToReturn); Assert.assertEquals("", AssigneeColumn.instance.getAssigneeStr(workItem)); - List<IAtsUser> implementersToReturn = new ArrayList<IAtsUser>(); + List<IAtsUser> implementersToReturn = new ArrayList<>(); when(workItem.getImplementers()).thenReturn(implementersToReturn); when(stateMgr.getStateType()).thenReturn(StateType.Cancelled); when(workItem.getCancelledBy()).thenReturn(steve); @@ -111,7 +111,7 @@ public class AssigneeColumnTest extends AbstractUserTest { // add alice as completedFromState assignee implementersToReturn.add(steve); when(workItem.getCancelledFromState()).thenReturn("Implement"); - List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>(); + List<IAtsUser> implementStateImplementers = new ArrayList<>(); implementStateImplementers.add(alice); when(stateMgr.getAssigneesForState("Implement")).thenReturn(implementStateImplementers); Assert.assertTrue(AssigneeColumn.instance.getAssigneeStr(workItem).contains("alice")); @@ -126,13 +126,13 @@ public class AssigneeColumnTest extends AbstractUserTest { @org.junit.Test public void testGetAssigneesStr_hasActions_oneWorkingOneCancelled() throws OseeCoreException { - List<IAtsUser> assigneesToReturn = new ArrayList<IAtsUser>(); + List<IAtsUser> assigneesToReturn = new ArrayList<>(); when(stateMgr.getStateType()).thenReturn(StateType.Working); when(workItem.getAssignees()).thenReturn(assigneesToReturn); when(stateMgr2.getStateType()).thenReturn(StateType.Cancelled); when(workItem2.getCancelledFromState()).thenReturn("Implement"); - List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>(); + List<IAtsUser> implementStateImplementers = new ArrayList<>(); implementStateImplementers.add(joe); when(workItem2.getImplementers()).thenReturn(implementStateImplementers); @@ -171,12 +171,12 @@ public class AssigneeColumnTest extends AbstractUserTest { @org.junit.Test public void testGetAssigneesStr_hasActions_twoWorkingDuplicates() throws OseeCoreException { - List<IAtsUser> assigneesToReturn = new ArrayList<IAtsUser>(); + List<IAtsUser> assigneesToReturn = new ArrayList<>(); assigneesToReturn.add(steve); when(workItem.getAssignees()).thenReturn(assigneesToReturn); when(stateMgr.getStateType()).thenReturn(StateType.Working); - List<IAtsUser> assigneesToReturn2 = new ArrayList<IAtsUser>(); + List<IAtsUser> assigneesToReturn2 = new ArrayList<>(); assigneesToReturn2.add(steve); when(workItem2.getAssignees()).thenReturn(assigneesToReturn2); when(stateMgr2.getStateType()).thenReturn(StateType.Working); diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ImplementersColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ImplementersColumnTest.java index 337d759106e..b3c9a2e83ee 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ImplementersColumnTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ImplementersColumnTest.java @@ -75,7 +75,7 @@ public class ImplementersColumnTest extends AbstractUserTest { */ @org.junit.Test public void testGetImplementersStrFromInWorkWorkflow_blankIfAssigned() throws OseeCoreException { - List<IAtsUser> assigneesToReturn = new ArrayList<IAtsUser>(); + List<IAtsUser> assigneesToReturn = new ArrayList<>(); assigneesToReturn.addAll(Arrays.asList(steve, alice)); when(workItem.getStateMgr().getStateType()).thenReturn(StateType.Working); when(workItem.getAssignees()).thenReturn(assigneesToReturn); @@ -114,7 +114,7 @@ public class ImplementersColumnTest extends AbstractUserTest { */ @org.junit.Test public void testGetImplementersStrFromCompletedCancelledWorkflow_completedByAndAssignee() throws OseeCoreException { - List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>(); + List<IAtsUser> implementStateImplementers = new ArrayList<>(); implementStateImplementers.add(alice); when(workItem.getStateMgr().getStateType()).thenReturn(StateType.Completed); @@ -137,9 +137,9 @@ public class ImplementersColumnTest extends AbstractUserTest { */ @org.junit.Test public void testGetImplementersStrFromCompletedCancelledWorkflow_completedByAndAssigneeWithUnassigned() throws OseeCoreException { - List<IAtsUser> implementersToReturn = new ArrayList<IAtsUser>(); + List<IAtsUser> implementersToReturn = new ArrayList<>(); implementersToReturn.add(alice); - List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>(); + List<IAtsUser> implementStateImplementers = new ArrayList<>(); implementStateImplementers.add(AtsCoreUsers.UNASSIGNED_USER); when(workItem.getImplementers()).thenReturn(implementersToReturn); @@ -164,7 +164,7 @@ public class ImplementersColumnTest extends AbstractUserTest { */ @org.junit.Test public void testGetImplementersStrFromCompletedCancelledWorkflow_duplicatesHandled() throws OseeCoreException { - List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>(); + List<IAtsUser> implementStateImplementers = new ArrayList<>(); implementStateImplementers.add(alice); implementStateImplementers.add(steve); @@ -189,26 +189,26 @@ public class ImplementersColumnTest extends AbstractUserTest { @org.junit.Test public void testGetImplementersStrFromCompletedCancelledWorkflow_fromAll() throws OseeCoreException { - List<IAtsUser> implementersToReturn = new ArrayList<IAtsUser>(); + List<IAtsUser> implementersToReturn = new ArrayList<>(); when(workItem.getImplementers()).thenReturn(implementersToReturn); when(workItem.getStateMgr().getStateType()).thenReturn(StateType.Completed); when(workItem.getCompletedBy()).thenReturn(steve); implementersToReturn.add(joe); when(workItem.getCompletedFromState()).thenReturn("Implement"); - List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>(); + List<IAtsUser> implementStateImplementers = new ArrayList<>(); implementStateImplementers.add(alice); when(stateMgr.getAssigneesForState("Implement")).thenReturn(implementStateImplementers); Assert.assertTrue(ImplementersColumn.instance.getImplementersStr(workItem).contains("alice")); Assert.assertTrue(ImplementersColumn.instance.getImplementersStr(workItem).contains("joe")); Assert.assertTrue(ImplementersColumn.instance.getImplementersStr(workItem).contains("steve")); - implementersToReturn = new ArrayList<IAtsUser>(); + implementersToReturn = new ArrayList<>(); when(workItem.getImplementers()).thenReturn(implementersToReturn); when(workItem.getStateMgr().getStateType()).thenReturn(StateType.Cancelled); when(workItem.getCancelledBy()).thenReturn(steve); implementersToReturn.add(joe); when(workItem.getCancelledFromState()).thenReturn("Implement"); - implementStateImplementers = new ArrayList<IAtsUser>(); + implementStateImplementers = new ArrayList<>(); implementStateImplementers.add(alice); when(stateMgr.getAssigneesForState("Implement")).thenReturn(implementStateImplementers); Assert.assertTrue(ImplementersColumn.instance.getImplementersStr(workItem).contains("alice")); @@ -219,9 +219,9 @@ public class ImplementersColumnTest extends AbstractUserTest { @org.junit.Test public void testGetImplementersStrFromCompletedWorkflow_duplicates() throws OseeCoreException { - List<IAtsUser> implementersToReturn = new ArrayList<IAtsUser>(); + List<IAtsUser> implementersToReturn = new ArrayList<>(); implementersToReturn.add(alice); - List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>(); + List<IAtsUser> implementStateImplementers = new ArrayList<>(); implementStateImplementers.add(alice); when(workItem.getImplementers()).thenReturn(implementersToReturn); @@ -241,14 +241,14 @@ public class ImplementersColumnTest extends AbstractUserTest { @org.junit.Test public void testGetImplementers_fromCompletedCancelledBy_noDuplicatesIfInImplementersAndCompletedBy() throws OseeCoreException { - List<IAtsUser> implementStateImplementers = new ArrayList<IAtsUser>(); + List<IAtsUser> implementStateImplementers = new ArrayList<>(); implementStateImplementers.add(alice); when(workItem.getStateMgr().getStateType()).thenReturn(StateType.Completed); when(workItem.getCompletedFromState()).thenReturn("Implement"); when(workItem.getCompletedBy()).thenReturn(alice); when(stateMgr.getAssigneesForState("Implement")).thenReturn(implementStateImplementers); - List<IAtsUser> implementers = new ArrayList<IAtsUser>(); + List<IAtsUser> implementers = new ArrayList<>(); ImplementersColumn.instance.getImplementers_fromCompletedCancelledBy(workItem, implementers); Assert.assertEquals(implementers.iterator().next(), alice); @@ -257,7 +257,7 @@ public class ImplementersColumnTest extends AbstractUserTest { when(workItem.getCancelledBy()).thenReturn(alice); when(workItem.getCancelledFromState()).thenReturn("Implement"); when(stateMgr.getAssigneesForState("Implement")).thenReturn(implementStateImplementers); - implementers = new ArrayList<IAtsUser>(); + implementers = new ArrayList<>(); ImplementersColumn.instance.getImplementers_fromCompletedCancelledBy(workItem, implementers); Assert.assertEquals(implementers.iterator().next(), alice); } @@ -265,7 +265,7 @@ public class ImplementersColumnTest extends AbstractUserTest { @org.junit.Test public void testGetImplementers_fromWorkItem_noDuplicates() throws OseeCoreException { MockWorkItem workItem = new MockWorkItem("this", "Completed", StateType.Completed); - List<IAtsUser> implementers = new ArrayList<IAtsUser>(); + List<IAtsUser> implementers = new ArrayList<>(); implementers.add(alice); workItem.addImplementer(alice); ImplementersColumn.instance.getImplementers_fromWorkItem(workItem, implementers); diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/log/AtsLogFactoryTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/log/AtsLogFactoryTest.java index eebed12a59c..32332beb1ee 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/log/AtsLogFactoryTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/log/AtsLogFactoryTest.java @@ -49,7 +49,7 @@ public class AtsLogFactoryTest { public void setup() throws OseeCoreException { MockitoAnnotations.initMocks(this); - List<IAtsLogItem> items = new ArrayList<IAtsLogItem>(); + List<IAtsLogItem> items = new ArrayList<>(); when(workItem.getLog()).thenReturn(log); when(log.getLogItems()).thenReturn(items); } diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerStoreTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerStoreTest.java index 237e38c3958..9dcf8f1cf1d 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerStoreTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerStoreTest.java @@ -150,7 +150,7 @@ public class StateManagerStoreTest { Assert.assertEquals(2, stateMgr.getAssignees().size()); when(workItem.getStateMgr()).thenReturn(stateMgr); - List<Object> objects = new ArrayList<Object>(); + List<Object> objects = new ArrayList<>(); when(changes.getObjects()).thenReturn(objects); IExecuteListener listener = StateManagerStore.getPostPersistExecutionListener(asUser, workItem, stateMgr, stateMgr.getAssigneesAdded(), diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerTest.java index 3b27789acd4..e51a334e43f 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/internal/state/StateManagerTest.java @@ -93,7 +93,7 @@ public class StateManagerTest extends AbstractUserTest { stateMgr.addAssignees("endorse", null); Assert.assertTrue(stateMgr.getAssignees().isEmpty()); - List<IAtsUser> users = new ArrayList<IAtsUser>(); + List<IAtsUser> users = new ArrayList<>(); stateMgr.addAssignees("endorse", users); Assert.assertTrue(stateMgr.getAssignees().isEmpty()); @@ -125,7 +125,7 @@ public class StateManagerTest extends AbstractUserTest { stateMgr.setAssignee(null); Assert.assertTrue(stateMgr.getAssignees().isEmpty()); - List<IAtsUser> users = new ArrayList<IAtsUser>(); + List<IAtsUser> users = new ArrayList<>(); stateMgr.setAssignees("endorse", users); Assert.assertTrue(stateMgr.getAssignees().isEmpty()); diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockState.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockState.java index 5f20d444172..018c5f6d3aa 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockState.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/mock/MockState.java @@ -20,7 +20,7 @@ import org.eclipse.osee.ats.api.user.IAtsUser; public class MockState { private final String name; - private final List<IAtsUser> assignees = new LinkedList<IAtsUser>(); + private final List<IAtsUser> assignees = new LinkedList<>(); private double hoursSpent = 0; private int percentComplete = 0; diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/AtsUsersUtilityTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/AtsUsersUtilityTest.java index bcb5530068d..43144f0e848 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/AtsUsersUtilityTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/AtsUsersUtilityTest.java @@ -26,7 +26,7 @@ public class AtsUsersUtilityTest extends AbstractUserTest { @Test public void testGetValidEmailUsers() throws OseeCoreException { - Set<IAtsUser> users = new HashSet<IAtsUser>(); + Set<IAtsUser> users = new HashSet<>(); users.add(joe); users.add(steve); users.add(alice); @@ -42,7 +42,7 @@ public class AtsUsersUtilityTest extends AbstractUserTest { @Test public void testGetActiveEmailUsers() throws OseeCoreException { - Set<IAtsUser> users = new HashSet<IAtsUser>(); + Set<IAtsUser> users = new HashSet<>(); users.add(joe); users.add(steve); users.add(alice); diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/CoreAtsUsersTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/CoreAtsUsersTest.java index 359c0ec33ea..b70abeff774 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/CoreAtsUsersTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/users/CoreAtsUsersTest.java @@ -127,7 +127,7 @@ public class CoreAtsUsersTest { IAtsUser mapToE = user1; IAtsUser alsoMapToE = user1; - HashMap<IAtsUser, Double> hash = new HashMap<IAtsUser, Double>(); + HashMap<IAtsUser, Double> hash = new HashMap<>(); hash.put(mapToPi, Math.PI); hash.put(mapToE, Math.E); diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsObjectsTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsObjectsTest.java index c39bf11c6ac..792a40277b0 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsObjectsTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/util/AtsObjectsTest.java @@ -31,7 +31,7 @@ public class AtsObjectsTest { @Test public void testToUuids() { - List<IAtsObject> objs = new ArrayList<IAtsObject>(); + List<IAtsObject> objs = new ArrayList<>(); objs.add(AtsCoreUsers.SYSTEM_USER); objs.add(AtsCoreUsers.GUEST_USER); Assert.assertEquals(Arrays.asList(AtsCoreUsers.SYSTEM_USER.getUuid(), AtsCoreUsers.GUEST_USER.getUuid()), @@ -42,7 +42,7 @@ public class AtsObjectsTest { public void testToString() { Assert.assertEquals("", AtsObjects.toString("; ", Collections.emptyList())); - List<Object> objs = new ArrayList<Object>(); + List<Object> objs = new ArrayList<>(); objs.add(AtsCoreUsers.SYSTEM_USER); objs.add(AtsCoreUsers.GUEST_USER); objs.add(AtsCoreUsers.UNASSIGNED_USER); @@ -54,7 +54,7 @@ public class AtsObjectsTest { @Test public void testGetNames() { - List<IAtsObject> objs = new ArrayList<IAtsObject>(); + List<IAtsObject> objs = new ArrayList<>(); objs.add(AtsCoreUsers.SYSTEM_USER); objs.add(AtsCoreUsers.GUEST_USER); objs.add(AtsCoreUsers.UNASSIGNED_USER); diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/AtsXWidgetValidateManagerTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/AtsXWidgetValidateManagerTest.java index d2a993bc01f..fe5d9e35cb3 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/AtsXWidgetValidateManagerTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/AtsXWidgetValidateManagerTest.java @@ -32,7 +32,7 @@ public class AtsXWidgetValidateManagerTest { @Test public void testValidateTransition_emptyValidators() { - List<WidgetResult> results = new LinkedList<WidgetResult>(); + List<WidgetResult> results = new LinkedList<>(); AtsXWidgetValidateManager manager = new AtsXWidgetValidateManager(); manager.validateTransition(results, ValidatorTestUtil.emptyValueProvider, null, null, null, atsServices); @@ -41,7 +41,7 @@ public class AtsXWidgetValidateManagerTest { @Test public void testValidateTransition_validValidators() { - List<WidgetResult> results = new LinkedList<WidgetResult>(); + List<WidgetResult> results = new LinkedList<>(); AtsXWidgetValidateManager manager = new AtsXWidgetValidateManager(); manager.add(new TestValidatorProvider(new AtsValidator())); @@ -51,7 +51,7 @@ public class AtsXWidgetValidateManagerTest { @Test public void testValidateTransition_inValidValidators() { - List<WidgetResult> results = new LinkedList<WidgetResult>(); + List<WidgetResult> results = new LinkedList<>(); AtsXWidgetValidateManager manager = new AtsXWidgetValidateManager(); manager.add(new TestValidatorProvider(new AtsErrorValidator())); @@ -61,7 +61,7 @@ public class AtsXWidgetValidateManagerTest { @Test public void testValidateTransition_exceptoinValidators() { - List<WidgetResult> results = new LinkedList<WidgetResult>(); + List<WidgetResult> results = new LinkedList<>(); AtsXWidgetValidateManager manager = new AtsXWidgetValidateManager(); manager.add(new TestValidatorProvider(new AtsExceptoinValidator())); @@ -111,7 +111,7 @@ public class AtsXWidgetValidateManagerTest { private final LinkedList<IAtsXWidgetValidator> validators; public TestValidatorProvider(IAtsXWidgetValidator validator) { - validators = new LinkedList<IAtsXWidgetValidator>(); + validators = new LinkedList<>(); validators.add(validator); } diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockRuleManager.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockRuleManager.java index be3376b6973..f013e82dcfd 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockRuleManager.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockRuleManager.java @@ -18,7 +18,7 @@ import java.util.List; */ public class MockRuleManager { - public List<String> rules = new ArrayList<String>(); + public List<String> rules = new ArrayList<>(); public List<String> getRules() { return rules; diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockStateDefinition.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockStateDefinition.java index 06d8c19430b..e59d399d84f 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockStateDefinition.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockStateDefinition.java @@ -27,13 +27,13 @@ public class MockStateDefinition implements IAtsStateDefinition { private StateType StateType; private int ordinal = 0; - private final List<IAtsLayoutItem> stateItems = new ArrayList<IAtsLayoutItem>(5); + private final List<IAtsLayoutItem> stateItems = new ArrayList<>(5); private final MockRuleManager ruleMgr = new MockRuleManager(); - private final List<IAtsStateDefinition> toStates = new ArrayList<IAtsStateDefinition>(5); + private final List<IAtsStateDefinition> toStates = new ArrayList<>(5); private IAtsStateDefinition defaultToState; - private final List<IAtsStateDefinition> overrideAttributeValidationStates = new ArrayList<IAtsStateDefinition>(5); - private final List<IAtsDecisionReviewDefinition> decisionReviews = new ArrayList<IAtsDecisionReviewDefinition>(); - private final List<IAtsPeerReviewDefinition> peerReviews = new ArrayList<IAtsPeerReviewDefinition>(); + private final List<IAtsStateDefinition> overrideAttributeValidationStates = new ArrayList<>(5); + private final List<IAtsDecisionReviewDefinition> decisionReviews = new ArrayList<>(); + private final List<IAtsPeerReviewDefinition> peerReviews = new ArrayList<>(); private IAtsWorkDefinition workDefinition; private int stateWeight = 0; private Integer recommendedPercentComplete = null; diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockWidgetDefinition.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockWidgetDefinition.java index 2e3022fa5e4..b7f21a1d549 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockWidgetDefinition.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/validator/MockWidgetDefinition.java @@ -30,7 +30,7 @@ public class MockWidgetDefinition implements IAtsWidgetDefinition { private String xWidgetName; private String defaultValue; private final WidgetOptionHandler options = new WidgetOptionHandler(); - private final List<IAtsWidgetConstraint> constraints = new ArrayList<IAtsWidgetConstraint>(); + private final List<IAtsWidgetConstraint> constraints = new ArrayList<>(); private String name; public MockWidgetDefinition(String name) { diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsWorkDefinitionAdminImplTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsWorkDefinitionAdminImplTest.java index 2a0b6343830..38b2b82dde4 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsWorkDefinitionAdminImplTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/AtsWorkDefinitionAdminImplTest.java @@ -130,7 +130,7 @@ public class AtsWorkDefinitionAdminImplTest { */ @Test public void testGetWorkDefinitionForPeerToPeerReviewIAtsTeamWorkflowIAtsPeerToPeerReview__fromReview() throws Exception { - List<Object> attrValues = new ArrayList<Object>(); + List<Object> attrValues = new ArrayList<>(); attrValues.add(MyPeerToPeerWorkDefId); when(attributeResolver.getAttributeValues(peerReview, AtsAttributeTypes.WorkflowDefinition)).thenReturn( attrValues); @@ -146,7 +146,7 @@ public class AtsWorkDefinitionAdminImplTest { @Test public void testGetWorkDefinitionForPeerToPeerReviewNotYetCreatedAndStandalone() throws Exception { when(teamWf.getTeamDefinition()).thenReturn(featureTeamDef); - List<Object> attrValues = new ArrayList<Object>(); + List<Object> attrValues = new ArrayList<>(); attrValues.add(MyPeerToPeerWorkDefId); when( attributeResolver.getAttributeValues(topTeamDef, AtsAttributeTypes.RelatedPeerWorkflowDefinition)).thenReturn( @@ -186,7 +186,7 @@ public class AtsWorkDefinitionAdminImplTest { workDefAmin.getPeerToPeerWorkDefinitionFromTeamDefinitionAttributeValueRecurse(featureTeamDef).isMatched()); // Setup that top team definition has WorkDefinition defined - List<Object> attrValues = new ArrayList<Object>(); + List<Object> attrValues = new ArrayList<>(); attrValues.add(MyPeerToPeerWorkDefId); when( attributeResolver.getAttributeValues(topTeamDef, AtsAttributeTypes.RelatedPeerWorkflowDefinition)).thenReturn( diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/MockWorkDefinition.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/MockWorkDefinition.java index 49ccd45362d..32543d8c1a3 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/MockWorkDefinition.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workdef/MockWorkDefinition.java @@ -21,7 +21,7 @@ import org.eclipse.osee.framework.jdk.core.type.Identity; */ public class MockWorkDefinition implements IAtsWorkDefinition { - private final List<IAtsStateDefinition> states = new ArrayList<IAtsStateDefinition>(5); + private final List<IAtsStateDefinition> states = new ArrayList<>(5); private String id; private IAtsStateDefinition startState; private String name; diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCoreTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCoreTest.java index ec800ca87f2..8008d986cbc 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCoreTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/WorkflowManagerCoreTest.java @@ -39,7 +39,7 @@ public class WorkflowManagerCoreTest { @Mock private IAtsTask task; @Mock private IAtsUser Joe, Mary; // @formatter:on - List<IAtsUser> assignees = new ArrayList<IAtsUser>(); + List<IAtsUser> assignees = new ArrayList<>(); @Before public void setup() { diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtilityTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtilityTest.java index 2fb11740b87..7dc4a34bbbe 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtilityTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtilityTest.java @@ -117,7 +117,7 @@ public class StateManagerUtilityTest { // test no visited states when(attrResolver.getSoleAttributeValue(workItem, AtsAttributeTypes.CurrentState, null)).thenReturn("Analyze;;;"); - List<String> emptyVisitedNames = new ArrayList<String>(); + List<String> emptyVisitedNames = new ArrayList<>(); when(stateMgr.getVisitedStateNames()).thenReturn(emptyVisitedNames); result = StateManagerUtility.isDirtyResult(workItem, stateMgr, attrResolver, workStateFactory); Assert.assertFalse(result.isTrue()); diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapterTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapterTest.java index 0495acdf640..685bc9d0267 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapterTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelperAdapterTest.java @@ -80,7 +80,7 @@ public class TransitionHelperAdapterTest { @Test public void testIsSystemUserAssignee() { when(workItem.getStateMgr()).thenReturn(stateMgr); - List<IAtsUser> assignees = new ArrayList<IAtsUser>(); + List<IAtsUser> assignees = new ArrayList<>(); when(stateMgr.getAssignees()).thenReturn(assignees); Assert.assertFalse(helper.isSystemUserAssingee(workItem)); diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionStatusDataTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionStatusDataTest.java index 04811221a09..989fb4f8d9e 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionStatusDataTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/workflow/transition/TransitionStatusDataTest.java @@ -42,7 +42,7 @@ public class TransitionStatusDataTest { public void setup() throws OseeCoreException { MockitoAnnotations.initMocks(this); - List<IAtsWorkItem> workItems = new ArrayList<IAtsWorkItem>(); + List<IAtsWorkItem> workItems = new ArrayList<>(); workItems.add(workItem); workItems.add(workItem2); data = new TransitionStatusData(workItems, false); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java index 04537f3d810..dee46789f85 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ActionableItemManager.java @@ -43,7 +43,7 @@ public class ActionableItemManager { } public Set<IAtsActionableItem> getActionableItems(IAtsObject atsObject) throws OseeCoreException { - Set<IAtsActionableItem> ais = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> ais = new HashSet<>(); if (!atsStoreService.isDeleted(atsObject)) { for (String guid : getActionableItemGuids(atsObject)) { long uuid = atsStoreService.getUuidFromGuid(guid); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ModifyActionableItems.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ModifyActionableItems.java index c51da10bb7a..0429d1d7f3a 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ModifyActionableItems.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ModifyActionableItems.java @@ -42,9 +42,9 @@ public class ModifyActionableItems { private final Collection<IAtsActionableItem> currWorkflowDesiredAIs; private final Collection<IAtsActionableItem> newAIs; private final IAtsUser modifiedBy; - private final List<CreateTeamData> teamDatas = new ArrayList<CreateTeamData>(); - private final List<IAtsActionableItem> addAis = new ArrayList<IAtsActionableItem>(); - private final List<IAtsActionableItem> removeAis = new ArrayList<IAtsActionableItem>(); + private final List<CreateTeamData> teamDatas = new ArrayList<>(); + private final List<IAtsActionableItem> addAis = new ArrayList<>(); + private final List<IAtsActionableItem> removeAis = new ArrayList<>(); private final Map<IAtsTeamDefinition, CreateTeamData> teamDefToTeamDataMap = new HashMap<IAtsTeamDefinition, CreateTeamData>(); private final ITeamDefinitionUtility teamDefUtil; @@ -70,8 +70,8 @@ public class ModifyActionableItems { } private void processAisAddedForNewWorkflows() throws OseeCoreException { - Set<IAtsActionableItem> allAIsForNewWorkflow = new HashSet<IAtsActionableItem>(); - Set<IAtsActionableItem> duplicatedAIs = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> allAIsForNewWorkflow = new HashSet<>(); + Set<IAtsActionableItem> duplicatedAIs = new HashSet<>(); // determine AIs that already have a team workflow associated for (IAtsActionableItem checkAi : newAIs) { if (!checkAi.isActionable()) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ActionableItemsColumn.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ActionableItemsColumn.java index b9105dff20e..671de453f4b 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ActionableItemsColumn.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ActionableItemsColumn.java @@ -36,7 +36,7 @@ public class ActionableItemsColumn { } public static String getActionableItemsStr(IAtsObject atsObject) throws OseeCoreException { - List<IAtsActionableItem> ais = new ArrayList<IAtsActionableItem>(); + List<IAtsActionableItem> ais = new ArrayList<>(); ais.addAll(getActionableItems(atsObject)); java.util.Collections.sort(ais, new Comparator<IAtsActionableItem>() { @@ -57,7 +57,7 @@ public class ActionableItemsColumn { } public static Collection<IAtsActionableItem> getActionableItems(IAtsObject atsObject) throws OseeCoreException { - Set<IAtsActionableItem> ais = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> ais = new HashSet<>(); // If object has children team workflows, roll-up results of all ais if (atsObject instanceof IAtsTeamWorkflowProvider) { for (IAtsTeamWorkflow team : ((IAtsTeamWorkflowProvider) atsObject).getTeamWorkflows()) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AssigneeColumn.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AssigneeColumn.java index 67391b8f1b6..45d8e089389 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AssigneeColumn.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/AssigneeColumn.java @@ -40,8 +40,8 @@ public class AssigneeColumn { if (atsObject instanceof HasActions) { HasActions hasActions = (HasActions) atsObject; // ensure consistent order by using lists - List<IAtsUser> pocs = new ArrayList<IAtsUser>(); - List<IAtsUser> implementers = new ArrayList<IAtsUser>(); + List<IAtsUser> pocs = new ArrayList<>(); + List<IAtsUser> implementers = new ArrayList<>(); for (IAtsWorkItem action : hasActions.getActions()) { if (action.getStateMgr().getStateType().isCompletedOrCancelled()) { for (IAtsUser user : action.getImplementers()) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ColorTeamColumn.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ColorTeamColumn.java index 875bd6a353b..8227b855584 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ColorTeamColumn.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ColorTeamColumn.java @@ -29,7 +29,7 @@ public class ColorTeamColumn { public static final String ATS_COLOR_TEAM_COLUMN_ID = "ats.Color Team"; public static Pair<String, Boolean> getWorkItemColorTeam(IAtsWorkItem workItem, IAtsServices atsServices) { - Pair<String, Boolean> result = new Pair<String, Boolean>(null, false); + Pair<String, Boolean> result = new Pair<>(null, false); IAttributeResolver attributeResolver = atsServices.getAttributeResolver(); String workPackageGuid = attributeResolver.getSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageGuid, null); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ImplementersColumn.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ImplementersColumn.java index 5fae7dba991..0f98916e3e0 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ImplementersColumn.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ImplementersColumn.java @@ -48,7 +48,7 @@ public class ImplementersColumn implements ImplementersStringProvider { } public List<IAtsUser> getImplementers(IAtsObject atsObject) throws OseeCoreException { - List<IAtsUser> implementers = new LinkedList<IAtsUser>(); + List<IAtsUser> implementers = new LinkedList<>(); if (atsObject instanceof IActionGroup) { implementers.addAll(getActionGroupImplementers((IActionGroup) atsObject)); } else if (atsObject instanceof IAtsWorkItem) { @@ -60,7 +60,7 @@ public class ImplementersColumn implements ImplementersStringProvider { } public List<IAtsUser> getWorkItemImplementers(IAtsWorkItem workItem) throws OseeCoreException { - List<IAtsUser> implementers = new ArrayList<IAtsUser>(); + List<IAtsUser> implementers = new ArrayList<>(); getImplementers_fromWorkItem(workItem, implementers); getImplementers_fromCompletedCancelledBy(workItem, implementers); getImplementers_fromCompletedCancelledFrom(workItem, implementers); @@ -109,7 +109,7 @@ public class ImplementersColumn implements ImplementersStringProvider { } public List<IAtsUser> getActionGroupImplementers(IActionGroup actionGroup) throws OseeCoreException { - List<IAtsUser> implementers = new LinkedList<IAtsUser>(); + List<IAtsUser> implementers = new LinkedList<>(); for (IAtsWorkItem action : actionGroup.getActions()) { if (action.getStateMgr().getStateType().isCompletedOrCancelled()) { for (IAtsUser user : getWorkItemImplementers(action)) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/ActionableItems.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/ActionableItems.java index 1879e7489ab..48d0ba77c48 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/ActionableItems.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/ActionableItems.java @@ -30,7 +30,7 @@ import org.eclipse.osee.framework.jdk.core.util.Collections; public class ActionableItems { public static Collection<String> getNames(Collection<? extends IAtsActionableItem> ais) { - ArrayList<String> names = new ArrayList<String>(); + ArrayList<String> names = new ArrayList<>(); for (IAtsActionableItem ai : ais) { names.add(ai.getName()); } @@ -53,7 +53,7 @@ public class ActionableItems { } public static Set<IAtsActionableItem> getAIsFromItemAndChildren(IAtsActionableItem ai) throws OseeCoreException { - Set<IAtsActionableItem> ais = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> ais = new HashSet<>(); ais.add(ai); for (IAtsActionableItem art : ai.getChildrenActionableItems()) { ais.addAll(getAIsFromItemAndChildren(art)); @@ -66,7 +66,7 @@ public class ActionableItems { } public static Set<IAtsActionableItem> getActionableItemsFromItemAndChildren(IAtsActionableItem ai) throws OseeCoreException { - Set<IAtsActionableItem> ais = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> ais = new HashSet<>(); getActionableItemsFromItemAndChildren(ai, ais); return ais; } @@ -81,7 +81,7 @@ public class ActionableItems { } public static Set<IAtsActionableItem> getActionableItems(Collection<String> actionableItemNames, IAtsConfig config) throws OseeCoreException { - Set<IAtsActionableItem> ais = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> ais = new HashSet<>(); for (String actionableItemName : actionableItemNames) { for (IAtsActionableItem ai : config.get(IAtsActionableItem.class)) { if (ai.getName().equals(actionableItemName)) { @@ -121,7 +121,7 @@ public class ActionableItems { } public static List<IAtsActionableItem> getActive(Collection<IAtsActionableItem> ais, Active active) { - List<IAtsActionableItem> results = new ArrayList<IAtsActionableItem>(); + List<IAtsActionableItem> results = new ArrayList<>(); for (IAtsActionableItem ai : ais) { if (active == Active.Both) { results.add(ai); @@ -139,7 +139,7 @@ public class ActionableItems { } public static Set<IAtsActionableItem> getChildren(IAtsActionableItem topActionableItem, boolean recurse) throws OseeCoreException { - Set<IAtsActionableItem> children = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> children = new HashSet<>(); for (IAtsActionableItem child : topActionableItem.getChildrenActionableItems()) { children.add(child); if (recurse) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/AtsConfigCache.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/AtsConfigCache.java index 93b0c1813d3..ce03fa5cd6e 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/AtsConfigCache.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/AtsConfigCache.java @@ -27,7 +27,7 @@ import org.eclipse.osee.framework.jdk.core.util.Conditions; public class AtsConfigCache implements IAtsConfig { // cache by guid and any other cachgeByTag item (like static id) - private final List<IAtsConfigObject> configObjects = new CopyOnWriteArrayList<IAtsConfigObject>(); + private final List<IAtsConfigObject> configObjects = new CopyOnWriteArrayList<>(); private final HashCollection<String, IAtsConfigObject> tagToConfigObject = new HashCollection<String, IAtsConfigObject>(true, CopyOnWriteArrayList.class); private final HashCollection<Long, IAtsConfigObject> idToConfigObject = @@ -71,7 +71,7 @@ public class AtsConfigCache implements IAtsConfig { @SuppressWarnings("unchecked") public final <A extends IAtsConfigObject> List<A> getByTag(String tag, Class<A> clazz) { Conditions.checkNotNull(tag, "tag"); - List<A> objs = new ArrayList<A>(); + List<A> objs = new ArrayList<>(); Collection<IAtsConfigObject> values = tagToConfigObject.getValues(tag); if (values != null) { for (IAtsConfigObject obj : values) { @@ -86,7 +86,7 @@ public class AtsConfigCache implements IAtsConfig { @Override @SuppressWarnings("unchecked") public final <A extends IAtsConfigObject> List<A> getById(long id, Class<A> clazz) { - List<A> objs = new ArrayList<A>(); + List<A> objs = new ArrayList<>(); Collection<IAtsConfigObject> values = idToConfigObject.getValues(id); if (values != null) { for (IAtsConfigObject obj : values) { @@ -116,7 +116,7 @@ public class AtsConfigCache implements IAtsConfig { @Override @SuppressWarnings("unchecked") public final <A extends IAtsConfigObject> List<A> get(Class<A> clazz) { - List<A> objs = new ArrayList<A>(); + List<A> objs = new ArrayList<>(); for (IAtsConfigObject obj : configObjects) { if (clazz.isInstance(obj)) { objs.add((A) obj); @@ -140,7 +140,7 @@ public class AtsConfigCache implements IAtsConfig { public void invalidate(IAtsConfigObject atsObject) { Conditions.checkNotNull(atsObject, "atsObject"); configObjects.remove(atsObject); - List<String> keysToRemove = new ArrayList<String>(); + List<String> keysToRemove = new ArrayList<>(); for (Entry<String, Collection<IAtsConfigObject>> entry : tagToConfigObject.entrySet()) { if (entry.getValue().contains(atsObject)) { keysToRemove.add(entry.getKey()); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/RuleManager.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/RuleManager.java index 94f292aaac7..1b73e45d1ce 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/RuleManager.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/RuleManager.java @@ -19,7 +19,7 @@ import org.eclipse.osee.ats.api.rule.IAtsRules; */ public class RuleManager implements IAtsRules { - public List<String> rules = new ArrayList<String>(); + public List<String> rules = new ArrayList<>(); @Override public List<String> getRules() { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinitions.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinitions.java index e9b72dcace8..bece82e43a7 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinitions.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinitions.java @@ -28,7 +28,7 @@ import org.eclipse.osee.framework.jdk.core.util.Collections; public class TeamDefinitions { public static Collection<String> getNames(Collection<? extends IAtsTeamDefinition> teamDefs) { - ArrayList<String> names = new ArrayList<String>(); + ArrayList<String> names = new ArrayList<>(); for (IAtsTeamDefinition named : teamDefs) { names.add(named.getName()); } @@ -44,7 +44,7 @@ public class TeamDefinitions { } public static List<IAtsTeamDefinition> getActive(Collection<IAtsTeamDefinition> teamDefs, Active active) { - List<IAtsTeamDefinition> results = new ArrayList<IAtsTeamDefinition>(); + List<IAtsTeamDefinition> results = new ArrayList<>(); for (IAtsTeamDefinition teamDef : teamDefs) { if (active == Active.Both) { results.add(teamDef); @@ -62,7 +62,7 @@ public class TeamDefinitions { } public static Set<IAtsTeamDefinition> getChildren(IAtsTeamDefinition topTeamDef, boolean recurse) throws OseeCoreException { - Set<IAtsTeamDefinition> children = new HashSet<IAtsTeamDefinition>(); + Set<IAtsTeamDefinition> children = new HashSet<>(); for (IAtsTeamDefinition child : topTeamDef.getChildrenTeamDefinitions()) { children.add(child); if (recurse) { @@ -89,7 +89,7 @@ public class TeamDefinitions { } public static Set<IAtsTeamDefinition> getTeamReleaseableDefinitions(Active active, IAtsConfig config) throws OseeCoreException { - Set<IAtsTeamDefinition> teamDefs = new HashSet<IAtsTeamDefinition>(); + Set<IAtsTeamDefinition> teamDefs = new HashSet<>(); for (IAtsTeamDefinition teamDef : getTeamDefinitions(active, config)) { if (teamDef.getVersions().size() > 0) { teamDefs.add(teamDef); @@ -99,13 +99,13 @@ public class TeamDefinitions { } public static Set<IAtsTeamDefinition> getTeamsFromItemAndChildren(IAtsActionableItem ai) throws OseeCoreException { - Set<IAtsTeamDefinition> aiTeams = new HashSet<IAtsTeamDefinition>(); + Set<IAtsTeamDefinition> aiTeams = new HashSet<>(); getTeamFromItemAndChildren(ai, aiTeams); return aiTeams; } public static Set<IAtsTeamDefinition> getTeamsFromItemAndChildren(IAtsTeamDefinition teamDef) throws OseeCoreException { - Set<IAtsTeamDefinition> teamDefs = new HashSet<IAtsTeamDefinition>(); + Set<IAtsTeamDefinition> teamDefs = new HashSet<>(); teamDefs.add(teamDef); for (IAtsTeamDefinition child : teamDef.getChildrenTeamDefinitions()) { teamDefs.addAll(getTeamsFromItemAndChildren(child)); @@ -122,7 +122,7 @@ public class TeamDefinitions { } public static Set<IAtsTeamDefinition> getTeamDefinitions(Collection<String> teamDefNames, IAtsConfig config) throws OseeCoreException { - Set<IAtsTeamDefinition> teamDefs = new HashSet<IAtsTeamDefinition>(); + Set<IAtsTeamDefinition> teamDefs = new HashSet<>(); for (IAtsTeamDefinition teamDef : config.get(IAtsTeamDefinition.class)) { if (teamDefNames.contains(teamDef.getName())) { teamDefs.add(teamDef); @@ -132,7 +132,7 @@ public class TeamDefinitions { } public static Set<IAtsTeamDefinition> getTeamDefinitionsNameStartsWith(String prefix, IAtsConfig config) throws OseeCoreException { - Set<IAtsTeamDefinition> teamDefs = new HashSet<IAtsTeamDefinition>(); + Set<IAtsTeamDefinition> teamDefs = new HashSet<>(); for (IAtsTeamDefinition teamDef : config.get(IAtsTeamDefinition.class)) { if (teamDef.getName().startsWith(prefix)) { teamDefs.add(teamDef); @@ -142,7 +142,7 @@ public class TeamDefinitions { } public static Collection<IAtsTeamDefinition> getImpactedTeamDefs(Collection<IAtsActionableItem> ais) throws OseeCoreException { - Set<IAtsTeamDefinition> resultTeams = new HashSet<IAtsTeamDefinition>(); + Set<IAtsTeamDefinition> resultTeams = new HashSet<>(); for (IAtsActionableItem ai : ais) { resultTeams.addAll(getImpactedTeamDefInherited(ai)); } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Versions.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Versions.java index 17f52ca8dee..5f199e18fa7 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Versions.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/Versions.java @@ -24,7 +24,7 @@ import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; public class Versions { public static Collection<String> getNames(Collection<? extends IAtsVersion> versions) { - ArrayList<String> names = new ArrayList<String>(); + ArrayList<String> names = new ArrayList<>(); for (IAtsVersion version : versions) { names.add(version.getName()); } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java index 26268913f8c..6c638c808a1 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/WorkPackageUtility.java @@ -29,7 +29,7 @@ import org.eclipse.osee.framework.jdk.core.util.Strings; public class WorkPackageUtility { public Pair<IAtsCountry, Boolean> getCountry(IAtsServices services, IAtsWorkItem workItem) { - Pair<IAtsCountry, Boolean> result = new Pair<IAtsCountry, Boolean>(null, false); + Pair<IAtsCountry, Boolean> result = new Pair<>(null, false); Pair<IAtsProgram, Boolean> programResult = getProgram(services, workItem); if (programResult.getFirst() != null) { IAtsCountry country = services.getRelationResolver().getRelatedOrNull(programResult.getFirst(), @@ -43,7 +43,7 @@ public class WorkPackageUtility { } public Pair<IAtsProgram, Boolean> getProgram(IAtsServices services, IAtsWorkItem workItem) { - Pair<IAtsProgram, Boolean> result = new Pair<IAtsProgram, Boolean>(null, false); + Pair<IAtsProgram, Boolean> result = new Pair<>(null, false); Pair<IAtsInsertion, Boolean> insertionResult = getInsertion(services, workItem); if (insertionResult.getFirst() != null) { IAtsProgram program = services.getRelationResolver().getRelatedOrNull(insertionResult.getFirst(), @@ -60,7 +60,7 @@ public class WorkPackageUtility { * @return IAtsInsertionActivity and true if value is inherited from parent team wf, false otherwise */ public Pair<IAtsInsertion, Boolean> getInsertion(IAtsServices services, IAtsWorkItem workItem) { - Pair<IAtsInsertion, Boolean> result = new Pair<IAtsInsertion, Boolean>(null, false); + Pair<IAtsInsertion, Boolean> result = new Pair<>(null, false); Pair<IAtsInsertionActivity, Boolean> insertionActivityResult = getInsertionActivity(services, workItem); if (insertionActivityResult.getFirst() != null) { IAtsInsertion insertion = services.getRelationResolver().getRelatedOrNull(insertionActivityResult.getFirst(), @@ -77,7 +77,7 @@ public class WorkPackageUtility { * @return IAtsInsertionActivity and true if value is inherited from parent team wf, false otherwise */ public Pair<IAtsInsertionActivity, Boolean> getInsertionActivity(IAtsServices services, IAtsWorkItem workItem) { - Pair<IAtsInsertionActivity, Boolean> result = new Pair<IAtsInsertionActivity, Boolean>(null, false); + Pair<IAtsInsertionActivity, Boolean> result = new Pair<>(null, false); Pair<ArtifactId, Boolean> workPackageResult = getWorkPackageArtifact(services, workItem); if (workPackageResult.getFirst() != null) { ArtifactId activityArt = services.getRelationResolver().getRelatedOrNull(workPackageResult.getFirst(), @@ -95,7 +95,7 @@ public class WorkPackageUtility { * @return Work Package artifact and true if value is inherited from parent team wf, false otherwise */ public Pair<ArtifactId, Boolean> getWorkPackageArtifact(IAtsServices services, IAtsWorkItem workItem) { - Pair<ArtifactId, Boolean> result = new Pair<ArtifactId, Boolean>(null, false); + Pair<ArtifactId, Boolean> result = new Pair<>(null, false); String workPackageGuid = services.getAttributeResolver().getSoleAttributeValue(workItem, AtsAttributeTypes.WorkPackageGuid, null); if (Strings.isValid(workPackageGuid)) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaFactory.java index d87606c9121..a88cf6c2f06 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaFactory.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaFactory.java @@ -24,7 +24,7 @@ import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow; */ public class CpaFactory { - private static final Map<String, Object> idToStoreObject = new HashMap<String, Object>(500); + private static final Map<String, Object> idToStoreObject = new HashMap<>(500); public static final String CPA_BASEPATH_KEY = "CpaBasepath"; public static CpaProgram get(IAtsProgram program) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/TeamColumnUtility.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/TeamColumnUtility.java index 1a56d5e5e02..c6619a65149 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/TeamColumnUtility.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/TeamColumnUtility.java @@ -51,7 +51,7 @@ public class TeamColumnUtility implements IAtsColumnUtility { if (!Strings.isValid(result) && (atsObject instanceof IAtsAbstractReview)) { IAtsAbstractReview review = (IAtsAbstractReview) atsObject; if (reviewService.isStandAloneReview(review)) { - List<IAtsTeamDefinition> teams = new ArrayList<IAtsTeamDefinition>(); + List<IAtsTeamDefinition> teams = new ArrayList<>(); for (IAtsActionableItem ai : review.getActionableItems()) { if (ai.getTeamDefinitionInherited() != null) { teams.add(ai.getTeamDefinition()); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLog.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLog.java index 65e0a692ccf..fd2e4bc3956 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLog.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/log/AtsLog.java @@ -29,7 +29,7 @@ import org.eclipse.osee.framework.logging.OseeLog; public class AtsLog implements IAtsLog { private boolean dirty = false; - private final List<IAtsLogItem> logItems = new ArrayList<IAtsLogItem>(); + private final List<IAtsLogItem> logItems = new ArrayList<>(); private String logId = "none"; @Override @@ -53,7 +53,7 @@ public class AtsLog implements IAtsLog { @Override public List<IAtsLogItem> getLogItemsReversed() throws OseeCoreException { - List<IAtsLogItem> logItems = new ArrayList<IAtsLogItem>(getLogItems()); + List<IAtsLogItem> logItems = new ArrayList<>(getLogItems()); Collections.reverse(logItems); return logItems; } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsWorkStateFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsWorkStateFactory.java index 51f153a3cd3..95106eb22a7 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsWorkStateFactory.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsWorkStateFactory.java @@ -92,7 +92,7 @@ public class AtsWorkStateFactory implements IAtsWorkStateFactory { @Override public List<IAtsUser> getUsers(String sorageString) { - List<IAtsUser> users = new ArrayList<IAtsUser>(); + List<IAtsUser> users = new ArrayList<>(); Matcher m = userPattern.matcher(sorageString); while (m.find()) { String userId = m.group(1); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManager.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManager.java index 8fc65880352..b8d476c0800 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManager.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/StateManager.java @@ -55,10 +55,10 @@ public class StateManager implements IAtsStateManager { private final IAtsWorkItem workItem; private String currentStateName; - private final List<WorkState> states = new CopyOnWriteArrayList<WorkState>(); + private final List<WorkState> states = new CopyOnWriteArrayList<>(); private final WorkStateFactory factory; private Integer percentCompleteValue = 0; - private final List<IAtsUser> initialAssignees = new ArrayList<IAtsUser>(); + private final List<IAtsUser> initialAssignees = new ArrayList<>(); private boolean dirty = false; private final String instanceGuid; private final IAtsLogFactory logFactory; @@ -254,9 +254,9 @@ public class StateManager implements IAtsStateManager { List<IAtsUser> currAssignees = currState.getAssignees(); WorkState nextState = getState(stateName); - List<IAtsUser> nextAssignees = new ArrayList<IAtsUser>(assignees); + List<IAtsUser> nextAssignees = new ArrayList<>(assignees); - List<IAtsUser> notifyNewAssignees = new ArrayList<IAtsUser>(nextAssignees); + List<IAtsUser> notifyNewAssignees = new ArrayList<>(nextAssignees); notifyNewAssignees.removeAll(currAssignees); //Update assignees for state @@ -437,7 +437,7 @@ public class StateManager implements IAtsStateManager { @Override public List<String> getVisitedStateNames() { - List<String> stateNames = new LinkedList<String>(); + List<String> stateNames = new LinkedList<>(); for (WorkState state : states) { stateNames.add(state.getName()); } @@ -606,7 +606,7 @@ public class StateManager implements IAtsStateManager { @Override public List<IAtsUser> getAssigneesAdded() throws OseeCoreException { - List<IAtsUser> added = new ArrayList<IAtsUser>(); + List<IAtsUser> added = new ArrayList<>(); List<IAtsUser> current = getAssignees(); for (IAtsUser user : current) { if (!initialAssignees.contains(user)) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/UsersByIds.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/UsersByIds.java index e582009146b..b4ed7531fac 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/UsersByIds.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/UsersByIds.java @@ -40,7 +40,7 @@ public class UsersByIds { } public List<IAtsUser> getUsers(String sorageString, IAtsUserService userService) { - List<IAtsUser> users = new ArrayList<IAtsUser>(); + List<IAtsUser> users = new ArrayList<>(); Matcher m = userPattern.matcher(sorageString); while (m.find()) { String userId = m.group(1); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsActionGroup.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsActionGroup.java index 61f875c60ef..ccd92431eb8 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsActionGroup.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsActionGroup.java @@ -21,7 +21,7 @@ import org.eclipse.osee.ats.core.model.IActionGroup; */ public class AtsActionGroup extends AtsObject implements IActionGroup { - List<IAtsWorkItem> actions = new ArrayList<IAtsWorkItem>(); + List<IAtsWorkItem> actions = new ArrayList<>(); public AtsActionGroup(String guid, String name, long uuid) { super(guid, uuid); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsConfigObject.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsConfigObject.java index 341f8bf1dc0..f8bffedeacf 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsConfigObject.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/AtsConfigObject.java @@ -107,7 +107,7 @@ public abstract class AtsConfigObject extends org.eclipse.osee.ats.core.model.im } protected Collection<IAtsUser> getRelatedUsers(IRelationTypeSide relation) { - Set<IAtsUser> results = new HashSet<IAtsUser>(); + Set<IAtsUser> results = new HashSet<>(); try { for (Object userArt : atsServices.getRelationResolver().getRelated(artifact, relation)) { IAtsUser lead = diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/WorkStateImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/WorkStateImpl.java index 0d3de12af28..93d8ee809ed 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/WorkStateImpl.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/model/impl/WorkStateImpl.java @@ -22,7 +22,7 @@ import org.eclipse.osee.framework.jdk.core.util.Conditions; public class WorkStateImpl implements WorkState { private String name; - private final List<IAtsUser> assignees = new LinkedList<IAtsUser>(); + private final List<IAtsUser> assignees = new LinkedList<>(); private double hoursSpent = 0; private int percentComplete = 0; diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java index 40bf0c57381..ed98c15e426 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AbstractAtsQueryImpl.java @@ -45,10 +45,10 @@ import org.eclipse.osee.framework.jdk.core.type.ResultSets; */ public abstract class AbstractAtsQueryImpl implements IAtsQuery { - protected final HashCollection<IAttributeType, String> andAttr = new HashCollection<IAttributeType, String>(); + protected final HashCollection<IAttributeType, String> andAttr = new HashCollection<>(); protected final HashCollection<IAttributeType, QueryOption> andAttrOptions = new HashCollection<IAttributeType, QueryOption>(); - protected final HashMap<IRelationTypeSide, IAtsObject> andRels = new HashMap<IRelationTypeSide, IAtsObject>(); + protected final HashMap<IRelationTypeSide, IAtsObject> andRels = new HashMap<>(); protected IAtsTeamDefinition teamDef; protected StateType[] stateType; protected Class<? extends IAtsWorkItem> clazz; @@ -123,7 +123,7 @@ public abstract class AbstractAtsQueryImpl implements IAtsQuery { } protected List<IArtifactType> getArtifactTypes() { - List<IArtifactType> artifactTypes = new LinkedList<IArtifactType>(); + List<IArtifactType> artifactTypes = new LinkedList<>(); if (IAtsTeamWorkflow.class.isAssignableFrom(clazz)) { artifactTypes.add(AtsArtifactTypes.TeamWorkflow); } else if (IAtsAction.class.isAssignableFrom(clazz)) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AtsWorkItemFilter.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AtsWorkItemFilter.java index f4be69d0421..b300263bda0 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AtsWorkItemFilter.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/query/AtsWorkItemFilter.java @@ -64,7 +64,7 @@ public class AtsWorkItemFilter implements IAtsWorkItemFilter { @Override public IAtsWorkItemFilter union(IAtsWorkItemFilter... atsQuery) throws OseeCoreException { - Set<IAtsWorkItem> items = new HashSet<IAtsWorkItem>(); + Set<IAtsWorkItem> items = new HashSet<>(); for (IAtsWorkItemFilter query : atsQuery) { items.addAll(query.getItems()); } @@ -84,7 +84,7 @@ public class AtsWorkItemFilter implements IAtsWorkItemFilter { @Override public IAtsWorkItemFilter isStateType(StateType... stateType) throws OseeCoreException { - List<StateType> types = new ArrayList<StateType>(); + List<StateType> types = new ArrayList<>(); for (StateType type : stateType) { types.add(type); } @@ -104,7 +104,7 @@ public class AtsWorkItemFilter implements IAtsWorkItemFilter { @SuppressWarnings("unchecked") @Override public <T extends IAtsWorkItem> Collection<T> getItems() throws OseeCoreException { - Set<T> workItems = new HashSet<T>(); + Set<T> workItems = new HashSet<>(); Iterator<? extends IAtsWorkItem> iterator = items.iterator(); while (iterator.hasNext()) { workItems.add((T) iterator.next()); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/UserRoleManager.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/UserRoleManager.java index 479ff989727..200f6263834 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/UserRoleManager.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/review/UserRoleManager.java @@ -45,7 +45,7 @@ public class UserRoleManager { public void ensureLoaded() throws OseeCoreException { if (roles == null) { - roles = new ArrayList<UserRole>(); + roles = new ArrayList<>(); for (String xml : attrResolver.getAttributesToStringList(workItem, AtsAttributeTypes.Role)) { roleMatcher.reset(xml); while (roleMatcher.find()) { @@ -62,7 +62,7 @@ public class UserRoleManager { } public List<UserRole> getUserRoles(Role role) throws OseeCoreException { - List<UserRole> roles = new ArrayList<UserRole>(); + List<UserRole> roles = new ArrayList<>(); for (UserRole uRole : getUserRoles()) { if (uRole.getRole() == role) { roles.add(uRole); @@ -72,7 +72,7 @@ public class UserRoleManager { } public List<IAtsUser> getRoleUsers(Role role) throws OseeCoreException { - List<IAtsUser> users = new ArrayList<IAtsUser>(); + List<IAtsUser> users = new ArrayList<>(); for (UserRole uRole : getUserRoles()) { if (uRole.getRole() == role && !users.contains(userService.getUserById(uRole.getUserId()))) { users.add(userService.getUserById(uRole.getUserId())); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AbstractAtsUserService.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AbstractAtsUserService.java index 8c0ded8da3f..54d5b48c2f5 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AbstractAtsUserService.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AbstractAtsUserService.java @@ -29,9 +29,9 @@ import org.eclipse.osee.framework.jdk.core.util.Strings; */ public abstract class AbstractAtsUserService implements IAtsUserService { - protected final Map<String, IAtsUser> userIdToAtsUser = new HashMap<String, IAtsUser>(300); - protected final Map<String, Boolean> userIdToAdmin = new HashMap<String, Boolean>(300); - protected final Map<String, IAtsUser> nameToAtsUser = new HashMap<String, IAtsUser>(300); + protected final Map<String, IAtsUser> userIdToAtsUser = new HashMap<>(300); + protected final Map<String, Boolean> userIdToAdmin = new HashMap<>(300); + protected final Map<String, IAtsUser> nameToAtsUser = new HashMap<>(300); protected IAtsUser currentUser = null; protected String currentUserId = null; protected boolean loaded = false; @@ -50,7 +50,7 @@ public abstract class AbstractAtsUserService implements IAtsUserService { @Override public Collection<IAtsUser> getUsersByUserIds(Collection<String> userIds) throws OseeCoreException { ensureLoaded(); - List<IAtsUser> users = new LinkedList<IAtsUser>(); + List<IAtsUser> users = new LinkedList<>(); for (String userId : userIds) { IAtsUser user = getUserById(userId); if (user != null) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AtsUsersUtility.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AtsUsersUtility.java index 62a9c33821b..f7b2a37959f 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AtsUsersUtility.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/users/AtsUsersUtility.java @@ -31,7 +31,7 @@ public final class AtsUsersUtility { } public static Collection<IAtsUser> getValidEmailUsers(Collection<? extends IAtsUser> users) throws OseeCoreException { - Set<IAtsUser> validUsers = new HashSet<IAtsUser>(); + Set<IAtsUser> validUsers = new HashSet<>(); for (IAtsUser user : users) { if (isEmailValid(user.getEmail())) { validUsers.add(user); @@ -41,7 +41,7 @@ public final class AtsUsersUtility { } public static Collection<IAtsUser> getActiveEmailUsers(Collection<? extends IAtsUser> users) throws OseeCoreException { - Set<IAtsUser> activeUsers = new HashSet<IAtsUser>(); + Set<IAtsUser> activeUsers = new HashSet<>(); for (IAtsUser user : users) { if (user.isActive()) { activeUsers.add(user); @@ -58,7 +58,7 @@ public final class AtsUsersUtility { } public static Collection<? extends IAtsUser> getUsers(Collection<String> userIds, IAtsUserService userService) { - Set<IAtsUser> users = new HashSet<IAtsUser>(); + Set<IAtsUser> users = new HashSet<>(); for (String userId : userIds) { users.add(userService.getUserById(userId)); } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsBranchService.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsBranchService.java index 487e145c1d6..9648ddecaba 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsBranchService.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsBranchService.java @@ -43,11 +43,11 @@ import org.eclipse.osee.framework.jdk.core.util.Strings; */ public abstract class AbstractAtsBranchService implements IAtsBranchService { - protected static Map<String, IOseeBranch> idToWorkingBranchCache = new HashMap<String, IOseeBranch>(); - protected static Map<String, Long> idToWorkingBranchCacheUpdated = new HashMap<String, Long>(50); + protected static Map<String, IOseeBranch> idToWorkingBranchCache = new HashMap<>(); + protected static Map<String, Long> idToWorkingBranchCacheUpdated = new HashMap<>(50); protected IAtsServices atsServices; private static final int SHORT_NAME_LIMIT = 35; - private static Set<IOseeBranch> branchesInCommit = new HashSet<IOseeBranch>(); + private static Set<IOseeBranch> branchesInCommit = new HashSet<>(); private ITeamWorkflowProvidersLazy teamWorkflowProvidersLazy; public AbstractAtsBranchService() { @@ -69,7 +69,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { @Override public Collection<IOseeBranch> getBranchesToCommitTo(IAtsTeamWorkflow teamWf) throws OseeCoreException { - Set<IOseeBranch> branches = new HashSet<IOseeBranch>(); + Set<IOseeBranch> branches = new HashSet<>(); for (ICommitConfigItem obj : getConfigArtifactsConfiguredToCommitTo(teamWf)) { if (isBranchValid(obj)) { branches.add(getBranch(obj)); @@ -199,7 +199,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { @Override public Collection<IOseeBranch> getBranchesCommittedTo(IAtsTeamWorkflow teamWf) { - Set<IOseeBranch> branches = new HashSet<IOseeBranch>(); + Set<IOseeBranch> branches = new HashSet<>(); for (ITransaction transId : getTransactionIds(teamWf, false)) { branches.add(getBranch(transId)); } @@ -208,7 +208,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { @Override public Collection<IOseeBranch> getBranchesLeftToCommit(IAtsTeamWorkflow teamWf) { - Set<IOseeBranch> branchesLeft = new HashSet<IOseeBranch>(); + Set<IOseeBranch> branchesLeft = new HashSet<>(); Collection<IOseeBranch> committedTo = getBranchesCommittedTo(teamWf); for (IOseeBranch branchToCommit : getBranchesToCommitTo(teamWf)) { if (!committedTo.contains(branchToCommit) && !isNoCommitNeeded(teamWf, branchToCommit)) { @@ -233,7 +233,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { @Override public Collection<ICommitConfigItem> getConfigArtifactsConfiguredToCommitTo(IAtsTeamWorkflow teamWf) { - Set<ICommitConfigItem> configObjects = new HashSet<ICommitConfigItem>(); + Set<ICommitConfigItem> configObjects = new HashSet<>(); if (teamWf.getTeamDefinition().isTeamUsesVersions()) { if (atsServices.getVersionService().hasTargetedVersion(teamWf)) { atsServices.getVersionService().getTargetedVersion(teamWf).getParallelVersions(configObjects); @@ -250,7 +250,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { public Collection<ITransaction> getCommitTransactionsToUnarchivedBaselineBranchs(IAtsTeamWorkflow teamWf) { Collection<ITransaction> committedTransactions = getCommittedArtifactTransactionIds(teamWf); - Collection<ITransaction> transactionIds = new ArrayList<ITransaction>(); + Collection<ITransaction> transactionIds = new ArrayList<>(); for (ITransaction transactionId : committedTransactions) { // exclude working branches including branch states that are re-baselined IOseeBranch branch = getBranch(transactionId); @@ -392,7 +392,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { // - first, we addAll configArtSet // - next, we loop through commitTxs and for any tx that has the same branch as ANY pre-existing commit // in configArtSet we do NOT add it to commitMgrInputObjs. - Collection<Object> commitMgrInputObjs = new HashSet<Object>(); + Collection<Object> commitMgrInputObjs = new HashSet<>(); commitMgrInputObjs.addAll(configArtSet); //for each tx commit... for (ITransaction txRecord : commitTxs) { @@ -566,7 +566,7 @@ public abstract class AbstractAtsBranchService implements IAtsBranchService { if (forMergeBranches) { IOseeBranch workingBranch = getWorkingBranch(teamWf); // grab only the transaction that had merge conflicts - Collection<ITransaction> transactionIds = new ArrayList<ITransaction>(); + Collection<ITransaction> transactionIds = new ArrayList<>(); for (ITransaction transactionId : getCommitTransactionsToUnarchivedBaselineBranchs(teamWf)) { if (isMergeBranchExists(teamWf, workingBranch, getBranch(transactionId))) { transactionIds.add(transactionId); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java index 0f71bca04fd..be483e99c51 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AbstractAtsChangeSet.java @@ -32,9 +32,9 @@ import org.eclipse.osee.framework.jdk.core.util.Conditions; public abstract class AbstractAtsChangeSet implements IAtsChangeSet { protected String comment; - protected final Set<Object> objects = new CopyOnWriteArraySet<Object>(); - protected final Set<Object> deleteObjects = new CopyOnWriteArraySet<Object>(); - protected final Set<IExecuteListener> listeners = new CopyOnWriteArraySet<IExecuteListener>(); + protected final Set<Object> objects = new CopyOnWriteArraySet<>(); + protected final Set<Object> deleteObjects = new CopyOnWriteArraySet<>(); + protected final Set<IExecuteListener> listeners = new CopyOnWriteArraySet<>(); protected final IAtsUser user; protected final AtsNotificationCollector notifications = new AtsNotificationCollector(); protected final List<IAtsWorkItem> workItemsCreated = new ArrayList<>(); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java index 6d051977b91..bf4d5127314 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/ActionFactory.java @@ -112,9 +112,9 @@ public class ActionFactory implements IAtsActionFactory { } // Create team workflow artifacts - List<IAtsTeamWorkflow> teamWfs = new ArrayList<IAtsTeamWorkflow>(); + List<IAtsTeamWorkflow> teamWfs = new ArrayList<>(); for (IAtsTeamDefinition teamDef : teamDefs) { - List<IAtsUser> leads = new LinkedList<IAtsUser>(teamDef.getLeads(actionableItems)); + List<IAtsUser> leads = new LinkedList<>(teamDef.getLeads(actionableItems)); IAtsTeamWorkflow teamWf = createTeamWorkflow(action, teamDef, actionableItems, leads, changes, createdDate, createdBy, newActionListener); teamWfs.add(teamWf); @@ -366,7 +366,7 @@ public class ActionFactory implements IAtsActionFactory { @Override public Collection<IAtsTeamWorkflow> getSiblingTeamWorkflows(IAtsTeamWorkflow teamWf) { - List<IAtsTeamWorkflow> teams = new LinkedList<IAtsTeamWorkflow>(); + List<IAtsTeamWorkflow> teams = new LinkedList<>(); IAtsAction action = getAction(teamWf); for (IAtsTeamWorkflow teamChild : atsServices.getRelationResolver().getRelated(action, AtsRelationTypes.ActionToWorkflow_WorkFlow, IAtsTeamWorkflow.class)) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsObjects.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsObjects.java index 5a5d99dbbd6..7d7a52456e9 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsObjects.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsObjects.java @@ -22,7 +22,7 @@ import org.eclipse.osee.ats.api.IAtsWorkItem; public class AtsObjects { public static List<Long> toUuids(Collection<? extends IAtsObject> atsObjects) { - List<Long> uuids = new ArrayList<Long>(atsObjects.size()); + List<Long> uuids = new ArrayList<>(atsObjects.size()); for (IAtsObject atsObject : atsObjects) { uuids.add(atsObject.getUuid()); } @@ -30,7 +30,7 @@ public class AtsObjects { } public static List<String> toGuids(Collection<? extends IAtsObject> atsObjects) { - List<String> guids = new ArrayList<String>(atsObjects.size()); + List<String> guids = new ArrayList<>(atsObjects.size()); for (IAtsObject atsObject : atsObjects) { guids.add(AtsUtilCore.getGuid(atsObject)); } @@ -38,7 +38,7 @@ public class AtsObjects { } public static List<String> toAtsIds(Collection<? extends IAtsWorkItem> workItem) { - List<String> guids = new ArrayList<String>(workItem.size()); + List<String> guids = new ArrayList<>(workItem.size()); for (IAtsWorkItem atsObject : workItem) { guids.add(atsObject.getAtsId()); } @@ -65,7 +65,7 @@ public class AtsObjects { } public static Collection<String> getNames(Collection<? extends IAtsObject> atsObjects) { - ArrayList<String> names = new ArrayList<String>(); + ArrayList<String> names = new ArrayList<>(); for (IAtsObject namedAtsObject : atsObjects) { names.add(namedAtsObject.getName()); } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsRelationChange.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsRelationChange.java index 3e788518562..5e3c76ea1d3 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsRelationChange.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsRelationChange.java @@ -32,7 +32,7 @@ public class AtsRelationChange { public AtsRelationChange(Object object, IRelationTypeSide relationSide, Collection<? extends Object> objects, RelationOperation operation) { this.object = object; this.relationSide = relationSide; - this.objects = new ArrayList<Object>(objects); + this.objects = new ArrayList<>(objects); this.operation = operation; } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUserGroup.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUserGroup.java index cc24b384aee..a1ac2fbc808 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUserGroup.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUserGroup.java @@ -20,7 +20,7 @@ import org.eclipse.osee.ats.api.user.IAtsUserGroup; */ public class AtsUserGroup implements IAtsUserGroup { - List<IAtsUser> users = new LinkedList<IAtsUser>(); + List<IAtsUser> users = new LinkedList<>(); public AtsUserGroup() { } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUtilCore.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUtilCore.java index b63ed856578..bf7a64f92c1 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUtilCore.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsUtilCore.java @@ -39,8 +39,8 @@ public class AtsUtilCore { private static final Object lock = new Object(); private volatile static IOseeBranch atsBranch; private volatile static String atsConfigName; - private static Map<Long, String> uuidToGuidMap = new HashMap<Long, String>(50); - private static Map<String, Long> guidToUuidMap = new HashMap<String, Long>(50); + private static Map<Long, String> uuidToGuidMap = new HashMap<>(50); + private static Map<String, Long> guidToUuidMap = new HashMap<>(50); public static String getAtsConfigName() { getAtsBranch(); @@ -87,7 +87,7 @@ public class AtsUtilCore { } public static List<String> toGuids(Collection<? extends IAtsObject> atsObjects) { - List<String> guids = new ArrayList<String>(atsObjects.size()); + List<String> guids = new ArrayList<>(atsObjects.size()); for (IAtsObject atsObj : atsObjects) { guids.add(AtsUtilCore.getGuid(atsObj)); } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/validator/AtsCoreXWidgetValidatorProvider.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/validator/AtsCoreXWidgetValidatorProvider.java index d930a3c6dcc..820423e31e1 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/validator/AtsCoreXWidgetValidatorProvider.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/validator/AtsCoreXWidgetValidatorProvider.java @@ -24,7 +24,7 @@ public class AtsCoreXWidgetValidatorProvider implements AtsXWidgetValidatorProvi @Override public Collection<IAtsXWidgetValidator> getValidators() { if (atsValidators == null) { - atsValidators = new ArrayList<IAtsXWidgetValidator>(); + atsValidators = new ArrayList<>(); atsValidators.add(new AtsXIntegerValidator()); atsValidators.add(new AtsXFloatValidator()); atsValidators.add(new AtsXTextValidator()); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/validator/AtsXWidgetValidateManager.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/validator/AtsXWidgetValidateManager.java index 9185eeb6f7e..0536bd0221e 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/validator/AtsXWidgetValidateManager.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/validator/AtsXWidgetValidateManager.java @@ -23,7 +23,7 @@ import org.eclipse.osee.ats.api.workdef.WidgetStatus; */ public class AtsXWidgetValidateManager { public static AtsXWidgetValidateManager instance = new AtsXWidgetValidateManager(); - private final List<AtsXWidgetValidatorProvider> providers = new LinkedList<AtsXWidgetValidatorProvider>(); + private final List<AtsXWidgetValidatorProvider> providers = new LinkedList<>(); protected AtsXWidgetValidateManager() { } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/version/AbstractAtsVersionServiceImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/version/AbstractAtsVersionServiceImpl.java index cc464c6d57a..2dc106889b8 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/version/AbstractAtsVersionServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/version/AbstractAtsVersionServiceImpl.java @@ -144,7 +144,7 @@ public abstract class AbstractAtsVersionServiceImpl implements IAtsVersionServic @Override public Collection<IAtsTeamWorkflow> getTargetedForTeamWorkflows(IAtsVersion verArt) throws OseeCoreException { - List<IAtsTeamWorkflow> teamWorkflows = new LinkedList<IAtsTeamWorkflow>(); + List<IAtsTeamWorkflow> teamWorkflows = new LinkedList<>(); for (IAtsTeamWorkflow teamWf : services.getRelationResolver().getRelated(verArt, AtsRelationTypes.TeamWorkflowTargetedForVersion_Workflow, IAtsTeamWorkflow.class)) { teamWorkflows.add(teamWf); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workdef/SimpleDecisionReviewOption.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workdef/SimpleDecisionReviewOption.java index 285a586de78..023c7df2917 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workdef/SimpleDecisionReviewOption.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workdef/SimpleDecisionReviewOption.java @@ -23,7 +23,7 @@ public class SimpleDecisionReviewOption implements IAtsDecisionReviewOption { public String name; public boolean followupRequired; public List<String> userIds; - public List<String> userNames = new LinkedList<String>(); + public List<String> userNames = new LinkedList<>(); public SimpleDecisionReviewOption(String name) { this(name, false, new ArrayList<String>()); @@ -33,7 +33,7 @@ public class SimpleDecisionReviewOption implements IAtsDecisionReviewOption { this.name = name; this.followupRequired = isFollowupRequired; if (userIds == null) { - this.userIds = new ArrayList<String>(); + this.userIds = new ArrayList<>(); } else { this.userIds = userIds; } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workdef/WorkDefinitionMatch.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workdef/WorkDefinitionMatch.java index 7d2885e6723..217a9c6b45a 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workdef/WorkDefinitionMatch.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workdef/WorkDefinitionMatch.java @@ -23,7 +23,7 @@ public class WorkDefinitionMatch implements IWorkDefinitionMatch { private IAtsWorkDefinition workDefinition; private String workDefinitionId; - private final List<String> trace = new ArrayList<String>(); + private final List<String> trace = new ArrayList<>(); public WorkDefinitionMatch() { this(null, null); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsWorkItemServiceImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsWorkItemServiceImpl.java index 5aab6b1db20..46d08c736ae 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsWorkItemServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsWorkItemServiceImpl.java @@ -65,7 +65,7 @@ public class AtsWorkItemServiceImpl implements IAtsWorkItemService { public Collection<IAtsTask> getTasks(IAtsTeamWorkflow teamWf, IStateToken relatedToState) throws OseeCoreException { ArtifactId artifact = services.getArtifactResolver().get(teamWf); Conditions.checkNotNull(artifact, "teamWf", "Can't Find Artifact matching [%s]", teamWf.toString()); - List<IAtsTask> tasks = new LinkedList<IAtsTask>(); + List<IAtsTask> tasks = new LinkedList<>(); for (IAtsTask task : services.getRelationResolver().getRelated(teamWf, AtsRelationTypes.TeamWfToTask_Task, IAtsTask.class)) { if (services.getAttributeResolver().getSoleAttributeValue(task, AtsAttributeTypes.RelatedToState, "").equals( @@ -98,7 +98,7 @@ public class AtsWorkItemServiceImpl implements IAtsWorkItemService { public Collection<IAtsAbstractReview> getReviews(IAtsTeamWorkflow teamWf, IStateToken state) throws OseeCoreException { ArtifactId artifact = services.getArtifactResolver().get(teamWf); Conditions.checkNotNull(artifact, "teamWf", "Can't Find Artifact matching [%s]", teamWf.toString()); - List<IAtsAbstractReview> reviews = new LinkedList<IAtsAbstractReview>(); + List<IAtsAbstractReview> reviews = new LinkedList<>(); for (IAtsAbstractReview review : services.getRelationResolver().getRelated(teamWf, AtsRelationTypes.TeamWorkflowToReview_Review, IAtsAbstractReview.class)) { if (services.getAttributeResolver().getSoleAttributeValue(review, AtsAttributeTypes.RelatedToState, "").equals( diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtility.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtility.java index 67155b21267..1ad5f39199f 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtility.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/state/StateManagerUtility.java @@ -37,7 +37,7 @@ public class StateManagerUtility { stateMgr.createState(workPage.getName()); stateMgr.setCurrentStateName(workPage.getName()); if (assignees == null) { - assignees = new LinkedList<IAtsUser>(); + assignees = new LinkedList<>(); } if (workPage.getStateType().isWorkingState()) { if (assignees.isEmpty()) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/state/StateTypeAdapter.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/state/StateTypeAdapter.java index 84524ec0faf..a301b8fd5dd 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/state/StateTypeAdapter.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/state/StateTypeAdapter.java @@ -32,10 +32,10 @@ public abstract class StateTypeAdapter implements IStateToken { private final StateType StateType; private static CompositeKeyHashMap<Class<?>, String, StateTypeAdapter> classAndNameToPage = new CompositeKeyHashMap<Class<?>, String, StateTypeAdapter>(); - private static final Map<StateTypeAdapter, Integer> pageToOrdinal = new HashMap<StateTypeAdapter, Integer>(10); + private static final Map<StateTypeAdapter, Integer> pageToOrdinal = new HashMap<>(10); private static final Map<Class<?>, List<StateTypeAdapter>> classToPages = new HashMap<Class<?>, List<StateTypeAdapter>>(); - private static final CountingMap<Class<?>> classToOrdinalCount = new CountingMap<Class<?>>(20); + private static final CountingMap<Class<?>> classToOrdinalCount = new CountingMap<>(20); private String description; private final String pageName; @@ -58,13 +58,13 @@ public abstract class StateTypeAdapter implements IStateToken { public synchronized static <T> List<T> pages(Class<?> clazz) { if (classToPages.get(clazz) == null) { - Set<StateTypeAdapter> pages = new HashSet<StateTypeAdapter>(); + Set<StateTypeAdapter> pages = new HashSet<>(); for (StateTypeAdapter page : pageToOrdinal.keySet()) { if (page.getClass().isAssignableFrom(clazz)) { pages.add(page); } } - List<StateTypeAdapter> pagesOrdered = new ArrayList<StateTypeAdapter>(); + List<StateTypeAdapter> pagesOrdered = new ArrayList<>(); for (int x = 1; x <= pages.size(); x++) { for (StateTypeAdapter page : pages) { if (page.ordinal() == x) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java index 7a4c91f0669..c660405785a 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionManager.java @@ -410,7 +410,7 @@ public class TransitionManager implements IAtsTransitionManager { checkTasksCompletedForState = false; } if (checkTasksCompletedForState && workItem.isTeamWorkflow() && !workItem.getStateMgr().getStateType().isCompletedOrCancelled()) { - Set<IAtsTask> tasksToCheck = new HashSet<IAtsTask>(); + Set<IAtsTask> tasksToCheck = new HashSet<>(); // If transitioning to completed/cancelled, all tasks must be completed/cancelled if (toStateDef.getStateType().isCompletedOrCancelledState()) { tasksToCheck.addAll(workItemService.getTaskArtifacts(workItem)); @@ -532,7 +532,7 @@ public class TransitionManager implements IAtsTransitionManager { @Override public List<? extends IAtsUser> getToAssignees(IAtsWorkItem workItem, IAtsStateDefinition toState) throws OseeCoreException { if (toAssignees == null) { - toAssignees = new ArrayList<IAtsUser>(); + toAssignees = new ArrayList<>(); if (toState.getStateType().isWorkingState()) { Collection<? extends IAtsUser> requestedAssignees = helper.getToAssignees(workItem); if (requestedAssignees != null) { diff --git a/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertWorkDefinitionToAtsDslTest.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertWorkDefinitionToAtsDslTest.java index b47181df175..46b286fe8ab 100644 --- a/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertWorkDefinitionToAtsDslTest.java +++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertWorkDefinitionToAtsDslTest.java @@ -103,7 +103,7 @@ public class ConvertWorkDefinitionToAtsDslTest { @Test public void test_processWorkRulesForState() { StateDef dslState = AtsDslFactoryImpl.init().createStateDef(); - List<String> rules = new ArrayList<String>(); + List<String> rules = new ArrayList<>(); XResultData resultData = new XResultData(false); ConvertWorkDefinitionToAtsDsl convert = new ConvertWorkDefinitionToAtsDsl(resultData); diff --git a/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WorkDefinitionTest.java b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WorkDefinitionTest.java index 6526986f9eb..774d9b7f4aa 100644 --- a/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WorkDefinitionTest.java +++ b/plugins/org.eclipse.osee.ats.dsl.integration.test/src/org/eclipse/osee/ats/dsl/integration/internal/model/WorkDefinitionTest.java @@ -75,7 +75,7 @@ public class WorkDefinitionTest { completed.setStateType(StateType.Completed); IAtsWorkDefinition def = new WorkDefinition("this"); - List<IAtsStateDefinition> states = new LinkedList<IAtsStateDefinition>(); + List<IAtsStateDefinition> states = new LinkedList<>(); states.addAll(Arrays.asList(endorse, analyze)); new AtsWorkDefinitionServiceImpl().getStatesOrderedByDefaultToState(def, endorse, states); Assert.assertEquals(2, states.size()); @@ -92,7 +92,7 @@ public class WorkDefinitionTest { IAtsWorkDefinition def = new WorkDefinition("this"); endorse.setDefaultToState(endorse); - List<IAtsStateDefinition> states = new LinkedList<IAtsStateDefinition>(); + List<IAtsStateDefinition> states = new LinkedList<>(); states.addAll(Arrays.asList(analyze, completed)); new AtsWorkDefinitionServiceImpl().getStatesOrderedByDefaultToState(def, endorse, states); Assert.assertEquals(3, states.size()); diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/AtsWorkDefinitionServiceImpl.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/AtsWorkDefinitionServiceImpl.java index 1214045304f..b120dff8bbd 100644 --- a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/AtsWorkDefinitionServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/AtsWorkDefinitionServiceImpl.java @@ -137,7 +137,7 @@ public class AtsWorkDefinitionServiceImpl implements IAtsWorkDefinitionService { @Override public Collection<String> getStateNames(IAtsWorkDefinition workDef) { - List<String> names = new ArrayList<String>(); + List<String> names = new ArrayList<>(); for (IAtsStateDefinition state : workDef.getStates()) { names.add(state.getName()); } @@ -146,8 +146,8 @@ public class AtsWorkDefinitionServiceImpl implements IAtsWorkDefinitionService { @Override public List<IAtsStateDefinition> getStatesOrderedByOrdinal(IAtsWorkDefinition workDef) { - List<IAtsStateDefinition> orderedPages = new ArrayList<IAtsStateDefinition>(); - List<IAtsStateDefinition> unOrderedPages = new ArrayList<IAtsStateDefinition>(); + List<IAtsStateDefinition> orderedPages = new ArrayList<>(); + List<IAtsStateDefinition> unOrderedPages = new ArrayList<>(); for (int x = 1; x < workDef.getStates().size() + 1; x++) { for (IAtsStateDefinition state : workDef.getStates()) { if (state.getOrdinal() == x) { @@ -188,7 +188,7 @@ public class AtsWorkDefinitionServiceImpl implements IAtsWorkDefinitionService { */ @Override public List<IAtsWidgetDefinition> getWidgetsFromLayoutItems(IAtsStateDefinition stateDef) { - List<IAtsWidgetDefinition> widgets = new ArrayList<IAtsWidgetDefinition>(); + List<IAtsWidgetDefinition> widgets = new ArrayList<>(); getWidgets(stateDef, widgets, stateDef.getLayoutItems()); return widgets; } @@ -251,7 +251,7 @@ public class AtsWorkDefinitionServiceImpl implements IAtsWorkDefinitionService { @Override public Collection<IAtsWorkDefinition> getAllWorkDefinitions(XResultData resultData) throws Exception { - List<IAtsWorkDefinition> workDefs = new ArrayList<IAtsWorkDefinition>(); + List<IAtsWorkDefinition> workDefs = new ArrayList<>(); for (Pair<String, String> entry : workDefStore.getWorkDefinitionStrings()) { String name = entry.getFirst(); String workDefStr = entry.getSecond(); @@ -267,7 +267,7 @@ public class AtsWorkDefinitionServiceImpl implements IAtsWorkDefinitionService { @Override public Collection<String> getAllValidStateNames(XResultData resultData) throws Exception { - Set<String> allValidStateNames = new HashSet<String>(); + Set<String> allValidStateNames = new HashSet<>(); for (IAtsWorkDefinition workDef : getAllWorkDefinitions(resultData)) { for (String stateName : getStateNames(workDef)) { if (!allValidStateNames.contains(stateName)) { diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertAtsDslToRuleDefinition.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertAtsDslToRuleDefinition.java index e07e09642f5..49ef259a48a 100644 --- a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertAtsDslToRuleDefinition.java +++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertAtsDslToRuleDefinition.java @@ -75,7 +75,7 @@ public class ConvertAtsDslToRuleDefinition { newRule.setName(Strings.unquote(dslRule.getName())); newRule.setTitle(Strings.unquote(dslRule.getTitle())); newRule.setDescription(Strings.unquote(dslRule.getDescription())); - List<RuleLocations> ruleLocs = new ArrayList<RuleLocations>(); + List<RuleLocations> ruleLocs = new ArrayList<>(); for (RuleLocation loc : dslRule.getRuleLocation()) { ruleLocs.add(RuleLocations.valueOf(loc.getName())); } @@ -86,7 +86,7 @@ public class ConvertAtsDslToRuleDefinition { private void convertCreateTaskRule(CreateTaskRuleDefinition newRule, CreateTaskRule dslRule) { newRule.setTaskWorkDef(Strings.unquote(dslRule.getTaskWorkDef())); newRule.setRelatedState(Strings.unquote(dslRule.getRelatedState())); - List<RuleEventType> ruleEvents = new ArrayList<RuleEventType>(); + List<RuleEventType> ruleEvents = new ArrayList<>(); for (OnEventType event : dslRule.getOnEvent()) { ruleEvents.add(RuleEventType.valueOf(event.getName())); } diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertAtsDslToWorkDefinition.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertAtsDslToWorkDefinition.java index 886989b06ad..20290432df7 100644 --- a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertAtsDslToWorkDefinition.java +++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertAtsDslToWorkDefinition.java @@ -88,13 +88,13 @@ public class ConvertAtsDslToWorkDefinition { } public Collection<IAtsWorkDefinition> convert() { - List<IAtsWorkDefinition> workDefs = new ArrayList<IAtsWorkDefinition>(); + List<IAtsWorkDefinition> workDefs = new ArrayList<>(); for (WorkDef dslWorkDef : atsDsl.getWorkDef()) { WorkDefinition workDef = new WorkDefinition(Strings.unquote(dslWorkDef.getName())); workDef.setId(dslWorkDef.getId().iterator().next()); List<IAtsWidgetDefinition> widgetDefs = retrieveWigetDefs(atsDsl, dslWorkDef, name); - Map<IAtsStateDefinition, String> copyLayoutFromMap = new HashMap<IAtsStateDefinition, String>(); + Map<IAtsStateDefinition, String> copyLayoutFromMap = new HashMap<>(); // Process and define all states for (StateDef dslState : dslWorkDef.getStates()) { @@ -322,7 +322,7 @@ public class ConvertAtsDslToWorkDefinition { } private Collection<String> getAssigneesFromUserRefs(EList<UserRef> UserRefs) { - Set<String> userIds = new HashSet<String>(); + Set<String> userIds = new HashSet<>(); for (UserRef UserRef : UserRefs) { if (UserRef instanceof UserByName) { UserByName byName = (UserByName) UserRef; @@ -364,7 +364,7 @@ public class ConvertAtsDslToWorkDefinition { } private List<IAtsWidgetDefinition> retrieveWigetDefs(AtsDsl atsDsl, WorkDef dslWorkDef, String SHEET_NAME) { - List<IAtsWidgetDefinition> widgetDefs = new ArrayList<IAtsWidgetDefinition>(); + List<IAtsWidgetDefinition> widgetDefs = new ArrayList<>(); for (WidgetDef dslWidgetDef : dslWorkDef.getWidgetDefs()) { IAtsWidgetDefinition widgetDef = convertDslWidgetDef(dslWidgetDef, SHEET_NAME); widgetDefs.add(widgetDef); diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertWorkDefinitionToAtsDsl.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertWorkDefinitionToAtsDsl.java index c59ff321fa7..3b2de1c0669 100644 --- a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertWorkDefinitionToAtsDsl.java +++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/ConvertWorkDefinitionToAtsDsl.java @@ -57,11 +57,11 @@ public class ConvertWorkDefinitionToAtsDsl { private WorkDef dslWorkDef; private final XResultData resultData; - private final Map<String, WidgetDef> idToDslWidgetDefMap = new HashMap<String, WidgetDef>(15); - private final Map<String, StateDef> nameToDslStateDefMap = new HashMap<String, StateDef>(15); - private final Map<String, DecisionReviewDef> nameToDslDecisionReviewDefMap = new HashMap<String, DecisionReviewDef>( + private final Map<String, WidgetDef> idToDslWidgetDefMap = new HashMap<>(15); + private final Map<String, StateDef> nameToDslStateDefMap = new HashMap<>(15); + private final Map<String, DecisionReviewDef> nameToDslDecisionReviewDefMap = new HashMap<>( 0); - private final Map<String, PeerReviewDef> nameToDslPeerReviewDefMap = new HashMap<String, PeerReviewDef>(0); + private final Map<String, PeerReviewDef> nameToDslPeerReviewDefMap = new HashMap<>(0); public ConvertWorkDefinitionToAtsDsl(XResultData resultData) { this.resultData = resultData; @@ -136,7 +136,7 @@ public class ConvertWorkDefinitionToAtsDsl { // Process transitions (must do after all states are defined) for (IAtsStateDefinition stateDef : workDef.getStates()) { - Set<String> toStateNames = new HashSet<String>(); + Set<String> toStateNames = new HashSet<>(); StateDef dslStateDef = nameToDslStateDefMap.get(stateDef.getName()); for (IAtsStateDefinition toStateDef : stateDef.getToStates()) { // skip states transitioning to themselves diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/CompositeLayoutItem.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/CompositeLayoutItem.java index b9de6638c94..4f3caea8075 100644 --- a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/CompositeLayoutItem.java +++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/CompositeLayoutItem.java @@ -21,7 +21,7 @@ import org.eclipse.osee.ats.api.workdef.IAtsLayoutItem; public class CompositeLayoutItem extends LayoutItem implements IAtsCompositeLayoutItem { private int numColumns; - private final List<IAtsLayoutItem> stateItems = new ArrayList<IAtsLayoutItem>(5); + private final List<IAtsLayoutItem> stateItems = new ArrayList<>(5); public CompositeLayoutItem() { this(2); diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewDefinition.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewDefinition.java index 7e53200b0bc..42f3e000b03 100644 --- a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewDefinition.java +++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewDefinition.java @@ -28,9 +28,9 @@ public class DecisionReviewDefinition implements IAtsDecisionReviewDefinition { public String relatedToState; public ReviewBlockType blockingType; public StateEventType stateEventType; - public List<String> assignees = new ArrayList<String>(); + public List<String> assignees = new ArrayList<>(); public boolean autoTransitionToDecision = false; - public List<IAtsDecisionReviewOption> options = new ArrayList<IAtsDecisionReviewOption>(); + public List<IAtsDecisionReviewOption> options = new ArrayList<>(); public DecisionReviewDefinition(String name) { this.name = name; diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewOption.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewOption.java index 6bace5a8806..f08da69d020 100644 --- a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewOption.java +++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/DecisionReviewOption.java @@ -23,7 +23,7 @@ public class DecisionReviewOption implements IAtsDecisionReviewOption { public String name; public boolean followupRequired; public List<String> userIds; - public List<String> userNames = new LinkedList<String>(); + public List<String> userNames = new LinkedList<>(); public DecisionReviewOption(String name) { this(name, false, new ArrayList<String>()); @@ -33,7 +33,7 @@ public class DecisionReviewOption implements IAtsDecisionReviewOption { this.name = name; this.followupRequired = isFollowupRequired; if (userIds == null) { - this.userIds = new ArrayList<String>(); + this.userIds = new ArrayList<>(); } else { this.userIds = userIds; } diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/PeerReviewDefinition.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/PeerReviewDefinition.java index e39902a1036..7fe123269f3 100644 --- a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/PeerReviewDefinition.java +++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/PeerReviewDefinition.java @@ -28,7 +28,7 @@ public class PeerReviewDefinition implements IAtsPeerReviewDefinition { public String relatedToState; public ReviewBlockType blockingType; public StateEventType stateEventType; - public List<String> assignees = new ArrayList<String>(); + public List<String> assignees = new ArrayList<>(); public PeerReviewDefinition(String name) { this.name = name; diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/RuleManager.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/RuleManager.java index f9627e4e3ed..6f9f2ea8b57 100644 --- a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/RuleManager.java +++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/RuleManager.java @@ -18,7 +18,7 @@ import java.util.List; */ public class RuleManager { - public List<String> rules = new ArrayList<String>(); + public List<String> rules = new ArrayList<>(); public List<String> getRules() { return rules; diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/StateDefinition.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/StateDefinition.java index 5c85d016455..76e4486a4c6 100644 --- a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/StateDefinition.java +++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/StateDefinition.java @@ -27,13 +27,13 @@ public class StateDefinition extends AbstractWorkDefItem implements IAtsStateDef private StateType StateType; private int ordinal = 0; - private final List<IAtsLayoutItem> stateItems = new ArrayList<IAtsLayoutItem>(5); + private final List<IAtsLayoutItem> stateItems = new ArrayList<>(5); private final RuleManager ruleMgr = new RuleManager(); - private final List<IAtsStateDefinition> toStates = new ArrayList<IAtsStateDefinition>(5); + private final List<IAtsStateDefinition> toStates = new ArrayList<>(5); private IAtsStateDefinition defaultToState; - private final List<IAtsStateDefinition> overrideAttributeValidationStates = new ArrayList<IAtsStateDefinition>(5); - private final List<IAtsDecisionReviewDefinition> decisionReviews = new ArrayList<IAtsDecisionReviewDefinition>(); - private final List<IAtsPeerReviewDefinition> peerReviews = new ArrayList<IAtsPeerReviewDefinition>(); + private final List<IAtsStateDefinition> overrideAttributeValidationStates = new ArrayList<>(5); + private final List<IAtsDecisionReviewDefinition> decisionReviews = new ArrayList<>(); + private final List<IAtsPeerReviewDefinition> peerReviews = new ArrayList<>(); private IAtsWorkDefinition workDefinition; private int stateWeight = 0; private Integer recommendedPercentComplete = null; diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinition.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinition.java index 55f0906ce13..733e9701615 100644 --- a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinition.java +++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WidgetDefinition.java @@ -30,7 +30,7 @@ public class WidgetDefinition extends LayoutItem implements IAtsWidgetDefinition private String xWidgetName; private String defaultValue; private final WidgetOptionHandler options = new WidgetOptionHandler(); - private final List<IAtsWidgetConstraint> constraints = new ArrayList<IAtsWidgetConstraint>(); + private final List<IAtsWidgetConstraint> constraints = new ArrayList<>(); public WidgetDefinition(String name) { super(name); diff --git a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WorkDefinition.java b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WorkDefinition.java index 94997a26460..00207b2b34e 100644 --- a/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WorkDefinition.java +++ b/plugins/org.eclipse.osee.ats.dsl.integration/src/org/eclipse/osee/ats/dsl/integration/internal/model/WorkDefinition.java @@ -21,7 +21,7 @@ import org.eclipse.osee.framework.jdk.core.type.Identity; */ public class WorkDefinition extends AbstractWorkDefItem implements IAtsWorkDefinition { - private final List<IAtsStateDefinition> states = new ArrayList<IAtsStateDefinition>(5); + private final List<IAtsStateDefinition> states = new ArrayList<>(5); private String id; private IAtsStateDefinition startState; diff --git a/plugins/org.eclipse.osee.ats.dsl.ui/src/org/eclipse/osee/ats/dsl/ui/contentassist/AtsDslProposalProvider.java b/plugins/org.eclipse.osee.ats.dsl.ui/src/org/eclipse/osee/ats/dsl/ui/contentassist/AtsDslProposalProvider.java index 6de7a6f5077..034ec647890 100644 --- a/plugins/org.eclipse.osee.ats.dsl.ui/src/org/eclipse/osee/ats/dsl/ui/contentassist/AtsDslProposalProvider.java +++ b/plugins/org.eclipse.osee.ats.dsl.ui/src/org/eclipse/osee/ats/dsl/ui/contentassist/AtsDslProposalProvider.java @@ -116,7 +116,7 @@ public class AtsDslProposalProvider extends AbstractAtsDslProposalProvider { private void provideAttributeNameOptions(ContentAssistContext context, ICompletionProposalAcceptor acceptor) { if (acceptor.canAcceptMoreProposals()) { try { - List<String> attrs = new ArrayList<String>(); + List<String> attrs = new ArrayList<>(); for (AttributeType type : AttributeTypeManager.getAllTypes()) { attrs.add(type.getName()); } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ActionableItemDefImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ActionableItemDefImpl.java index 517264ac532..4fcd0a1baef 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ActionableItemDefImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ActionableItemDefImpl.java @@ -294,7 +294,7 @@ public class ActionableItemDefImpl extends MinimalEObjectImpl.Container implemen { if (aiDefOption == null) { - aiDefOption = new EDataTypeEList<String>(String.class, this, AtsDslPackage.ACTIONABLE_ITEM_DEF__AI_DEF_OPTION); + aiDefOption = new EDataTypeEList<>(String.class, this, AtsDslPackage.ACTIONABLE_ITEM_DEF__AI_DEF_OPTION); } return aiDefOption; } @@ -400,7 +400,7 @@ public class ActionableItemDefImpl extends MinimalEObjectImpl.Container implemen { if (lead == null) { - lead = new EObjectContainmentEList<UserRef>(UserRef.class, this, AtsDslPackage.ACTIONABLE_ITEM_DEF__LEAD); + lead = new EObjectContainmentEList<>(UserRef.class, this, AtsDslPackage.ACTIONABLE_ITEM_DEF__LEAD); } return lead; } @@ -414,7 +414,7 @@ public class ActionableItemDefImpl extends MinimalEObjectImpl.Container implemen { if (owner == null) { - owner = new EObjectContainmentEList<UserRef>(UserRef.class, this, AtsDslPackage.ACTIONABLE_ITEM_DEF__OWNER); + owner = new EObjectContainmentEList<>(UserRef.class, this, AtsDslPackage.ACTIONABLE_ITEM_DEF__OWNER); } return owner; } @@ -428,7 +428,7 @@ public class ActionableItemDefImpl extends MinimalEObjectImpl.Container implemen { if (staticId == null) { - staticId = new EDataTypeEList<String>(String.class, this, AtsDslPackage.ACTIONABLE_ITEM_DEF__STATIC_ID); + staticId = new EDataTypeEList<>(String.class, this, AtsDslPackage.ACTIONABLE_ITEM_DEF__STATIC_ID); } return staticId; } @@ -465,7 +465,7 @@ public class ActionableItemDefImpl extends MinimalEObjectImpl.Container implemen { if (accessContextId == null) { - accessContextId = new EDataTypeEList<String>(String.class, this, AtsDslPackage.ACTIONABLE_ITEM_DEF__ACCESS_CONTEXT_ID); + accessContextId = new EDataTypeEList<>(String.class, this, AtsDslPackage.ACTIONABLE_ITEM_DEF__ACCESS_CONTEXT_ID); } return accessContextId; } @@ -479,7 +479,7 @@ public class ActionableItemDefImpl extends MinimalEObjectImpl.Container implemen { if (rules == null) { - rules = new EDataTypeEList<String>(String.class, this, AtsDslPackage.ACTIONABLE_ITEM_DEF__RULES); + rules = new EDataTypeEList<>(String.class, this, AtsDslPackage.ACTIONABLE_ITEM_DEF__RULES); } return rules; } @@ -493,7 +493,7 @@ public class ActionableItemDefImpl extends MinimalEObjectImpl.Container implemen { if (children == null) { - children = new EObjectContainmentEList<ActionableItemDef>(ActionableItemDef.class, this, AtsDslPackage.ACTIONABLE_ITEM_DEF__CHILDREN); + children = new EObjectContainmentEList<>(ActionableItemDef.class, this, AtsDslPackage.ACTIONABLE_ITEM_DEF__CHILDREN); } return children; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/AtsDslImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/AtsDslImpl.java index 5ad7248ba9c..4dadb179bfb 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/AtsDslImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/AtsDslImpl.java @@ -135,7 +135,7 @@ public class AtsDslImpl extends MinimalEObjectImpl.Container implements AtsDsl { if (userDef == null) { - userDef = new EObjectContainmentEList<UserDef>(UserDef.class, this, AtsDslPackage.ATS_DSL__USER_DEF); + userDef = new EObjectContainmentEList<>(UserDef.class, this, AtsDslPackage.ATS_DSL__USER_DEF); } return userDef; } @@ -149,7 +149,7 @@ public class AtsDslImpl extends MinimalEObjectImpl.Container implements AtsDsl { if (teamDef == null) { - teamDef = new EObjectContainmentEList<TeamDef>(TeamDef.class, this, AtsDslPackage.ATS_DSL__TEAM_DEF); + teamDef = new EObjectContainmentEList<>(TeamDef.class, this, AtsDslPackage.ATS_DSL__TEAM_DEF); } return teamDef; } @@ -163,7 +163,7 @@ public class AtsDslImpl extends MinimalEObjectImpl.Container implements AtsDsl { if (actionableItemDef == null) { - actionableItemDef = new EObjectContainmentEList<ActionableItemDef>(ActionableItemDef.class, this, AtsDslPackage.ATS_DSL__ACTIONABLE_ITEM_DEF); + actionableItemDef = new EObjectContainmentEList<>(ActionableItemDef.class, this, AtsDslPackage.ATS_DSL__ACTIONABLE_ITEM_DEF); } return actionableItemDef; } @@ -177,7 +177,7 @@ public class AtsDslImpl extends MinimalEObjectImpl.Container implements AtsDsl { if (workDef == null) { - workDef = new EObjectContainmentEList<WorkDef>(WorkDef.class, this, AtsDslPackage.ATS_DSL__WORK_DEF); + workDef = new EObjectContainmentEList<>(WorkDef.class, this, AtsDslPackage.ATS_DSL__WORK_DEF); } return workDef; } @@ -191,7 +191,7 @@ public class AtsDslImpl extends MinimalEObjectImpl.Container implements AtsDsl { if (program == null) { - program = new EObjectContainmentEList<ProgramDef>(ProgramDef.class, this, AtsDslPackage.ATS_DSL__PROGRAM); + program = new EObjectContainmentEList<>(ProgramDef.class, this, AtsDslPackage.ATS_DSL__PROGRAM); } return program; } @@ -205,7 +205,7 @@ public class AtsDslImpl extends MinimalEObjectImpl.Container implements AtsDsl { if (rule == null) { - rule = new EObjectContainmentEList<Rule>(Rule.class, this, AtsDslPackage.ATS_DSL__RULE); + rule = new EObjectContainmentEList<>(Rule.class, this, AtsDslPackage.ATS_DSL__RULE); } return rule; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/AttrFullDefImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/AttrFullDefImpl.java index 0afbb05a272..792a0e66b19 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/AttrFullDefImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/AttrFullDefImpl.java @@ -116,7 +116,7 @@ public class AttrFullDefImpl extends AttrDefOptionsImpl implements AttrFullDef { if (values == null) { - values = new EDataTypeEList<String>(String.class, this, AtsDslPackage.ATTR_FULL_DEF__VALUES); + values = new EDataTypeEList<>(String.class, this, AtsDslPackage.ATTR_FULL_DEF__VALUES); } return values; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/AttrWidgetImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/AttrWidgetImpl.java index ae26c8e9c29..92eab1c7c71 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/AttrWidgetImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/AttrWidgetImpl.java @@ -116,7 +116,7 @@ public class AttrWidgetImpl extends LayoutItemImpl implements AttrWidget { if (option == null) { - option = new EDataTypeEList<String>(String.class, this, AtsDslPackage.ATTR_WIDGET__OPTION); + option = new EDataTypeEList<>(String.class, this, AtsDslPackage.ATTR_WIDGET__OPTION); } return option; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/CompositeImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/CompositeImpl.java index 397d03d9128..7c0d56eb100 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/CompositeImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/CompositeImpl.java @@ -132,7 +132,7 @@ public class CompositeImpl extends LayoutItemImpl implements Composite { if (layoutItems == null) { - layoutItems = new EObjectContainmentEList<LayoutItem>(LayoutItem.class, this, AtsDslPackage.COMPOSITE__LAYOUT_ITEMS); + layoutItems = new EObjectContainmentEList<>(LayoutItem.class, this, AtsDslPackage.COMPOSITE__LAYOUT_ITEMS); } return layoutItems; } @@ -146,7 +146,7 @@ public class CompositeImpl extends LayoutItemImpl implements Composite { if (options == null) { - options = new EDataTypeEList<String>(String.class, this, AtsDslPackage.COMPOSITE__OPTIONS); + options = new EDataTypeEList<>(String.class, this, AtsDslPackage.COMPOSITE__OPTIONS); } return options; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/CreateDecisionReviewRuleImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/CreateDecisionReviewRuleImpl.java index bf451e2f650..7d9dca4c6bf 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/CreateDecisionReviewRuleImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/CreateDecisionReviewRuleImpl.java @@ -121,7 +121,7 @@ public class CreateDecisionReviewRuleImpl extends ReviewRuleImpl implements Crea { if (options == null) { - options = new EObjectContainmentEList<DecisionReviewOpt>(DecisionReviewOpt.class, this, AtsDslPackage.CREATE_DECISION_REVIEW_RULE__OPTIONS); + options = new EObjectContainmentEList<>(DecisionReviewOpt.class, this, AtsDslPackage.CREATE_DECISION_REVIEW_RULE__OPTIONS); } return options; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/CreateTaskRuleImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/CreateTaskRuleImpl.java index 82de45cefaf..1435d53942a 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/CreateTaskRuleImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/CreateTaskRuleImpl.java @@ -143,7 +143,7 @@ public class CreateTaskRuleImpl extends RuleImpl implements CreateTaskRule { if (assignees == null) { - assignees = new EObjectContainmentEList<UserDef>(UserDef.class, this, AtsDslPackage.CREATE_TASK_RULE__ASSIGNEES); + assignees = new EObjectContainmentEList<>(UserDef.class, this, AtsDslPackage.CREATE_TASK_RULE__ASSIGNEES); } return assignees; } @@ -203,7 +203,7 @@ public class CreateTaskRuleImpl extends RuleImpl implements CreateTaskRule { if (onEvent == null) { - onEvent = new EDataTypeEList<OnEventType>(OnEventType.class, this, AtsDslPackage.CREATE_TASK_RULE__ON_EVENT); + onEvent = new EDataTypeEList<>(OnEventType.class, this, AtsDslPackage.CREATE_TASK_RULE__ON_EVENT); } return onEvent; } @@ -217,7 +217,7 @@ public class CreateTaskRuleImpl extends RuleImpl implements CreateTaskRule { if (attributes == null) { - attributes = new EObjectContainmentEList<AttrDef>(AttrDef.class, this, AtsDslPackage.CREATE_TASK_RULE__ATTRIBUTES); + attributes = new EObjectContainmentEList<>(AttrDef.class, this, AtsDslPackage.CREATE_TASK_RULE__ATTRIBUTES); } return attributes; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/DecisionReviewDefImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/DecisionReviewDefImpl.java index b2f8ac5f3eb..faa82cdabc2 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/DecisionReviewDefImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/DecisionReviewDefImpl.java @@ -388,7 +388,7 @@ public class DecisionReviewDefImpl extends MinimalEObjectImpl.Container implemen { if (assigneeRefs == null) { - assigneeRefs = new EObjectContainmentEList<UserRef>(UserRef.class, this, AtsDslPackage.DECISION_REVIEW_DEF__ASSIGNEE_REFS); + assigneeRefs = new EObjectContainmentEList<>(UserRef.class, this, AtsDslPackage.DECISION_REVIEW_DEF__ASSIGNEE_REFS); } return assigneeRefs; } @@ -425,7 +425,7 @@ public class DecisionReviewDefImpl extends MinimalEObjectImpl.Container implemen { if (options == null) { - options = new EObjectContainmentEList<DecisionReviewOpt>(DecisionReviewOpt.class, this, AtsDslPackage.DECISION_REVIEW_DEF__OPTIONS); + options = new EObjectContainmentEList<>(DecisionReviewOpt.class, this, AtsDslPackage.DECISION_REVIEW_DEF__OPTIONS); } return options; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/FollowupRefImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/FollowupRefImpl.java index c73087e6c5d..3827de10cf9 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/FollowupRefImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/FollowupRefImpl.java @@ -75,7 +75,7 @@ public class FollowupRefImpl extends MinimalEObjectImpl.Container implements Fol { if (assigneeRefs == null) { - assigneeRefs = new EObjectContainmentEList<UserRef>(UserRef.class, this, AtsDslPackage.FOLLOWUP_REF__ASSIGNEE_REFS); + assigneeRefs = new EObjectContainmentEList<>(UserRef.class, this, AtsDslPackage.FOLLOWUP_REF__ASSIGNEE_REFS); } return assigneeRefs; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/LayoutDefImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/LayoutDefImpl.java index c2b28aadca3..ec280d5e7d0 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/LayoutDefImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/LayoutDefImpl.java @@ -73,7 +73,7 @@ public class LayoutDefImpl extends LayoutTypeImpl implements LayoutDef { if (layoutItems == null) { - layoutItems = new EObjectContainmentEList<LayoutItem>(LayoutItem.class, this, AtsDslPackage.LAYOUT_DEF__LAYOUT_ITEMS); + layoutItems = new EObjectContainmentEList<>(LayoutItem.class, this, AtsDslPackage.LAYOUT_DEF__LAYOUT_ITEMS); } return layoutItems; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/PeerReviewDefImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/PeerReviewDefImpl.java index 7eee5d876a2..9a8481b5e1a 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/PeerReviewDefImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/PeerReviewDefImpl.java @@ -398,7 +398,7 @@ public class PeerReviewDefImpl extends MinimalEObjectImpl.Container implements P { if (assigneeRefs == null) { - assigneeRefs = new EObjectContainmentEList<UserRef>(UserRef.class, this, AtsDslPackage.PEER_REVIEW_DEF__ASSIGNEE_REFS); + assigneeRefs = new EObjectContainmentEList<>(UserRef.class, this, AtsDslPackage.PEER_REVIEW_DEF__ASSIGNEE_REFS); } return assigneeRefs; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ProgramDefImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ProgramDefImpl.java index 0d93c00c69f..02c9b5f4bdc 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ProgramDefImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ProgramDefImpl.java @@ -260,7 +260,7 @@ public class ProgramDefImpl extends MinimalEObjectImpl.Container implements Prog { if (programDefOption == null) { - programDefOption = new EDataTypeEList<String>(String.class, this, AtsDslPackage.PROGRAM_DEF__PROGRAM_DEF_OPTION); + programDefOption = new EDataTypeEList<>(String.class, this, AtsDslPackage.PROGRAM_DEF__PROGRAM_DEF_OPTION); } return programDefOption; } @@ -412,7 +412,7 @@ public class ProgramDefImpl extends MinimalEObjectImpl.Container implements Prog { if (attributes == null) { - attributes = new EObjectContainmentEList<AttrDef>(AttrDef.class, this, AtsDslPackage.PROGRAM_DEF__ATTRIBUTES); + attributes = new EObjectContainmentEList<>(AttrDef.class, this, AtsDslPackage.PROGRAM_DEF__ATTRIBUTES); } return attributes; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ReviewRuleImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ReviewRuleImpl.java index 1690f35c331..ce0f479c5b1 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ReviewRuleImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ReviewRuleImpl.java @@ -153,7 +153,7 @@ public class ReviewRuleImpl extends RuleImpl implements ReviewRule { if (assignees == null) { - assignees = new EObjectContainmentEList<UserDef>(UserDef.class, this, AtsDslPackage.REVIEW_RULE__ASSIGNEES); + assignees = new EObjectContainmentEList<>(UserDef.class, this, AtsDslPackage.REVIEW_RULE__ASSIGNEES); } return assignees; } @@ -236,7 +236,7 @@ public class ReviewRuleImpl extends RuleImpl implements ReviewRule { if (attributes == null) { - attributes = new EObjectContainmentEList<AttrDef>(AttrDef.class, this, AtsDslPackage.REVIEW_RULE__ATTRIBUTES); + attributes = new EObjectContainmentEList<>(AttrDef.class, this, AtsDslPackage.REVIEW_RULE__ATTRIBUTES); } return attributes; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/RuleImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/RuleImpl.java index 5f9440df863..af9fb816471 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/RuleImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/RuleImpl.java @@ -206,7 +206,7 @@ public class RuleImpl extends MinimalEObjectImpl.Container implements Rule { if (ruleLocation == null) { - ruleLocation = new EDataTypeEList<RuleLocation>(RuleLocation.class, this, AtsDslPackage.RULE__RULE_LOCATION); + ruleLocation = new EDataTypeEList<>(RuleLocation.class, this, AtsDslPackage.RULE__RULE_LOCATION); } return ruleLocation; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/StateDefImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/StateDefImpl.java index 6515c46ae88..32bd6096777 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/StateDefImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/StateDefImpl.java @@ -364,7 +364,7 @@ public class StateDefImpl extends MinimalEObjectImpl.Container implements StateD { if (transitionStates == null) { - transitionStates = new EObjectContainmentEList<ToState>(ToState.class, this, AtsDslPackage.STATE_DEF__TRANSITION_STATES); + transitionStates = new EObjectContainmentEList<>(ToState.class, this, AtsDslPackage.STATE_DEF__TRANSITION_STATES); } return transitionStates; } @@ -378,7 +378,7 @@ public class StateDefImpl extends MinimalEObjectImpl.Container implements StateD { if (rules == null) { - rules = new EDataTypeEList<String>(String.class, this, AtsDslPackage.STATE_DEF__RULES); + rules = new EDataTypeEList<>(String.class, this, AtsDslPackage.STATE_DEF__RULES); } return rules; } @@ -392,7 +392,7 @@ public class StateDefImpl extends MinimalEObjectImpl.Container implements StateD { if (decisionReviews == null) { - decisionReviews = new EObjectContainmentEList<DecisionReviewRef>(DecisionReviewRef.class, this, AtsDslPackage.STATE_DEF__DECISION_REVIEWS); + decisionReviews = new EObjectContainmentEList<>(DecisionReviewRef.class, this, AtsDslPackage.STATE_DEF__DECISION_REVIEWS); } return decisionReviews; } @@ -406,7 +406,7 @@ public class StateDefImpl extends MinimalEObjectImpl.Container implements StateD { if (peerReviews == null) { - peerReviews = new EObjectContainmentEList<PeerReviewRef>(PeerReviewRef.class, this, AtsDslPackage.STATE_DEF__PEER_REVIEWS); + peerReviews = new EObjectContainmentEList<>(PeerReviewRef.class, this, AtsDslPackage.STATE_DEF__PEER_REVIEWS); } return peerReviews; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/TeamDefImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/TeamDefImpl.java index 0919484a560..22441396307 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/TeamDefImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/TeamDefImpl.java @@ -338,7 +338,7 @@ public class TeamDefImpl extends MinimalEObjectImpl.Container implements TeamDef { if (teamDefOption == null) { - teamDefOption = new EDataTypeEList<String>(String.class, this, AtsDslPackage.TEAM_DEF__TEAM_DEF_OPTION); + teamDefOption = new EDataTypeEList<>(String.class, this, AtsDslPackage.TEAM_DEF__TEAM_DEF_OPTION); } return teamDefOption; } @@ -421,7 +421,7 @@ public class TeamDefImpl extends MinimalEObjectImpl.Container implements TeamDef { if (staticId == null) { - staticId = new EDataTypeEList<String>(String.class, this, AtsDslPackage.TEAM_DEF__STATIC_ID); + staticId = new EDataTypeEList<>(String.class, this, AtsDslPackage.TEAM_DEF__STATIC_ID); } return staticId; } @@ -435,7 +435,7 @@ public class TeamDefImpl extends MinimalEObjectImpl.Container implements TeamDef { if (lead == null) { - lead = new EObjectContainmentEList<UserRef>(UserRef.class, this, AtsDslPackage.TEAM_DEF__LEAD); + lead = new EObjectContainmentEList<>(UserRef.class, this, AtsDslPackage.TEAM_DEF__LEAD); } return lead; } @@ -449,7 +449,7 @@ public class TeamDefImpl extends MinimalEObjectImpl.Container implements TeamDef { if (member == null) { - member = new EObjectContainmentEList<UserRef>(UserRef.class, this, AtsDslPackage.TEAM_DEF__MEMBER); + member = new EObjectContainmentEList<>(UserRef.class, this, AtsDslPackage.TEAM_DEF__MEMBER); } return member; } @@ -463,7 +463,7 @@ public class TeamDefImpl extends MinimalEObjectImpl.Container implements TeamDef { if (privileged == null) { - privileged = new EObjectContainmentEList<UserRef>(UserRef.class, this, AtsDslPackage.TEAM_DEF__PRIVILEGED); + privileged = new EObjectContainmentEList<>(UserRef.class, this, AtsDslPackage.TEAM_DEF__PRIVILEGED); } return privileged; } @@ -546,7 +546,7 @@ public class TeamDefImpl extends MinimalEObjectImpl.Container implements TeamDef { if (accessContextId == null) { - accessContextId = new EDataTypeEList<String>(String.class, this, AtsDslPackage.TEAM_DEF__ACCESS_CONTEXT_ID); + accessContextId = new EDataTypeEList<>(String.class, this, AtsDslPackage.TEAM_DEF__ACCESS_CONTEXT_ID); } return accessContextId; } @@ -560,7 +560,7 @@ public class TeamDefImpl extends MinimalEObjectImpl.Container implements TeamDef { if (version == null) { - version = new EObjectContainmentEList<VersionDef>(VersionDef.class, this, AtsDslPackage.TEAM_DEF__VERSION); + version = new EObjectContainmentEList<>(VersionDef.class, this, AtsDslPackage.TEAM_DEF__VERSION); } return version; } @@ -574,7 +574,7 @@ public class TeamDefImpl extends MinimalEObjectImpl.Container implements TeamDef { if (rules == null) { - rules = new EDataTypeEList<String>(String.class, this, AtsDslPackage.TEAM_DEF__RULES); + rules = new EDataTypeEList<>(String.class, this, AtsDslPackage.TEAM_DEF__RULES); } return rules; } @@ -588,7 +588,7 @@ public class TeamDefImpl extends MinimalEObjectImpl.Container implements TeamDef { if (children == null) { - children = new EObjectContainmentEList<TeamDef>(TeamDef.class, this, AtsDslPackage.TEAM_DEF__CHILDREN); + children = new EObjectContainmentEList<>(TeamDef.class, this, AtsDslPackage.TEAM_DEF__CHILDREN); } return children; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ToStateImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ToStateImpl.java index 4d1febafe88..dd98676263a 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ToStateImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/ToStateImpl.java @@ -129,7 +129,7 @@ public class ToStateImpl extends MinimalEObjectImpl.Container implements ToState { if (options == null) { - options = new EDataTypeEList<String>(String.class, this, AtsDslPackage.TO_STATE__OPTIONS); + options = new EDataTypeEList<>(String.class, this, AtsDslPackage.TO_STATE__OPTIONS); } return options; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/UserDefImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/UserDefImpl.java index 1cb7e14a02c..5792640e81f 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/UserDefImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/UserDefImpl.java @@ -202,7 +202,7 @@ public class UserDefImpl extends MinimalEObjectImpl.Container implements UserDef { if (userDefOption == null) { - userDefOption = new EDataTypeEList<String>(String.class, this, AtsDslPackage.USER_DEF__USER_DEF_OPTION); + userDefOption = new EDataTypeEList<>(String.class, this, AtsDslPackage.USER_DEF__USER_DEF_OPTION); } return userDefOption; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/VersionDefImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/VersionDefImpl.java index 4ae45e0f2a0..e5eeac3bd9a 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/VersionDefImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/VersionDefImpl.java @@ -322,7 +322,7 @@ public class VersionDefImpl extends MinimalEObjectImpl.Container implements Vers { if (staticId == null) { - staticId = new EDataTypeEList<String>(String.class, this, AtsDslPackage.VERSION_DEF__STATIC_ID); + staticId = new EDataTypeEList<>(String.class, this, AtsDslPackage.VERSION_DEF__STATIC_ID); } return staticId; } @@ -451,7 +451,7 @@ public class VersionDefImpl extends MinimalEObjectImpl.Container implements Vers { if (parallelVersion == null) { - parallelVersion = new EDataTypeEList<String>(String.class, this, AtsDslPackage.VERSION_DEF__PARALLEL_VERSION); + parallelVersion = new EDataTypeEList<>(String.class, this, AtsDslPackage.VERSION_DEF__PARALLEL_VERSION); } return parallelVersion; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/WidgetDefImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/WidgetDefImpl.java index 028cdb9c2b7..bf5116ae528 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/WidgetDefImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/WidgetDefImpl.java @@ -379,7 +379,7 @@ public class WidgetDefImpl extends MinimalEObjectImpl.Container implements Widge { if (option == null) { - option = new EDataTypeEList<String>(String.class, this, AtsDslPackage.WIDGET_DEF__OPTION); + option = new EDataTypeEList<>(String.class, this, AtsDslPackage.WIDGET_DEF__OPTION); } return option; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/WorkDefImpl.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/WorkDefImpl.java index 878814d03cf..0e4e21d2e81 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/WorkDefImpl.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/atsDsl/impl/WorkDefImpl.java @@ -180,7 +180,7 @@ public class WorkDefImpl extends MinimalEObjectImpl.Container implements WorkDef { if (id == null) { - id = new EDataTypeEList<String>(String.class, this, AtsDslPackage.WORK_DEF__ID); + id = new EDataTypeEList<>(String.class, this, AtsDslPackage.WORK_DEF__ID); } return id; } @@ -237,7 +237,7 @@ public class WorkDefImpl extends MinimalEObjectImpl.Container implements WorkDef { if (widgetDefs == null) { - widgetDefs = new EObjectContainmentEList<WidgetDef>(WidgetDef.class, this, AtsDslPackage.WORK_DEF__WIDGET_DEFS); + widgetDefs = new EObjectContainmentEList<>(WidgetDef.class, this, AtsDslPackage.WORK_DEF__WIDGET_DEFS); } return widgetDefs; } @@ -251,7 +251,7 @@ public class WorkDefImpl extends MinimalEObjectImpl.Container implements WorkDef { if (decisionReviewDefs == null) { - decisionReviewDefs = new EObjectContainmentEList<DecisionReviewDef>(DecisionReviewDef.class, this, AtsDslPackage.WORK_DEF__DECISION_REVIEW_DEFS); + decisionReviewDefs = new EObjectContainmentEList<>(DecisionReviewDef.class, this, AtsDslPackage.WORK_DEF__DECISION_REVIEW_DEFS); } return decisionReviewDefs; } @@ -265,7 +265,7 @@ public class WorkDefImpl extends MinimalEObjectImpl.Container implements WorkDef { if (peerReviewDefs == null) { - peerReviewDefs = new EObjectContainmentEList<PeerReviewDef>(PeerReviewDef.class, this, AtsDslPackage.WORK_DEF__PEER_REVIEW_DEFS); + peerReviewDefs = new EObjectContainmentEList<>(PeerReviewDef.class, this, AtsDslPackage.WORK_DEF__PEER_REVIEW_DEFS); } return peerReviewDefs; } @@ -279,7 +279,7 @@ public class WorkDefImpl extends MinimalEObjectImpl.Container implements WorkDef { if (states == null) { - states = new EObjectContainmentEList<StateDef>(StateDef.class, this, AtsDslPackage.WORK_DEF__STATES); + states = new EObjectContainmentEList<>(StateDef.class, this, AtsDslPackage.WORK_DEF__STATES); } return states; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/validation/AbstractAtsDslJavaValidator.java b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/validation/AbstractAtsDslJavaValidator.java index 56db0d5e73f..4f059e601e0 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/validation/AbstractAtsDslJavaValidator.java +++ b/plugins/org.eclipse.osee.ats.dsl/src-gen/org/eclipse/osee/ats/dsl/validation/AbstractAtsDslJavaValidator.java @@ -14,7 +14,7 @@ public class AbstractAtsDslJavaValidator extends org.eclipse.xtext.validation.Ab @Override protected List<EPackage> getEPackages() { - List<EPackage> result = new ArrayList<EPackage>(); + List<EPackage> result = new ArrayList<>(); result.add(org.eclipse.osee.ats.dsl.atsDsl.AtsDslPackage.eINSTANCE); return result; } diff --git a/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/AtsDslResourceProvider.java b/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/AtsDslResourceProvider.java index 3f5c206135e..0218ac70a33 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/AtsDslResourceProvider.java +++ b/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/AtsDslResourceProvider.java @@ -37,7 +37,7 @@ public class AtsDslResourceProvider implements IResourceProvider { @Override public Collection<String> getErrors() { - List<String> errors = new LinkedList<String>(); + List<String> errors = new LinkedList<>(); for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : resource.getErrors()) { throw new IllegalStateException(diagnostic.toString()); } diff --git a/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/ModelUtil.java b/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/ModelUtil.java index 8b55fb3979a..3324d2f56b9 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/ModelUtil.java +++ b/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/ModelUtil.java @@ -50,7 +50,7 @@ public final class ModelUtil { Resource resource = resourceSet.createResource(URI.createURI(uri)); resource.getContents().add(model); - Map<String, Boolean> options = new HashMap<String, Boolean>(); + Map<String, Boolean> options = new HashMap<>(); SaveOptions saveOptions = SaveOptions.getOptions(options); resource.save(outputStream, saveOptions.toOptionsMap()); } diff --git a/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/UserRefUtil.java b/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/UserRefUtil.java index 6697c2398c1..248be517db8 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/UserRefUtil.java +++ b/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/UserRefUtil.java @@ -24,7 +24,7 @@ import org.eclipse.osee.framework.jdk.core.util.Strings; public class UserRefUtil { public static Set<String> getUserIds(EList<UserRef> userRefs) { - Set<String> userIds = new HashSet<String>(); + Set<String> userIds = new HashSet<>(); for (UserRef UserRef : userRefs) { if (UserRef instanceof UserByUserId) { userIds.add(((UserByUserId) UserRef).getUserId()); @@ -34,7 +34,7 @@ public class UserRefUtil { } public static Set<String> getUserNames(EList<UserRef> userRefs) { - Set<String> userNames = new HashSet<String>(); + Set<String> userNames = new HashSet<>(); for (UserRef UserRef : userRefs) { if (UserRef instanceof UserByName) { userNames.add(Strings.unquote(((UserByName) UserRef).getUserName())); diff --git a/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/formatting/AtsDslFormatter.java b/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/formatting/AtsDslFormatter.java index 16c7a39d8e5..8a337280637 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/formatting/AtsDslFormatter.java +++ b/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/formatting/AtsDslFormatter.java @@ -77,7 +77,7 @@ public class AtsDslFormatter extends AbstractDeclarativeFormatter implements IIn c.setAutoLinewrap(120); Iterable<Keyword> keywords = GrammarUtil.containedKeywords(access.getGrammar()); - Stack<Keyword> openBraceStack = new Stack<Keyword>(); + Stack<Keyword> openBraceStack = new Stack<>(); for (Keyword currentKeyword : keywords) { String current = currentKeyword.getValue(); diff --git a/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/validation/AtsDslJavaValidator.java b/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/validation/AtsDslJavaValidator.java index c5ee9594609..89addea4a0d 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/validation/AtsDslJavaValidator.java +++ b/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/validation/AtsDslJavaValidator.java @@ -67,7 +67,7 @@ public class AtsDslJavaValidator extends AbstractAtsDslJavaValidator { if (atsDsl.getWorkDef() == null) { return; } - Set<Integer> ordinals = new HashSet<Integer>(); + Set<Integer> ordinals = new HashSet<>(); for (WorkDef workDef : atsDsl.getWorkDef()) { for (StateDef state : workDef.getStates()) { if (ordinals.contains(state.getOrdinal())) { diff --git a/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/validation/AtsNamesAreUniqueValidator.java b/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/validation/AtsNamesAreUniqueValidator.java index b2d6ff58bc7..38448152586 100644 --- a/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/validation/AtsNamesAreUniqueValidator.java +++ b/plugins/org.eclipse.osee.ats.dsl/src/org/eclipse/osee/ats/dsl/validation/AtsNamesAreUniqueValidator.java @@ -39,7 +39,7 @@ public class AtsNamesAreUniqueValidator extends NamesAreUniqueValidator { @Override public void checkUniqueNames(Iterable<IEObjectDescription> descriptions, CancelIndicator cancelIndicator, ValidationMessageAcceptor acceptor) { - List<IEObjectDescription> validDescriptions = new ArrayList<IEObjectDescription>(); + List<IEObjectDescription> validDescriptions = new ArrayList<>(); for (IEObjectDescription description : descriptions) { if (!(description.getEObjectOrProxy() instanceof UserRef)) { validDescriptions.add(description); diff --git a/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/HelpContextTest.java b/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/HelpContextTest.java index 5b6731bb22e..c43fc99eccc 100644 --- a/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/HelpContextTest.java +++ b/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/HelpContextTest.java @@ -72,7 +72,7 @@ public class HelpContextTest { } private static Map<String, HelpContext> getContexts(Class<?> clazz) throws IllegalArgumentException, IllegalAccessException { - Map<String, HelpContext> contexts = new HashMap<String, HelpContext>(); + Map<String, HelpContext> contexts = new HashMap<>(); for (Field field : clazz.getFields()) { Object object = field.get(null); if (object instanceof HelpContext) { diff --git a/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/util/ContextParser.java b/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/util/ContextParser.java index 045e8aef058..7d09fadfd46 100644 --- a/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/util/ContextParser.java +++ b/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/util/ContextParser.java @@ -36,7 +36,7 @@ public class ContextParser { private static final String HREF = "href"; private static final String ID_TAG = "id"; - public Map<String, ContextEntry> entries = new HashMap<String, ContextEntry>(); + public Map<String, ContextEntry> entries = new HashMap<>(); public String path; private String localName; @@ -121,7 +121,7 @@ public class ContextParser { public final class ContextEntry { private final String id; - private final Set<String> references = new LinkedHashSet<String>(); + private final Set<String> references = new LinkedHashSet<>(); public ContextEntry(String id) { super(); diff --git a/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/util/HtmlParser.java b/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/util/HtmlParser.java index c3a57acd34e..4b0a733597b 100644 --- a/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/util/HtmlParser.java +++ b/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/util/HtmlParser.java @@ -56,7 +56,7 @@ public class HtmlParser { } public Set<String> parse(URL url) throws Exception { - Set<String> entries = new HashSet<String>(); + Set<String> entries = new HashSet<>(); entries.clear(); String pathPrefix = getPath(url.toString()); diff --git a/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/util/TocParser.java b/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/util/TocParser.java index 4d671eb370a..1df316ce995 100644 --- a/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/util/TocParser.java +++ b/plugins/org.eclipse.osee.ats.help.ui.test/src/org/eclipse/osee/ats/help/ui/util/TocParser.java @@ -32,7 +32,7 @@ public class TocParser { private static final String TOPIC = "topic"; private static final String HREF = "href"; - public Set<String> entries = new HashSet<String>(); + public Set<String> entries = new HashSet<>(); public String path; private String localName; diff --git a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/notify/WorkItemNotificationProcessorTest.java b/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/notify/WorkItemNotificationProcessorTest.java index 57e13ee3071..a940e6182f0 100644 --- a/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/notify/WorkItemNotificationProcessorTest.java +++ b/plugins/org.eclipse.osee.ats.impl.test/src/org/eclipse/osee/ats/impl/internal/notify/WorkItemNotificationProcessorTest.java @@ -80,7 +80,7 @@ public class WorkItemNotificationProcessorTest { false, false); when(teamWf.getName()).thenReturn(WorkItemNotificationProcessorTest.class.getSimpleName() + "-testNotify"); - List<IAtsUser> assignees = new ArrayList<IAtsUser>(); + List<IAtsUser> assignees = new ArrayList<>(); assignees.addAll(Arrays.asList(inactiveSteve, alex_NoValidEmail, jason_ValidEmail, kay_ValidEmail, joeSmith_CurrentUser)); String atsId = "ATS003"; @@ -96,7 +96,7 @@ public class WorkItemNotificationProcessorTest { when(teamWf.getStateDefinition()).thenReturn(stateDef); when(teamWf.getTeamDefinition()).thenReturn(teamDef); - Set<IAtsActionableItem> ais = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> ais = new HashSet<>(); ais.add(ai); when(teamWf.getActionableItems()).thenReturn(ais); @@ -150,10 +150,10 @@ public class WorkItemNotificationProcessorTest { // joe smith should be removed from list cause it's current user // alex should be removed cause not valid email - List<String> expectedUserIds = new ArrayList<String>(); + List<String> expectedUserIds = new ArrayList<>(); expectedUserIds.add(jason_ValidEmail.getUserId()); expectedUserIds.add(kay_ValidEmail.getUserId()); - List<IAtsUser> users = new ArrayList<IAtsUser>(); + List<IAtsUser> users = new ArrayList<>(); for (String userId : event.getUserIds()) { users.add(userService.getUserById(userId)); } diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/config/AbstractConfigResource.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/config/AbstractConfigResource.java index 819f0b2fa2e..35c414f66c1 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/config/AbstractConfigResource.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/config/AbstractConfigResource.java @@ -71,7 +71,7 @@ public abstract class AbstractConfigResource { } private List<IAtsConfigObject> getObjects() { - List<IAtsConfigObject> configs = new ArrayList<IAtsConfigObject>(); + List<IAtsConfigObject> configs = new ArrayList<>(); for (ArtifactReadable art : atsServer.getQuery().andIsOfType(artifactType).getResults()) { configs.add(atsServer.getConfigItemFactory().getConfigObject(art)); } diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/AtsServerImpl.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/AtsServerImpl.java index 2a5e9b3fc1a..116590641a0 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/AtsServerImpl.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/AtsServerImpl.java @@ -146,7 +146,7 @@ public class AtsServerImpl implements IAtsServer { private volatile boolean emailEnabled = true; - private final List<IAtsNotifierServer> notifiers = new CopyOnWriteArrayList<IAtsNotifierServer>(); + private final List<IAtsNotifierServer> notifiers = new CopyOnWriteArrayList<>(); private final Map<String, IAtsDatabaseConversion> externalConversions = new ConcurrentHashMap<String, IAtsDatabaseConversion>(); private IArtifactResolver artifactResolver; @@ -415,7 +415,7 @@ public class AtsServerImpl implements IAtsServer { @Override public Collection<ArtifactReadable> getArtifacts(List<Long> uuids) { - Collection<ArtifactReadable> artifacts = new LinkedList<ArtifactReadable>(); + Collection<ArtifactReadable> artifacts = new LinkedList<>(); Iterator<ArtifactReadable> iterator = orcsApi.getQueryFactory().fromBranch(AtsUtilCore.getAtsBranch()).andUuids(uuids).getResults().iterator(); while (iterator.hasNext()) { @@ -426,7 +426,7 @@ public class AtsServerImpl implements IAtsServer { @Override public List<ArtifactReadable> getArtifactListByIds(String ids) { - List<ArtifactReadable> actions = new ArrayList<ArtifactReadable>(); + List<ArtifactReadable> actions = new ArrayList<>(); for (String id : ids.split(",")) { id = id.replaceAll("^ +", ""); id = id.replaceAll(" +$", ""); @@ -497,7 +497,7 @@ public class AtsServerImpl implements IAtsServer { @Override public List<IAtsWorkItem> getWorkItemListByIds(String ids) { - List<IAtsWorkItem> workItems = new ArrayList<IAtsWorkItem>(); + List<IAtsWorkItem> workItems = new ArrayList<>(); for (ArtifactReadable art : getArtifactListByIds(ids)) { IAtsWorkItem workItem = workItemFactory.getWorkItem(art); if (workItem != null) { @@ -540,7 +540,7 @@ public class AtsServerImpl implements IAtsServer { @Override public Collection<IArtifactType> getArtifactTypes() { - List<IArtifactType> types = new ArrayList<IArtifactType>(); + List<IArtifactType> types = new ArrayList<>(); types.addAll(orcsApi.getOrcsTypes().getArtifactTypes().getAll()); return types; } diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileFactory.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileFactory.java index 684134beacf..237ef877d3c 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileFactory.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileFactory.java @@ -68,7 +68,7 @@ public class AgileFactory { transaction.addChildren(topAgileFolder, agileTeamArt); } - Set<ArtifactReadable> atsTeamArts = new HashSet<ArtifactReadable>(); + Set<ArtifactReadable> atsTeamArts = new HashSet<>(); transaction.setRelations(agileTeamArt, AtsRelationTypes.AgileTeamToAtsTeam_AtsTeam, atsTeamArts); transaction.commit(); @@ -101,7 +101,7 @@ public class AgileFactory { transaction.addChildren(topAgileFolder, agileTeamArt); } - Set<ArtifactReadable> atsTeamArts = new HashSet<ArtifactReadable>(); + Set<ArtifactReadable> atsTeamArts = new HashSet<>(); for (long atsTeamUuid : team.getAtsTeamUuids()) { ArtifactReadable atsTeamArt = atsServer.getArtifactByUuid(atsTeamUuid); if (atsTeamArt != null && atsTeamArt.isOfType(AtsArtifactTypes.TeamDefinition)) { diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileItemWriter.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileItemWriter.java index 607bd7e6a6e..fa8abf93220 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileItemWriter.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileItemWriter.java @@ -45,7 +45,7 @@ public class AgileItemWriter { if (newItem.isSetFeatures()) { Collection<IAgileFeatureGroup> features = agileService.getAgileFeatureGroups(newItem.getFeatures()); - List<ArtifactReadable> featureArts = new LinkedList<ArtifactReadable>(); + List<ArtifactReadable> featureArts = new LinkedList<>(); for (IAgileFeatureGroup feature : features) { featureArts.add((ArtifactReadable) feature.getStoreObject()); } diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileService.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileService.java index 908705f464b..f7b712d0986 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileService.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileService.java @@ -118,7 +118,7 @@ public class AgileService implements IAgileService { @Override public Collection<IAgileTeam> getTeams() { - List<IAgileTeam> teams = new ArrayList<IAgileTeam>(); + List<IAgileTeam> teams = new ArrayList<>(); for (ArtifactReadable teamArt : atsServer.getQuery().andTypeEquals(AtsArtifactTypes.AgileTeam).getResults()) { teams.add(getAgileTeam(teamArt)); } @@ -182,7 +182,7 @@ public class AgileService implements IAgileService { @Override public Collection<IAgileFeatureGroup> getAgileFeatureGroups(IAgileTeam team) { - List<IAgileFeatureGroup> groups = new LinkedList<IAgileFeatureGroup>(); + List<IAgileFeatureGroup> groups = new LinkedList<>(); ArtifactReadable artifact = (ArtifactReadable) team.getStoreObject(); for (ArtifactReadable groupArt : artifact.getRelated(AtsRelationTypes.AgileTeamToFeatureGroup_FeatureGroup)) { groups.add(atsServer.getConfigItemFactory().getAgileFeatureGroup(groupArt)); @@ -223,7 +223,7 @@ public class AgileService implements IAgileService { @Override public Collection<IAgileSprint> getSprintsForTeam(long teamUuid) { - List<IAgileSprint> sprints = new ArrayList<IAgileSprint>(); + List<IAgileSprint> sprints = new ArrayList<>(); ArtifactReadable team = getArtifact(teamUuid); for (ArtifactReadable sprintArt : team.getRelated(AtsRelationTypes.AgileTeamToSprint_Sprint)) { sprints.add(getAgileSprint(sprintArt)); @@ -233,7 +233,7 @@ public class AgileService implements IAgileService { @Override public Collection<IAgileSprint> getAgileSprints(IAgileTeam team) { - List<IAgileSprint> sprints = new LinkedList<IAgileSprint>(); + List<IAgileSprint> sprints = new LinkedList<>(); ArtifactReadable artifact = (ArtifactReadable) team.getStoreObject(); for (ArtifactReadable groupArt : artifact.getRelated(AtsRelationTypes.AgileTeamToSprint_Sprint)) { sprints.add(atsServer.getWorkItemFactory().getAgileSprint(groupArt)); @@ -291,7 +291,7 @@ public class AgileService implements IAgileService { @Override public Collection<IAgileFeatureGroup> getAgileFeatureGroups(List<Long> uuids) { - List<IAgileFeatureGroup> features = new LinkedList<IAgileFeatureGroup>(); + List<IAgileFeatureGroup> features = new LinkedList<>(); for (ArtifactReadable featureArt : atsServer.getArtifacts(uuids)) { features.add(atsServer.getConfigItemFactory().getAgileFeatureGroup(featureArt)); } @@ -300,7 +300,7 @@ public class AgileService implements IAgileService { @Override public Collection<IAgileItem> getItems(IAgileBacklog backlog) { - List<IAgileItem> items = new LinkedList<IAgileItem>(); + List<IAgileItem> items = new LinkedList<>(); ArtifactReadable backlogArt = (ArtifactReadable) backlog.getStoreObject(); for (ArtifactReadable art : backlogArt.getRelated(AtsRelationTypes.Goal_Member)) { if (art.isOfType(AtsArtifactTypes.AbstractWorkflowArtifact)) { @@ -315,7 +315,7 @@ public class AgileService implements IAgileService { @Override public Collection<IAgileFeatureGroup> getFeatureGroups(IAgileItem aItem) { - List<IAgileFeatureGroup> groups = new LinkedList<IAgileFeatureGroup>(); + List<IAgileFeatureGroup> groups = new LinkedList<>(); ArtifactReadable itemArt = atsServer.getArtifact(aItem); for (ArtifactReadable featureGroup : itemArt.getRelated(AtsRelationTypes.AgileFeatureToItem_FeatureGroup)) { groups.add(atsServer.getAgileService().getAgileFeatureGroup(featureGroup)); diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileTeam.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileTeam.java index 7d6b636078a..c2feaa6aa79 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileTeam.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/agile/AgileTeam.java @@ -40,7 +40,7 @@ public class AgileTeam extends AtsConfigObject implements IAgileTeam { @Override public List<Long> getAtsTeamUuids() { - List<Long> uuids = new ArrayList<Long>(); + List<Long> uuids = new ArrayList<>(); for (ArtifactReadable atsTeam : getArtifact().getRelated(AtsRelationTypes.AgileTeamToAtsTeam_AtsTeam)) { uuids.add(new Long(atsTeam.getUuid())); } diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/SendNotificationEvents.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/SendNotificationEvents.java index e122fcb6ca4..598d7aa7941 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/SendNotificationEvents.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/SendNotificationEvents.java @@ -60,7 +60,7 @@ public class SendNotificationEvents { public Result run() { try { - Set<IAtsUser> uniqueUusers = new HashSet<IAtsUser>(); + Set<IAtsUser> uniqueUusers = new HashSet<>(); for (AtsNotificationEvent notificationEvent : notificationEvents) { uniqueUusers.addAll(AtsUsersUtility.getUsers(notificationEvent.getUserIds(), userService)); } @@ -70,7 +70,7 @@ public class SendNotificationEvents { testingUserEmail); } for (IAtsUser user : AtsUsersUtility.getValidEmailUsers(uniqueUusers)) { - List<AtsNotificationEvent> notifyEvents = new ArrayList<AtsNotificationEvent>(); + List<AtsNotificationEvent> notifyEvents = new ArrayList<>(); for (AtsNotificationEvent notificationEvent : notificationEvents) { if (isTesting() || AtsUsersUtility.getUsers(notificationEvent.getUserIds(), userService).contains(user)) { notifyEvents.add(notificationEvent); diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/WorkItemNotificationProcessor.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/WorkItemNotificationProcessor.java index 484d5b21b1c..ade057c4e2f 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/WorkItemNotificationProcessor.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/notify/WorkItemNotificationProcessor.java @@ -68,7 +68,7 @@ public class WorkItemNotificationProcessor { */ public void run(AtsNotificationCollector notifications, AtsWorkItemNotificationEvent event) throws OseeCoreException { Collection<AtsNotifyType> types = event.getNotifyTypes(); - List<IAtsUser> notifyUsers = new ArrayList<IAtsUser>(); + List<IAtsUser> notifyUsers = new ArrayList<>(); IAtsUser fromUser = AtsCoreUsers.SYSTEM_USER; if (Strings.isValid(event.getFromUserId())) { fromUser = userService.getUserById(event.getFromUserId()); @@ -104,7 +104,7 @@ public class WorkItemNotificationProcessor { } if (types.contains(AtsNotifyType.Assigned)) { try { - Collection<IAtsUser> assignees = new HashSet<IAtsUser>(); + Collection<IAtsUser> assignees = new HashSet<>(); if (!notifyUsers.isEmpty()) { assignees.addAll(notifyUsers); } else { @@ -131,7 +131,7 @@ public class WorkItemNotificationProcessor { } if (types.contains(AtsNotifyType.Subscribed)) { try { - Collection<IAtsUser> subscribed = new HashSet<IAtsUser>(); + Collection<IAtsUser> subscribed = new HashSet<>(); subscribed.addAll(userService.getSubscribed(workItem)); subscribed = AtsUsersUtility.getValidEmailUsers(subscribed); subscribed = AtsUsersUtility.getActiveEmailUsers(subscribed); @@ -186,7 +186,7 @@ public class WorkItemNotificationProcessor { if (types.contains(AtsNotifyType.Peer_Reviewers_Completed) && workItem instanceof IAtsAbstractReview) { try { UserRoleManager roleMgr = new UserRoleManager(attrResolver, userService, workItem); - Collection<IAtsUser> authorModerator = new ArrayList<IAtsUser>(); + Collection<IAtsUser> authorModerator = new ArrayList<>(); for (UserRole role : roleMgr.getUserRoles()) { if (role.getRole() == Role.Author || role.getRole() == Role.Moderator) { authorModerator.add(userService.getUserById(role.getUserId())); @@ -210,7 +210,7 @@ public class WorkItemNotificationProcessor { if (workItem.isTeamWorkflow()) { IAtsTeamWorkflow teamWf = (IAtsTeamWorkflow) workItem; try { - Collection<IAtsUser> subscribedUsers = new HashSet<IAtsUser>(); + Collection<IAtsUser> subscribedUsers = new HashSet<>(); // Handle Team Definitions IAtsTeamDefinition teamDef = teamWf.getTeamDefinition(); subscribedUsers.addAll(teamDef.getSubscribed()); diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/query/AtsQueryImpl.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/query/AtsQueryImpl.java index a53d7aebb1e..3da2c003c86 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/query/AtsQueryImpl.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/query/AtsQueryImpl.java @@ -63,7 +63,7 @@ public class AtsQueryImpl extends AbstractAtsQueryImpl { // state if (stateType != null) { - List<String> stateTypes = new ArrayList<String>(); + List<String> stateTypes = new ArrayList<>(); for (StateType type : stateType) { stateTypes.add(type.name()); } @@ -76,7 +76,7 @@ public class AtsQueryImpl extends AbstractAtsQueryImpl { } if (uuids != null && uuids.length > 0) { - List<Long> artIds = new LinkedList<Long>(); + List<Long> artIds = new LinkedList<>(); for (Long uuid : uuids) { artIds.add(uuid); } @@ -96,7 +96,7 @@ public class AtsQueryImpl extends AbstractAtsQueryImpl { } } - Set<T> workItems = new HashSet<T>(); + Set<T> workItems = new HashSet<>(); Iterator<ArtifactReadable> iterator = query.getResults().iterator(); while (iterator.hasNext()) { workItems.add((T) atsServer.getWorkItemFactory().getWorkItem(iterator.next())); diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/user/AtsUserServiceImpl.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/user/AtsUserServiceImpl.java index ed6aa42ed95..43bf07e65fd 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/user/AtsUserServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/user/AtsUserServiceImpl.java @@ -127,7 +127,7 @@ public class AtsUserServiceImpl extends AbstractAtsUserService { @Override public List<IAtsUser> getUsers(Active active) { ensureLoaded(); - List<IAtsUser> users = new ArrayList<IAtsUser>(); + List<IAtsUser> users = new ArrayList<>(); for (ArtifactReadable userArt : orcsApi.getQueryFactory().fromBranch(AtsUtilCore.getAtsBranch()).andIsOfType( CoreArtifactTypes.User).getResults()) { Boolean activeFlag = userArt.getSoleAttributeValue(CoreAttributeTypes.Active, true); @@ -169,7 +169,7 @@ public class AtsUserServiceImpl extends AbstractAtsUserService { @Override public List<IAtsUser> getSubscribed(IAtsWorkItem workItem) throws OseeCoreException { - ArrayList<IAtsUser> arts = new ArrayList<IAtsUser>(); + ArrayList<IAtsUser> arts = new ArrayList<>(); for (ArtifactReadable art : ((ArtifactReadable) workItem.getStoreObject()).getRelated( AtsRelationTypes.SubscribedUser_User)) { arts.add(getUserById((String) art.getSoleAttributeValue(CoreAttributeTypes.UserId))); diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/ArtifactResolverImpl.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/ArtifactResolverImpl.java index 1b5833cea45..6b58b60ea4c 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/ArtifactResolverImpl.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/ArtifactResolverImpl.java @@ -63,7 +63,7 @@ public class ArtifactResolverImpl implements IArtifactResolver { @SuppressWarnings("unchecked") public <A extends ArtifactId> List<A> get(Collection<? extends IAtsWorkItem> workItems, Class<?> clazz) throws OseeCoreException { Assert.isNotNull(workItems, "Work Items can not be null"); - List<A> arts = new ArrayList<A>(); + List<A> arts = new ArrayList<>(); for (IAtsWorkItem workItem : workItems) { ArtifactReadable artifact = get(workItem, clazz); if (artifact != null) { diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsAttributeResolverServiceImpl.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsAttributeResolverServiceImpl.java index eb44a47e1e1..e6a36e31003 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsAttributeResolverServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsAttributeResolverServiceImpl.java @@ -147,7 +147,7 @@ public class AtsAttributeResolverServiceImpl implements IAttributeResolver { @SuppressWarnings("unchecked") @Override public <T> Collection<IAttribute<T>> getAttributes(IAtsWorkItem workItem, IAttributeType attributeType) throws OseeCoreException { - Collection<IAttribute<T>> attrs = new ArrayList<IAttribute<T>>(); + Collection<IAttribute<T>> attrs = new ArrayList<>(); for (AttributeReadable<Object> attr : getArtifact(workItem).getAttributes(attributeType)) { attrs.add(new AttributeWrapper<T>((AttributeReadable<T>) attr)); } diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsBranchServiceImpl.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsBranchServiceImpl.java index 0685a00a91d..e386836661d 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsBranchServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsBranchServiceImpl.java @@ -64,7 +64,7 @@ public class AtsBranchServiceImpl extends AbstractAtsBranchService { public IOseeBranch getWorkingBranchExcludeStates(IAtsTeamWorkflow teamWf, BranchState... negatedBranchStates) { BranchQuery branchQuery = orcsApi.getQueryFactory().branchQuery(); if (negatedBranchStates.length > 0) { - Collection<BranchState> statesToSearch = new LinkedList<BranchState>(Arrays.asList(BranchState.values())); + Collection<BranchState> statesToSearch = new LinkedList<>(Arrays.asList(BranchState.values())); statesToSearch.removeAll(Arrays.asList(negatedBranchStates)); branchQuery.andStateIs(statesToSearch.toArray(new BranchState[statesToSearch.size()])); } @@ -142,7 +142,7 @@ public class AtsBranchServiceImpl extends AbstractAtsBranchService { // Cache the transactionIds first time through. Other commits will be added to cache as they // happen in this client or as remote commit events come through if (transactionIds == null) { - transactionIds = new ArrayList<ITransaction>(5); + transactionIds = new ArrayList<>(5); TransactionQuery txQuery = orcsApi.getQueryFactory().transactionQuery(); txQuery.andCommitIds(artifactReadable.getLocalId()); for (TransactionReadable tx : txQuery.getResults()) { diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsChangeSet.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsChangeSet.java index c24bbe7855b..4d7390efb7e 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsChangeSet.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsChangeSet.java @@ -235,7 +235,7 @@ public class AtsChangeSet extends AbstractAtsChangeSet { throw new UnsupportedOperationException("Can only set relations from A to B side"); } ArtifactReadable artifact = getArtifact(object); - Set<ArtifactReadable> artifacts = new HashSet<ArtifactReadable>(objects.size()); + Set<ArtifactReadable> artifacts = new HashSet<>(objects.size()); for (Object obj : objects) { ArtifactReadable art = getArtifact(obj); if (art != null) { diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsRelationResolverServiceImpl.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsRelationResolverServiceImpl.java index 33ae4983cc8..c43a4f09338 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsRelationResolverServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsRelationResolverServiceImpl.java @@ -36,7 +36,7 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver { @Override public Collection<ArtifactId> getRelated(ArtifactId artifact, IRelationTypeSide relationType) { - List<ArtifactId> results = new ArrayList<ArtifactId>(); + List<ArtifactId> results = new ArrayList<>(); if (artifact instanceof ArtifactReadable) { for (ArtifactReadable art : ((ArtifactReadable) artifact).getRelated(relationType)) { results.add(art); @@ -53,7 +53,7 @@ public class AtsRelationResolverServiceImpl implements IRelationResolver { @SuppressWarnings("unchecked") @Override public <T extends IAtsObject> Collection<T> getRelated(IAtsObject atsObject, IRelationTypeSide relationType, Class<T> clazz) { - List<T> results = new ArrayList<T>(); + List<T> results = new ArrayList<>(); ArtifactReadable useArt = getArtifact(atsObject); if (useArt != null) { for (ArtifactReadable art : useArt.getRelated(relationType)) { diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsReviewServiceImpl.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsReviewServiceImpl.java index 87b0f729484..3065cd8b033 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsReviewServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsReviewServiceImpl.java @@ -82,7 +82,7 @@ public class AtsReviewServiceImpl implements IAtsReviewService { @Override public Collection<IAtsAbstractReview> getReviews(IAtsTeamWorkflow teamWf) { - List<IAtsAbstractReview> reviews = new ArrayList<IAtsAbstractReview>(); + List<IAtsAbstractReview> reviews = new ArrayList<>(); for (ArtifactReadable reviewArt : ((ArtifactReadable) teamWf.getStoreObject()).getRelated(AtsRelationTypes.TeamWorkflowToReview_Review)) { reviews.add(atsServer.getWorkItemFactory().getReview(reviewArt)); diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsStoreServiceImpl.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsStoreServiceImpl.java index 99868f68861..f9b369378c4 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsStoreServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsStoreServiceImpl.java @@ -57,7 +57,7 @@ public class AtsStoreServiceImpl implements IAtsStoreService { @Override public List<IAtsWorkItem> reload(List<IAtsWorkItem> inWorkWorkflows) { - List<IAtsWorkItem> workItems = new ArrayList<IAtsWorkItem>(inWorkWorkflows.size()); + List<IAtsWorkItem> workItems = new ArrayList<>(inWorkWorkflows.size()); List<String> guids = AtsObjects.toGuids(inWorkWorkflows); Iterator<ArtifactReadable> arts = atsServer.getOrcsApi().getQueryFactory().fromBranch(AtsUtilCore.getAtsBranch()).andGuids(guids).getResults().iterator(); @@ -75,7 +75,7 @@ public class AtsStoreServiceImpl implements IAtsStoreService { @Override public Long getUuidFromGuid(String guid) { if (guidToUuid == null) { - guidToUuid = new HashMap<String, Long>(200); + guidToUuid = new HashMap<>(200); } Long result = null; if (guidToUuid.containsKey(guid)) { diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsWorkDefinitionCacheProvider.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsWorkDefinitionCacheProvider.java index a102fad35fa..38049e4f91f 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsWorkDefinitionCacheProvider.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AtsWorkDefinitionCacheProvider.java @@ -34,7 +34,7 @@ public class AtsWorkDefinitionCacheProvider extends LazyObject<AtsWorkDefinition @Override protected FutureTask<AtsWorkDefinitionCache> createLoaderTask() { Callable<AtsWorkDefinitionCache> newCallable = new LoadAtsWorkDefinitionCacheCallable(workDefinitionService); - FutureTask<AtsWorkDefinitionCache> newTask = new FutureTask<AtsWorkDefinitionCache>(newCallable); + FutureTask<AtsWorkDefinitionCache> newTask = new FutureTask<>(newCallable); return newTask; } diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AttributeTypeToXWidgetName.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AttributeTypeToXWidgetName.java index bba8a1461ac..da3eebce697 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AttributeTypeToXWidgetName.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/util/AttributeTypeToXWidgetName.java @@ -64,7 +64,7 @@ public class AttributeTypeToXWidgetName { } private static Collection<String> getEnumerationValues(OrcsApi orcsApi, IAttributeType attributeType) { - List<String> values = new ArrayList<String>(); + List<String> values = new ArrayList<>(); for (EnumEntry entry : orcsApi.getOrcsTypes().getAttributeTypes().getEnumType(attributeType).values()) { values.add(entry.getName()); } diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/AtsWorkDefinitionStoreImpl.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/AtsWorkDefinitionStoreImpl.java index d17b41050ab..7a1f71dc09a 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/AtsWorkDefinitionStoreImpl.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workdef/AtsWorkDefinitionStoreImpl.java @@ -43,7 +43,7 @@ public class AtsWorkDefinitionStoreImpl implements IAtsWorkDefinitionStore { @Override public List<Pair<String, String>> getWorkDefinitionStrings() throws OseeCoreException { - List<Pair<String, String>> nameToWorkDefStr = new ArrayList<Pair<String, String>>(15); + List<Pair<String, String>> nameToWorkDefStr = new ArrayList<>(15); for (ArtifactReadable workDefArt : orcsApi.getQueryFactory().fromBranch(AtsUtilCore.getAtsBranch()).andTypeEquals( AtsArtifactTypes.WorkDefinition).getResults()) { nameToWorkDefStr.add( diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AbstractReview.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AbstractReview.java index dcebcc7640e..7ed8b90e328 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AbstractReview.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AbstractReview.java @@ -31,7 +31,7 @@ public abstract class AbstractReview extends WorkItem implements IAtsAbstractRev @Override public Set<IAtsActionableItem> getActionableItems() throws OseeCoreException { - Set<IAtsActionableItem> ais = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> ais = new HashSet<>(); for (Object aiGuidObj : artifact.getAttributeValues(AtsAttributeTypes.ActionableItem)) { String aiGuid = (String) aiGuidObj; ArtifactReadable aiArt = getAtsServer().getArtifactByGuid(aiGuid); diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/ActionableItem.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/ActionableItem.java index d2642d5d1c7..d43da30c6d6 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/ActionableItem.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/ActionableItem.java @@ -38,7 +38,7 @@ public class ActionableItem extends AtsConfigObject implements IAtsActionableIte @Override public Collection<IAtsActionableItem> getChildrenActionableItems() { - Set<IAtsActionableItem> children = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> children = new HashSet<>(); try { for (ArtifactReadable childArt : getArtifact().getRelated(CoreRelationTypes.Default_Hierarchical__Child)) { IAtsActionableItem childTeamDef = atsServices.getConfigItemFactory().getActionableItem(childArt); @@ -129,7 +129,7 @@ public class ActionableItem extends AtsConfigObject implements IAtsActionableIte @Override public Collection<String> getRules() { - Collection<String> rules = new ArrayList<String>(); + Collection<String> rules = new ArrayList<>(); try { rules = getArtifact().getAttributeValues(AtsAttributeTypes.RuleDefinition); } catch (OseeCoreException ex) { diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsTeamDefinitionService.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsTeamDefinitionService.java index 07506cd586d..d78bf0074fa 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsTeamDefinitionService.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/AtsTeamDefinitionService.java @@ -41,7 +41,7 @@ public class AtsTeamDefinitionService implements IAtsTeamDefinitionService { @Override public Collection<IAtsVersion> getVersions(IAtsTeamDefinition teamDef) { - List<IAtsVersion> versions = new ArrayList<IAtsVersion>(); + List<IAtsVersion> versions = new ArrayList<>(); for (ArtifactReadable verArt : ((ArtifactReadable) teamDef.getStoreObject()).getRelated(AtsRelationTypes.TeamDefinitionToVersion_Version)) { versions.add(atsServer.getConfigItemFactory().getVersion(verArt)); } diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/TeamDefinition.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/TeamDefinition.java index 801706c7d1a..21033feed2a 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/TeamDefinition.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/TeamDefinition.java @@ -55,7 +55,7 @@ public class TeamDefinition extends AtsConfigObject implements IAtsTeamDefinitio @Override public Collection<IAtsActionableItem> getActionableItems() { - Set<IAtsActionableItem> ais = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> ais = new HashSet<>(); try { for (Object aiGuidObj : getArtifact().getAttributeValues(AtsAttributeTypes.ActionableItem)) { String aiGuid = (String) aiGuidObj; @@ -90,7 +90,7 @@ public class TeamDefinition extends AtsConfigObject implements IAtsTeamDefinitio @Override public Collection<IAtsTeamDefinition> getChildrenTeamDefinitions() { - Set<IAtsTeamDefinition> children = new HashSet<IAtsTeamDefinition>(); + Set<IAtsTeamDefinition> children = new HashSet<>(); try { for (ArtifactReadable childArt : getArtifact().getRelated(CoreRelationTypes.Default_Hierarchical__Child)) { IAtsTeamDefinition childTeamDef = atsServices.getConfigItemFactory().getTeamDef(childArt); @@ -106,7 +106,7 @@ public class TeamDefinition extends AtsConfigObject implements IAtsTeamDefinitio @Override public Collection<IAtsUser> getLeads(Collection<IAtsActionableItem> actionableItems) { - Set<IAtsUser> leads = new HashSet<IAtsUser>(); + Set<IAtsUser> leads = new HashSet<>(); for (IAtsActionableItem aia : actionableItems) { if (this.equals(aia.getTeamDefinitionInherited())) { // If leads are specified for this aia, add them @@ -132,7 +132,7 @@ public class TeamDefinition extends AtsConfigObject implements IAtsTeamDefinitio @Override public Collection<IAtsUser> getMembersAndLeads() { - Set<IAtsUser> results = new HashSet<IAtsUser>(); + Set<IAtsUser> results = new HashSet<>(); results.addAll(getLeads()); results.addAll(getMembers()); return results; @@ -276,7 +276,7 @@ public class TeamDefinition extends AtsConfigObject implements IAtsTeamDefinitio @Override public Collection<IAtsVersion> getVersions() { - Set<IAtsVersion> results = new HashSet<IAtsVersion>(); + Set<IAtsVersion> results = new HashSet<>(); try { for (ArtifactReadable verArt : getArtifact().getRelated(AtsRelationTypes.TeamDefinitionToVersion_Version)) { IAtsVersion version = (IAtsVersion) atsServer.getConfig().getSoleByUuid(verArt.getUuid()); @@ -305,7 +305,7 @@ public class TeamDefinition extends AtsConfigObject implements IAtsTeamDefinitio @Override public Collection<IAtsVersion> getVersionsLocked(VersionLockedType lockType) { - ArrayList<IAtsVersion> versions = new ArrayList<IAtsVersion>(); + ArrayList<IAtsVersion> versions = new ArrayList<>(); for (IAtsVersion version : getVersions()) { if (version.isVersionLocked() && (lockType == VersionLockedType.Locked || lockType == VersionLockedType.Both)) { versions.add(version); @@ -318,7 +318,7 @@ public class TeamDefinition extends AtsConfigObject implements IAtsTeamDefinitio @Override public Collection<IAtsVersion> getVersionsReleased(VersionReleaseType releaseType) { - ArrayList<IAtsVersion> versions = new ArrayList<IAtsVersion>(); + ArrayList<IAtsVersion> versions = new ArrayList<>(); for (IAtsVersion version : getVersions()) { if (version.isReleased() && (releaseType == VersionReleaseType.Released || releaseType == VersionReleaseType.Both)) { versions.add(version); @@ -371,7 +371,7 @@ public class TeamDefinition extends AtsConfigObject implements IAtsTeamDefinitio @Override public Collection<String> getRules() { - Collection<String> rules = new ArrayList<String>(); + Collection<String> rules = new ArrayList<>(); try { rules = getArtifact().getAttributeValues(AtsAttributeTypes.RuleDefinition); } catch (OseeCoreException ex) { diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/TeamWorkflow.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/TeamWorkflow.java index e372e436f21..b07c29580df 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/TeamWorkflow.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/TeamWorkflow.java @@ -32,7 +32,7 @@ public class TeamWorkflow extends WorkItem implements IAtsTeamWorkflow { @Override public Set<IAtsActionableItem> getActionableItems() throws OseeCoreException { - Set<IAtsActionableItem> ais = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> ais = new HashSet<>(); for (Object aiGuidObj : artifact.getAttributeValues(AtsAttributeTypes.ActionableItem)) { String aiGuid = (String) aiGuidObj; Long uuid = getAtsServer().getStoreService().getUuidFromGuid(aiGuid); diff --git a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/Version.java b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/Version.java index 7e76778cfb6..3c1e27ee70a 100644 --- a/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/Version.java +++ b/plugins/org.eclipse.osee.ats.impl/src/org/eclipse/osee/ats/impl/internal/workitem/Version.java @@ -43,7 +43,7 @@ public class Version extends AtsConfigObject implements IAtsVersion { @Override public List<IAtsVersion> getParallelVersions() { - List<IAtsVersion> parallelVersions = new ArrayList<IAtsVersion>(); + List<IAtsVersion> parallelVersions = new ArrayList<>(); for (ArtifactReadable parallelVerArt : getArtifact().getRelated(AtsRelationTypes.ParallelVersion_Child)) { IAtsVersion parallelVer = atsServices.getConfigItemFactory().getVersion(parallelVerArt); parallelVersions.add(parallelVer); @@ -66,7 +66,7 @@ public class Version extends AtsConfigObject implements IAtsVersion { @Override public String getCommitFullDisplayName() { - List<String> strs = new ArrayList<String>(); + List<String> strs = new ArrayList<>(); strs.add(getName()); String fullName = getArtifact().getSoleAttributeValue(AtsAttributeTypes.FullName, ""); if (Strings.isValid(fullName)) { diff --git a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/AtsMockitoTest.java b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/AtsMockitoTest.java index 7e4673ead62..5e724039842 100644 --- a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/AtsMockitoTest.java +++ b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/AtsMockitoTest.java @@ -119,7 +119,7 @@ public class AtsMockitoTest { initializeAi(testAi, "AI", true, true); initializeAi(testAi2, "AI2", true, true); - Set<IAtsActionableItem> aias = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> aias = new HashSet<>(); aias.add(testAi); aias.add(testAi2); diff --git a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockDecisionReviewDefinition.java b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockDecisionReviewDefinition.java index c998ded628c..f4a31b2a736 100644 --- a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockDecisionReviewDefinition.java +++ b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockDecisionReviewDefinition.java @@ -28,9 +28,9 @@ public class MockDecisionReviewDefinition implements IAtsDecisionReviewDefinitio public String relatedToState; public ReviewBlockType blockingType; public StateEventType stateEventType; - public List<String> assignees = new ArrayList<String>(); + public List<String> assignees = new ArrayList<>(); public boolean autoTransitionToDecision = false; - public List<IAtsDecisionReviewOption> options = new ArrayList<IAtsDecisionReviewOption>(); + public List<IAtsDecisionReviewOption> options = new ArrayList<>(); public MockDecisionReviewDefinition(String name) { this.name = name; diff --git a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockDecisionReviewOption.java b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockDecisionReviewOption.java index 9281da42bb0..f9a9dd0d854 100644 --- a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockDecisionReviewOption.java +++ b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockDecisionReviewOption.java @@ -23,7 +23,7 @@ public class MockDecisionReviewOption implements IAtsDecisionReviewOption { public String name; public boolean followupRequired; public List<String> userIds; - public List<String> userNames = new LinkedList<String>(); + public List<String> userNames = new LinkedList<>(); public MockDecisionReviewOption(String name) { this(name, false, new ArrayList<String>()); @@ -33,7 +33,7 @@ public class MockDecisionReviewOption implements IAtsDecisionReviewOption { this.name = name; this.followupRequired = isFollowupRequired; if (userIds == null) { - this.userIds = new ArrayList<String>(); + this.userIds = new ArrayList<>(); } else { this.userIds = userIds; } diff --git a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockPeerReviewDefinition.java b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockPeerReviewDefinition.java index b88e3f721a0..715a7a0b752 100644 --- a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockPeerReviewDefinition.java +++ b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockPeerReviewDefinition.java @@ -28,7 +28,7 @@ public class MockPeerReviewDefinition implements IAtsPeerReviewDefinition { public String relatedToState; public ReviewBlockType blockingType; public StateEventType stateEventType; - public List<String> assignees = new ArrayList<String>(); + public List<String> assignees = new ArrayList<>(); public MockPeerReviewDefinition(String name) { this.name = name; diff --git a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockRuleManager.java b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockRuleManager.java index d7517e7f755..24865b0245f 100644 --- a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockRuleManager.java +++ b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockRuleManager.java @@ -18,7 +18,7 @@ import java.util.List; */ public class MockRuleManager { - public List<String> rules = new ArrayList<String>(); + public List<String> rules = new ArrayList<>(); public List<String> getRules() { return rules; diff --git a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockStateDefinition.java b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockStateDefinition.java index 87595fed29d..dc3212fc6ac 100644 --- a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockStateDefinition.java +++ b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockStateDefinition.java @@ -27,13 +27,13 @@ public class MockStateDefinition implements IAtsStateDefinition { private StateType StateType; private int ordinal = 0; - private final List<IAtsLayoutItem> stateItems = new ArrayList<IAtsLayoutItem>(5); + private final List<IAtsLayoutItem> stateItems = new ArrayList<>(5); private final MockRuleManager ruleMgr = new MockRuleManager(); - private final List<IAtsStateDefinition> toStates = new ArrayList<IAtsStateDefinition>(5); + private final List<IAtsStateDefinition> toStates = new ArrayList<>(5); private IAtsStateDefinition defaultToState; - private final List<IAtsStateDefinition> overrideAttributeValidationStates = new ArrayList<IAtsStateDefinition>(5); - private final List<IAtsDecisionReviewDefinition> decisionReviews = new ArrayList<IAtsDecisionReviewDefinition>(); - private final List<IAtsPeerReviewDefinition> peerReviews = new ArrayList<IAtsPeerReviewDefinition>(); + private final List<IAtsStateDefinition> overrideAttributeValidationStates = new ArrayList<>(5); + private final List<IAtsDecisionReviewDefinition> decisionReviews = new ArrayList<>(); + private final List<IAtsPeerReviewDefinition> peerReviews = new ArrayList<>(); private IAtsWorkDefinition workDefinition; private int stateWeight = 0; private Integer recommendedPercentComplete = null; diff --git a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockWidgetDefinition.java b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockWidgetDefinition.java index e89e9d0bc5a..7b024dec620 100644 --- a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockWidgetDefinition.java +++ b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockWidgetDefinition.java @@ -30,7 +30,7 @@ public class MockWidgetDefinition implements IAtsWidgetDefinition { private String xWidgetName; private String defaultValue; private final WidgetOptionHandler options = new WidgetOptionHandler(); - private final List<IAtsWidgetConstraint> constraints = new ArrayList<IAtsWidgetConstraint>(); + private final List<IAtsWidgetConstraint> constraints = new ArrayList<>(); private String name; public MockWidgetDefinition(String name) { diff --git a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockWorkDefinition.java b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockWorkDefinition.java index c3968bec936..b6c6de1e286 100644 --- a/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockWorkDefinition.java +++ b/plugins/org.eclipse.osee.ats.mocks/src/org/eclipse/osee/ats/mocks/MockWorkDefinition.java @@ -21,7 +21,7 @@ import org.eclipse.osee.framework.jdk.core.type.Identity; */ public class MockWorkDefinition implements IAtsWorkDefinition { - private final List<IAtsStateDefinition> states = new ArrayList<IAtsStateDefinition>(5); + private final List<IAtsStateDefinition> states = new ArrayList<>(5); private String id; private IAtsStateDefinition startState; private String name; diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/hours/HourBurndownLog.java b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/hours/HourBurndownLog.java index b2307597f6d..9bf00bc4af3 100644 --- a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/hours/HourBurndownLog.java +++ b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/hours/HourBurndownLog.java @@ -35,8 +35,8 @@ public class HourBurndownLog { * Constructor to initialise list of Work flow artifacts and Log entries */ public HourBurndownLog() { - this.artifacts = new ArrayList<AbstractWorkflowArtifact>(); - this.entries = new ArrayList<HourBurndownEntry>(); + this.artifacts = new ArrayList<>(); + this.entries = new ArrayList<>(); } /** diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/issues/IssueBurndownLog.java b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/issues/IssueBurndownLog.java index b5f411a0d30..e490548540d 100644 --- a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/issues/IssueBurndownLog.java +++ b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/issues/IssueBurndownLog.java @@ -31,8 +31,8 @@ public class IssueBurndownLog { * Constructor to initialise list of Work flow artifacts and Log entries */ public IssueBurndownLog() { - this.artifacts = new ArrayList<AbstractWorkflowArtifact>(); - this.entries = new ArrayList<IssueBurndownEntry>(); + this.artifacts = new ArrayList<>(); + this.entries = new ArrayList<>(); } /** diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownAtsReport.java b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownAtsReport.java index f66ca5134ef..939b34190d6 100644 --- a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownAtsReport.java +++ b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownAtsReport.java @@ -72,7 +72,7 @@ public class BurndownAtsReport implements AtsReport<BurdownInputParameters, Obje @Override public List<IResultsEditorTab> getResultsEditorTabs() { - List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>(); + List<IResultsEditorTab> tabs = new ArrayList<>(); tabs.add(createTab("Hour Burndown", "reports/HourBurndown.rptdesign")); tabs.add(createTab("Issue Burndown", "reports/IssueBurndown.rptdesign")); return tabs; diff --git a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownSelectionDialog.java b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownSelectionDialog.java index 1a310e3551e..0bbb70e7552 100644 --- a/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownSelectionDialog.java +++ b/plugins/org.eclipse.osee.ats.reports.burndown/src/org/eclipse/osee/ats/reports/burndown/ui/BurndownSelectionDialog.java @@ -77,7 +77,7 @@ public class BurndownSelectionDialog extends SelectionDialog { @Override protected Control createDialogArea(final Composite container) { - List<Object> objs = new ArrayList<Object>(); + List<Object> objs = new ArrayList<>(); try { Set<IAtsTeamDefinition> teamReleaseableDefinitions = TeamDefinitions.getTeamReleaseableDefinitions(this.active, AtsClientService.get().getConfig()); @@ -110,7 +110,7 @@ public class BurndownSelectionDialog extends SelectionDialog { @Override public void widgetSelected(final SelectionEvent e) { - ArrayList<Object> objs1 = new ArrayList<Object>(); + ArrayList<Object> objs1 = new ArrayList<>(); try { selectedTeamDef = (Artifact) teamCombo.getSelected(); @@ -155,7 +155,7 @@ public class BurndownSelectionDialog extends SelectionDialog { } }); if (teamDef != null) { - objs = new ArrayList<Object>(); + objs = new ArrayList<>(); try { for (Artifact versionArtifact : selectedTeamDef.getRelatedArtifacts(AtsRelationTypes.TeamDefinitionToVersion_Version)) { IAtsVersion version = diff --git a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/team/VersionEfficiency.java b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/team/VersionEfficiency.java index d8e3fdbc4a0..2167cc34dfb 100644 --- a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/team/VersionEfficiency.java +++ b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/team/VersionEfficiency.java @@ -37,7 +37,7 @@ public class VersionEfficiency { */ public VersionEfficiency(final IAtsVersion version) { this.version = version; - this.efficiency = new HashMap<String, Double>(); + this.efficiency = new HashMap<>(); } /** @@ -46,7 +46,7 @@ public class VersionEfficiency { * @throws OseeCoreException : */ public void compute() throws OseeCoreException { - final Map<String, List<TeamWorkFlowArtifact>> teams = new HashMap<String, List<TeamWorkFlowArtifact>>(); + final Map<String, List<TeamWorkFlowArtifact>> teams = new HashMap<>(); // 1. For each team, collect the list of artifacts. for (IAtsTeamWorkflow team : AtsClientService.get().getVersionService().getTargetedForTeamWorkflows(this.version)) { @@ -54,7 +54,7 @@ public class VersionEfficiency { if (teams.containsKey(teamWorkflow.getTeamName())) { teams.get(teamWorkflow.getTeamName()).add(teamWorkflow); } else { - List<TeamWorkFlowArtifact> teamArt = new ArrayList<TeamWorkFlowArtifact>(); + List<TeamWorkFlowArtifact> teamArt = new ArrayList<>(); teamArt.add(teamWorkflow); teams.put(teamWorkflow.getTeamName(), teamArt); } diff --git a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyAtsReport.java b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyAtsReport.java index 51c4d2169bb..3da4af8416a 100644 --- a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyAtsReport.java +++ b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/EfficiencyAtsReport.java @@ -74,7 +74,7 @@ public class EfficiencyAtsReport implements AtsReport<IAtsTeamDefinition, Object @Override public List<IResultsEditorTab> getResultsEditorTabs() { - List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>(); + List<IResultsEditorTab> tabs = new ArrayList<>(); tabs.add(createTab("Team Efficiency", "reports/TeamEfficiencyBar.rptdesign")); tabs.add(createTab("Team Efficiency Trend", "reports/TeamEfficiencyLine.rptdesign")); return tabs; diff --git a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/LoadEfficiencyDataOperation.java b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/LoadEfficiencyDataOperation.java index d1efea404f1..018fd7fcf01 100644 --- a/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/LoadEfficiencyDataOperation.java +++ b/plugins/org.eclipse.osee.ats.reports.efficiency/src/org/eclipse/osee/ats/reports/efficiency/ui/LoadEfficiencyDataOperation.java @@ -33,7 +33,7 @@ public class LoadEfficiencyDataOperation extends AbstractOperation { @Override protected void doWork(IProgressMonitor monitor) throws Exception { Conditions.checkNotNull(teamDef, "teamDefinition"); - List<VersionEfficiency> verEffs = new ArrayList<VersionEfficiency>(); + List<VersionEfficiency> verEffs = new ArrayList<>(); for (IAtsVersion version : teamDef.getVersions()) { VersionEfficiency eff = new VersionEfficiency(version); eff.compute(); diff --git a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/AIDistributionEntry.java b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/AIDistributionEntry.java index 7721c94cc6e..8f48066ba22 100644 --- a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/AIDistributionEntry.java +++ b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/AIDistributionEntry.java @@ -32,7 +32,7 @@ public class AIDistributionEntry { */ public AIDistributionEntry(final Artifact verArtifact) { this.versionArtifact = verArtifact; - this.aiSplitMap = new HashMap<IAtsActionableItem, Integer>(); + this.aiSplitMap = new HashMap<>(); } /** diff --git a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/StateDistributionEntry.java b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/StateDistributionEntry.java index d28925260d1..3f8f5ae5b6a 100644 --- a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/StateDistributionEntry.java +++ b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/StateDistributionEntry.java @@ -33,7 +33,7 @@ public class StateDistributionEntry { */ public StateDistributionEntry(final Artifact ver) { this.versionArtifact = ver; - this.stateSplitMap = new HashMap<String, Double>(); + this.stateSplitMap = new HashMap<>(); } /** diff --git a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/TeamDistributionEntry.java b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/TeamDistributionEntry.java index 0398b46335a..780ab82047c 100644 --- a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/TeamDistributionEntry.java +++ b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/model/TeamDistributionEntry.java @@ -32,7 +32,7 @@ public class TeamDistributionEntry { */ public TeamDistributionEntry(final Artifact verArtifact) { this.versionArtifact = verArtifact; - this.teamSplitMap = new HashMap<String, Double>(); + this.teamSplitMap = new HashMap<>(); } /** diff --git a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/DistributionAtsReport.java b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/DistributionAtsReport.java index 8ec394b71c4..c7937c82047 100644 --- a/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/DistributionAtsReport.java +++ b/plugins/org.eclipse.osee.ats.reports.split/src/org/eclipse/osee/ats/reports/split/ui/DistributionAtsReport.java @@ -69,7 +69,7 @@ public class DistributionAtsReport implements AtsReport<IAtsVersion, Object> { @Override public List<IResultsEditorTab> getResultsEditorTabs() { - List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>(); + List<IResultsEditorTab> tabs = new ArrayList<>(); tabs.add(createTab("Actionable Item", "reports/aiDistribution.rptdesign")); tabs.add(createTab("Team-Work", "reports/teamWorkDistribution.rptdesign")); tabs.add(createTab("Workflow State", "reports/stateWorkDistribution.rptdesign")); diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsApplication.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsApplication.java index 8cc56769cc5..0ffda6c9b94 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsApplication.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsApplication.java @@ -52,7 +52,7 @@ import org.eclipse.osee.template.engine.OseeTemplateTokens; @ApplicationPath("ats") public class AtsApplication extends Application { - private final Set<Object> singletons = new HashSet<Object>(); + private final Set<Object> singletons = new HashSet<>(); private Log logger; private OrcsApi orcsApi; diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java index c5dea423516..056149e6b5b 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java @@ -83,7 +83,7 @@ public class AgileEndpointImpl implements AgileEndpointApi { @Override public List<JaxAgileTeam> team() throws Exception { - List<JaxAgileTeam> teams = new ArrayList<JaxAgileTeam>(); + List<JaxAgileTeam> teams = new ArrayList<>(); for (IAgileTeam team : atsServer.getAgileService().getTeams()) { teams.add(toJaxTeam(team)); } @@ -151,7 +151,7 @@ public class AgileEndpointImpl implements AgileEndpointApi { @Override public List<JaxAgileFeatureGroup> getFeatureGroups(long teamUuid) { - List<JaxAgileFeatureGroup> groups = new LinkedList<JaxAgileFeatureGroup>(); + List<JaxAgileFeatureGroup> groups = new LinkedList<>(); ArtifactReadable agileTeamArt = atsServer.getArtifactByUuid(teamUuid); for (ArtifactReadable child : agileTeamArt.getChildren()) { if (child.getName().equals(AgileUtil.FEATURE_GROUP_FOLDER_NAME)) { @@ -262,7 +262,7 @@ public class AgileEndpointImpl implements AgileEndpointApi { if (teamUuid <= 0) { throw new OseeWebApplicationException(Status.NOT_FOUND, "teamUuid is not valid"); } - List<JaxAgileSprint> sprints = new ArrayList<JaxAgileSprint>(); + List<JaxAgileSprint> sprints = new ArrayList<>(); for (IAgileSprint sprint : atsServer.getAgileService().getSprintsForTeam(teamUuid)) { sprints.add(toJaxSprint(sprint)); } @@ -365,7 +365,7 @@ public class AgileEndpointImpl implements AgileEndpointApi { @Override public List<AgileItem> getBacklogItems(long teamUuid) { - List<AgileItem> items = new LinkedList<AgileItem>(); + List<AgileItem> items = new LinkedList<>(); IAgileTeam team = atsServer.getAgileService().getAgileTeam(teamUuid); IAgileBacklog backlog = atsServer.getAgileService().getAgileBacklog(team); if (backlog != null) { diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/SprintPageBuilder.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/SprintPageBuilder.java index e31a99e2283..771ec38d43e 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/SprintPageBuilder.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/SprintPageBuilder.java @@ -39,7 +39,7 @@ public class SprintPageBuilder { private double walkupCompleted = 0; private int numActionsStarted = 0; private int numActionsBacklog = 0; - TreeMap<String, FeatureGroupSum> featureSums = new TreeMap<String, FeatureGroupSum>(); + TreeMap<String, FeatureGroupSum> featureSums = new TreeMap<>(); public SprintPageBuilder(IAtsServer atsServer, ArtifactReadable sprint) { this.atsServer = atsServer; diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/CountryEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/CountryEndpointImpl.java index f9e3a112a47..eb444a2fe8a 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/CountryEndpointImpl.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/CountryEndpointImpl.java @@ -71,7 +71,7 @@ public class CountryEndpointImpl extends BaseConfigEndpointImpl<JaxCountry> impl @Override public List<JaxCountry> getObjects() { - List<JaxCountry> configs = new ArrayList<JaxCountry>(); + List<JaxCountry> configs = new ArrayList<>(); for (ArtifactReadable art : atsServer.getQuery().andIsOfType(artifactType).getResults()) { configs.add(getConfigObject(art)); } diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionActivityEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionActivityEndpointImpl.java index 6f2c0191444..1f687ec7aa4 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionActivityEndpointImpl.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionActivityEndpointImpl.java @@ -79,7 +79,7 @@ public class InsertionActivityEndpointImpl extends BaseConfigEndpointImpl<JaxIns @Override public List<JaxInsertionActivity> getObjects() { - List<JaxInsertionActivity> insertions = new ArrayList<JaxInsertionActivity>(); + List<JaxInsertionActivity> insertions = new ArrayList<>(); if (insertionUuid == 0L) { for (ArtifactReadable art : atsServer.getQuery().andIsOfType(artifactType).getResults()) { insertions.add(getConfigObject(art)); diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionEndpointImpl.java index 32cd3ba3d9e..dc7115170a0 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionEndpointImpl.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/InsertionEndpointImpl.java @@ -81,7 +81,7 @@ public class InsertionEndpointImpl extends BaseConfigEndpointImpl<JaxInsertion> @Override public List<JaxInsertion> getObjects() { - List<JaxInsertion> insertions = new ArrayList<JaxInsertion>(); + List<JaxInsertion> insertions = new ArrayList<>(); if (programUuid == 0L) { for (ArtifactReadable art : atsServer.getQuery().andIsOfType(artifactType).getResults()) { insertions.add(getConfigObject(art)); diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramEndpointImpl.java index 2cfc99a033e..788123ba002 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramEndpointImpl.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramEndpointImpl.java @@ -80,7 +80,7 @@ public class ProgramEndpointImpl extends BaseConfigEndpointImpl<JaxProgram> impl @Override public List<JaxProgram> getObjects() { - List<JaxProgram> configs = new ArrayList<JaxProgram>(); + List<JaxProgram> configs = new ArrayList<>(); if (countryUuid == 0L) { for (ArtifactReadable art : atsServer.getQuery().andIsOfType(artifactType).getResults()) { configs.add(getConfigObject(art)); diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramResource.java index a60b6ce6339..89719e1e7c6 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramResource.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ProgramResource.java @@ -71,7 +71,7 @@ public class ProgramResource extends AbstractConfigResource { } // get the insertions related to the given program ResultSet<ArtifactReadable> results = programArt.getRelated(AtsRelationTypes.ProgramToInsertion_Insertion); - List<IAtsConfigObject> insertions = new LinkedList<IAtsConfigObject>(); + List<IAtsConfigObject> insertions = new LinkedList<>(); for (ArtifactReadable insertion : results) { insertions.add(atsServer.getConfigItemFactory().getInsertion(insertion)); } @@ -159,7 +159,7 @@ public class ProgramResource extends AbstractConfigResource { // get the insertions related to the given program ResultSet<ArtifactReadable> results = insertion.getRelated(AtsRelationTypes.InsertionToInsertionActivity_InsertionActivity); - List<IAtsConfigObject> insertionActivitys = new LinkedList<IAtsConfigObject>(); + List<IAtsConfigObject> insertionActivitys = new LinkedList<>(); for (ArtifactReadable insertionActivity : results) { insertionActivitys.add(atsServer.getConfigItemFactory().getInsertionActivity(insertionActivity)); } diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java index cb16940533a..30fdb39b1e4 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java @@ -60,9 +60,9 @@ public class ReportResource { @Produces(MediaType.APPLICATION_OCTET_STREAM) public Response getTypeCount(@QueryParam("branchUuid") long branchUuid, @QueryParam("artTypes") List<Long> artTypes, @QueryParam("attrTypes") List<Long> attrTypes) throws OseeCoreException { List<ChangeItem> changes = getChanges(branchUuid); - Set<Long> newArts = new HashSet<Long>(); - Set<Long> modArts = new HashSet<Long>(); - Set<Long> deletedArts = new HashSet<Long>(); + Set<Long> newArts = new HashSet<>(); + Set<Long> modArts = new HashSet<>(); + Set<Long> deletedArts = new HashSet<>(); Map<Integer, Pair<ChangeItem, Set<ChangeItem>>> artToChanges = new HashMap<Integer, Pair<ChangeItem, Set<ChangeItem>>>(); @@ -100,7 +100,7 @@ public class ReportResource { } } else if (changeType.isAttributeChange()) { if (!artToChanges.containsKey(artId)) { - Set<ChangeItem> changeSet = new HashSet<ChangeItem>(); + Set<ChangeItem> changeSet = new HashSet<>(); changeSet.add(change); artToChanges.put(artId, new Pair<>(null, changeSet)); } else { diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/TypeCountWriter.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/TypeCountWriter.java index 185dcc57eab..c59d2daab17 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/TypeCountWriter.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/TypeCountWriter.java @@ -109,7 +109,7 @@ public class TypeCountWriter { } private List<IArtifactType> getTypes(List<Long> typeIds) { - List<IArtifactType> toReturn = new ArrayList<IArtifactType>(); + List<IArtifactType> toReturn = new ArrayList<>(); Collection<? extends IArtifactType> allTypes = orcsApi.getOrcsTypes().getArtifactTypes().getAll(); for (IArtifactType type : allTypes) { @@ -121,7 +121,7 @@ public class TypeCountWriter { } private List<IAttributeType> getAttrTypes(List<Long> typeIds) { - List<IAttributeType> toReturn = new ArrayList<IAttributeType>(); + List<IAttributeType> toReturn = new ArrayList<>(); Collection<? extends IAttributeType> allTypes = orcsApi.getOrcsTypes().getAttributeTypes().getAll(); for (IAttributeType type : allTypes) { diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/UpdateAtsConfiguration.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/UpdateAtsConfiguration.java index c5d84b59d5b..083ea796fba 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/UpdateAtsConfiguration.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/UpdateAtsConfiguration.java @@ -91,7 +91,7 @@ public class UpdateAtsConfiguration { rd.log("Creating VIEWS attribute\n"); } else { // merge any new default view items to current database view items - List<AtsAttributeValueColumn> toAdd = new LinkedList<AtsAttributeValueColumn>(); + List<AtsAttributeValueColumn> toAdd = new LinkedList<>(); for (AtsAttributeValueColumn defaultView : defaultViews.getAttrColumns()) { boolean found = false; for (AtsAttributeValueColumn dbView : databaseViews.getAttrColumns()) { diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaResource.java index 7fef3953a0a..6f62919e607 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaResource.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaResource.java @@ -70,7 +70,7 @@ public final class CpaResource implements AtsCpaEndpointApi { @Produces(MediaType.APPLICATION_JSON) @Override public List<CpaProgram> getPrograms() throws Exception { - List<CpaProgram> programs = new ArrayList<CpaProgram>(); + List<CpaProgram> programs = new ArrayList<>(); for (IAtsCpaService service : cpaRegistry.getServices()) { programs.addAll(service.getPrograms()); } @@ -90,7 +90,7 @@ public final class CpaResource implements AtsCpaEndpointApi { @Produces(MediaType.APPLICATION_JSON) @Override public List<CpaBuild> getBuildsByProgram(@PathParam("uuid") String programUuid) throws Exception { - List<CpaBuild> builds = new ArrayList<CpaBuild>(); + List<CpaBuild> builds = new ArrayList<>(); for (IAtsCpaService service : cpaRegistry.getServices()) { builds.addAll(service.getBuilds(programUuid)); } diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaServiceRegistry.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaServiceRegistry.java index 3fe684c63df..91b69b10fb5 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaServiceRegistry.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaServiceRegistry.java @@ -19,7 +19,7 @@ import org.eclipse.osee.ats.api.cpa.IAtsCpaService; */ public class CpaServiceRegistry { - private final Map<String, IAtsCpaService> idToCpaService = new ConcurrentHashMap<String, IAtsCpaService>(); + private final Map<String, IAtsCpaService> idToCpaService = new ConcurrentHashMap<>(); public void addCpaService(IAtsCpaService cpaService) { String id = cpaService.getId(); diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/DecisionLoader.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/DecisionLoader.java index 11ab6caa1ea..b7902ecc0dc 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/DecisionLoader.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/DecisionLoader.java @@ -69,7 +69,7 @@ public class DecisionLoader { } public List<CpaDecision> load() { - List<CpaDecision> decisions = new ArrayList<CpaDecision>(); + List<CpaDecision> decisions = new ArrayList<>(); QueryBuilder queryBuilder = atsServer.getQuery().andTypeEquals(AtsArtifactTypes.TeamWorkflow).and(AtsAttributeTypes.ApplicabilityWorkflow, "true"); @@ -83,7 +83,7 @@ public class DecisionLoader { queryBuilder.and(AtsAttributeTypes.CurrentStateType, (open ? StateType.Working.name() : StateType.Completed.name())); } - HashCollection<String, CpaDecision> origPcrIdToDecision = new HashCollection<String, CpaDecision>(); + HashCollection<String, CpaDecision> origPcrIdToDecision = new HashCollection<>(); String pcrToolId = null; ElapsedTime time = new ElapsedTime("load cpa workflows"); ResultSet<ArtifactReadable> results = queryBuilder.getResults(); diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/DecisionUpdater.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/DecisionUpdater.java index 509bd9dfe4b..6e8e60abfe0 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/DecisionUpdater.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/DecisionUpdater.java @@ -110,7 +110,7 @@ public class DecisionUpdater { private void updateAssignees(final DecisionUpdate update, IAtsChangeSet changes, IAtsTeamWorkflow teamWf, XResultData rd) { if (update.getAssignees() != null) { - List<IAtsUser> assignees = new ArrayList<IAtsUser>(); + List<IAtsUser> assignees = new ArrayList<>(); for (String userId : update.getAssignees()) { IAtsUser user = atsServer.getUserService().getUserById(userId); if (user == null) { diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/ActionPage.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/ActionPage.java index 832f4fa84a6..09121d8235a 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/ActionPage.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/util/ActionPage.java @@ -307,7 +307,7 @@ public class ActionPage { private List<String> getIgnoreWidgetNames() { if (ignoredWidgets == null) { - ignoredWidgets = new ArrayList<String>(); + ignoredWidgets = new ArrayList<>(); String configValue = atsServer.getConfigValue("IgnoredWidgetNames"); if (Strings.isValid(configValue)) { for (String widgetName : configValue.split(";")) { diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/ActionUiResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/ActionUiResource.java index b5968629a28..945739fb4c8 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/ActionUiResource.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/ActionUiResource.java @@ -106,7 +106,7 @@ public final class ActionUiResource { @GET @Produces(MediaType.TEXT_HTML) public ViewModel getNewSource() throws Exception { - List<ArtifactReadable> sortedAis = new ArrayList<ArtifactReadable>(); + List<ArtifactReadable> sortedAis = new ArrayList<>(); for (ArtifactReadable ai : getAis()) { sortedAis.add(ai); } diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsActionEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsActionEndpointImpl.java index f58cb98a10e..80eaf5141d3 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsActionEndpointImpl.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsActionEndpointImpl.java @@ -102,7 +102,7 @@ public final class AtsActionEndpointImpl implements AtsActionEndpointApi { @Produces({MediaType.APPLICATION_JSON}) public Set<IAtsWorkItem> query(@Context UriInfo uriInfo) throws Exception { MultivaluedMap<String, String> queryParameters = uriInfo.getQueryParameters(true); - Set<IAtsWorkItem> workItems = new HashSet<IAtsWorkItem>(); + Set<IAtsWorkItem> workItems = new HashSet<>(); for (String key : queryParameters.keySet()) { IAttributeType attrType = null; Long attrTypeId = Strings.isNumeric(key) ? Long.valueOf(key) : null; @@ -164,7 +164,7 @@ public final class AtsActionEndpointImpl implements AtsActionEndpointApi { if (!Strings.isValid(actionableItems)) { return RestUtil.returnBadRequest("actionableItems is not valid"); } - List<IAtsActionableItem> aias = new ArrayList<IAtsActionableItem>(); + List<IAtsActionableItem> aias = new ArrayList<>(); ArtifactReadable aiArt = atsServer.getQuery().andTypeEquals(AtsArtifactTypes.ActionableItem).andNameEquals( actionableItems).getResults().getOneOrNull(); if (aiArt == null) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/WorkflowPortingBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/WorkflowPortingBlam.java index 9d9752b0326..97dc3171751 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/WorkflowPortingBlam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/WorkflowPortingBlam.java @@ -61,7 +61,7 @@ public class WorkflowPortingBlam extends AbstractBlam { private List<Artifact> createDestinationWorkflows(IAtsChangeSet changes, List<IAtsActionableItem> actionableItems) throws OseeCoreException { IAtsTeamDefinition teamDefinition = actionableItems.get(0).getTeamDefinition(); - List<Artifact> destinationWorkflows = new ArrayList<Artifact>(); + List<Artifact> destinationWorkflows = new ArrayList<>(); IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser(); Date createdDate = new Date(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/access/AtsBranchAccessManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/access/AtsBranchAccessManager.java index 190879fb1d9..20684c717ef 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/access/AtsBranchAccessManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/access/AtsBranchAccessManager.java @@ -128,7 +128,7 @@ public class AtsBranchAccessManager implements IArtifactEventListener, IAccessCo return branchUuidToContextIdCache.get(branch.getUuid()); } - Collection<IAccessContextId> contextIds = new ArrayList<IAccessContextId>(); + Collection<IAccessContextId> contextIds = new ArrayList<>(); branchUuidToContextIdCache.put(branch.getUuid(), contextIds); try { // don't access control common branch artifacts...yet @@ -160,7 +160,7 @@ public class AtsBranchAccessManager implements IArtifactEventListener, IAccessCo * Provided for testing purposes only. */ public static Collection<IAccessContextId> internalGetFromWorkflow(TeamWorkFlowArtifact teamArt) { - Set<IAccessContextId> contextIds = new HashSet<IAccessContextId>(); + Set<IAccessContextId> contextIds = new HashSet<>(); try { contextIds.addAll(getFromArtifact(teamArt)); if (contextIds.isEmpty()) { @@ -191,7 +191,7 @@ public class AtsBranchAccessManager implements IArtifactEventListener, IAccessCo * Recursively check artifact and all default hierarchy parents */ private static Collection<IAccessContextId> getFromArtifact(Artifact artifact) { - Set<IAccessContextId> contextIds = new HashSet<IAccessContextId>(); + Set<IAccessContextId> contextIds = new HashSet<>(); try { for (String guid : artifact.getAttributesToStringList(CoreAttributeTypes.AccessContextId)) { // Do not use getOrCreateId here cause name represents where context ids came from @@ -225,7 +225,7 @@ public class AtsBranchAccessManager implements IArtifactEventListener, IAccessCo return getAtsObjectEventFilters(); } - private static final List<IEventFilter> atsObjectEventFilter = new ArrayList<IEventFilter>(2); + private static final List<IEventFilter> atsObjectEventFilter = new ArrayList<>(2); private static final ArtifactTypeEventFilter atsArtifactTypesFilter = new ArtifactTypeEventFilter( AtsArtifactTypes.TeamWorkflow, AtsArtifactTypes.TeamDefinition, AtsArtifactTypes.ActionableItem); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AddNoteAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AddNoteAction.java index a29ad924a3d..1d481deb6ca 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AddNoteAction.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/AddNoteAction.java @@ -50,8 +50,8 @@ public class AddNoteAction extends AbstractAtsAction { @Override public void runWithException() throws OseeCoreException { - ArrayList<String> artifactNames = new ArrayList<String>(); - Map<String, String> selectedToStateName = new HashMap<String, String>(); + ArrayList<String> artifactNames = new ArrayList<>(); + Map<String, String> selectedToStateName = new HashMap<>(); artifactNames.add("Whole \"" + sma.getArtifactTypeName() + "\""); for (IAtsStateDefinition stateDefinition : AtsClientService.get().getWorkDefinitionAdmin().getStatesOrderedByOrdinal( sma.getWorkDefinition())) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DeleteTasksAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DeleteTasksAction.java index 0aec6a6091f..56dda21859b 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DeleteTasksAction.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DeleteTasksAction.java @@ -92,8 +92,8 @@ public class DeleteTasksAction extends AbstractAtsAction { SkynetTransaction transaction = TransactionManager.createTransaction(AtsUtilCore.getAtsBranch(), "Delete Tasks"); // Done for concurrent modification purposes - ArrayList<TaskArtifact> delItems = new ArrayList<TaskArtifact>(); - ArrayList<TaskArtifact> tasksNotInDb = new ArrayList<TaskArtifact>(); + ArrayList<TaskArtifact> delItems = new ArrayList<>(); + ArrayList<TaskArtifact> tasksNotInDb = new ArrayList<>(); delItems.addAll(items); for (TaskArtifact taskArt : delItems) { SMAEditor.close(Collections.singleton(taskArt), false); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DuplicateWorkflowViaWorldEditorAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DuplicateWorkflowViaWorldEditorAction.java index b61dddd39f4..85cae3bca54 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DuplicateWorkflowViaWorldEditorAction.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/DuplicateWorkflowViaWorldEditorAction.java @@ -43,7 +43,7 @@ public class DuplicateWorkflowViaWorldEditorAction extends AbstractAtsAction { } private Collection<TeamWorkFlowArtifact> getSelectedTeamWorkflowArtifacts() throws OseeCoreException { - List<TeamWorkFlowArtifact> teams = new ArrayList<TeamWorkFlowArtifact>(); + List<TeamWorkFlowArtifact> teams = new ArrayList<>(); for (Artifact art : selectedAtsArtifacts.getSelectedSMAArtifacts()) { if (art instanceof TeamWorkFlowArtifact) { teams.add((TeamWorkFlowArtifact) art); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/FavoriteAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/FavoriteAction.java index 3278be99fc5..a5df26fd1f8 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/FavoriteAction.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/FavoriteAction.java @@ -58,7 +58,7 @@ public class FavoriteAction extends AbstractAtsAction { } public Collection<AbstractWorkflowArtifact> getSelectedFavoritableArts() throws OseeCoreException { - List<AbstractWorkflowArtifact> favoritableArts = new ArrayList<AbstractWorkflowArtifact>(); + List<AbstractWorkflowArtifact> favoritableArts = new ArrayList<>(); for (Artifact art : selectedAtsArtifacts.getSelectedSMAArtifacts()) { if (art instanceof AbstractWorkflowArtifact) { favoritableArts.add((AbstractWorkflowArtifact) art); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ReloadAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ReloadAction.java index caee64df615..7ae3e8977b3 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ReloadAction.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/ReloadAction.java @@ -40,7 +40,7 @@ public class ReloadAction extends AbstractAtsAction { @Override public void runWithException() throws OseeCoreException { - Set<Artifact> relatedArts = new HashSet<Artifact>(); + Set<Artifact> relatedArts = new HashSet<>(); relatedArts.add(sma); if (sma.isTeamWorkflow()) { relatedArts.addAll(ReviewManager.getReviews((TeamWorkFlowArtifact) sma)); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/SubscribedAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/SubscribedAction.java index 13d63b17b93..9a191aa4f57 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/SubscribedAction.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/SubscribedAction.java @@ -59,7 +59,7 @@ public class SubscribedAction extends AbstractAtsAction { } public Collection<AbstractWorkflowArtifact> getSelectedSubscribableArts() throws OseeCoreException { - List<AbstractWorkflowArtifact> favoritableArts = new ArrayList<AbstractWorkflowArtifact>(); + List<AbstractWorkflowArtifact> favoritableArts = new ArrayList<>(); for (Artifact art : selectedAtsArtifacts.getSelectedSMAArtifacts()) { if (art instanceof AbstractWorkflowArtifact) { favoritableArts.add((AbstractWorkflowArtifact) art); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java index 0b0f4bf1309..50727b80315 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java @@ -213,7 +213,7 @@ public class NewActionPage1 extends WizardPage { } public Set<IAtsActionableItem> getSelectedIAtsActionableItems() { - Set<IAtsActionableItem> selected = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> selected = new HashSet<>(); for (Object obj : treeViewer.getChecked()) { selected.add((IAtsActionableItem) obj); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage3.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage3.java index 2d01e9cf977..9066fd37892 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage3.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage3.java @@ -46,7 +46,7 @@ public class NewActionPage3 extends WizardPage { private XWidgetPage page; private Composite comp; protected final NewActionWizard wizard; - private static Set<IAtsWizardItem> wizardExtensionItems = new HashSet<IAtsWizardItem>(); + private static Set<IAtsWizardItem> wizardExtensionItems = new HashSet<>(); public NewActionPage3(NewActionWizard wizard) { this(wizard, "Create new ATS Action", "Create ATS Action"); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileFeatureGroupColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileFeatureGroupColumn.java index d3ed84c7623..012df3718b2 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileFeatureGroupColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileFeatureGroupColumn.java @@ -125,7 +125,7 @@ public class AgileFeatureGroupColumn extends XViewerAtsColumn implements IXViewe } AgileEndpointApi agileEp = AtsClientService.getAgileEndpoint(); - List<JaxAgileFeatureGroup> activeFeatureGroups = new ArrayList<JaxAgileFeatureGroup>(); + List<JaxAgileFeatureGroup> activeFeatureGroups = new ArrayList<>(); long teamUuid = items.getCommonBacklog().getTeamUuid(); try { for (JaxAgileFeatureGroup feature : agileEp.getFeatureGroups(items.getCommonBacklog().getTeamUuid())) { @@ -172,7 +172,7 @@ public class AgileFeatureGroupColumn extends XViewerAtsColumn implements IXViewe } private static Collection<IAgileFeatureGroup> getSelectedFeatureGroups(Collection<? extends AbstractWorkflowArtifact> awas) { - List<IAgileFeatureGroup> selected = new LinkedList<IAgileFeatureGroup>(); + List<IAgileFeatureGroup> selected = new LinkedList<>(); if (awas.size() == 1) { for (Artifact featureArt : awas.iterator().next().getRelatedArtifacts( AtsRelationTypes.AgileFeatureToItem_FeatureGroup)) { @@ -190,7 +190,7 @@ public class AgileFeatureGroupColumn extends XViewerAtsColumn implements IXViewe public String getColumnText(Object element, XViewerColumn column, int columnIndex) { try { if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { String str = getColumnText(team, column, columnIndex); if (Strings.isValid(str)) { @@ -211,8 +211,8 @@ public class AgileFeatureGroupColumn extends XViewerAtsColumn implements IXViewe @Override public void handleColumnMultiEdit(TreeColumn treeColumn, Collection<TreeItem> treeItems) { try { - Set<AbstractWorkflowArtifact> awas = new HashSet<AbstractWorkflowArtifact>(); - List<Artifact> arts = new ArrayList<Artifact>(); + Set<AbstractWorkflowArtifact> awas = new HashSet<>(); + List<Artifact> arts = new ArrayList<>(); for (TreeItem item : treeItems) { Artifact art = (Artifact) item.getData(); if (art.isOfType(AtsArtifactTypes.AbstractWorkflowArtifact)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileUtilClient.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileUtilClient.java index cd34a92341a..4f9c8337af7 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileUtilClient.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/AgileUtilClient.java @@ -41,7 +41,7 @@ public class AgileUtilClient { } public static Collection<Artifact> getRelatedSprints(Artifact awa) { - Set<Artifact> sprints = new HashSet<Artifact>(); + Set<Artifact> sprints = new HashSet<>(); for (Artifact sprintArt : awa.getRelatedArtifacts(AtsRelationTypes.AgileSprintToItem_Sprint)) { sprints.add(sprintArt); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/BacklogXViewerFactory.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/BacklogXViewerFactory.java index ba21e40a0ea..8586319443a 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/BacklogXViewerFactory.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/BacklogXViewerFactory.java @@ -47,7 +47,7 @@ public class BacklogXViewerFactory extends SkynetXViewerFactory { this.soleBacklogArtifact = soleBacklogArtifact; List<XViewerAtsAttributeValueColumn> configCols = WorldXViewerUtil.getConfigurationColumns(); - List<XViewerColumn> backlogCols = new LinkedList<XViewerColumn>(); + List<XViewerColumn> backlogCols = new LinkedList<>(); // Add default Backlog columns WorldXViewerUtil.addColumn(this, BacklogOrderColumn.getInstance(), AbstractMembersOrderColumn.DEFAULT_WIDTH, diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintColumn.java index 9f2b9c91a71..28887d4b97c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintColumn.java @@ -171,7 +171,7 @@ public class SprintColumn extends XViewerAtsColumn implements IXViewerValueColum } private static Set<IAgileSprint> getActiveSprints(Artifact agileTeamArt) { - Set<IAgileSprint> activeSprints = new HashSet<IAgileSprint>(); + Set<IAgileSprint> activeSprints = new HashSet<>(); for (Artifact sprintArt : agileTeamArt.getRelatedArtifacts(AtsRelationTypes.AgileTeamToSprint_Sprint)) { IAgileSprint agileSprint = AtsClientService.get().getWorkItemFactory().getAgileSprint(sprintArt); if (agileSprint.isActive()) { @@ -197,7 +197,7 @@ public class SprintColumn extends XViewerAtsColumn implements IXViewerValueColum @Override public void handleColumnMultiEdit(TreeColumn treeColumn, Collection<TreeItem> treeItems) { try { - Set<AbstractWorkflowArtifact> awas = new HashSet<AbstractWorkflowArtifact>(); + Set<AbstractWorkflowArtifact> awas = new HashSet<>(); for (TreeItem item : treeItems) { Artifact art = (Artifact) item.getData(); if (art instanceof AbstractWorkflowArtifact) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintItems.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintItems.java index 4f929bbed0d..2457ec6ef5d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintItems.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintItems.java @@ -43,7 +43,7 @@ public class SprintItems { public void validate() { commonBacklog = null; - multipleSprints = new HashSet<Artifact>(); + multipleSprints = new HashSet<>(); commonSelectedSprint = true; noBacklogDetected = false; multipleBacklogsDetected = false; @@ -119,7 +119,7 @@ public class SprintItems { } public Set<IAgileSprint> getMultipleSprints() { - Set<IAgileSprint> sprints = new HashSet<IAgileSprint>(); + Set<IAgileSprint> sprints = new HashSet<>(); for (Artifact art : multipleSprints) { sprints.add(AtsClientService.get().getWorkItemFactory().getAgileSprint(art)); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintXViewerFactory.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintXViewerFactory.java index ce8b02d1e29..f4b3d76a2cc 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintXViewerFactory.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/SprintXViewerFactory.java @@ -44,7 +44,7 @@ public class SprintXViewerFactory extends SkynetXViewerFactory { this.soleSprintArtifact = soleSprintArtifact; List<XViewerAtsAttributeValueColumn> configCols = WorldXViewerUtil.getConfigurationColumns(); - List<XViewerColumn> sprintCols = new LinkedList<XViewerColumn>(); + List<XViewerColumn> sprintCols = new LinkedList<>(); // Add default Sprint columns WorldXViewerUtil.addColumn(this, SprintOrderColumn.getInstance(), 45, sprintCols); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/MembersManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/MembersManager.java index 02abcbd7048..10fe94ab413 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/MembersManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/MembersManager.java @@ -59,7 +59,7 @@ public abstract class MembersManager<T extends CollectorArtifact> { } public Collection<Artifact> getCollectors(Artifact artifact, boolean recurse) throws OseeCoreException { - Set<Artifact> collectors = new HashSet<Artifact>(); + Set<Artifact> collectors = new HashSet<>(); getCollectors(artifact, collectors, recurse); return collectors; } @@ -106,7 +106,7 @@ public abstract class MembersManager<T extends CollectorArtifact> { AWorkbench.popup(String.format("New Order Number [%s] out of range 1..%d", newIndexStr, members.size())); return null; } - List<Artifact> reversed = new LinkedList<Artifact>(artifacts); + List<Artifact> reversed = new LinkedList<>(artifacts); Collections.reverse(reversed); for (Artifact artifact : reversed) { int currentIdx = members.indexOf(artifact); @@ -129,7 +129,7 @@ public abstract class MembersManager<T extends CollectorArtifact> { return ""; } Collection<Artifact> collectors = getCollectors(artifact, false); - List<Artifact> collectorsSorted = new ArrayList<Artifact>(collectors); + List<Artifact> collectorsSorted = new ArrayList<>(collectors); Collections.sort(collectorsSorted); StringBuffer sb = new StringBuffer(); for (Artifact member : collectorsSorted) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/WorkflowManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/WorkflowManager.java index 8e59b23d3c5..6c430d70c43 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/WorkflowManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/WorkflowManager.java @@ -75,7 +75,7 @@ public class WorkflowManager { } public static List<TeamWorkFlowArtifact> getAllTeamWorkflowArtifacts() throws OseeCoreException { - List<TeamWorkFlowArtifact> result = new ArrayList<TeamWorkFlowArtifact>(); + List<TeamWorkFlowArtifact> result = new ArrayList<>(); for (IArtifactType artType : TeamWorkFlowManager.getTeamWorkflowArtifactTypes()) { List<TeamWorkFlowArtifact> teamArts = org.eclipse.osee.framework.jdk.core.util.Collections.castAll(ArtifactQuery.getArtifactListFromType(artType, @@ -86,7 +86,7 @@ public class WorkflowManager { } public static Collection<AbstractWorkflowArtifact> getCompletedCancelled(Collection<AbstractWorkflowArtifact> awas) throws OseeCoreException { - List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<AbstractWorkflowArtifact>(awas.size()); + List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<>(awas.size()); for (AbstractWorkflowArtifact awa : awas) { if (awa.isCompletedOrCancelled()) { artifactsToReturn.add(awa); @@ -96,7 +96,7 @@ public class WorkflowManager { } public static Collection<AbstractWorkflowArtifact> getInWork(Collection<AbstractWorkflowArtifact> awas) throws OseeCoreException { - List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<AbstractWorkflowArtifact>(awas.size()); + List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<>(awas.size()); for (AbstractWorkflowArtifact awa : awas) { if (!awa.isCompletedOrCancelled()) { artifactsToReturn.add(awa); @@ -106,7 +106,7 @@ public class WorkflowManager { } public static Collection<AbstractWorkflowArtifact> filterOutState(Collection<AbstractWorkflowArtifact> awas, Collection<String> stateNames) { - List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<AbstractWorkflowArtifact>(awas.size()); + List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<>(awas.size()); for (AbstractWorkflowArtifact awa : awas) { if (!stateNames.contains(awa.getStateMgr().getCurrentStateName())) { artifactsToReturn.add(awa); @@ -116,7 +116,7 @@ public class WorkflowManager { } public static Collection<AbstractWorkflowArtifact> filterOutCompleted(Collection<AbstractWorkflowArtifact> awas) throws OseeCoreException { - List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<AbstractWorkflowArtifact>(awas.size()); + List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<>(awas.size()); for (AbstractWorkflowArtifact awa : awas) { if (!awa.isCompleted()) { artifactsToReturn.add(awa); @@ -126,7 +126,7 @@ public class WorkflowManager { } public static Collection<AbstractWorkflowArtifact> filterOutCancelled(Collection<AbstractWorkflowArtifact> awas) throws OseeCoreException { - List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<AbstractWorkflowArtifact>(awas.size()); + List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<>(awas.size()); for (AbstractWorkflowArtifact awa : awas) { if (!awa.isCancelled()) { artifactsToReturn.add(awa); @@ -136,7 +136,7 @@ public class WorkflowManager { } public static Collection<Artifact> filterState(String selectedState, Collection<? extends Artifact> awas) { - List<Artifact> artifactsToReturn = new ArrayList<Artifact>(awas.size()); + List<Artifact> artifactsToReturn = new ArrayList<>(awas.size()); if (!Strings.isValid(selectedState)) { artifactsToReturn.addAll(awas); } else { @@ -150,7 +150,7 @@ public class WorkflowManager { } public static Collection<AbstractWorkflowArtifact> filterOutTypes(Collection<AbstractWorkflowArtifact> awas, Collection<Class<?>> classes) { - List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<AbstractWorkflowArtifact>(awas.size()); + List<AbstractWorkflowArtifact> artifactsToReturn = new ArrayList<>(awas.size()); for (AbstractWorkflowArtifact awa : awas) { boolean found = false; for (Class<?> clazz : classes) { @@ -166,7 +166,7 @@ public class WorkflowManager { } public static Collection<AbstractWorkflowArtifact> getOpenAtDate(Date date, Collection<AbstractWorkflowArtifact> artifacts) throws OseeCoreException { - List<AbstractWorkflowArtifact> awas = new ArrayList<AbstractWorkflowArtifact>(); + List<AbstractWorkflowArtifact> awas = new ArrayList<>(); for (AbstractWorkflowArtifact awa : artifacts) { Date createDate = CreatedDateColumn.getDate(awa); Date completedCancelDate = null; @@ -185,7 +185,7 @@ public class WorkflowManager { } public static Collection<AbstractWorkflowArtifact> getCompletedCancelledBetweenDate(Date startDate, Date endDate, Collection<AbstractWorkflowArtifact> artifacts) throws OseeCoreException { - List<AbstractWorkflowArtifact> awas = new ArrayList<AbstractWorkflowArtifact>(); + List<AbstractWorkflowArtifact> awas = new ArrayList<>(); for (AbstractWorkflowArtifact awa : artifacts) { Date completedCancelDate = null; if (awa.isCompletedOrCancelled()) { @@ -214,7 +214,7 @@ public class WorkflowManager { } public static Collection<AbstractWorkflowArtifact> getStateAtDate(Date date, Collection<String> states, Collection<AbstractWorkflowArtifact> artifacts) throws OseeCoreException { - List<AbstractWorkflowArtifact> awas = new ArrayList<AbstractWorkflowArtifact>(); + List<AbstractWorkflowArtifact> awas = new ArrayList<>(); for (AbstractWorkflowArtifact awa : artifacts) { Date createDate = CreatedDateColumn.getDate(awa); if (createDate.after(date)) { @@ -238,7 +238,7 @@ public class WorkflowManager { * Returns awa if change type, or parent team workflow's change type is in specified set */ public static Collection<AbstractWorkflowArtifact> getChangeType(Collection<ChangeType> changeTypes, Collection<AbstractWorkflowArtifact> artifacts) throws OseeCoreException { - List<AbstractWorkflowArtifact> awas = new ArrayList<AbstractWorkflowArtifact>(); + List<AbstractWorkflowArtifact> awas = new ArrayList<>(); for (AbstractWorkflowArtifact awa : artifacts) { TeamWorkFlowArtifact teamArt = awa.getParentTeamWorkflow(); if (changeTypes.contains(ChangeTypeUtil.getChangeType(teamArt))) { @@ -253,7 +253,7 @@ public class WorkflowManager { * Returns awa if priority type, or parent team workflow's priority type is in specified set */ public static Collection<AbstractWorkflowArtifact> getPriorityType(Collection<String> priorityTypes, Collection<AbstractWorkflowArtifact> artifacts) throws OseeCoreException { - List<AbstractWorkflowArtifact> awas = new ArrayList<AbstractWorkflowArtifact>(); + List<AbstractWorkflowArtifact> awas = new ArrayList<>(); for (AbstractWorkflowArtifact awa : artifacts) { TeamWorkFlowArtifact teamArt = awa.getParentTeamWorkflow(); if (priorityTypes.contains(PriorityUtil.getPriorityStr(teamArt))) { @@ -265,7 +265,7 @@ public class WorkflowManager { } public static Collection<AbstractWorkflowArtifact> getTeamDefinitionWorkflows(Collection<? extends Artifact> artifacts, Collection<IAtsTeamDefinition> teamDefs) throws OseeCoreException { - List<AbstractWorkflowArtifact> returnawas = new ArrayList<AbstractWorkflowArtifact>(); + List<AbstractWorkflowArtifact> returnawas = new ArrayList<>(); for (AbstractWorkflowArtifact awa : getAwas(artifacts)) { if (awa.getParentTeamWorkflow() == null) { continue; @@ -278,7 +278,7 @@ public class WorkflowManager { } public static Collection<AbstractWorkflowArtifact> getVersionWorkflows(Collection<? extends Artifact> artifacts, Collection<IAtsVersion> versionArts) throws OseeCoreException { - List<AbstractWorkflowArtifact> returnawas = new ArrayList<AbstractWorkflowArtifact>(); + List<AbstractWorkflowArtifact> returnawas = new ArrayList<>(); for (AbstractWorkflowArtifact awa : getAwas(artifacts)) { if (awa.getParentTeamWorkflow() == null) { continue; @@ -318,7 +318,7 @@ public class WorkflowManager { } public static List<StateXWidgetPage> getStatePagesOrderedByOrdinal(AbstractWorkflowArtifact awa) throws OseeStateException { - List<StateXWidgetPage> statePages = new ArrayList<StateXWidgetPage>(); + List<StateXWidgetPage> statePages = new ArrayList<>(); if (awa != null) { IAtsWorkDefinition definition = awa.getWorkDefinition(); ATSXWidgetOptionResolver optionResolver = ATSXWidgetOptionResolver.getInstance(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractBranchColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractBranchColumn.java index e6079032f50..242fd6a3ade 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractBranchColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractBranchColumn.java @@ -63,7 +63,7 @@ public abstract class AbstractBranchColumn extends XViewerAtsColumn implements I } } } else if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { String str = getColumnText(team, column, columnIndex); if (Strings.isValid(str)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractMembersOrderColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractMembersOrderColumn.java index c36c111ec2e..1f954378b92 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractMembersOrderColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractMembersOrderColumn.java @@ -32,7 +32,7 @@ import org.eclipse.osee.framework.ui.skynet.util.LogUtil; public abstract class AbstractMembersOrderColumn extends XViewerAtsColumn implements IXViewerPreComputedColumn, IAltLeftClickProvider { public static final Integer DEFAULT_WIDTH = 45; - Map<Long, String> multiMembersValueMap = new HashMap<Long, String>(); + Map<Long, String> multiMembersValueMap = new HashMap<>(); boolean loading = false; public AbstractMembersOrderColumn(String id, String name, int width, int align, boolean show, SortDataType sortDataType, boolean multiColumnEditable, String description) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractWorkflowVersionDateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractWorkflowVersionDateColumn.java index 27827e5f4c8..5421a68087f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractWorkflowVersionDateColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AbstractWorkflowVersionDateColumn.java @@ -44,7 +44,7 @@ public abstract class AbstractWorkflowVersionDateColumn extends XViewerAtsAttrib public String getColumnText(Object element, XViewerColumn column, int columnIndex) { try { if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { String str = getColumnText(team, column, columnIndex); if (Strings.isValid(str)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ActionableItemOwner.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ActionableItemOwner.java index 0b686b9549d..7c70496cd7f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ActionableItemOwner.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ActionableItemOwner.java @@ -67,7 +67,7 @@ public class ActionableItemOwner extends XViewerAtsColumn implements IXViewerVal } public static Set<User> getActionableItemOwners(Object element) throws OseeCoreException { - Set<User> users = new HashSet<User>(); + Set<User> users = new HashSet<>(); if (element instanceof ActionArtifact) { for (TeamWorkFlowArtifact teamArt : ((ActionArtifact) element).getTeams()) { users.addAll(getActionableItemOwners(teamArt)); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AssigneeColumnUI.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AssigneeColumnUI.java index 1aee65ddabc..504fa13b8f6 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AssigneeColumnUI.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/AssigneeColumnUI.java @@ -171,7 +171,7 @@ public class AssigneeColumnUI extends XViewerAtsColumn implements IXViewerValueC @Override public void handleColumnMultiEdit(TreeColumn treeColumn, Collection<TreeItem> treeItems) { try { - Set<AbstractWorkflowArtifact> awas = new HashSet<AbstractWorkflowArtifact>(); + Set<AbstractWorkflowArtifact> awas = new HashSet<>(); for (TreeItem item : treeItems) { Artifact art = (Artifact) item.getData(); if (art instanceof AbstractWorkflowArtifact) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/BranchStatusColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/BranchStatusColumn.java index cd6905fba2a..77c57162180 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/BranchStatusColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/BranchStatusColumn.java @@ -58,7 +58,7 @@ public class BranchStatusColumn extends XViewerAtsColumn implements IXViewerValu public String getColumnText(Object element, XViewerColumn column, int columnIndex) { try { if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { String str = getColumnText(team, column, columnIndex); if (Strings.isValid(str)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CancelledByColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CancelledByColumn.java index b24df535b48..6cb71e1f8f0 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CancelledByColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CancelledByColumn.java @@ -63,7 +63,7 @@ public class CancelledByColumn extends XViewerAtsColumn implements IXViewerValue return user.getName(); } } else if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<IAtsUser> users = new HashSet<IAtsUser>(); + Set<IAtsUser> users = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { IAtsUser user = team.getCancelledBy(); if (user != null) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CancelledDateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CancelledDateColumn.java index 810860658a8..cbbda5ffe08 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CancelledDateColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CancelledDateColumn.java @@ -87,7 +87,7 @@ public class CancelledDateColumn extends XViewerAtsColumn implements IXViewerVal public static String getDateStr(Object object) throws OseeCoreException { if (Artifacts.isOfType(object, AtsArtifactTypes.Action)) { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(object)) { String str = getDateStr(team); if (Strings.isValid(str)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ChangeTypeColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ChangeTypeColumn.java index 9048a0999f1..884cce07fa3 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ChangeTypeColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ChangeTypeColumn.java @@ -176,7 +176,7 @@ public class ChangeTypeColumn extends XViewerAtsAttributeValueColumn { @Override public void handleColumnMultiEdit(TreeColumn treeColumn, Collection<TreeItem> treeItems) { - Set<TeamWorkFlowArtifact> awas = new HashSet<TeamWorkFlowArtifact>(); + Set<TeamWorkFlowArtifact> awas = new HashSet<>(); for (TreeItem item : treeItems) { Artifact art = (Artifact) item.getData(); if (art.isOfType(AtsArtifactTypes.TeamWorkflow)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ColorTeamColumnUI.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ColorTeamColumnUI.java index 43a9bfe6fc5..50650916be9 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ColorTeamColumnUI.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ColorTeamColumnUI.java @@ -30,7 +30,7 @@ import org.eclipse.swt.SWT; public class ColorTeamColumnUI extends XViewerAtsColumn implements IXViewerPreComputedColumn { public static final Integer DEFAULT_WIDTH = 45; - Map<Long, String> workItemUuidToColorTeam = new HashMap<Long, String>(100); + Map<Long, String> workItemUuidToColorTeam = new HashMap<>(100); boolean loading = false; public static ColorTeamColumnUI instance = new ColorTeamColumnUI(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedByColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedByColumn.java index 84529bbc2c3..6877bd88ce7 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedByColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedByColumn.java @@ -63,7 +63,7 @@ public class CompletedByColumn extends XViewerAtsColumn implements IXViewerValue return user.getName(); } } else if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<IAtsUser> users = new HashSet<IAtsUser>(); + Set<IAtsUser> users = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { IAtsUser user = team.getCompletedBy(); if (user != null) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedCancelledByColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedCancelledByColumn.java index 6cdca8e8360..cabf3288fe5 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedCancelledByColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedCancelledByColumn.java @@ -64,7 +64,7 @@ public class CompletedCancelledByColumn extends XViewerAtsColumn implements IXVi return CancelledByColumn.getInstance().getColumnText(element, column, columnIndex); } } else if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<IAtsUser> users = new HashSet<IAtsUser>(); + Set<IAtsUser> users = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { IAtsUser user = team.getCompletedBy(); if (((AbstractWorkflowArtifact) element).isCompleted()) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedCancelledDateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedCancelledDateColumn.java index 84d2ac12ffd..554cba9c789 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedCancelledDateColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedCancelledDateColumn.java @@ -65,7 +65,7 @@ public class CompletedCancelledDateColumn extends XViewerAtsColumn implements IX return CancelledDateColumn.getDateStr(element); } } else if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<String> dates = new HashSet<String>(); + Set<String> dates = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { String date = getColumnText(team, column, columnIndex); if (Strings.isValid(date)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedDateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedDateColumn.java index 9396144b485..ed244a7ba5e 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedDateColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CompletedDateColumn.java @@ -87,7 +87,7 @@ public class CompletedDateColumn extends XViewerAtsColumn implements IXViewerVal public static String getDateStr(Object object) throws OseeCoreException { if (Artifacts.isOfType(object, AtsArtifactTypes.Action)) { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(object)) { String str = getDateStr(team); if (Strings.isValid(str)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CreatedDateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CreatedDateColumn.java index 1423ee79785..61dbc04eb02 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CreatedDateColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/CreatedDateColumn.java @@ -75,7 +75,7 @@ public class CreatedDateColumn extends XViewerAtsColumn implements IXViewerValue } public static String getDateStr(Object object) throws OseeCoreException { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); if (Artifacts.isOfType(object, AtsArtifactTypes.Action)) { for (TeamWorkFlowArtifact team : ActionManager.getTeams(object)) { Date date = getDate(team); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/DaysInCurrentStateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/DaysInCurrentStateColumn.java index 1ebd732e48c..9e86e27ece0 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/DaysInCurrentStateColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/DaysInCurrentStateColumn.java @@ -66,7 +66,7 @@ public class DaysInCurrentStateColumn extends XViewerAtsColumn implements IXView } return AtsUtilCore.doubleToI18nString(timeInCurrState / DateUtil.MILLISECONDS_IN_A_DAY); } else if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { String str = getColumnText(team, column, columnIndex); if (Strings.isValid(str)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/EndDateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/EndDateColumn.java index 9e8e65e9ed2..28262e6ae57 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/EndDateColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/EndDateColumn.java @@ -75,7 +75,7 @@ public class EndDateColumn extends XViewerAtsAttributeValueColumn { } public static String getDateStr(Object object) throws OseeCoreException { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); if (Artifacts.isOfType(object, AtsArtifactTypes.Action)) { for (TeamWorkFlowArtifact team : ActionManager.getTeams(object)) { Date date = getDate(team); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/GoalsColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/GoalsColumn.java index 78903b0e421..b101b0c0a92 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/GoalsColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/GoalsColumn.java @@ -104,7 +104,7 @@ public class GoalsColumn extends XViewerAtsColumn implements IXViewerValueColumn } public static boolean promptChangeGoals(final Collection<? extends Artifact> awas, boolean persist) throws OseeCoreException { - Set<Artifact> selected = new HashSet<Artifact>(); + Set<Artifact> selected = new HashSet<>(); for (Artifact awa : awas) { selected.addAll(awa.getRelatedArtifacts(AtsRelationTypes.Goal_Goal)); } @@ -137,7 +137,7 @@ public class GoalsColumn extends XViewerAtsColumn implements IXViewerValueColumn @Override public void handleColumnMultiEdit(TreeColumn treeColumn, Collection<TreeItem> treeItems) { try { - Set<AbstractWorkflowArtifact> awas = new HashSet<AbstractWorkflowArtifact>(); + Set<AbstractWorkflowArtifact> awas = new HashSet<>(); for (TreeItem item : treeItems) { Artifact art = (Artifact) item.getData(); if (art instanceof AbstractWorkflowArtifact) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/GroupsColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/GroupsColumn.java index df7b3342543..3006c15377c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/GroupsColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/GroupsColumn.java @@ -104,7 +104,7 @@ public class GroupsColumn extends XViewerAtsColumn implements IXViewerValueColum } public static boolean promptChangeGroups(final Collection<? extends AbstractWorkflowArtifact> awas, boolean persist) throws OseeCoreException { - Set<Artifact> selected = new HashSet<Artifact>(); + Set<Artifact> selected = new HashSet<>(); for (AbstractWorkflowArtifact awa : awas) { selected.addAll(awa.getRelatedArtifacts(CoreRelationTypes.Universal_Grouping__Group)); } @@ -127,7 +127,7 @@ public class GroupsColumn extends XViewerAtsColumn implements IXViewerValueColum public String getColumnText(Object element, XViewerColumn column, int columnIndex) { try { if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<Artifact> groups = new HashSet<Artifact>(); + Set<Artifact> groups = new HashSet<>(); Artifact actionArt = (Artifact) element; groups.addAll(actionArt.getRelatedArtifacts(CoreRelationTypes.Universal_Grouping__Group)); // Roll up if same for all children @@ -149,7 +149,7 @@ public class GroupsColumn extends XViewerAtsColumn implements IXViewerValueColum @Override public void handleColumnMultiEdit(TreeColumn treeColumn, Collection<TreeItem> treeItems) { try { - Set<AbstractWorkflowArtifact> awas = new HashSet<AbstractWorkflowArtifact>(); + Set<AbstractWorkflowArtifact> awas = new HashSet<>(); for (TreeItem item : treeItems) { Artifact art = (Artifact) item.getData(); if (art.isOfType(AtsArtifactTypes.TeamWorkflow)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksColumn.java index 828f2247593..e0064cc4eec 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksColumn.java @@ -58,7 +58,7 @@ public class NumberOfTasksColumn extends XViewerAtsColumn implements IXViewerVal public String getColumnText(Object element, XViewerColumn column, int columnIndex) { try { if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { String str = getColumnText(team, column, columnIndex); if (Strings.isValid(str)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksRemainingColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksRemainingColumn.java index dc4554d5f25..9ccf49bf3bc 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksRemainingColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksRemainingColumn.java @@ -58,7 +58,7 @@ public class NumberOfTasksRemainingColumn extends XViewerAtsColumn implements IX public String getColumnText(Object element, XViewerColumn column, int columnIndex) { try { if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { String str = getColumnText(team, column, columnIndex); if (Strings.isValid(str)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OperationalImpactColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OperationalImpactColumn.java index 029a28e6286..53f97c68df8 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OperationalImpactColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OperationalImpactColumn.java @@ -74,7 +74,7 @@ public class OperationalImpactColumn extends XViewerValueColumn { return ((TeamWorkFlowArtifact) art).getSoleAttributeValue(AtsAttributeTypes.OperationalImpact, ""); } if (art.isOfType(AtsArtifactTypes.Action)) { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(art)) { strs.add(getOperationalImpact(team)); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OperationalImpactWorkaroundColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OperationalImpactWorkaroundColumn.java index a37352248b2..d3212085fc3 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OperationalImpactWorkaroundColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OperationalImpactWorkaroundColumn.java @@ -74,7 +74,7 @@ public class OperationalImpactWorkaroundColumn extends XViewerValueColumn { return ((TeamWorkFlowArtifact) art).getSoleAttributeValue(AtsAttributeTypes.OperationalImpactWorkaround, ""); } if (art.isOfType(AtsArtifactTypes.Action)) { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(art)) { strs.add(getOperationalImpact(team)); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OriginatingWorkFlowColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OriginatingWorkFlowColumn.java index 3a66a61bce9..fedbc311ae5 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OriginatingWorkFlowColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OriginatingWorkFlowColumn.java @@ -78,7 +78,7 @@ public class OriginatingWorkFlowColumn extends XViewerAtsColumn implements IXVie } public static String getWorldViewOriginatingWorkflowStr(Artifact actionArt) throws OseeCoreException { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (TeamWorkFlowArtifact team : getWorldViewOriginatingWorkflows(actionArt)) { strs.add(AtsClientService.get().getColumnUtilities().getTeamUtility().getColumnText(team)); } @@ -89,7 +89,7 @@ public class OriginatingWorkFlowColumn extends XViewerAtsColumn implements IXVie if (ActionManager.getTeams(actionArt).size() == 1) { return ActionManager.getTeams(actionArt); } - Collection<TeamWorkFlowArtifact> results = new ArrayList<TeamWorkFlowArtifact>(); + Collection<TeamWorkFlowArtifact> results = new ArrayList<>(); Date origDate = null; for (TeamWorkFlowArtifact teamArt : ActionManager.getTeams(actionArt)) { if (teamArt.isCancelled()) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OriginatorColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OriginatorColumn.java index a5d8f2947cf..1bb157dee41 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OriginatorColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/OriginatorColumn.java @@ -136,7 +136,7 @@ public class OriginatorColumn extends XViewerAtsColumn implements IXViewerValueC return ((AbstractWorkflowArtifact) element).getCreatedBy().getName(); } if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { strs.add(team.getCreatedBy().getName()); } @@ -155,7 +155,7 @@ public class OriginatorColumn extends XViewerAtsColumn implements IXViewerValueC return AtsUtil.getImage(Arrays.asList(((AbstractWorkflowArtifact) element).getCreatedBy())); } if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<IAtsUser> users = new HashSet<IAtsUser>(); + Set<IAtsUser> users = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { users.add(team.getCreatedBy()); } @@ -171,7 +171,7 @@ public class OriginatorColumn extends XViewerAtsColumn implements IXViewerValueC @Override public void handleColumnMultiEdit(TreeColumn treeColumn, Collection<TreeItem> treeItems) { try { - Set<AbstractWorkflowArtifact> awas = new HashSet<AbstractWorkflowArtifact>(); + Set<AbstractWorkflowArtifact> awas = new HashSet<>(); for (TreeItem item : treeItems) { Artifact art = (Artifact) item.getData(); if (art instanceof AbstractWorkflowArtifact) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/PriorityColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/PriorityColumn.java index a7b02de7db4..64d610ba76b 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/PriorityColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/PriorityColumn.java @@ -124,7 +124,7 @@ public class PriorityColumn extends XViewerAtsAttributeValueColumn { @Override public void handleColumnMultiEdit(TreeColumn treeColumn, Collection<TreeItem> treeItems) { - Set<TeamWorkFlowArtifact> awas = new HashSet<TeamWorkFlowArtifact>(); + Set<TeamWorkFlowArtifact> awas = new HashSet<>(); for (TreeItem item : treeItems) { Artifact art = (Artifact) item.getData(); if (art.isOfType(AtsArtifactTypes.TeamWorkflow)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/RelatedToStateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/RelatedToStateColumn.java index b29b4cc27cd..1f8f6e0983c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/RelatedToStateColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/RelatedToStateColumn.java @@ -86,7 +86,7 @@ public class RelatedToStateColumn extends XViewerAtsAttributeValueColumn { return false; } try { - List<String> validStates = new ArrayList<String>(); + List<String> validStates = new ArrayList<>(); validStates.add(NONE); validStates.addAll(RelatedToStateColumn.getValidInWorkStates(tasks.iterator().next().getParentTeamWorkflow())); final StateListDialog dialog = @@ -127,14 +127,14 @@ public class RelatedToStateColumn extends XViewerAtsAttributeValueColumn { } public static List<String> getValidStates(TeamWorkFlowArtifact teamArt) throws OseeStateException { - List<String> names = new ArrayList<String>(); + List<String> names = new ArrayList<>(); names.addAll(AtsClientService.get().getWorkDefinitionAdmin().getStateNames(teamArt.getWorkDefinition())); Collections.sort(names); return names; } public static List<String> getValidInWorkStates(TeamWorkFlowArtifact teamArt) throws OseeStateException { - List<String> names = new ArrayList<String>(); + List<String> names = new ArrayList<>(); for (String state : AtsClientService.get().getWorkDefinitionAdmin().getStateNames(teamArt.getWorkDefinition())) { if (teamArt.getStateDefinitionByName(state).getStateType().isWorkingState()) { names.add(state); @@ -167,7 +167,7 @@ public class RelatedToStateColumn extends XViewerAtsAttributeValueColumn { @Override public void handleColumnMultiEdit(TreeColumn treeColumn, Collection<TreeItem> treeItems) { - Set<TaskArtifact> tasks = new HashSet<TaskArtifact>(); + Set<TaskArtifact> tasks = new HashSet<>(); for (TreeItem item : treeItems) { Artifact art = (Artifact) item.getData(); if (art.isOfType(AtsArtifactTypes.Task)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StartDateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StartDateColumn.java index fc18683438d..ab50b710f76 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StartDateColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StartDateColumn.java @@ -75,7 +75,7 @@ public class StartDateColumn extends XViewerAtsAttributeValueColumn { } public static String getDateStr(Object object) throws OseeCoreException { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); if (Artifacts.isOfType(object, AtsArtifactTypes.Action)) { for (TeamWorkFlowArtifact team : ActionManager.getTeams(object)) { Date date = getDate(team); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateAssigneesColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateAssigneesColumn.java index 94eb812b693..3e8cae0ade2 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateAssigneesColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateAssigneesColumn.java @@ -57,11 +57,11 @@ public class StateAssigneesColumn extends XViewerAtsColumn implements IXViewerVa try { if (element instanceof AbstractWorkflowArtifact) { AbstractWorkflowArtifact awa = (AbstractWorkflowArtifact) element; - Set<IAtsUser> users = new HashSet<IAtsUser>(); + Set<IAtsUser> users = new HashSet<>(); users.addAll(awa.getStateMgr().getAssignees(stateName)); return AtsObjects.toString(";", users); } else if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<IAtsUser> users = new HashSet<IAtsUser>(); + Set<IAtsUser> users = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { users.addAll(team.getStateMgr().getAssignees(stateName)); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateColumn.java index 7a17399d472..5fa240d07a9 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateColumn.java @@ -62,7 +62,7 @@ public class StateColumn extends XViewerAtsColumn implements IXViewerValueColumn if (element instanceof AbstractWorkflowArtifact) { return ((AbstractWorkflowArtifact) element).getCurrentStateName(); } else if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { strs.add(team.getCurrentStateName()); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateCompletedColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateCompletedColumn.java index f0918fbfa1e..4c2d2c8392d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateCompletedColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/StateCompletedColumn.java @@ -68,7 +68,7 @@ public class StateCompletedColumn extends XViewerAtsColumn implements IXViewerVa return date; } } else if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<String> dates = new HashSet<String>(); + Set<String> dates = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { IAtsStateDefinition state = team.getStateDefinitionByName(stateName); if (state != null) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/TargetedVersionColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/TargetedVersionColumn.java index 42c4cb1135d..4ffca9c584c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/TargetedVersionColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/TargetedVersionColumn.java @@ -191,7 +191,7 @@ public class TargetedVersionColumn extends XViewerAtsColumn implements IXViewerV String result = ""; try { if (element instanceof IAtsAction) { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { String str = Versions.getTargetedVersionStr(team, AtsClientService.get().getVersionService()); if (Strings.isValid(str)) { @@ -212,8 +212,8 @@ public class TargetedVersionColumn extends XViewerAtsColumn implements IXViewerV @Override public void handleColumnMultiEdit(TreeColumn treeColumn, Collection<TreeItem> treeItems) { try { - Set<TeamWorkFlowArtifact> awas = new HashSet<TeamWorkFlowArtifact>(); - List<Artifact> arts = new ArrayList<Artifact>(); + Set<TeamWorkFlowArtifact> awas = new HashSet<>(); + List<Artifact> arts = new ArrayList<>(); for (TreeItem item : treeItems) { Artifact art = (Artifact) item.getData(); if (art.isOfType(AtsArtifactTypes.TeamWorkflow)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/TitleColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/TitleColumn.java index 00280eca8c0..2012fc03366 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/TitleColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/TitleColumn.java @@ -65,7 +65,7 @@ public class TitleColumn extends XViewerAtsAttributeValueColumn { } if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { Collection<TeamWorkFlowArtifact> teams = ActionManager.getTeams(element); - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); strs.add(((Artifact) element).getName()); for (TeamWorkFlowArtifact team : teams) { String str = getColumnText(team, column, columnIndex); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/WorkPackageFilterTreeDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/WorkPackageFilterTreeDialog.java index c68f92ea583..69d509f8d32 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/WorkPackageFilterTreeDialog.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/WorkPackageFilterTreeDialog.java @@ -143,7 +143,7 @@ public class WorkPackageFilterTreeDialog extends FilteredTreeDialog { } private Collection<? extends IAtsWorkPackage> filterInput(Collection<? extends IAtsWorkPackage> input2) throws OseeCoreException { - List<IAtsWorkPackage> filtered = new ArrayList<IAtsWorkPackage>(); + List<IAtsWorkPackage> filtered = new ArrayList<>(); boolean all = false; if (showAll != null && showAll.isChecked()) { all = true; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ev/AbstractWorkPackageRelatedColumnUI.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ev/AbstractWorkPackageRelatedColumnUI.java index 41dd8508ce3..8e0a0c12b35 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ev/AbstractWorkPackageRelatedColumnUI.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ev/AbstractWorkPackageRelatedColumnUI.java @@ -75,7 +75,7 @@ public abstract class AbstractWorkPackageRelatedColumnUI extends XViewerAtsColum @Override public void handleColumnMultiEdit(TreeColumn treeColumn, Collection<TreeItem> treeItems) { try { - Set<AbstractWorkflowArtifact> awas = new HashSet<AbstractWorkflowArtifact>(); + Set<AbstractWorkflowArtifact> awas = new HashSet<>(); for (TreeItem item : treeItems) { Artifact art = (Artifact) item.getData(); if (art instanceof AbstractWorkflowArtifact) { @@ -93,7 +93,7 @@ public abstract class AbstractWorkPackageRelatedColumnUI extends XViewerAtsColum } private void openSelectedWorkPackages(Collection<AbstractWorkflowArtifact> awas) throws OseeCoreException { - List<String> guids = new ArrayList<String>(); + List<String> guids = new ArrayList<>(); for (AbstractWorkflowArtifact awa : awas) { IAtsWorkPackage workPkg = AtsClientService.get().getEarnedValueService().getWorkPackage(awa); if (workPkg != null) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ev/ActivityIdColumnUI.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ev/ActivityIdColumnUI.java index ae218e3637c..8d46608be1e 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ev/ActivityIdColumnUI.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/ev/ActivityIdColumnUI.java @@ -117,8 +117,8 @@ public class ActivityIdColumnUI extends XViewerAtsColumn implements IMultiColumn public static boolean promptChangeActivityIds(final Collection<? extends AbstractWorkflowArtifact> awas, boolean persist) throws OseeCoreException { boolean modified = false; - Set<IAtsWorkPackage> commonWorkPackageOptions = new HashSet<IAtsWorkPackage>(); - Set<IAtsWorkPackage> uniqueWorkPackageOptions = new HashSet<IAtsWorkPackage>(); + Set<IAtsWorkPackage> commonWorkPackageOptions = new HashSet<>(); + Set<IAtsWorkPackage> uniqueWorkPackageOptions = new HashSet<>(); Result result = getConfiguredWorkPackageOptions(awas, commonWorkPackageOptions, uniqueWorkPackageOptions); if (result.isFalse()) { AWorkbench.popup("Options Invalid", result.getText()); @@ -188,7 +188,7 @@ public class ActivityIdColumnUI extends XViewerAtsColumn implements IMultiColumn @Override public void handleColumnMultiEdit(TreeColumn treeColumn, Collection<TreeItem> treeItems) { try { - Set<AbstractWorkflowArtifact> awas = new HashSet<AbstractWorkflowArtifact>(); + Set<AbstractWorkflowArtifact> awas = new HashSet<>(); for (TreeItem item : treeItems) { Artifact art = (Artifact) item.getData(); if (art instanceof AbstractWorkflowArtifact) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfig2DataExample.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfig2DataExample.java index 2e7c5772a41..0d58ee0bf78 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfig2DataExample.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfig2DataExample.java @@ -52,7 +52,7 @@ public class AtsConfig2DataExample extends AbstractAtsConfig2Data { @Override public Collection<WorkDefinitionSheet> getTeamsAiSheets() { - List<WorkDefinitionSheet> sheets = new ArrayList<WorkDefinitionSheet>(); + List<WorkDefinitionSheet> sheets = new ArrayList<>(); sheets.add(new WorkDefinitionSheet("WorkDef_Team_AtsConfig2_AIs_And_Teams", AtsWorkDefinitionSheetProviders.getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Team_AtsConfig2Example_AIs_And_Teams.ats"))); @@ -61,7 +61,7 @@ public class AtsConfig2DataExample extends AbstractAtsConfig2Data { @Override public Collection<WorkDefinitionSheet> getWorkDefSheets() { - List<WorkDefinitionSheet> sheets = new ArrayList<WorkDefinitionSheet>(); + List<WorkDefinitionSheet> sheets = new ArrayList<>(); sheets.add(new WorkDefinitionSheet("WorkDef_Team_AtsConfig2Example", AtsWorkDefinitionSheetProviders.getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Team_AtsConfig2Example.ats"))); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfig2Operation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfig2Operation.java index 5b4a02c09d2..16c35b8a164 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfig2Operation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfig2Operation.java @@ -54,7 +54,7 @@ public class AtsConfig2Operation extends AbstractOperation { // Import Work Definition sheets data.getResultData().log("Importing Work Definitions"); Artifact folder = getWorkDefinitionFolder(); - Set<String> stateNames = new HashSet<String>(); + Set<String> stateNames = new HashSet<>(); AtsWorkDefinitionSheetProviders.importWorkDefinitionSheets(data.getResultData(), changes, folder, data.getWorkDefSheets(), stateNames); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigOperation.java index 10f02fc63f1..95095385290 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigOperation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsConfigOperation.java @@ -150,7 +150,7 @@ public class AtsConfigOperation extends AbstractOperation { } private Collection<IAtsActionableItem> createActionableItems(IAtsChangeSet changes, IAtsTeamDefinition teamDef) throws OseeCoreException { - Collection<IAtsActionableItem> aias = new ArrayList<IAtsActionableItem>(); + Collection<IAtsActionableItem> aias = new ArrayList<>(); // Create top actionable item IAtsActionableItem topAia = AtsClientService.get().createActionableItem(teamDefName); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java index bc4c6e28b6d..7ca30b71589 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsDatabaseConfig.java @@ -94,7 +94,7 @@ public class AtsDatabaseConfig implements IDbInitializationTask { } private void createSafetyConfig() { - List<String> versions = new ArrayList<String>(); + List<String> versions = new ArrayList<>(); AtsConfigOperation operation = new AtsConfigOperation("Configure Safety For ATS", AtsArtifactToken.SafetyTeamDefinition, versions, AtsArtifactToken.SafetyActionableItem); Operations.executeWorkAndCheckStatus(operation); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/ValidateAtsConfiguration.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/ValidateAtsConfiguration.java index c45d2f3f2fa..cb9ef50c53e 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/ValidateAtsConfiguration.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/ValidateAtsConfiguration.java @@ -80,7 +80,7 @@ public class ValidateAtsConfiguration extends XNavigateItemAction { } private void logCounts(List<Artifact> configArts, ValidateResults results) { - CountingMap<String> typeToCount = new CountingMap<String>(); + CountingMap<String> typeToCount = new CountingMap<>(); for (Artifact art : configArts) { typeToCount.put(art.getArtifactTypeName()); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsConfigurationOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsConfigurationOperation.java index 96978b29f93..0c661c38e78 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsConfigurationOperation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsConfigurationOperation.java @@ -83,9 +83,9 @@ public class CopyAtsConfigurationOperation extends AbstractOperation { resultData.log("Report-Only, Changes are not persisted"); } - newArtifacts = new HashSet<Artifact>(50); - existingArtifacts = new HashSet<Artifact>(50); - processedFromAis = new HashSet<Artifact>(10); + newArtifacts = new HashSet<>(50); + existingArtifacts = new HashSet<>(50); + processedFromAis = new HashSet<>(10); createTeamDefinitions(changes, data.getTeamDef(), data.getParentTeamDef()); if (resultData.isErrors()) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsValidation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsValidation.java index 97e3a0c1a89..25fb91bf1e9 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsValidation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsValidation.java @@ -55,13 +55,13 @@ public class CopyAtsValidation { ValidateResults results = new ValidateResults(); // Validate AIs to TeamDefs - Set<Artifact> aias = new HashSet<Artifact>(); + Set<Artifact> aias = new HashSet<>(); aias.addAll(AtsClientService.get().getConfigArtifacts( ActionableItems.getActionableItemsFromItemAndChildren(configData.getActionableItem()))); ValidateAtsDatabase.testActionableItemToTeamDefinition(aias, results); // Validate TeamDefs have Workflow Definitions - Set<IAtsTeamDefinition> teamDefs = new HashSet<IAtsTeamDefinition>(); + Set<IAtsTeamDefinition> teamDefs = new HashSet<>(); teamDefs.addAll(TeamDefinitions.getTeamsFromItemAndChildren(configData.getTeamDef())); results.addResultsMapToResultData(resultData); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigContentProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigContentProvider.java index e008f134bfa..fbfd8d3c689 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigContentProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigContentProvider.java @@ -25,7 +25,7 @@ import org.eclipse.osee.framework.ui.skynet.results.table.IResultsXViewerRow; */ public class AtsConfigContentProvider implements ITreeContentProvider { - protected Collection<IResultsXViewerRow> rootSet = new HashSet<IResultsXViewerRow>(); + protected Collection<IResultsXViewerRow> rootSet = new HashSet<>(); private static Object[] EMPTY_ARRAY = new Object[0]; public AtsConfigContentProvider() { @@ -63,7 +63,7 @@ public class AtsConfigContentProvider implements ITreeContentProvider { private Object[] getActionableItemChildren(Object data) { IAtsActionableItem aia = (IAtsActionableItem) data; - List<Object> children = new LinkedList<Object>(); + List<Object> children = new LinkedList<>(); children.addAll(aia.getChildrenActionableItems()); if (aia.getTeamDefinition() != null) { children.add(aia.getTeamDefinition()); @@ -73,7 +73,7 @@ public class AtsConfigContentProvider implements ITreeContentProvider { private Object[] getTeamDefChildren(Object data) { IAtsTeamDefinition teamDef = (IAtsTeamDefinition) data; - List<Object> children = new LinkedList<Object>(); + List<Object> children = new LinkedList<>(); children.addAll(teamDef.getChildrenTeamDefinitions()); children.addAll(teamDef.getActionableItems()); children.addAll(teamDef.getVersions()); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigResultsEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigResultsEditor.java index db976936080..8e9e993ea5f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigResultsEditor.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigResultsEditor.java @@ -44,7 +44,7 @@ public class AtsConfigResultsEditor extends AbstractOperation { @Override protected void doWork(IProgressMonitor monitor) throws Exception { - List<IResultsXViewerRow> artRows = new LinkedList<IResultsXViewerRow>(); + List<IResultsXViewerRow> artRows = new LinkedList<>(); for (IAtsConfigObject obj : configObjects) { artRows.add(new ResultsXViewerRow(new String[] {obj.getName(), ""}, obj)); } @@ -53,7 +53,7 @@ public class AtsConfigResultsEditor extends AbstractOperation { new XViewerColumn("Name", "Name", 300, SWT.LEFT, true, SortDataType.String, false, "Name"), new XViewerColumn("Guid", "Guid", 150, SWT.LEFT, true, SortDataType.String, false, "Guid")); - final List<IResultsEditorTab> toReturn = new LinkedList<IResultsEditorTab>(); + final List<IResultsEditorTab> toReturn = new LinkedList<>(); IResultsEditorLabelProvider provider = new IResultsEditorLabelProvider() { @Override diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigResultsEditorNavigateItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigResultsEditorNavigateItem.java index 44e29da7040..c2b161f42c6 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigResultsEditorNavigateItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/editor/AtsConfigResultsEditorNavigateItem.java @@ -37,7 +37,7 @@ public class AtsConfigResultsEditorNavigateItem extends XNavigateItemAction { @Override public void run(TableLoadOption... tableLoadOptions) throws Exception { - final List<IAtsConfigObject> objs = new ArrayList<IAtsConfigObject>(); + final List<IAtsConfigObject> objs = new ArrayList<>(); objs.add(TeamDefinitions.getTopTeamDefinition(AtsClientService.get().getConfig())); objs.add(ActionableItems.getTopActionableItem(AtsClientService.get().getConfig())); Job job = new Job("ATS Config Viewer") { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/wizard/AtsConfigWizardPage1.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/wizard/AtsConfigWizardPage1.java index 11bc625d077..3742598e792 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/wizard/AtsConfigWizardPage1.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/wizard/AtsConfigWizardPage1.java @@ -56,7 +56,7 @@ public class AtsConfigWizardPage1 extends WizardPage { } public List<String> getActionableItems() throws OseeCoreException { - List<String> aias = new ArrayList<String>(); + List<String> aias = new ArrayList<>(); for (String aia : ((String) getXWidget(ACTIONABLE_ITEMS).getData()).split(",")) { aia = aia.replaceAll("^ *", ""); aia = aia.replaceAll(" *$", ""); @@ -68,7 +68,7 @@ public class AtsConfigWizardPage1 extends WizardPage { } public List<String> getVersions() throws OseeCoreException { - List<String> versions = new ArrayList<String>(); + List<String> versions = new ArrayList<>(); for (String version : ((String) getXWidget(VERSIONS).getData()).split(",")) { version = version.replaceAll("^ *", ""); version = version.replaceAll(" *$", ""); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java index ffdbc008385..db43f5cc560 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java @@ -104,7 +104,7 @@ public class SMAEditor extends AbstractArtifactEditor implements IWorldEditor, I private AttributesComposite attributesComposite; private boolean privilegedEditModeEnabled = false; private TaskTabXWidgetActionPage taskTabXWidgetActionPage; - private final List<ISMAEditorListener> editorListeners = new ArrayList<ISMAEditorListener>(); + private final List<ISMAEditorListener> editorListeners = new ArrayList<>(); SMAEditorOutlinePage outlinePage; @Override @@ -524,7 +524,7 @@ public class SMAEditor extends AbstractArtifactEditor implements IWorldEditor, I } public static List<SMAEditor> getSmaEditors() { - List<SMAEditor> results = new ArrayList<SMAEditor>(); + List<SMAEditor> results = new ArrayList<>(); IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); IEditorReference editors[] = page.getEditorReferences(); for (int j = 0; j < editors.length; j++) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorArtifactEventManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorArtifactEventManager.java index 65567ce09ac..019ad4d86dd 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorArtifactEventManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorArtifactEventManager.java @@ -49,7 +49,7 @@ import org.eclipse.osee.framework.ui.swt.Displays; */ public class SMAEditorArtifactEventManager implements IArtifactEventListener { - List<ISMAEditorEventHandler> handlers = new CopyOnWriteArrayList<ISMAEditorEventHandler>(); + List<ISMAEditorEventHandler> handlers = new CopyOnWriteArrayList<>(); static SMAEditorArtifactEventManager instance = new SMAEditorArtifactEventManager(); private SMAEditorArtifactEventManager() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorBranchEventManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorBranchEventManager.java index 01eef16eca9..235b513fc05 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorBranchEventManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorBranchEventManager.java @@ -36,7 +36,7 @@ import org.eclipse.osee.framework.ui.swt.Displays; */ public class SMAEditorBranchEventManager implements IBranchEventListener { - List<ISMAEditorEventHandler> handlers = new CopyOnWriteArrayList<ISMAEditorEventHandler>(); + List<ISMAEditorEventHandler> handlers = new CopyOnWriteArrayList<>(); static SMAEditorBranchEventManager instance = new SMAEditorBranchEventManager(); private SMAEditorBranchEventManager() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorOutlinePage.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorOutlinePage.java index e769a4cdf80..0db369e2a66 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorOutlinePage.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditorOutlinePage.java @@ -187,7 +187,7 @@ public class SMAEditorOutlinePage extends ContentOutlinePage { @Override public Object[] getChildren(Object element) { - List<Object> items = new ArrayList<Object>(); + List<Object> items = new ArrayList<>(); if (element instanceof SMAEditor) { add(items, ((SMAEditor) element).getAwa()); items.add(new WrappedStateItems(AtsStateItemManager.getStateItems())); @@ -455,7 +455,7 @@ public class SMAEditorOutlinePage extends ContentOutlinePage { } public Collection<RuleAndLocation> getRuleAndLocations() { - List<RuleAndLocation> result = new ArrayList<SMAEditorOutlinePage.RuleAndLocation>(); + List<RuleAndLocation> result = new ArrayList<>(); // get rules from stateDef for (String ruleDef : stateDef.getRules()) { result.add(new RuleAndLocation(ruleDef, "State Definition")); @@ -637,11 +637,11 @@ public class SMAEditorOutlinePage extends ContentOutlinePage { } public Collection<Object> getTransitions() { - List<IAtsStateDefinition> defaultToStates = new ArrayList<IAtsStateDefinition>(); + List<IAtsStateDefinition> defaultToStates = new ArrayList<>(); if (stateDef.getDefaultToState() != null) { defaultToStates.add(stateDef.getDefaultToState()); } - List<Object> items = new ArrayList<Object>(); + List<Object> items = new ArrayList<>(); items.add(new WrappedStates("DefaultToState", defaultToStates)); items.add(new WrappedStates("ToStates", stateDef.getToStates())); items.add(new WrappedStates("OverrideAttrValidationStates", stateDef.getOverrideAttributeValidationStates())); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAMembersTab.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAMembersTab.java index bea214d2cbe..b4c6daf7778 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAMembersTab.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAMembersTab.java @@ -107,7 +107,7 @@ public class SMAMembersTab extends FormPage implements ISelectedAtsArtifacts, IW private LoadingComposite loadingComposite; public final static String ID = "ats.members.tab"; private final SMAEditor editor; - private static Map<String, Integer> guidToScrollLocation = new HashMap<String, Integer>(); + private static Map<String, Integer> guidToScrollLocation = new HashMap<>(); private final ReloadJobChangeAdapter reloadAdapter; private final IMemberProvider provider; @@ -419,7 +419,7 @@ public class SMAMembersTab extends FormPage implements ISelectedAtsArtifacts, IW return; } List<Artifact> loadedArtifacts = worldComposite.getLoadedArtifacts(); - List<Artifact> toRemoveFromLoaded = new LinkedList<Artifact>(members); + List<Artifact> toRemoveFromLoaded = new LinkedList<>(members); members.removeAll(loadedArtifacts); for (Artifact art : members) { worldComposite.insert(art, -1); @@ -632,7 +632,7 @@ public class SMAMembersTab extends FormPage implements ISelectedAtsArtifacts, IW @Override public Set<? extends Artifact> getSelectedSMAArtifacts() { - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); for (Artifact art : worldComposite.getSelectedArtifacts()) { if (art instanceof AbstractWorkflowArtifact) { artifacts.add(art); @@ -643,7 +643,7 @@ public class SMAMembersTab extends FormPage implements ISelectedAtsArtifacts, IW @Override public List<Artifact> getSelectedAtsArtifacts() { - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); for (Artifact art : worldComposite.getSelectedArtifacts()) { if (art.isOfType(AtsArtifactTypes.AtsArtifact)) { artifacts.add(art); @@ -654,7 +654,7 @@ public class SMAMembersTab extends FormPage implements ISelectedAtsArtifacts, IW @Override public List<TaskArtifact> getSelectedTaskArtifacts() { - List<TaskArtifact> tasks = new ArrayList<TaskArtifact>(); + List<TaskArtifact> tasks = new ArrayList<>(); for (Artifact art : worldComposite.getSelectedArtifacts()) { if (art instanceof TaskArtifact) { tasks.add((TaskArtifact) art); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOperationsSection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOperationsSection.java index 5a9c7841857..c2727f4b0be 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOperationsSection.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAOperationsSection.java @@ -71,7 +71,7 @@ public class SMAOperationsSection extends SectionPart { private synchronized void registerAdvancedSectionsFromExtensionPoints() { if (operationsSectionProviders == null) { - operationsSectionProviders = new ArrayList<ISMAOperationsSection>(); + operationsSectionProviders = new ArrayList<>(); ExtensionDefinedObjects<ISMAOperationsSection> extensions = new ExtensionDefinedObjects<ISMAOperationsSection>(Activator.PLUGIN_ID + ".AtsAdvancedOperationAction", "AtsAdvancedOperationAction", "classname", true); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java index 720e114af5f..560eee3511c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowSection.java @@ -74,7 +74,7 @@ public class SMAWorkFlowSection extends SectionPart { private final StateXWidgetPage statePage; private final boolean isEditable, isCurrentState, isGlobalEditable; private Composite mainComp; - private final List<XWidget> allXWidgets = new ArrayList<XWidget>(); + private final List<XWidget> allXWidgets = new ArrayList<>(); private boolean sectionCreated = false; private Section section; private final SMAEditor editor; @@ -504,7 +504,7 @@ public class SMAWorkFlowSection extends SectionPart { } public List<XWidget> getXWidgets(Class<?> clazz) { - List<XWidget> widgets = new ArrayList<XWidget>(); + List<XWidget> widgets = new ArrayList<>(); for (XWidget widget : allXWidgets) { if (clazz.isInstance(widget)) { widgets.add(widget); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java index 1a16c23b618..42498fb9767 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAWorkFlowTab.java @@ -112,9 +112,9 @@ import org.eclipse.ui.progress.UIJob; */ public class SMAWorkFlowTab extends FormPage implements IWorldViewerEventHandler { private final AbstractWorkflowArtifact awa; - private final List<SMAWorkFlowSection> sections = new ArrayList<SMAWorkFlowSection>(); - private final List<StateXWidgetPage> statePages = new ArrayList<StateXWidgetPage>(); - private static Map<String, Integer> guidToScrollLocation = new HashMap<String, Integer>(); + private final List<SMAWorkFlowSection> sections = new ArrayList<>(); + private final List<StateXWidgetPage> statePages = new ArrayList<>(); + private static Map<String, Integer> guidToScrollLocation = new HashMap<>(); private SMARelationsHyperlinkComposite smaRelationsComposite; private IManagedForm managedForm; private Composite bodyComp; @@ -127,7 +127,7 @@ public class SMAWorkFlowTab extends FormPage implements IWorldViewerEventHandler private LoadingComposite loadingComposite; public final static String ID = "ats.workflow.tab"; private final SMAEditor editor; - private final List<WEUndefinedStateSection> undefinedStateSections = new ArrayList<WEUndefinedStateSection>(); + private final List<WEUndefinedStateSection> undefinedStateSections = new ArrayList<>(); public SMAWorkFlowTab(SMAEditor editor, AbstractWorkflowArtifact awa) { super(editor, ID, "Workflow"); @@ -199,7 +199,7 @@ public class SMAWorkFlowTab extends FormPage implements IWorldViewerEventHandler } public void refreshData() { - List<IOperation> ops = new ArrayList<IOperation>(); + List<IOperation> ops = new ArrayList<>(); ops.addAll(AtsBulkLoad.getConfigLoadingOperations()); IOperation operation = Operations.createBuilder("Load Workflow Tab").addAll(ops).build(); Operations.executeAsJob(operation, false, Job.LONG, new ReloadJobChangeAdapter(editor)); @@ -522,7 +522,7 @@ public class SMAWorkFlowTab extends FormPage implements IWorldViewerEventHandler } public void saveXWidgetToArtifact() throws OseeCoreException { - List<IArtifactStoredWidget> artWidgets = new ArrayList<IArtifactStoredWidget>(); + List<IArtifactStoredWidget> artWidgets = new ArrayList<>(); // Collect all dirty widgets first (so same attribute shown on different sections don't colide for (SMAWorkFlowSection section : sections) { section.getDirtyIArtifactWidgets(artWidgets); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WETransitionComposite.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WETransitionComposite.java index a04598cc12b..bad3019448b 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WETransitionComposite.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WETransitionComposite.java @@ -109,7 +109,7 @@ public class WETransitionComposite extends Composite { transitionToStateCombo = new XComboViewer("Transition To State Combo", SWT.NONE); transitionToStateCombo.setDisplayLabel(false); - List<Object> allPages = new ArrayList<Object>(); + List<Object> allPages = new ArrayList<>(); for (IAtsStateDefinition nextState : awa.getToStatesWithCompleteCancelReturnStates()) { if (!allPages.contains(nextState)) { allPages.add(nextState); @@ -123,7 +123,7 @@ public class WETransitionComposite extends Composite { transitionToStateCombo.createWidgets(this, 1); // Set default page from workflow default - ArrayList<Object> defaultPage = new ArrayList<Object>(); + ArrayList<Object> defaultPage = new ArrayList<>(); if (workflowSection.getPage().getDefaultToPage() != null) { defaultPage.add(workflowSection.getPage().getDefaultToPage()); transitionToStateCombo.setSelected(defaultPage); @@ -399,7 +399,7 @@ public class WETransitionComposite extends Composite { for (IAtsStateDefinition toState : awa.getToStates()) { if (toState.getName().equals(transitionStateOverride)) { // Reset selection - ArrayList<Object> defaultPage = new ArrayList<Object>(); + ArrayList<Object> defaultPage = new ArrayList<>(); defaultPage.add(toState); transitionToStateCombo.setSelected(defaultPage); return; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WEUndefinedStateSection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WEUndefinedStateSection.java index d01edde441b..c0c693a6974 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WEUndefinedStateSection.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WEUndefinedStateSection.java @@ -84,7 +84,7 @@ public class WEUndefinedStateSection extends SectionPart { // Display pages that are in data store, but not in Work Definition Collection<String> stateNamesDefined = AtsClientService.get().getWorkDefinitionAdmin().getStateNames(awa.getWorkDefinition()); - List<String> stateNamesUndefined = new ArrayList<String>(); + List<String> stateNamesUndefined = new ArrayList<>(); for (String pageName : awa.getAttributesToStringList(AtsAttributeTypes.State)) { String justPage = pageName.replaceFirst(";.*$", ""); if (!stateNamesDefined.contains(justPage)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/history/XHistoryViewer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/history/XHistoryViewer.java index c5fe1c4dcb1..0b06d621806 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/history/XHistoryViewer.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/history/XHistoryViewer.java @@ -37,7 +37,7 @@ public class XHistoryViewer extends GenericXWidget { private HistoryXViewer xViewer; private ToolBar toolBar; protected final AbstractWorkflowArtifact awa; - protected final Collection<Change> changes = new ArrayList<Change>(); + protected final Collection<Change> changes = new ArrayList<>(); public XHistoryViewer(AbstractWorkflowArtifact awa) { super(""); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/history/column/AuthorColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/history/column/AuthorColumn.java index 449e4e10945..99e14d846d4 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/history/column/AuthorColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/history/column/AuthorColumn.java @@ -29,7 +29,7 @@ import org.eclipse.swt.SWT; */ public class AuthorColumn extends XViewerValueColumn { private static AuthorColumn instance = new AuthorColumn(); - private final Map<Integer, String> artIdToName = new HashMap<Integer, String>(40); + private final Map<Integer, String> artIdToName = new HashMap<>(40); public static AuthorColumn getInstance() { return instance; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/history/column/EventColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/history/column/EventColumn.java index 225b96f1736..ab5999dc823 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/history/column/EventColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/history/column/EventColumn.java @@ -120,8 +120,8 @@ public class EventColumn extends XViewerValueColumn { } Collection<? extends IAtsUser> wasAssignees = was.getAssignees(); Collection<? extends IAtsUser> isAssignees = is.getAssignees(); - Set<IAtsUser> assigned = new HashSet<IAtsUser>(); - Set<IAtsUser> unAssigned = new HashSet<IAtsUser>(); + Set<IAtsUser> assigned = new HashSet<>(); + Set<IAtsUser> unAssigned = new HashSet<>(); for (IAtsUser isAssignee : isAssignees) { if (!wasAssignees.contains(isAssignee)) { assigned.add(isAssignee); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewDecisionStateItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewDecisionStateItem.java index d9432cf2ec5..f33a0b6a993 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewDecisionStateItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsDecisionReviewDecisionStateItem.java @@ -55,7 +55,7 @@ public class AtsDecisionReviewDecisionStateItem extends AtsStateItem { } if (xWidget.getLabel().equals(AtsAttributeTypes.Decision.getUnqualifiedName())) { XComboDam decisionComboDam = (XComboDam) xWidget; - List<String> options = new ArrayList<String>(); + List<String> options = new ArrayList<>(); XDecisionOptions xDecOptions = new XDecisionOptions(WorkflowManager.cast(art)); for (DecisionOption opt : xDecOptions.getDecisionOptions()) { options.add(opt.getName()); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItem.java index 15c8b2e3fde..df5b6bdb716 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsPeerToPeerReviewReviewStateItem.java @@ -44,7 +44,7 @@ public class AtsPeerToPeerReviewReviewStateItem extends AtsStateItem implements public void transitioned(IAtsWorkItem workItem, IStateToken fromState, IStateToken toState, Collection<? extends IAtsUser> toAssignees, IAtsChangeSet changes) throws OseeCoreException { if ((workItem instanceof IAtsPeerToPeerReview) && toState.getName().equals(PeerToPeerReviewState.Review.getName())) { // Set Assignees to all user roles users - Set<IAtsUser> assignees = new HashSet<IAtsUser>(); + Set<IAtsUser> assignees = new HashSet<>(); PeerToPeerReviewArtifact peerArt = (PeerToPeerReviewArtifact) workItem; for (UserRole uRole : UserRoleManager.getUserRoles(peerArt)) { if (!uRole.isCompleted()) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsStateItemManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsStateItemManager.java index 6d464e08969..a2bf6a884be 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsStateItemManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/stateItem/AtsStateItemManager.java @@ -27,7 +27,7 @@ import org.osgi.framework.Bundle; */ public class AtsStateItemManager { - private final static List<IAtsStateItem> stateItems = new ArrayList<IAtsStateItem>(); + private final static List<IAtsStateItem> stateItems = new ArrayList<>(); public static List<IAtsStateItem> getStateItems() { loadAllStateItems(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java index 26c60fde40c..da63cdbc080 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/ReviewInfoXWidget.java @@ -71,7 +71,7 @@ import org.eclipse.ui.forms.widgets.Hyperlink; public class ReviewInfoXWidget extends XLabelValueBase { private final IStateToken forState; - private final List<Label> labelWidgets = new ArrayList<Label>(); + private final List<Label> labelWidgets = new ArrayList<>(); private Composite destroyableComposite = null; private final Composite composite; private final IManagedForm managedForm; @@ -304,7 +304,7 @@ public class ReviewInfoXWidget extends XLabelValueBase { return; } try { - List<AbstractWorkflowArtifact> awas = new ArrayList<AbstractWorkflowArtifact>(); + List<AbstractWorkflowArtifact> awas = new ArrayList<>(); for (IAtsAbstractReview review : ReviewManager.getReviewsFromCurrentState(teamArt)) { AbstractReviewArtifact revArt = (AbstractReviewArtifact) AtsClientService.get().getArtifact(review); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/EarnedValueWorkPacakgeReportBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/EarnedValueWorkPacakgeReportBlam.java index 308c0cbacff..35739a84ef5 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/EarnedValueWorkPacakgeReportBlam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/EarnedValueWorkPacakgeReportBlam.java @@ -76,7 +76,7 @@ public class EarnedValueWorkPacakgeReportBlam extends AbstractBlam { AWorkbench.popup("ERROR", "Must drag in Work Packages(s)."); return; } - List<IAtsWorkPackage> workPackages = new ArrayList<IAtsWorkPackage>(); + List<IAtsWorkPackage> workPackages = new ArrayList<>(); for (Artifact artifact : workPackageArts) { workPackages.add(new WorkPackageArtifact(artifact)); } @@ -106,7 +106,7 @@ public class EarnedValueWorkPacakgeReportBlam extends AbstractBlam { @Override public List<IResultsEditorTab> getResultsEditorTabs() { if (tabs == null) { - tabs = new LinkedList<IResultsEditorTab>(); + tabs = new LinkedList<>(); tabs.add(createDataTab(results)); } return tabs; @@ -115,12 +115,12 @@ public class EarnedValueWorkPacakgeReportBlam extends AbstractBlam { } private static IResultsEditorTab createDataTab(List<EarnedValueReportResult> results) { - List<XViewerColumn> columns = new ArrayList<XViewerColumn>(); + List<XViewerColumn> columns = new ArrayList<>(); for (IColumn column : EarnedValueReportOperation.columns) { columns.add(new XViewerIColumnAdapter(column)); } - List<IResultsXViewerRow> rows = new ArrayList<IResultsXViewerRow>(); + List<IResultsXViewerRow> rows = new ArrayList<>(); for (EarnedValueReportResult result : results) { String strs[] = new String[EarnedValueReportOperation.columns.size()]; int x = 0; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkItemAndPackageReport.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkItemAndPackageReport.java index 4e82273a76b..f6d4c6bbd8d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkItemAndPackageReport.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkItemAndPackageReport.java @@ -69,7 +69,7 @@ public class WorkItemAndPackageReport extends XNavigateItemAction { @Override public List<IResultsEditorTab> getResultsEditorTabs() { if (tabs == null) { - tabs = new LinkedList<IResultsEditorTab>(); + tabs = new LinkedList<>(); createWorkItemTab(tabs); } return tabs; @@ -82,7 +82,7 @@ public class WorkItemAndPackageReport extends XNavigateItemAction { List<XViewerColumn> columns = getColumns(); XResultData results = new XResultData(false); - List<IResultsXViewerRow> rows = new ArrayList<IResultsXViewerRow>(); + List<IResultsXViewerRow> rows = new ArrayList<>(); WorkPackageConfigLoader loader = new WorkPackageConfigLoader(); loader.load(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkPackageConfigLoader.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkPackageConfigLoader.java index 95ce69b67ba..978f059aa78 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkPackageConfigLoader.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkPackageConfigLoader.java @@ -35,11 +35,11 @@ public class WorkPackageConfigLoader { public Map<String, WorkPackageData> workPackageGuidToWorkPackageData; public void load() { - workPackageGuidToWorkPackageArt = new HashMap<String, Artifact>(); - workPackageArtToActivityArt = new HashMap<Artifact, Artifact>(); - activityArtToInsertionArt = new HashMap<Artifact, Artifact>(); - insertionArtToProgramArt = new HashMap<Artifact, Artifact>(); - programArtToCountryArt = new HashMap<Artifact, Artifact>(); + workPackageGuidToWorkPackageArt = new HashMap<>(); + workPackageArtToActivityArt = new HashMap<>(); + activityArtToInsertionArt = new HashMap<>(); + insertionArtToProgramArt = new HashMap<>(); + programArtToCountryArt = new HashMap<>(); workPackageGuidToWorkPackageData = new HashMap<>(); loadWorkPackageConfiguration(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkPackageConfigReport.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkPackageConfigReport.java index 177774e5ef1..46659174312 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkPackageConfigReport.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/WorkPackageConfigReport.java @@ -52,7 +52,7 @@ public class WorkPackageConfigReport extends XNavigateItemAction { @Override public List<IResultsEditorTab> getResultsEditorTabs() { if (tabs == null) { - tabs = new LinkedList<IResultsEditorTab>(); + tabs = new LinkedList<>(); tabs.add(createConfigurationTab()); } return tabs; @@ -64,7 +64,7 @@ public class WorkPackageConfigReport extends XNavigateItemAction { private IResultsEditorTab createConfigurationTab() { List<XViewerColumn> columns = getColumns(); - List<IResultsXViewerRow> rows = new ArrayList<IResultsXViewerRow>(); + List<IResultsXViewerRow> rows = new ArrayList<>(); WorkPackageConfigLoader loader = new WorkPackageConfigLoader(); loader.load(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/export/AtsExportBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/export/AtsExportBlam.java index a184084c358..ffe2c12f696 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/export/AtsExportBlam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/export/AtsExportBlam.java @@ -70,7 +70,7 @@ public class AtsExportBlam extends AbstractBlam { sb.append(ARTIFACTS); sb.append("\" />"); - List<ExportOption> validExportOptions = new ArrayList<ExportOption>(); + List<ExportOption> validExportOptions = new ArrayList<>(); validExportOptions.addAll(Arrays.asList(ExportOption.values())); for (ExportOption exportOption : validExportOptions) { @@ -128,7 +128,7 @@ public class AtsExportBlam extends AbstractBlam { } public Collection<ExportOption> getExportOptions(VariableMap variableMap) { - List<ExportOption> options = new ArrayList<AtsExportAction.ExportOption>(); + List<ExportOption> options = new ArrayList<>(); for (ExportOption exportOption : ExportOption.values()) { boolean checked = variableMap.getBoolean(exportOption.name()); if (checked) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/AtsHealthCheck.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/AtsHealthCheck.java index a5dbc8654d4..1b48ba3e444 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/AtsHealthCheck.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/AtsHealthCheck.java @@ -30,7 +30,7 @@ public class AtsHealthCheck { public static Set<IAtsHealthCheck> getAtsHealthCheckItems() { if (healthCheckItems == null) { - healthCheckItems = new HashSet<IAtsHealthCheck>(); + healthCheckItems = new HashSet<>(); IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.osee.ats.AtsHealthCheck"); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java index a22e729287e..4af6f946bec 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateAtsDatabase.java @@ -94,8 +94,8 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { "WHERE art1.gamma_id = txs1.gamma_id AND txs1.tx_current = 1 AND txs1.branch_id = ? " + // "ORDER BY art1.art_id, txs1.branch_id "; private boolean fixAttributeValues = false; - private final Set<String> atsIds = new HashSet<String>(); - private final Map<String, String> legacyPcrIdToParentId = new HashMap<String, String>(50000); + private final Set<String> atsIds = new HashSet<>(); + private final Map<String, String> legacyPcrIdToParentId = new HashMap<>(50000); private String emailOnComplete = null; private final ValidateResults results = new ValidateResults(); @@ -168,8 +168,8 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { // elapsedTime.end(); // Un-comment to process specific artifact from common - Test Mode - // artIdLists = new ArrayList<Collection<Integer>>(); - // List<Integer> ids = new ArrayList<Integer>(); + // artIdLists = new ArrayList<>(); + // List<Integer> ids = new ArrayList<>(); // ids.add(new Integer(1070598)); // artIdLists.add(ids); @@ -202,7 +202,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { // NOTE: Use DoesNotWorkItemAts to process list of IDs // remove all deleted/purged artifacts first - List<Artifact> artifacts = new ArrayList<Artifact>(allArtifacts.size()); + List<Artifact> artifacts = new ArrayList<>(allArtifacts.size()); for (Artifact artifact : allArtifacts) { if (!artifact.isDeleted()) { artifacts.add(artifact); @@ -265,7 +265,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { private List<Collection<Integer>> getFromGuids() { List<String> guids = Arrays.asList("AD3zXUb9kkF08ltQPwQA", "AD3zWI5UrUmhDxwBekAA", "BPLQGf99g2qG_LoknEQA"); List<Artifact> artifacts = ArtifactQuery.getArtifactListFromIds(guids, AtsUtilCore.getAtsBranch()); - List<Integer> artIds = new ArrayList<Integer>(); + List<Integer> artIds = new ArrayList<>(); for (Artifact art : artifacts) { artIds.add(art.getArtId()); } @@ -445,7 +445,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { try { if (artifact instanceof AbstractWorkflowArtifact) { AbstractWorkflowArtifact awa = (AbstractWorkflowArtifact) artifact; - Map<String, Attribute<String>> stateNamesToStateStr = new HashMap<String, Attribute<String>>(); + Map<String, Attribute<String>> stateNamesToStateStr = new HashMap<>(); Attribute<String> currentStateAttr = awa.getSoleAttribute(AtsAttributeTypes.CurrentState); String currentStateStr = currentStateAttr.getValue(); String currentStateName = currentStateStr.replaceAll(";.*$", ""); @@ -739,7 +739,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { } private List<Long> getInvalidUuids(List<Long> uuids) throws OseeCoreException { - List<Long> badUuids = new ArrayList<Long>(); + List<Long> badUuids = new ArrayList<>(); for (Long uuid : uuids) { if (AtsClientService.get().getArtifact(uuid.longValue()) == null) { badUuids.add(uuid); @@ -828,7 +828,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { } private static List<Integer> getCommonArtifactIds(XResultData xResultData) throws OseeCoreException { - List<Integer> artIds = new ArrayList<Integer>(); + List<Integer> artIds = new ArrayList<>(); xResultData.log(null, "getCommonArtifactIds - Started " + DateUtil.getMMDDYYHHMM()); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { @@ -892,7 +892,7 @@ public class ValidateAtsDatabase extends WorldXNavigateItemAction { "Error: Artifact: " + XResultDataUI.getHyperlink(artifact) + " Type [%s] AttrType [%s] Max [%d] Actual [%d] Values [%s] ", artifact.getArtifactTypeName(), attrType.getName(), attrType.getMaxOccurrences(), count, artifact.getAttributesToString(attrType)); - Map<String, Attribute<?>> valuesAttrMap = new HashMap<String, Attribute<?>>(); + Map<String, Attribute<?>> valuesAttrMap = new HashMap<>(); int latestGamma = 0; StringBuffer fixInfo = new StringBuffer(" - FIX AVAILABLE"); for (Attribute<?> attr : artifact.getAttributes(attrType)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateResults.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateResults.java index a0869fe3258..b6095136e99 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateResults.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/health/ValidateResults.java @@ -23,9 +23,9 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact; */ public class ValidateResults { - private final CountingMap<String> testNameToTimeSpentMap = new CountingMap<String>(); - private final HashCollection<String, String> testNameToResultsMap = new HashCollection<String, String>(50); - private final HashCollection<String, String> testNameToGuidMap = new HashCollection<String, String>(50); + private final CountingMap<String> testNameToTimeSpentMap = new CountingMap<>(); + private final HashCollection<String, String> testNameToResultsMap = new HashCollection<>(50); + private final HashCollection<String, String> testNameToGuidMap = new HashCollection<>(50); public void logTestTimeSpent(Date date, String testName) { Date now = new Date(); @@ -53,7 +53,7 @@ public class ValidateResults { xResultData.log(result); } // uniqueize guids - Set<String> guidStrs = new HashSet<String>(); + Set<String> guidStrs = new HashSet<>(); Collection<String> values = testNameToGuidMap.getValues(testName); if (values != null) { guidStrs.addAll(values); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsOseeCmService.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsOseeCmService.java index e83e96c5033..45f09d73a07 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsOseeCmService.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/internal/AtsOseeCmService.java @@ -114,7 +114,7 @@ public class AtsOseeCmService implements IOseeCmService { public List<Artifact> getTaskArtifacts(Artifact pcrArtifact) { if (pcrArtifact instanceof AbstractTaskableArtifact) { try { - List<Artifact> arts = new ArrayList<Artifact>(); + List<Artifact> arts = new ArrayList<>(); arts.addAll(((AbstractTaskableArtifact) pcrArtifact).getTaskArtifacts()); return arts; } catch (OseeCoreException ex) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ArtifactImpactToActionSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ArtifactImpactToActionSearchItem.java index e618a130095..bbe7892dcf7 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ArtifactImpactToActionSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ArtifactImpactToActionSearchItem.java @@ -97,7 +97,7 @@ public class ArtifactImpactToActionSearchItem extends XNavigateItemAction { final Collection<Artifact> srchArts = ArtifactQuery.getArtifactListFromName(artifactName, branch, INCLUDE_DELETED, QueryOption.CONTAINS_MATCH_OPTIONS); - final Set<Artifact> processArts = new HashSet<Artifact>(); + final Set<Artifact> processArts = new HashSet<>(); if (srchArts.isEmpty()) { return; } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java index b1d8b1224ac..4c04a250826 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsNavigateViewItems.java @@ -112,7 +112,7 @@ import org.osgi.framework.Bundle; * @author Donald G. Dunne */ public final class AtsNavigateViewItems implements XNavigateViewItems, IXNavigateCommonItem { - private final List<XNavigateItem> items = new CopyOnWriteArrayList<XNavigateItem>(); + private final List<XNavigateItem> items = new CopyOnWriteArrayList<>(); private boolean ensurePopulatedRanOnce = false; private final static AtsNavigateViewItems instance = new AtsNavigateViewItems(); @@ -345,7 +345,7 @@ public final class AtsNavigateViewItems implements XNavigateViewItems, IXNavigat return; } IExtension[] extensions = point.getExtensions(); - Map<String, XNavigateItem> nameToNavItem = new TreeMap<String, XNavigateItem>(); + Map<String, XNavigateItem> nameToNavItem = new TreeMap<>(); for (IExtension extension : extensions) { IConfigurationElement[] elements = extension.getConfigurationElements(); String classname = null; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java index 1aad683b6dd..b7c52b3e6ad 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/AtsRemoteEventTestItem.java @@ -106,7 +106,7 @@ public class AtsRemoteEventTestItem extends WorldXNavigateItemAction { } private static Set<IAtsActionableItem> getActionableItemsByToken(Collection<IArtifactToken> aiArtifactTokens) throws OseeCoreException { - Set<IAtsActionableItem> aias = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> aias = new HashSet<>(); for (IArtifactToken token : aiArtifactTokens) { Artifact aiArt = ArtifactQuery.getArtifactFromId(token.getGuid(), AtsUtilCore.getAtsBranch()); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/BarChartExample.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/BarChartExample.java index 4fb83bad6fe..95cd32b47dd 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/BarChartExample.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/BarChartExample.java @@ -66,7 +66,7 @@ public class BarChartExample extends XNavigateItemAction { @Override public List<IResultsEditorTab> getResultsEditorTabs() { - List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>(); + List<IResultsEditorTab> tabs = new ArrayList<>(); tabs.add(new ResultsEditorChartTab("Chart", createMyChart())); tabs.add(getReportHtmlTab()); return tabs; @@ -122,7 +122,7 @@ public class BarChartExample extends XNavigateItemAction { yAxisPrimary.getLabel().getCaption().getFont().setRotation(90); // initialize a collection with the X-series data - List<String> vs = new ArrayList<String>(); + List<String> vs = new ArrayList<>(); vs.add("zero"); vs.add("one"); vs.add("two"); @@ -130,7 +130,7 @@ public class BarChartExample extends XNavigateItemAction { TextDataSet categoryValues = TextDataSetImpl.create(vs); // initialize a collection with the Y-series data - ArrayList<Double> vn1 = new ArrayList<Double>(); + ArrayList<Double> vn1 = new ArrayList<>(); vn1.add(new Double(25)); vn1.add(new Double(35)); vn1.add(new Double(-45)); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewAgileBacklog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewAgileBacklog.java index eeae66168d4..86b29b88cb1 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewAgileBacklog.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewAgileBacklog.java @@ -51,7 +51,7 @@ public class CreateNewAgileBacklog extends XNavigateItemAction { @Override public void run(TableLoadOption... tableLoadOptions) throws OseeCoreException { - List<Artifact> activeTeams = new LinkedList<Artifact>(); + List<Artifact> activeTeams = new LinkedList<>(); for (Artifact agTeam : ArtifactQuery.getArtifactListFromType(AtsArtifactTypes.AgileTeam, AtsUtilCore.getAtsBranch())) { if (agTeam.getSoleAttributeValue(AtsAttributeTypes.Active, true)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewAgileFeatureGroup.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewAgileFeatureGroup.java index 4c2c765bc19..fbbc78af664 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewAgileFeatureGroup.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewAgileFeatureGroup.java @@ -51,7 +51,7 @@ public class CreateNewAgileFeatureGroup extends XNavigateItemAction { @Override public void run(TableLoadOption... tableLoadOptions) throws OseeCoreException { - List<Artifact> activeTeams = new LinkedList<Artifact>(); + List<Artifact> activeTeams = new LinkedList<>(); for (Artifact agTeam : ArtifactQuery.getArtifactListFromType(AtsArtifactTypes.AgileTeam, AtsUtilCore.getAtsBranch())) { if (agTeam.getSoleAttributeValue(AtsAttributeTypes.Active, true)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewAgileSprint.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewAgileSprint.java index 6c0cfcb0fd5..764257f09c7 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewAgileSprint.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewAgileSprint.java @@ -51,7 +51,7 @@ public class CreateNewAgileSprint extends XNavigateItemAction { @Override public void run(TableLoadOption... tableLoadOptions) throws OseeCoreException { - List<Artifact> activeTeams = new LinkedList<Artifact>(); + List<Artifact> activeTeams = new LinkedList<>(); for (Artifact agTeam : ArtifactQuery.getArtifactListFromType(AtsArtifactTypes.AgileTeam, AtsUtilCore.getAtsBranch())) { if (agTeam.getSoleAttributeValue(AtsAttributeTypes.Active, true)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewUsersByNameItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewUsersByNameItem.java index 16f72a92a92..2ab8d5f23b3 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewUsersByNameItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/CreateNewUsersByNameItem.java @@ -59,7 +59,7 @@ public class CreateNewUsersByNameItem extends XNavigateItemAction { MessageDialog.QUESTION, new String[] {"OK", "Cancel"}, 0); ed.setFillVertically(true); if (ed.open() == 0) { - Set<String> newUserNames = new HashSet<String>(); + Set<String> newUserNames = new HashSet<>(); for (String str : ed.getEntry().split(System.getProperty("line.separator"))) { newUserNames.add(str); } @@ -100,7 +100,7 @@ public class CreateNewUsersByNameItem extends XNavigateItemAction { } private Set<Artifact> createNewUserItemTx(SkynetTransaction transaction, Set<String> userNames) throws OseeCoreException { - Set<Artifact> newVersions = new HashSet<Artifact>(); + Set<Artifact> newVersions = new HashSet<>(); for (String userName : userNames) { Artifact userArt = ArtifactTypeManager.addArtifact(CoreArtifactTypes.User, AtsUtilCore.getAtsBranch(), userName); userArt.setSoleAttributeValue(CoreAttributeTypes.UserId, GUID.create()); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/EmailTeamsItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/EmailTeamsItem.java index 1564a6b1843..03cc9c2c8ac 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/EmailTeamsItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/EmailTeamsItem.java @@ -61,7 +61,7 @@ public class EmailTeamsItem extends XNavigateItemAction { if (teamDefs.isEmpty()) { return; } - Set<String> emails = new HashSet<String>(); + Set<String> emails = new HashSet<>(); for (IAtsTeamDefinition teamDef : teamDefs) { if (memberTypes.contains(MemberType.Members) || memberTypes.contains(MemberType.Both)) { for (IAtsUser user : teamDef.getMembers()) { @@ -88,7 +88,7 @@ public class EmailTeamsItem extends XNavigateItemAction { public Collection<IAtsTeamDefinition> getTeamDefinitions() throws OseeCoreException { if (teamDef != null) { - Set<IAtsTeamDefinition> teamDefs = new HashSet<IAtsTeamDefinition>(); + Set<IAtsTeamDefinition> teamDefs = new HashSet<>(); teamDefs.add(teamDef); teamDefs.addAll(TeamDefinitions.getChildren(teamDef, true)); return teamDefs; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredCheckboxTreeArtifactDialogExample.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredCheckboxTreeArtifactDialogExample.java index cf49998f391..eea5e7644e5 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredCheckboxTreeArtifactDialogExample.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredCheckboxTreeArtifactDialogExample.java @@ -36,7 +36,7 @@ public class FilteredCheckboxTreeArtifactDialogExample extends XNavigateItemActi @Override public void run(TableLoadOption... tableLoadOptions) throws Exception { Artifact rootArtifact = OseeSystemArtifacts.getDefaultHierarchyRootArtifact(AtsUtilCore.getAtsBranch()); - List<Artifact> initialSelection = new ArrayList<Artifact>(); + List<Artifact> initialSelection = new ArrayList<>(); List<Artifact> children = rootArtifact.getChildren(); initialSelection.add(children.iterator().next()); FilteredCheckboxTreeArtifactDialog dialog = diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredCheckboxTreeDialogExample.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredCheckboxTreeDialogExample.java index 3cc5f987e1a..00d30a276da 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredCheckboxTreeDialogExample.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredCheckboxTreeDialogExample.java @@ -31,7 +31,7 @@ public class FilteredCheckboxTreeDialogExample extends XNavigateItemAction { @Override public void run(TableLoadOption... tableLoadOptions) throws Exception { List<MyTask> input = FilteredDialogExampleUtil.getInput(); - List<FilteredDialogExampleUtil.MyTask> initialSelection = new ArrayList<FilteredDialogExampleUtil.MyTask>(); + List<FilteredDialogExampleUtil.MyTask> initialSelection = new ArrayList<>(); initialSelection.add(FilteredDialogExampleUtil.getChild3()); initialSelection.add(FilteredDialogExampleUtil.getParent11()); FilteredCheckboxTreeDialog dialog = diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredCheckboxTreeDialogSelectAllExample.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredCheckboxTreeDialogSelectAllExample.java index a6ba61ab042..45f7f187766 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredCheckboxTreeDialogSelectAllExample.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredCheckboxTreeDialogSelectAllExample.java @@ -28,7 +28,7 @@ public class FilteredCheckboxTreeDialogSelectAllExample extends XNavigateItemAct @Override public void run(TableLoadOption... tableLoadOptions) throws Exception { List<MyTask> input = FilteredDialogExampleUtil.getInput(); - List<FilteredDialogExampleUtil.MyTask> initialSelection = new ArrayList<FilteredDialogExampleUtil.MyTask>(); + List<FilteredDialogExampleUtil.MyTask> initialSelection = new ArrayList<>(); initialSelection.add(FilteredDialogExampleUtil.getChild3()); initialSelection.add(FilteredDialogExampleUtil.getParent11()); FilteredCheckboxTreeDialog dialog = diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredDialogExampleUtil.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredDialogExampleUtil.java index f9c79735d84..86edab2482d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredDialogExampleUtil.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/FilteredDialogExampleUtil.java @@ -62,7 +62,7 @@ public class FilteredDialogExampleUtil { } protected static List<MyTask> getInput() { - List<MyTask> tasks = new ArrayList<MyTask>(); + List<MyTask> tasks = new ArrayList<>(); MyTask parent1 = new MyTask("First One"); tasks.add(parent1); MyTask child1 = new MyTask("Child this 1", parent1); @@ -101,7 +101,7 @@ public class FilteredDialogExampleUtil { String name; MyTask parent; - List<MyTask> children = new ArrayList<MyTask>(); + List<MyTask> children = new ArrayList<>(); public MyTask(String name) { this.name = name; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/SubscribeByActionableItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/SubscribeByActionableItem.java index caf64dba808..ea9f840ffb3 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/SubscribeByActionableItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/SubscribeByActionableItem.java @@ -45,7 +45,7 @@ public class SubscribeByActionableItem extends XNavigateItemAction { new AICheckTreeDialog(getName(), "Select Actionable Items\n\nEmail will be sent for every Action created against these AIs.", Active.Active); try { - List<IAtsActionableItem> objs = new ArrayList<IAtsActionableItem>(); + List<IAtsActionableItem> objs = new ArrayList<>(); objs.addAll(AtsClientService.get().getConfigObjects( AtsClientService.get().getUserServiceClient().getCurrentOseeUser().getRelatedArtifacts( AtsRelationTypes.SubscribedUser_Artifact), IAtsActionableItem.class)); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/SubscribeByTeamDefinition.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/SubscribeByTeamDefinition.java index 8754fcae917..1db2f894e8b 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/SubscribeByTeamDefinition.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/SubscribeByTeamDefinition.java @@ -46,7 +46,7 @@ public class SubscribeByTeamDefinition extends XNavigateItemAction { "Select Team Definition\n\nEmail will be sent for every Action created against these Teams.", Active.Active, false); try { - List<IAtsTeamDefinition> objs = new ArrayList<IAtsTeamDefinition>(); + List<IAtsTeamDefinition> objs = new ArrayList<>(); for (Artifact art : AtsClientService.get().getUserServiceClient().getCurrentOseeUser().getRelatedArtifacts( AtsRelationTypes.SubscribedUser_Artifact)) { if (art.isOfType(AtsArtifactTypes.TeamDefinition)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/TeamWorkflowSearchWorkflowSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/TeamWorkflowSearchWorkflowSearchItem.java index 33470962691..e51db7a45c2 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/TeamWorkflowSearchWorkflowSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/TeamWorkflowSearchWorkflowSearchItem.java @@ -194,7 +194,7 @@ public class TeamWorkflowSearchWorkflowSearchItem extends WorldEditorParameterSe } private List<String> getSortedVersions(IAtsTeamDefinition teamDefHoldingVersions) { - List<IAtsVersion> versions = new ArrayList<IAtsVersion>(); + List<IAtsVersion> versions = new ArrayList<>(); versions.addAll(teamDefHoldingVersions.getVersions()); Collections.sort(versions, new Comparator<IAtsVersion>() { @@ -208,7 +208,7 @@ public class TeamWorkflowSearchWorkflowSearchItem extends WorldEditorParameterSe return aObj1.getName().compareTo(aObj2.getName()); } }); - List<String> sorted = new ArrayList<String>(); + List<String> sorted = new ArrayList<>(); for (IAtsVersion version : versions) { String postfix = ""; if (version.isNextVersion()) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/UserSearchWorkflowSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/UserSearchWorkflowSearchItem.java index 7947692361b..21d4bc3b882 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/UserSearchWorkflowSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/UserSearchWorkflowSearchItem.java @@ -235,7 +235,7 @@ public class UserSearchWorkflowSearchItem extends WorldEditorParameterSearchItem versionCombo.setDataStrings(new String[] {}); return; } - List<String> namesList = new ArrayList<String>(names); + List<String> namesList = new ArrayList<>(names); java.util.Collections.sort(namesList); versionCombo.setDataStrings(namesList.toArray(new String[namesList.size()])); } catch (Exception ex) { @@ -271,7 +271,7 @@ public class UserSearchWorkflowSearchItem extends WorldEditorParameterSearchItem if (stateCombo == null) { return; } - List<Object> states = new ArrayList<Object>(); + List<Object> states = new ArrayList<>(); states.add("Implement"); stateCombo.setSelected(states); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/VisitedItems.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/VisitedItems.java index 91b3a7cf4f8..c36ccf1977c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/VisitedItems.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/VisitedItems.java @@ -31,15 +31,15 @@ import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction; */ public class VisitedItems extends XNavigateItemAction { - public static List<String> visitedGuids = new ArrayList<String>(); + public static List<String> visitedGuids = new ArrayList<>(); public static List<Artifact> getReverseVisited() throws OseeCoreException { // Search artifacts and hold on to references so don't get garbage collected - Map<String, Artifact> artifacts = new HashMap<String, Artifact>(); + Map<String, Artifact> artifacts = new HashMap<>(); for (Artifact art : ArtifactQuery.getArtifactListFromIds(visitedGuids, AtsUtilCore.getAtsBranch())) { artifacts.put(art.getGuid(), art); } - List<Artifact> revArts = new ArrayList<Artifact>(); + List<Artifact> revArts = new ArrayList<>(); for (int x = visitedGuids.size(); x <= 0; x--) { Artifact art = artifacts.get(visitedGuids.get(x)); if (art != null) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/ExtendedStatusReportJob.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/ExtendedStatusReportJob.java index 86b0b15af63..73dfb7727ff 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/ExtendedStatusReportJob.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/report/ExtendedStatusReportJob.java @@ -107,7 +107,7 @@ public class ExtendedStatusReportJob extends Job { } public static String[] getColumnNames() { - ArrayList<String> names = new ArrayList<String>(); + ArrayList<String> names = new ArrayList<>(); for (Columns col : values()) { names.add(col.toString()); } @@ -138,7 +138,7 @@ public class ExtendedStatusReportJob extends Job { } private static void addTableRow(StringBuilder sb, AbstractWorkflowArtifact sma) throws OseeCoreException { - List<String> values = new ArrayList<String>(); + List<String> values = new ArrayList<>(); for (Columns col : Columns.values()) { // System.out.println("col *" + col + "*"); if (col == Columns.ActionId) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/ArtifactEmailWizard.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/ArtifactEmailWizard.java index f5880efe5f9..d01ac066421 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/ArtifactEmailWizard.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/ArtifactEmailWizard.java @@ -36,12 +36,12 @@ public class ArtifactEmailWizard extends EmailWizard { } public static List<EmailGroup> getEmailableGroups(IAtsWorkItem workItem) throws OseeCoreException { - ArrayList<EmailGroup> groupNames = new ArrayList<EmailGroup>(); - ArrayList<String> emails = new ArrayList<String>(); + ArrayList<EmailGroup> groupNames = new ArrayList<>(); + ArrayList<String> emails = new ArrayList<>(); emails.add(workItem.getCreatedBy().getEmail()); groupNames.add(new EmailGroup("Originator", emails)); if (workItem.getStateMgr().getAssignees().size() > 0) { - emails = new ArrayList<String>(); + emails = new ArrayList<>(); for (IAtsUser user : workItem.getStateMgr().getAssignees()) { emails.add(user.getEmail()); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/EmailActionsBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/EmailActionsBlam.java index 637b055bb12..2bf80159dbb 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/EmailActionsBlam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/EmailActionsBlam.java @@ -113,7 +113,7 @@ public class EmailActionsBlam extends AbstractBlam { return; } - List<String> emailAddresses = new ArrayList<String>(); + List<String> emailAddresses = new ArrayList<>(); for (IAtsUser basicUser : activeEmailUsers) { if (EmailUtil.isEmailValid(basicUser.getEmail())) { emailAddresses.add(basicUser.getEmail()); @@ -141,7 +141,7 @@ public class EmailActionsBlam extends AbstractBlam { } private Collection<IAtsUser> getRecipients(EmailRecipient emailRecipient, AbstractWorkflowArtifact awa) { - List<IAtsUser> recipients = new ArrayList<IAtsUser>(); + List<IAtsUser> recipients = new ArrayList<>(); if (emailRecipient == EmailRecipient.Assignees) { try { recipients.addAll(awa.getAssignees()); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/EmailActionsData.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/EmailActionsData.java index 03413bce4ea..dbb91453d34 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/EmailActionsData.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/notify/EmailActionsData.java @@ -29,7 +29,7 @@ public class EmailActionsData { private String subject; private String body; - private final Set<Artifact> workflows = new HashSet<Artifact>(5); + private final Set<Artifact> workflows = new HashSet<>(5); private EmailRecipient emailRecipient = null; public String getSubject() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ConvertWorkflowStatesBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ConvertWorkflowStatesBlam.java index 9e7703c6414..ec1a35811f9 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ConvertWorkflowStatesBlam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ConvertWorkflowStatesBlam.java @@ -93,7 +93,7 @@ public class ConvertWorkflowStatesBlam extends AbstractBlam { } private Map<String, String> createFromToMap(String fromToMapStr) { - Map<String, String> fromToMap = new HashMap<String, String>(); + Map<String, String> fromToMap = new HashMap<>(); for (String line : fromToMapStr.split(";")) { String[] fromTo = line.split(":"); if (fromTo.length != 2 || fromTo[0].isEmpty() || fromTo[1].isEmpty()) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CreateActionFromTaskBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CreateActionFromTaskBlam.java index f91c72f5fbc..408d6997880 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CreateActionFromTaskBlam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CreateActionFromTaskBlam.java @@ -121,7 +121,7 @@ public class CreateActionFromTaskBlam extends AbstractBlam { } private void handleCreateActions(Collection<TaskArtifact> tasks, String title, Collection<IAtsActionableItem> aias, ChangeType changeType, String priority, IProgressMonitor monitor) throws OseeCoreException { - Set<TeamWorkFlowArtifact> newTeamArts = new HashSet<TeamWorkFlowArtifact>(); + Set<TeamWorkFlowArtifact> newTeamArts = new HashSet<>(); AtsChangeSet changes = new AtsChangeSet("Create Actions from Tasks"); for (TaskArtifact task : tasks) { String useTitle = title; @@ -213,7 +213,7 @@ public class CreateActionFromTaskBlam extends AbstractBlam { * @param taskArtifacts the defaultTeamWorkflows to set */ public void setDefaultTeamWorkflows(Collection<? extends TaskArtifact> taskArtifacts) { - this.taskArtifacts = new LinkedList<TaskArtifact>(); + this.taskArtifacts = new LinkedList<>(); this.taskArtifacts.addAll(taskArtifacts); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CreateWorkingBranchFromTxBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CreateWorkingBranchFromTxBlam.java index 1450df0d740..c6fee2070f6 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CreateWorkingBranchFromTxBlam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/CreateWorkingBranchFromTxBlam.java @@ -48,7 +48,7 @@ public class CreateWorkingBranchFromTxBlam extends AbstractBlam { @Override public void runOperation(VariableMap variableMap, IProgressMonitor monitor) throws Exception { String input = variableMap.getString(ATS_ID_TX_WIDGET_NAME); - ArrayList<String> idTxs = new ArrayList<String>(Arrays.asList(input.split("\\r?\\n"))); + ArrayList<String> idTxs = new ArrayList<>(Arrays.asList(input.split("\\r?\\n"))); for (String idTx : idTxs) { String[] pairs = idTx.split("[,\\s]+"); if (pairs.length == PAIR_SIZE) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java index c880308a95a..ea271b601fb 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java @@ -215,14 +215,14 @@ public class DetailedTestStatusBlam extends AbstractBlam { IOseeBranch resultsBranch = variableMap.getBranch("Test Results Branch"); versions = variableMap.getCollection(IAtsVersion.class, "Versions"); - reqTaskMap = new CompositeKeyHashMap<String, String, RequirementStatus>(); - legacyIdToImplementers = new HashCollection<String, IAtsUser>(); - testRunArtifacts = new HashMap<String, Artifact>(); - scriptCategories = new HashMap<String, String>(); - testPocs = new HashSet<IAtsUser>(); - requirementPocs = new HashSet<String>(); - statusLines = new ArrayList<String[]>(); - statuses = new ArrayList<RequirementStatus>(100); + reqTaskMap = new CompositeKeyHashMap<>(); + legacyIdToImplementers = new HashCollection<>(); + testRunArtifacts = new HashMap<>(); + scriptCategories = new HashMap<>(); + testPocs = new HashSet<>(); + requirementPocs = new HashSet<>(); + statusLines = new ArrayList<>(); + statuses = new ArrayList<>(100); charBak = new CharBackedInputStream(); excelWriter = new ExcelXmlWriter(charBak.getWriter()); sumFormula = new StringBuilder(); @@ -269,7 +269,7 @@ public class DetailedTestStatusBlam extends AbstractBlam { } private boolean blamReadyToExecute() { - final List<String> items = new ArrayList<String>(); + final List<String> items = new ArrayList<>(); if (selectedProgram == null) { items.add("program"); @@ -512,7 +512,7 @@ public class DetailedTestStatusBlam extends AbstractBlam { private HashCollection<String, Artifact> getTestProcedureTraceability(IOseeBranch testProcedureBranch, IProgressMonitor monitor) throws OseeCoreException { monitor.subTask("Gathering test procedures"); - HashCollection<String, Artifact> requirementNameToTestProcedures = new HashCollection<String, Artifact>(); + HashCollection<String, Artifact> requirementNameToTestProcedures = new HashCollection<>(); // Map Software Requirements from TestProcedure IOseeBranch to Requirements IOseeBranch List<Artifact> tpReqs = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.SoftwareRequirement, testProcedureBranch); @@ -527,7 +527,7 @@ public class DetailedTestStatusBlam extends AbstractBlam { } Set<Artifact> foundProcedures = new HashSet<Artifact>(tpRequirement.getRelatedArtifacts(CoreRelationTypes.Validation__Validator)); - Set<Artifact> toAdd = new HashSet<Artifact>(); + Set<Artifact> toAdd = new HashSet<>(); toAdd = foundProcedures; requirementNameToTestProcedures.put(tpRequirement.getName(), toAdd); } @@ -635,7 +635,7 @@ public class DetailedTestStatusBlam extends AbstractBlam { */ private Collection<String> getAliases(Artifact artifact) { // TODO: this method should return history of names - ArrayList<String> aliases = new ArrayList<String>(1); + ArrayList<String> aliases = new ArrayList<>(1); aliases.add(artifact.getName()); return aliases; } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java index e5f264f7968..fa8003926c6 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java @@ -96,14 +96,14 @@ public class DetailedTestStatusOld extends AbstractBlam { new CompositeKeyHashMap<String, String, RequirementStatus>(); private final StringBuilder sumFormula = new StringBuilder(500); private HashCollection<Artifact, String> requirementToCodeUnitsMap; - private final HashMap<String, String> testProcedureInfo = new HashMap<String, String>(); - private final HashCollection<String, IAtsUser> legacyIdToImplementers = new HashCollection<String, IAtsUser>(); - private final HashMap<String, Artifact> testRunArtifacts = new HashMap<String, Artifact>(); - private final HashMap<String, String> scriptCategories = new HashMap<String, String>(); - private final HashSet<IAtsUser> testPocs = new HashSet<IAtsUser>(); - private final HashSet<String> requirementPocs = new HashSet<String>(); - private final ArrayList<String[]> statusLines = new ArrayList<String[]>(); - private final ArrayList<RequirementStatus> statuses = new ArrayList<RequirementStatus>(100); + private final HashMap<String, String> testProcedureInfo = new HashMap<>(); + private final HashCollection<String, IAtsUser> legacyIdToImplementers = new HashCollection<>(); + private final HashMap<String, Artifact> testRunArtifacts = new HashMap<>(); + private final HashMap<String, String> scriptCategories = new HashMap<>(); + private final HashSet<IAtsUser> testPocs = new HashSet<>(); + private final HashSet<String> requirementPocs = new HashSet<>(); + private final ArrayList<String[]> statusLines = new ArrayList<>(); + private final ArrayList<RequirementStatus> statuses = new ArrayList<>(100); private Collection<IAtsVersion> versions; private XBranchSelectWidget requirementsBranchWidget; @@ -226,7 +226,7 @@ public class DetailedTestStatusOld extends AbstractBlam { IOseeBranch procedureBranch = variableMap.getBranch("Test Procedure Branch"); File scriptDir = new File(variableMap.getString("Script Root Directory")); - versions = new ArrayList<IAtsVersion>(); + versions = new ArrayList<>(); for (IAtsVersion version : variableMap.getCollection(IAtsVersion.class, "Versions")) { versions.add(version); } @@ -234,7 +234,7 @@ public class DetailedTestStatusOld extends AbstractBlam { loadTestRunArtifacts(scriptsBranch); - Collection<TraceHandler> traceHandlers = new LinkedList<TraceHandler>(); + Collection<TraceHandler> traceHandlers = new LinkedList<>(); for (String handler : availableTraceHandlers) { if (variableMap.getBoolean(handler)) { TraceHandler traceHandler = TraceUnitExtensionManager.getInstance().getTraceHandlerByName(handler); @@ -272,7 +272,7 @@ public class DetailedTestStatusOld extends AbstractBlam { } private boolean blamReadyToExecute() { - final List<String> items = new ArrayList<String>(); + final List<String> items = new ArrayList<>(); if (selectedProgram == null) { items.add("program"); @@ -563,7 +563,7 @@ public class DetailedTestStatusOld extends AbstractBlam { */ private Collection<String> getAliases(Artifact artifact) { // TODO: this method should return history of names - ArrayList<String> aliases = new ArrayList<String>(1); + ArrayList<String> aliases = new ArrayList<>(1); aliases.add(artifact.getName()); return aliases; } @@ -576,7 +576,7 @@ public class DetailedTestStatusOld extends AbstractBlam { sb.append("<XWidget xwidgetType=\"XVersionList\" displayName=\"Versions\" multiSelect=\"true\" />"); sb.append("<XWidget xwidgetType=\"XText\" displayName=\"Script Root Directory\" defaultValue=\"C:/UserData/workspaceScripts\" />"); - availableTraceHandlers = new LinkedList<String>(); + availableTraceHandlers = new LinkedList<>(); sb.append("<XWidget xwidgetType=\"XLabel\" displayName=\"Select appropriate script parser:\" />"); Collection<String> traceHandlers = TraceUnitExtensionManager.getInstance().getAllTraceHandlerNames(); for (String handler : traceHandlers) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DuplicateWorkflowBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DuplicateWorkflowBlam.java index a4268de3913..810a3d1b786 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DuplicateWorkflowBlam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DuplicateWorkflowBlam.java @@ -129,13 +129,13 @@ public class DuplicateWorkflowBlam extends AbstractBlam { } private void handleCreateNewWorkflow(Collection<TeamWorkFlowArtifact> teamArts, String title) throws OseeCoreException { - Set<TeamWorkFlowArtifact> newTeamArts = new HashSet<TeamWorkFlowArtifact>(); + Set<TeamWorkFlowArtifact> newTeamArts = new HashSet<>(); AtsChangeSet changes = new AtsChangeSet("Duplicate Workflow"); Date createdDate = new Date(); IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser(); for (TeamWorkFlowArtifact teamArt : teamArts) { // assignees == add in existing assignees, leads and originator (current user) - List<IAtsUser> assignees = new LinkedList<IAtsUser>(); + List<IAtsUser> assignees = new LinkedList<>(); assignees.addAll(teamArt.getStateMgr().getAssignees()); IAtsTeamDefinition teamDef = teamArt.getTeamDefinition(); assignees.addAll(teamDef.getLeads()); @@ -162,7 +162,7 @@ public class DuplicateWorkflowBlam extends AbstractBlam { } private void handleCreateDuplicate(Collection<TeamWorkFlowArtifact> teamArts, boolean duplicateTasks, String title) throws OseeCoreException { - Set<TeamWorkFlowArtifact> newTeamArts = new HashSet<TeamWorkFlowArtifact>(); + Set<TeamWorkFlowArtifact> newTeamArts = new HashSet<>(); AtsChangeSet changes = new AtsChangeSet("Duplicate Workflow"); IAtsUser user = AtsClientService.get().getUserService().getCurrentUser(); @@ -178,7 +178,7 @@ public class DuplicateWorkflowBlam extends AbstractBlam { dupArt.getLog().addLog(LogType.Note, null, "Workflow duplicated from " + teamArt.getAtsId(), user.getUserId()); // assignees == add in existing assignees, leads and originator (current user) - List<IAtsUser> assignees = new LinkedList<IAtsUser>(); + List<IAtsUser> assignees = new LinkedList<>(); assignees.addAll(teamArt.getStateMgr().getAssignees()); assignees.addAll(teamArt.getTeamDefinition().getLeads()); if (!assignees.contains(user)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java index 3a6ffd90456..485e87c600f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java @@ -90,7 +90,7 @@ public final class ExportChangeReportOperation extends AbstractOperation { }; for (TeamWorkFlowArtifact workflow : workflows) { - Set<Integer> artIds = new HashSet<Integer>(); + Set<Integer> artIds = new HashSet<>(); Collection<Change> changes = computeChanges(workflow, monitor, artIds); if (!changes.isEmpty() && changes.size() < 4000) { logf("Exporting: %s", workflow.toStringWithId()); @@ -137,7 +137,7 @@ public final class ExportChangeReportOperation extends AbstractOperation { private Collection<Change> computeChanges(Artifact workflow, IProgressMonitor monitor, Set<Integer> artIds) throws OseeCoreException { TeamWorkFlowArtifact teamArt = (TeamWorkFlowArtifact) workflow; - List<Change> changes = new ArrayList<Change>(); + List<Change> changes = new ArrayList<>(); IOperation operation = null; if (AtsClientService.get().getBranchService().isCommittedBranchExists(teamArt)) { operation = ChangeManager.comparedToPreviousTx(pickTransaction(workflow), changes); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ImportTasksFromSimpleList.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ImportTasksFromSimpleList.java index bde1f4ca854..ca39993abc7 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ImportTasksFromSimpleList.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ImportTasksFromSimpleList.java @@ -65,14 +65,14 @@ public class ImportTasksFromSimpleList extends AbstractBlam { public void run() { try { List<Artifact> artifacts = variableMap.getArtifacts(TEAM_WORKFLOW); - final List<IAtsUser> assignees = new ArrayList<IAtsUser>(); + final List<IAtsUser> assignees = new ArrayList<>(); for (Artifact art : variableMap.getArtifacts(ASSIGNEES)) { if (art instanceof User) { IAtsUser atsUser = AtsClientService.get().getUserServiceClient().getUserFromOseeUser((User) art); assignees.add(atsUser); } } - final List<String> titles = new ArrayList<String>(); + final List<String> titles = new ArrayList<>(); for (String title : variableMap.getString(TASK_IMPORT_TITLES).split("\n")) { title = title.replaceAll("\r", ""); if (!title.equals("")) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ModifyActionableItemsBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ModifyActionableItemsBlam.java index e6758a4f183..c1b6b5f1057 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ModifyActionableItemsBlam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ModifyActionableItemsBlam.java @@ -192,7 +192,7 @@ public class ModifyActionableItemsBlam extends AbstractBlam { @Override public void handleEvent(Event event) { TeamWorkFlowArtifact teamWf = getDroppedTeamWf(); - List<TeamWorkFlowArtifact> teams = new ArrayList<TeamWorkFlowArtifact>(); + List<TeamWorkFlowArtifact> teams = new ArrayList<>(); if (teamWf != null) { teams.add(teamWf); } @@ -235,7 +235,7 @@ public class ModifyActionableItemsBlam extends AbstractBlam { Set<IAtsActionableItem> actionableItems = teamWf.getActionableItems(); wfTree.setInitalChecked(Arrays.asList(actionableItems.toArray())); - Set<IAtsActionableItem> ais = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> ais = new HashSet<>(); for (TeamWorkFlowArtifact team : teamWf.getParentActionArtifact().getTeams()) { if (!team.equals(teamWf)) { ais.addAll(team.getActionableItems()); @@ -284,7 +284,7 @@ public class ModifyActionableItemsBlam extends AbstractBlam { return; } try { - currAIsForAllWfs = new HashSet<IAtsActionableItem>(); + currAIsForAllWfs = new HashSet<>(); for (TeamWorkFlowArtifact team : teamWf.getParentActionArtifact().getTeams()) { currAIsForAllWfs.addAll(team.getActionableItems()); } @@ -333,7 +333,7 @@ public class ModifyActionableItemsBlam extends AbstractBlam { public class ModifyActionableItemOperation extends AbstractOperation { private final ModifyActionableItems job; - List<TeamWorkFlowArtifact> newTeamWfs = new ArrayList<TeamWorkFlowArtifact>(); + List<TeamWorkFlowArtifact> newTeamWfs = new ArrayList<>(); private final TeamWorkFlowArtifact teamWf; public TeamWorkFlowArtifact getTeamWf() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ReAssignATSObjectsToUser.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ReAssignATSObjectsToUser.java index e120881c7c3..3ca85be364f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ReAssignATSObjectsToUser.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ReAssignATSObjectsToUser.java @@ -62,7 +62,7 @@ public class ReAssignATSObjectsToUser extends AbstractBlam { // Get all things user is directly assigned to Collection<Artifact> assignedToArts = AtsUtil.getAssigned(AtsClientService.get().getUserServiceClient().getUserFromOseeUser(fromUser)); - Set<Artifact> atsArts = new HashSet<Artifact>(); + Set<Artifact> atsArts = new HashSet<>(); for (Artifact assignedArt : assignedToArts) { if (assignedArt instanceof AbstractWorkflowArtifact) { atsArts.add(assignedArt); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java index 589a36d365e..1c37169f660 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/TaskMetrics.java @@ -67,7 +67,7 @@ public class TaskMetrics extends AbstractBlam { private AtsObjectMultiChoiceSelect versionsWidget; public TaskMetrics() { - metrics = new CountingMap<IAtsUser>(); + metrics = new CountingMap<>(); } @Override @@ -91,7 +91,7 @@ public class TaskMetrics extends AbstractBlam { List<IAtsObject> versionArtifacts = versionsWidget.getSelected(); if (!versionArtifacts.isEmpty()) { - Set<IAtsTeamWorkflow> teamWorkflows = new HashSet<IAtsTeamWorkflow>(); + Set<IAtsTeamWorkflow> teamWorkflows = new HashSet<>(); for (IAtsObject version : versionArtifacts) { teamWorkflows.addAll(AtsClientService.get().getVersionService().getTargetedForTeamWorkflows( (IAtsVersion) version)); @@ -189,7 +189,7 @@ public class TaskMetrics extends AbstractBlam { @Override public void widgetModified(XWidget widget) { - Collection<IAtsObject> versions = new HashSet<IAtsObject>(); + Collection<IAtsObject> versions = new HashSet<>(); versionsWidget.setSelectableItems(Collections.<IAtsObject> emptyList()); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/WorkflowsActiveAisContentProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/WorkflowsActiveAisContentProvider.java index 06a1487d366..83f282dec33 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/WorkflowsActiveAisContentProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/WorkflowsActiveAisContentProvider.java @@ -37,7 +37,7 @@ public class WorkflowsActiveAisContentProvider implements ITreeContentProvider { @Override public Object[] getElements(Object inputElement) { - Collection<IAtsActionableItem> ais = new ArrayList<IAtsActionableItem>(); + Collection<IAtsActionableItem> ais = new ArrayList<>(); if (inputElement instanceof TeamWorkFlowArtifact) { TeamWorkFlowArtifact teamWf = (TeamWorkFlowArtifact) inputElement; ais.addAll(teamWf.getTeamDefinition().getActionableItems()); @@ -47,7 +47,7 @@ public class WorkflowsActiveAisContentProvider implements ITreeContentProvider { @Override public Object[] getChildren(Object inputElement) { - Collection<IAtsActionableItem> ais = new ArrayList<IAtsActionableItem>(); + Collection<IAtsActionableItem> ais = new ArrayList<>(); if (inputElement instanceof IAtsActionableItem) { IAtsActionableItem ai = (IAtsActionableItem) inputElement; for (IAtsActionableItem childAi : ai.getChildrenActionableItems()) { @@ -76,7 +76,7 @@ public class WorkflowsActiveAisContentProvider implements ITreeContentProvider { * Add ai to results if owned by teamDef an matches active status */ private static List<IAtsActionableItem> getActiveChildrenForTeamAndAi(IAtsTeamDefinition teamDef, Active active, IAtsActionableItem ai) { - List<IAtsActionableItem> results = new ArrayList<IAtsActionableItem>(); + List<IAtsActionableItem> results = new ArrayList<>(); if (ai.getTeamDefinition() == null || ai.getTeamDefinition().equals(teamDef)) { if (active == Active.Both) { results.add(ai); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewNavigateViewItems.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewNavigateViewItems.java index c4ebe23d6b6..7bccd9ab803 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewNavigateViewItems.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewNavigateViewItems.java @@ -40,7 +40,7 @@ import org.eclipse.osee.framework.ui.skynet.util.DbConnectionUtility; public class ReviewNavigateViewItems implements XNavigateViewItems, IXNavigateCommonItem { private final static ReviewNavigateViewItems instance = new ReviewNavigateViewItems(); - private final List<XNavigateItem> items = new CopyOnWriteArrayList<XNavigateItem>(); + private final List<XNavigateItem> items = new CopyOnWriteArrayList<>(); private boolean ensurePopulatedRanOnce = false; public static ReviewNavigateViewItems getInstance() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewSearchWorkflowSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewSearchWorkflowSearchItem.java index fc2eabeb6bb..dc585bb5ba5 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewSearchWorkflowSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewSearchWorkflowSearchItem.java @@ -291,7 +291,7 @@ public class ReviewSearchWorkflowSearchItem extends WorldEditorParameterSearchIt protected Set<IAtsVersion> getSelectableVersionArtifacts() throws OseeCoreException { Collection<IAtsActionableItem> aias = getSelectedAIs(); - Set<IAtsVersion> versions = new HashSet<IAtsVersion>(); + Set<IAtsVersion> versions = new HashSet<>(); if (!aias.isEmpty()) { for (IAtsTeamDefinition teamDef : TeamDefinitions.getImpactedTeamDefs(aias)) { IAtsTeamDefinition teamDefHoldingVersions = teamDef.getTeamDefinitionHoldingVersions(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewWorldSearchItem.java index bb948ae5173..7b224f5daae 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewWorldSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewWorldSearchItem.java @@ -100,7 +100,7 @@ public class ReviewWorldSearchItem extends WorldUISearchItem { @Override public Collection<Artifact> performSearch(SearchType searchType) throws OseeCoreException { - Set<String> actionableItemGuids = new HashSet<String>(aias.size()); + Set<String> actionableItemGuids = new HashSet<>(aias.size()); for (IAtsActionableItem aia : aias) { if (recurseChildren) { for (IAtsActionableItem childTeamDef : ActionableItems.getActionableItemsFromItemAndChildren(aia)) { @@ -110,7 +110,7 @@ public class ReviewWorldSearchItem extends WorldUISearchItem { actionableItemGuids.add(AtsUtilCore.getGuid(aia)); } } - List<ArtifactSearchCriteria> criteria = new ArrayList<ArtifactSearchCriteria>(); + List<ArtifactSearchCriteria> criteria = new ArrayList<>(); if (actionableItemGuids.isEmpty()) { criteria.add(new AttributeCriteria(AtsAttributeTypes.ActionableItem)); } else { @@ -121,7 +121,7 @@ public class ReviewWorldSearchItem extends WorldUISearchItem { List<Artifact> artifacts = ArtifactQuery.getArtifactListFromCriteria(AtsUtilCore.getAtsBranch(), 1000, criteria); - Set<Artifact> resultSet = new HashSet<Artifact>(); + Set<Artifact> resultSet = new HashSet<>(); for (Artifact art : artifacts) { if (art.isOfType(AtsArtifactTypes.ReviewArtifact) && includeReview(art) && isCompletedCancelledValid(art)) { resultSet.add(art); @@ -188,7 +188,7 @@ public class ReviewWorldSearchItem extends WorldUISearchItem { if (!includeCancelled && !includeCompleted) { criteria.add(new AttributeCriteria(AtsAttributeTypes.CurrentStateType, StateType.Working.name())); } else { - List<String> cancelOrComplete = new ArrayList<String>(2); + List<String> cancelOrComplete = new ArrayList<>(2); cancelOrComplete.add(StateType.Working.name()); if (includeCompleted) { cancelOrComplete.add(StateType.Completed.name()); @@ -202,7 +202,7 @@ public class ReviewWorldSearchItem extends WorldUISearchItem { } catch (OseeTypeDoesNotExist ex) { OseeLog.log(Activator.class, Level.SEVERE, ex); // Backward compatibility; remove after 0.9.7 release - List<String> cancelOrComplete = new ArrayList<String>(2); + List<String> cancelOrComplete = new ArrayList<>(2); if (!includeCancelled) { cancelOrComplete.add(TeamState.Cancelled.getName() + ";;;"); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/AtsQuickSearchOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/AtsQuickSearchOperation.java index da306cca78f..f5cc489ca78 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/AtsQuickSearchOperation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/AtsQuickSearchOperation.java @@ -34,7 +34,7 @@ import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLo * @author Donald G. Dunne */ class AtsQuickSearchOperation extends AbstractOperation implements IWorldEditorConsumer { - Set<Artifact> allArtifacts = new HashSet<Artifact>(); + Set<Artifact> allArtifacts = new HashSet<>(); private final AtsQuickSearchData data; private WorldEditor worldEditor; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/ExportMetricsOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/ExportMetricsOperation.java index f8209177bf5..b76cf974b3c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/ExportMetricsOperation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/ExportMetricsOperation.java @@ -36,7 +36,7 @@ public class ExportMetricsOperation extends AbstractOperation { } private List<TaskArtifact> asTask(List<? extends Artifact> artifacts) { - List<TaskArtifact> tasks = new ArrayList<TaskArtifact>(); + List<TaskArtifact> tasks = new ArrayList<>(); for (Artifact artifact : artifacts) { if (artifact instanceof TaskArtifact) { tasks.add((TaskArtifact) artifact); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskComposite.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskComposite.java index 970d1862504..7b372f777bd 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskComposite.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskComposite.java @@ -79,7 +79,7 @@ public class TaskComposite extends Composite implements IWorldViewerEventHandler private TaskXViewer taskXViewer; private final IXTaskViewer iXTaskViewer; protected Label showReleaseMetricsLabel; - private final Set<TaskArtifact> taskArts = new HashSet<TaskArtifact>(200); + private final Set<TaskArtifact> taskArts = new HashSet<>(200); public TaskComposite(IXTaskViewer iXTaskViewer, Composite parent, int style) { super(parent, style); @@ -182,7 +182,7 @@ public class TaskComposite extends Composite implements IWorldViewerEventHandler public List<TaskArtifact> getSelectedTaskArtifactItems() { Iterator<?> i = ((IStructuredSelection) taskXViewer.getSelection()).iterator(); - ArrayList<TaskArtifact> items = new ArrayList<TaskArtifact>(); + ArrayList<TaskArtifact> items = new ArrayList<>(); while (i.hasNext()) { Object obj = i.next(); if (Artifacts.isOfType(obj, AtsArtifactTypes.Task)) { @@ -255,7 +255,7 @@ public class TaskComposite extends Composite implements IWorldViewerEventHandler if (iXTaskViewer.getAwa() == null) { return; } - List<TaskArtifact> taskArts = new LinkedList<TaskArtifact>(); + List<TaskArtifact> taskArts = new LinkedList<>(); for (Artifact art : ((ArtifactData) e.data).getArtifacts()) { if (art.isOfType(AtsArtifactTypes.Task)) { taskArts.add((TaskArtifact) art); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java index 1541c20559a..8b345ff74d8 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java @@ -63,7 +63,7 @@ public class TaskEditor extends AbstractArtifactEditor implements IAtsMetricsPro public static final String EDITOR_ID = "org.eclipse.osee.ats.editor.TaskEditor"; private int mainPageIndex, metricsPageIndex; private TaskEditorXWidgetActionPage taskActionPage; - private final Collection<TaskArtifact> tasks = new CopyOnWriteArraySet<TaskArtifact>(); + private final Collection<TaskArtifact> tasks = new CopyOnWriteArraySet<>(); private boolean loading = false; public final static int TITLE_MAX_LENGTH = WorldEditor.TITLE_MAX_LENGTH; @@ -91,7 +91,7 @@ public class TaskEditor extends AbstractArtifactEditor implements IAtsMetricsPro } public static Collection<TaskEditor> getEditors() { - final List<TaskEditor> editors = new ArrayList<TaskEditor>(); + final List<TaskEditor> editors = new ArrayList<>(); Displays.pendInDisplayThread(new Runnable() { @Override public void run() { @@ -281,7 +281,7 @@ public class TaskEditor extends AbstractArtifactEditor implements IAtsMetricsPro try { taskEditor.setLoading(true); taskEditor.getTaskActionPage().getTaskComposite().getTaskXViewer().clear(true); - final List<TaskArtifact> taskArts = new ArrayList<TaskArtifact>(); + final List<TaskArtifact> taskArts = new ArrayList<>(); for (Artifact artifact : itaskEditorProvider.getTaskEditorTaskArtifacts()) { if (artifact.isOfType(AtsArtifactTypes.Task)) { taskArts.add((TaskArtifact) artifact); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java index 1a332f96b1c..2cd17992505 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsBranchManager.java @@ -65,7 +65,7 @@ public final class AtsBranchManager { public static void showMergeManager(TeamWorkFlowArtifact teamArt) { try { Branch workingBranch = teamArt.getWorkingBranch(); - List<Branch> destinationBranches = new ArrayList<Branch>(); + List<Branch> destinationBranches = new ArrayList<>(); if (workingBranch != null) { List<MergeBranch> mergeBranches = BranchManager.getMergeBranches(workingBranch); @@ -188,7 +188,7 @@ public final class AtsBranchManager { * Either return a single commit transaction or user must choose from a list of valid commit transactions */ public static TransactionRecord getTransactionIdOrPopupChoose(TeamWorkFlowArtifact teamArt, String title, boolean showMergeManager) throws OseeCoreException { - Collection<TransactionRecord> transactionIds = new HashSet<TransactionRecord>(); + Collection<TransactionRecord> transactionIds = new HashSet<>(); Collection<ITransaction> transactions = AtsClientService.get().getBranchService().getTransactionIds(teamArt, showMergeManager); Collection<TransactionRecord> trs = Collections.castAll(transactions); @@ -299,7 +299,7 @@ public final class AtsBranchManager { if (commitConfigArt != null && !isBaselinBranchConfigured(commitConfigArt)) { throw new OseeArgumentException("Parent Branch not configured for [%s]", commitConfigArt); } - Collection<Change> changes = new ArrayList<Change>(); + Collection<Change> changes = new ArrayList<>(); IOperation operation = null; if (AtsClientService.get().getBranchService().isWorkingBranchInWork(teamArt)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java index 3fc899aa013..7ecd7992c11 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java @@ -55,7 +55,7 @@ public class AtsDeleteManager { public static void handleDeletePurgeAtsObject(Collection<? extends Artifact> selectedArts, boolean forcePend, DeleteOption... deleteOption) throws OseeCoreException { final Collection<DeleteOption> deleteOptions = Collections.getAggregate(deleteOption); - List<Artifact> delArts = new ArrayList<Artifact>(); + List<Artifact> delArts = new ArrayList<>(); StringBuilder artBuilder = new StringBuilder(); for (Artifact art : selectedArts) { @@ -91,8 +91,8 @@ public class AtsDeleteManager { // Build list of related artifacts that will be deleted StringBuilder delBuilder = new StringBuilder(); - final Set<Artifact> allDeleteArts = new HashSet<Artifact>(30); - Map<Artifact, Object> ignoredArts = new HashMap<Artifact, Object>(); + final Set<Artifact> allDeleteArts = new HashSet<>(30); + Map<Artifact, Object> ignoredArts = new HashMap<>(); getDeleteArtifacts(delArts, delBuilder, allDeleteArts, ignoredArts); final boolean purge = deleteOptions.contains(DeleteOption.Purge); // Get final confirmation of all seleted and related items to delete/purge @@ -139,7 +139,7 @@ public class AtsDeleteManager { private static void getDeleteArtifacts(List<Artifact> delArts, StringBuilder delBuilder, final Set<Artifact> allDeleteArts, Map<Artifact, Object> ignoredArts) throws OseeCoreException { for (Artifact deleteArt : delArts) { allDeleteArts.add(deleteArt); - final Set<Artifact> relatedArts = new HashSet<Artifact>(30); + final Set<Artifact> relatedArts = new HashSet<>(30); delBuilder.append(String.format("\n<b>Selected</b>:[%s][%s][%s]", deleteArt.getArtifactTypeName(), AtsUtilClient.getAtsId(deleteArt), deleteArt.getName()) + "\n"); if (deleteArt.isOfType(AtsArtifactTypes.Action)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsObjectLabelProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsObjectLabelProvider.java index 2eec74aac3f..e39b53c4019 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsObjectLabelProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsObjectLabelProvider.java @@ -67,7 +67,7 @@ public class AtsObjectLabelProvider extends LabelProvider { if (element instanceof IAtsObject) { IAtsObject artifact = (IAtsObject) element; - List<String> extraInfo = new ArrayList<String>(); + List<String> extraInfo = new ArrayList<>(); String name = artifact.getName(); extraInfo.add(name != null ? name : ""); result = Collections.toString(" ", extraInfo); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUserNavigateItems.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUserNavigateItems.java index 354708a31e8..959b69f1d99 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUserNavigateItems.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUserNavigateItems.java @@ -36,7 +36,7 @@ public class AtsUserNavigateItems implements IUserNavigateItem { @Override public List<XNavigateItem> getNavigateItems(XNavigateItem parentItem) { - List<XNavigateItem> items = new ArrayList<XNavigateItem>(); + List<XNavigateItem> items = new ArrayList<>(); if (AtsUtilClient.isAtsAdmin()) { items.add(new XNavigateItemBlam(parentItem, new PurgeUser(), FrameworkImage.X_RED)); items.add(new XNavigateItemBlam(parentItem, new ReAssignATSObjectsToUser(), AtsImage.ACTION)); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java index f817c08e16f..9a84affb646 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsUtil.java @@ -291,7 +291,7 @@ public final class AtsUtil { } public static void openInAtsWorldEditor(String name, Collection<? extends Artifact> artifacts) { - Set<Artifact> otherArts = new HashSet<Artifact>(); + Set<Artifact> otherArts = new HashSet<>(); for (Artifact art : artifacts) { if (art.isOfType(CoreArtifactTypes.UniversalGroup)) { WorldEditor.open(new WorldEditorUISearchItemProvider(new GroupWorldSearchItem(art), null, @@ -364,7 +364,7 @@ public final class AtsUtil { * @param clazz to match or all if null */ public static Set<Artifact> getAssigned(String userId, Class<?> clazz) throws OseeCoreException { - Set<Artifact> assigned = new HashSet<Artifact>(); + Set<Artifact> assigned = new HashSet<>(); for (Artifact artifact : ArtifactQuery.getArtifactListFromAttribute(AtsAttributeTypes.CurrentState, "<" + userId + ">", AtsUtilCore.getAtsBranch(), QueryOption.CONTAINS_MATCH_OPTIONS)) { if (clazz == null || clazz.isInstance(artifact)) { @@ -386,7 +386,7 @@ public final class AtsUtil { } public static Image getImage(Collection<IAtsUser> atsUsers) { - Set<User> users = new HashSet<User>(); + Set<User> users = new HashSet<>(); for (IAtsUser user : atsUsers) { users.add((User) AtsClientService.get().getUserService().getUserById(user.getUserId()).getStoreObject()); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/CreateActionUsingAllActionableItems.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/CreateActionUsingAllActionableItems.java index bf47d0f2749..4522b4b6193 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/CreateActionUsingAllActionableItems.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/CreateActionUsingAllActionableItems.java @@ -64,7 +64,7 @@ public class CreateActionUsingAllActionableItems extends XNavigateItemAction { } public static ActionArtifact createActionWithAllAis() throws OseeCoreException { - Set<IAtsActionableItem> aias = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> aias = new HashSet<>(); for (IAtsActionableItem aia : ActionableItems.getActionableItems(Active.Active, AtsClientService.get().getConfig())) { if (aia.isActionable() && aia.isAllowUserActionCreation()) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/FavoritesManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/FavoritesManager.java index 43802f07773..e62ef94a764 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/FavoritesManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/FavoritesManager.java @@ -115,7 +115,7 @@ public class FavoritesManager { } public static List<User> getFavorites(AbstractWorkflowArtifact workflow) throws OseeCoreException { - ArrayList<User> arts = new ArrayList<User>(); + ArrayList<User> arts = new ArrayList<>(); for (Artifact art : workflow.getRelatedArtifactsUnSorted(AtsRelationTypes.FavoriteUser_User)) { arts.add((User) art); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java index ea43d53b5ce..4a92fb655d2 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java @@ -72,9 +72,9 @@ import org.xml.sax.helpers.XMLReaderFactory; */ public class ExcelAtsActionArtifactExtractor { - private final List<ActionData> actionDatas = new ArrayList<ActionData>(); - private final Set<Artifact> actionArts = new HashSet<Artifact>(); - private final Map<String, Artifact> actionNameToAction = new HashMap<String, Artifact>(100); + private final List<ActionData> actionDatas = new ArrayList<>(); + private final Set<Artifact> actionArts = new HashSet<>(); + private final Map<String, Artifact> actionNameToAction = new HashMap<>(100); private final boolean emailPOCs; private boolean dataIsValid = true; private final IAtsGoal toGoal; @@ -95,13 +95,13 @@ public class ExcelAtsActionArtifactExtractor { if (aData.title.equals("")) { rd.error("Row " + rowNum + "; Invalid Title"); } - Set<IAtsTeamDefinition> teamDefs = new HashSet<IAtsTeamDefinition>(); + Set<IAtsTeamDefinition> teamDefs = new HashSet<>(); if (aData.actionableItems.isEmpty()) { rd.error("Row " + rowNum + ": Must have at least one ActionableItem defined"); } else { for (String actionableItemName : aData.actionableItems) { try { - Collection<IAtsActionableItem> aias = new ArrayList<IAtsActionableItem>(); + Collection<IAtsActionableItem> aias = new ArrayList<>(); for (Artifact aiaArt : ArtifactQuery.getArtifactListFromTypeAndName(AtsArtifactTypes.ActionableItem, actionableItemName, AtsUtilCore.getAtsBranch())) { IAtsActionableItem ai = @@ -171,13 +171,13 @@ public class ExcelAtsActionArtifactExtractor { public void createArtifactsAndNotify(IAtsChangeSet changes) { AtsUtilClient.setEmailEnabled(false); - Set<TeamWorkFlowArtifact> teamWfs = new HashSet<TeamWorkFlowArtifact>(); + Set<TeamWorkFlowArtifact> teamWfs = new HashSet<>(); Date createdDate = new Date(); try { IAtsUser createdBy = AtsClientService.get().getUserService().getCurrentUser(); for (ActionData aData : actionDatas) { Artifact actionArt = actionNameToAction.get(aData.title); - Collection<TeamWorkFlowArtifact> newTeamArts = new HashSet<TeamWorkFlowArtifact>(); + Collection<TeamWorkFlowArtifact> newTeamArts = new HashSet<>(); if (actionArt == null) { actionArt = ActionManager.createAction(null, aData.title, aData.desc, ChangeType.getChangeType(aData.changeType), @@ -323,11 +323,11 @@ public class ExcelAtsActionArtifactExtractor { protected String title = ""; protected String desc = ""; protected String priorityStr = ""; - protected Set<String> userComms = new HashSet<String>(); + protected Set<String> userComms = new HashSet<>(); protected String changeType = ""; - protected Set<String> assigneeStrs = new HashSet<String>(); - protected List<IAtsUser> assignees = new LinkedList<IAtsUser>(); - protected Set<String> actionableItems = new HashSet<String>(); + protected Set<String> assigneeStrs = new HashSet<>(); + protected List<IAtsUser> assignees = new LinkedList<>(); + protected Set<String> actionableItems = new HashSet<>(); protected String version = ""; protected Double estimatedHours = null; } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsTaskArtifactExtractor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsTaskArtifactExtractor.java index df802c01226..d272a126977 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsTaskArtifactExtractor.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsTaskArtifactExtractor.java @@ -304,7 +304,7 @@ public class ExcelAtsTaskArtifactExtractor { } private void processAssignees(String[] row, TaskArtifact taskArt, int i) throws OseeCoreException { - Set<IAtsUser> assignees = new HashSet<IAtsUser>(); + Set<IAtsUser> assignees = new HashSet<>(); for (String userName : row[i].split(";")) { userName = userName.replaceAll("^\\s+", ""); userName = userName.replaceAll("\\+$", ""); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/LegacyPCRActions.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/LegacyPCRActions.java index 1bb22420dda..2ce0b5a4eb1 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/LegacyPCRActions.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/LegacyPCRActions.java @@ -34,7 +34,7 @@ public class LegacyPCRActions { public static Collection<TeamWorkFlowArtifact> getTeamsTeamWorkflowArtifacts(Collection<IAtsTeamDefinition> teamDefs) throws OseeCoreException { LegacyPCRActionsWorldSearchItem search = new LegacyPCRActionsWorldSearchItem(teamDefs, false); - Set<TeamWorkFlowArtifact> teamArts = new HashSet<TeamWorkFlowArtifact>(); + Set<TeamWorkFlowArtifact> teamArts = new HashSet<>(); for (Artifact art : search.performSearchGetResults()) { if (art.isOfType(AtsArtifactTypes.TeamWorkflow)) { teamArts.add((TeamWorkFlowArtifact) art); @@ -57,7 +57,7 @@ public class LegacyPCRActions { public static Collection<TeamWorkFlowArtifact> getTeamsTeamWorkflowArtifacts(Collection<String> pcrIds, Collection<IAtsTeamDefinition> teamDefs) throws OseeCoreException { LegacyPCRActionsWorldSearchItem search = new LegacyPCRActionsWorldSearchItem(pcrIds, teamDefs, false); - Set<TeamWorkFlowArtifact> teamArts = new HashSet<TeamWorkFlowArtifact>(); + Set<TeamWorkFlowArtifact> teamArts = new HashSet<>(); for (Artifact art : search.performSearchGetResults()) { if (art.isOfType(AtsArtifactTypes.TeamWorkflow)) { teamArts.add((TeamWorkFlowArtifact) art); @@ -72,7 +72,7 @@ public class LegacyPCRActions { public static Collection<ActionArtifact> getTeamsActionArtifacts(Collection<IAtsTeamDefinition> teamDefs) throws OseeCoreException { LegacyPCRActionsWorldSearchItem search = new LegacyPCRActionsWorldSearchItem(teamDefs, true); - Set<ActionArtifact> actArts = new HashSet<ActionArtifact>(); + Set<ActionArtifact> actArts = new HashSet<>(); for (Artifact art : search.performSearchGetResults()) { if (art.isOfType(AtsArtifactTypes.Action)) { actArts.add((ActionArtifact) art); @@ -87,7 +87,7 @@ public class LegacyPCRActions { public static Collection<Artifact> getTeamsActionArtifacts(Collection<String> pcrIds, Collection<IAtsTeamDefinition> teamDefs) throws OseeCoreException { LegacyPCRActionsWorldSearchItem search = new LegacyPCRActionsWorldSearchItem(pcrIds, teamDefs, true); - Set<Artifact> actArts = new HashSet<Artifact>(); + Set<Artifact> actArts = new HashSet<>(); for (Artifact art : search.performSearchGetResults()) { actArts.add(art); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java index 091d83b6945..44ca05ad513 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Overview.java @@ -229,7 +229,7 @@ public class Overview { startBorderTable(TABLE_WIDTH, false, "Team Workflows"); StringBuffer sb = new StringBuffer(AHTML.beginMultiColumnTable(100, 1)); sb.append(AHTML.addHeaderRowMultiColumnTable(new String[] {"Type", "State"}, new Integer[] {70, 150})); - ArrayList<CellItem> cells = new ArrayList<CellItem>(); + ArrayList<CellItem> cells = new ArrayList<>(); for (TeamWorkFlowArtifact team : teams) { cells.add(new AHTML.CellItem(Overview.getOpenHyperlinkHtml(team))); cells.add(new AHTML.CellItem(team.getStateMgr().getCurrentStateName())); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PrivilegedUserManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PrivilegedUserManager.java index 1d7163bd9c5..5f6f8cb2d62 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PrivilegedUserManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/PrivilegedUserManager.java @@ -32,7 +32,7 @@ import org.eclipse.osee.framework.logging.OseeLog; public class PrivilegedUserManager { public static Set<IAtsUser> getPrivilegedUsers(AbstractWorkflowArtifact workflow) throws OseeCoreException { - Set<IAtsUser> users = new HashSet<IAtsUser>(); + Set<IAtsUser> users = new HashSet<>(); if (workflow.getParentTeamWorkflow() != null) { users.addAll(getPrivilegedUsers(workflow.getParentTeamWorkflow())); } else { @@ -51,7 +51,7 @@ public class PrivilegedUserManager { } public static Set<IAtsUser> getPrivilegedUsers(TeamWorkFlowArtifact teamArt) { - Set<IAtsUser> users = new HashSet<IAtsUser>(); + Set<IAtsUser> users = new HashSet<>(); try { addPrivilegedUsersUpTeamDefinitionTree(teamArt.getTeamDefinition(), users); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/TeamBasedDefaultBranchProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/TeamBasedDefaultBranchProvider.java index 2044297e54d..1758aff85a2 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/TeamBasedDefaultBranchProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/TeamBasedDefaultBranchProvider.java @@ -35,12 +35,12 @@ public class TeamBasedDefaultBranchProvider implements IDefaultInitialBranchesPr public Collection<Branch> getDefaultInitialBranches() throws OseeCoreException { IAtsUser user = AtsClientService.get().getUserService().getCurrentUser(); try { - Collection<IAtsTeamDefinition> teams = new ArrayList<IAtsTeamDefinition>(); + Collection<IAtsTeamDefinition> teams = new ArrayList<>(); for (Artifact art : AtsClientService.get().getUserServiceClient().getOseeUser(user).getRelatedArtifacts( AtsRelationTypes.TeamMember_Team)) { teams.add(AtsClientService.get().getConfig().getSoleByUuid(art.getUuid(), IAtsTeamDefinition.class)); } - Collection<Branch> branches = new LinkedList<Branch>(); + Collection<Branch> branches = new LinkedList<>(); Branch branch; for (IAtsTeamDefinition team : teams) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/WorkflowMetrics.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/WorkflowMetrics.java index ca5a68db044..323f2235059 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/WorkflowMetrics.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/WorkflowMetrics.java @@ -52,18 +52,18 @@ public class WorkflowMetrics { long daysTillRel = 0; IAtsVersion version = null; String str = ""; - Set<TeamWorkFlowArtifact> teamArts = new HashSet<TeamWorkFlowArtifact>(); - Set<Artifact> actionArts = new HashSet<Artifact>(); - Set<TaskArtifact> taskArts = new HashSet<TaskArtifact>(); - Set<AbstractReviewArtifact> reviewArts = new HashSet<AbstractReviewArtifact>(); - Set<GoalArtifact> goalArts = new HashSet<GoalArtifact>(); - Set<AbstractWorkflowArtifact> awas = new HashSet<AbstractWorkflowArtifact>(); - Set<IAtsUser> assignees = new HashSet<IAtsUser>(); - Set<IAtsUser> assigneesAssignedOrCompleted = new HashSet<IAtsUser>(); - - private final HashCollection<IAtsUser, Artifact> userToAssignedSmas = new HashCollection<IAtsUser, Artifact>(true, + Set<TeamWorkFlowArtifact> teamArts = new HashSet<>(); + Set<Artifact> actionArts = new HashSet<>(); + Set<TaskArtifact> taskArts = new HashSet<>(); + Set<AbstractReviewArtifact> reviewArts = new HashSet<>(); + Set<GoalArtifact> goalArts = new HashSet<>(); + Set<AbstractWorkflowArtifact> awas = new HashSet<>(); + Set<IAtsUser> assignees = new HashSet<>(); + Set<IAtsUser> assigneesAssignedOrCompleted = new HashSet<>(); + + private final HashCollection<IAtsUser, Artifact> userToAssignedSmas = new HashCollection<>(true, HashSet.class, 100); - private final HashCollection<IAtsUser, Artifact> userToCompletedSmas = new HashCollection<IAtsUser, Artifact>(true, + private final HashCollection<IAtsUser, Artifact> userToCompletedSmas = new HashCollection<>(true, HashSet.class, 100); private final double manHoursPerDay; @@ -88,7 +88,7 @@ public class WorkflowMetrics { } if (art instanceof AbstractWorkflowArtifact) { awas.add((AbstractWorkflowArtifact) art); - Collection<IAtsUser> users = new HashSet<IAtsUser>(); + Collection<IAtsUser> users = new HashSet<>(); users.addAll(((AbstractWorkflowArtifact) art).getStateMgr().getAssignees()); assignees.addAll(users); assigneesAssignedOrCompleted.addAll(users); @@ -162,7 +162,7 @@ public class WorkflowMetrics { if (!userToCompletedSmas.containsKey(user)) { return Collections.emptyList(); } - List<A> awas = new ArrayList<A>(); + List<A> awas = new ArrayList<>(); for (Artifact art : userToCompletedSmas.getValues(user)) { if (clazz == null || art.getClass().isInstance(clazz)) { awas.add((A) art); @@ -176,7 +176,7 @@ public class WorkflowMetrics { if (!userToAssignedSmas.containsKey(user)) { return Collections.emptyList(); } - List<A> awas = new ArrayList<A>(); + List<A> awas = new ArrayList<>(); for (Artifact art : userToAssignedSmas.getValues(user)) { if (clazz == null || art.getClass().equals(clazz)) { awas.add((A) art); @@ -186,7 +186,7 @@ public class WorkflowMetrics { } public Collection<TeamWorkFlowArtifact> getCompletedTeamWorkflows() throws OseeCoreException { - Set<TeamWorkFlowArtifact> teams = new HashSet<TeamWorkFlowArtifact>(); + Set<TeamWorkFlowArtifact> teams = new HashSet<>(); for (TeamWorkFlowArtifact team : getTeamArts()) { if (team.isCompletedOrCancelled()) { teams.add(team); @@ -196,7 +196,7 @@ public class WorkflowMetrics { } public Collection<AbstractWorkflowArtifact> getCompletedWorkflows() throws OseeCoreException { - Set<AbstractWorkflowArtifact> completed = new HashSet<AbstractWorkflowArtifact>(); + Set<AbstractWorkflowArtifact> completed = new HashSet<>(); for (AbstractWorkflowArtifact awa : awas) { if (awa.isCompletedOrCancelled()) { completed.add(awa); @@ -228,7 +228,7 @@ public class WorkflowMetrics { } public Collection<TaskArtifact> getCompletedTaskWorkflows() throws OseeCoreException { - Set<TaskArtifact> tasks = new HashSet<TaskArtifact>(); + Set<TaskArtifact> tasks = new HashSet<>(); for (TaskArtifact team : getTaskArts()) { if (team.isCompletedOrCancelled()) { tasks.add(team); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/XVersionList.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/XVersionList.java index 53413b7a735..0a175b2461a 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/XVersionList.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/XVersionList.java @@ -39,7 +39,7 @@ public class XVersionList extends XListViewer { } public void setInputAtsObjects(Collection<? extends IAtsVersion> arts) { - ArrayList<Object> objs = new ArrayList<Object>(); + ArrayList<Object> objs = new ArrayList<>(); objs.addAll(arts); setInput(objs); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/ArtifactValidationRule.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/ArtifactValidationRule.java index 0d1b98fdd05..71950a7bf06 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/ArtifactValidationRule.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/ArtifactValidationRule.java @@ -35,7 +35,7 @@ public class ArtifactValidationRule extends AbstractValidationRule { @Override protected ValidationResult validate(Artifact artToValidate, IProgressMonitor monitor) throws OseeCoreException { - Collection<String> errorMessages = new ArrayList<String>(); + Collection<String> errorMessages = new ArrayList<>(); boolean validationPassed = true; IStatus status = OseeValidator.getInstance().validate(IOseeValidator.LONG, artToValidate); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/AttributeSetRule.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/AttributeSetRule.java index 57e31efd5f6..6c987976a0d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/AttributeSetRule.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/AttributeSetRule.java @@ -55,7 +55,7 @@ public final class AttributeSetRule extends AbstractValidationRule { @Override protected ValidationResult validate(Artifact artToValidate, IProgressMonitor monitor) throws OseeCoreException { - Collection<String> errorMessages = new ArrayList<String>(); + Collection<String> errorMessages = new ArrayList<>(); boolean validationPassed = true; if (hasArtifactType(artToValidate.getArtifactType())) { // validate attribute is set and not invalidValue diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/RelationSetRule.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/RelationSetRule.java index 53dec347349..8c3ad7f6f65 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/RelationSetRule.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/RelationSetRule.java @@ -51,7 +51,7 @@ public final class RelationSetRule extends AbstractValidationRule { @Override protected ValidationResult validate(Artifact artToValidate, IProgressMonitor monitor) throws OseeCoreException { - Collection<String> errorMessages = new ArrayList<String>(); + Collection<String> errorMessages = new ArrayList<>(); boolean validationPassed = true; ArtifactType type = artToValidate.getArtifactType(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/UniqueNameRule.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/UniqueNameRule.java index 355000fb9f4..2a4a8ef7675 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/UniqueNameRule.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/UniqueNameRule.java @@ -29,7 +29,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; public class UniqueNameRule extends AbstractValidationRule { private final IArtifactType artifactType; - private final Collection<GuidPair> guidPairs = new LinkedList<GuidPair>(); + private final Collection<GuidPair> guidPairs = new LinkedList<>(); public UniqueNameRule(IArtifactType artifactType) { this.artifactType = artifactType; @@ -45,7 +45,7 @@ public class UniqueNameRule extends AbstractValidationRule { @Override protected ValidationResult validate(Artifact artToValidate, IProgressMonitor monitor) throws OseeCoreException { - Collection<String> errorMessages = new ArrayList<String>(); + Collection<String> errorMessages = new ArrayList<>(); boolean validationPassed = true; if (hasArtifactType(artToValidate.getArtifactType())) { // validate that no other artifact of the given Artifact Type has the same name. diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/ValidationReportOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/ValidationReportOperation.java index 42bba898e9f..0b5e1b291da 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/ValidationReportOperation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/validate/ValidationReportOperation.java @@ -51,7 +51,7 @@ public class ValidationReportOperation extends AbstractOperation { protected void doWork(IProgressMonitor monitor) throws Exception { logf("<b>Validating Requirement Changes for %s</b>\n", teamArt.getName()); - List<AbstractValidationRule> rulesSorted = new ArrayList<AbstractValidationRule>(rules); + List<AbstractValidationRule> rulesSorted = new ArrayList<>(rules); Collections.sort(rulesSorted, new ValidationRuleComparator()); for (AbstractValidationRule rule : rulesSorted) { @@ -67,7 +67,7 @@ public class ValidationReportOperation extends AbstractOperation { double total = changedArtifacts.size() + rules.size(); if (total > 0) { - Collection<String> warnings = new ArrayList<String>(); + Collection<String> warnings = new ArrayList<>(); int workAmount = calculateWork(1 / total); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/AtsAttributeXWidgetProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/AtsAttributeXWidgetProvider.java index bb339694b25..0fdcbbfb3f1 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/AtsAttributeXWidgetProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/AtsAttributeXWidgetProvider.java @@ -28,7 +28,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.util.XWidgetRendererItem; */ public class AtsAttributeXWidgetProvider extends DefaultAttributeXWidgetProvider { - private static final Collection<IAttributeType> XFLAT_ATTRIBUTE_TYPES = new ArrayList<IAttributeType>(); + private static final Collection<IAttributeType> XFLAT_ATTRIBUTE_TYPES = new ArrayList<>(); static { XFLAT_ATTRIBUTE_TYPES.add(CoreAttributeTypes.WorkTransition); XFLAT_ATTRIBUTE_TYPES.add(CoreAttributeTypes.WorkData); @@ -39,7 +39,7 @@ public class AtsAttributeXWidgetProvider extends DefaultAttributeXWidgetProvider @Override public List<XWidgetRendererItem> getDynamicXWidgetLayoutData(IAttributeType attributeType) throws OseeCoreException { - List<XWidgetRendererItem> layouts = new ArrayList<XWidgetRendererItem>(); + List<XWidgetRendererItem> layouts = new ArrayList<>(); if (attributeType.equals(AtsAttributeTypes.BaselineBranchUuid)) { layouts = super.getDynamicXWidgetLayoutData(attributeType); XWidgetRendererItem layoutData = layouts.get(0); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XActionableItemCombo.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XActionableItemCombo.java index 38bbe9e5778..cf97aa969a0 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XActionableItemCombo.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XActionableItemCombo.java @@ -57,11 +57,11 @@ public class XActionableItemCombo extends XComboViewer { OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, "Error loading actionable items", ex); } - List<IAtsActionableItem> sortedAiArts = new ArrayList<IAtsActionableItem>(); + List<IAtsActionableItem> sortedAiArts = new ArrayList<>(); sortedAiArts.addAll(ais); Collections.sort(sortedAiArts, new ActionableItemSorter()); getComboViewer().setInput(sortedAiArts); - ArrayList<Object> defaultSelection = new ArrayList<Object>(); + ArrayList<Object> defaultSelection = new ArrayList<>(); defaultSelection.add("--select--"); setSelected(defaultSelection); addXModifiedListener(new XModifiedListener() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XAtsProgramComboWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XAtsProgramComboWidget.java index cd62dd538af..b01585f2d7a 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XAtsProgramComboWidget.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XAtsProgramComboWidget.java @@ -47,7 +47,7 @@ public class XAtsProgramComboWidget extends XComboViewer { } private static Collection<? extends IAtsProgramClient> getAllPrograms() throws OseeCoreException { - List<IAtsProgramClient> programs = new ArrayList<IAtsProgramClient>(); + List<IAtsProgramClient> programs = new ArrayList<>(); for (IAtsProgramManager manager : ProgramManagers.getAtsProgramManagers()) { programs.addAll(manager.getPrograms()); } @@ -63,7 +63,7 @@ public class XAtsProgramComboWidget extends XComboViewer { } public void reload(Collection<? extends IAtsProgramClient> lbaPrograms) { - Collection<Object> objs = new ArrayList<Object>(); + Collection<Object> objs = new ArrayList<>(); for (IAtsProgramClient proj : atsPrograms) { objs.add(proj); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XGoalCombo.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XGoalCombo.java index ed329ec379b..923cd0fe233 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XGoalCombo.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XGoalCombo.java @@ -47,13 +47,13 @@ public class XGoalCombo extends XComboViewer { try { Collection<Artifact> goalArtifacts = new GoalSearchItem("", new ArrayList<IAtsTeamDefinition>(), false, null).performSearchGetResults(); - List<IAtsGoal> sortedGoals = new ArrayList<IAtsGoal>(); + List<IAtsGoal> sortedGoals = new ArrayList<>(); for (Artifact goalArt : goalArtifacts) { sortedGoals.add((IAtsGoal) goalArt); } Collections.sort(sortedGoals, new GoalSorter()); getComboViewer().setInput(sortedGoals); - ArrayList<Object> defaultSelection = new ArrayList<Object>(); + ArrayList<Object> defaultSelection = new ArrayList<>(); defaultSelection.add("--select--"); setSelected(defaultSelection); addXModifiedListener(new XModifiedListener() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XHyperlabelActionableItemSelection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XHyperlabelActionableItemSelection.java index 3f2508e4f26..ca658fbe11b 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XHyperlabelActionableItemSelection.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XHyperlabelActionableItemSelection.java @@ -30,7 +30,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.XHyperlinkLabelCmdValueSelec public class XHyperlabelActionableItemSelection extends XHyperlinkLabelCmdValueSelection { public static final String WIDGET_ID = XHyperlabelActionableItemSelection.class.getSimpleName(); - Collection<IAtsActionableItem> selectedAis = new HashSet<IAtsActionableItem>(); + Collection<IAtsActionableItem> selectedAis = new HashSet<>(); Collection<IAtsActionableItem> teamDefs; ActionableItemTreeWithChildrenDialog dialog = null; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XHyperlabelTeamDefinitionSelection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XHyperlabelTeamDefinitionSelection.java index d39c77e4947..4923d05f420 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XHyperlabelTeamDefinitionSelection.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XHyperlabelTeamDefinitionSelection.java @@ -30,7 +30,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.XHyperlinkLabelCmdValueSelec public class XHyperlabelTeamDefinitionSelection extends XHyperlinkLabelCmdValueSelection { public static final String WIDGET_ID = XHyperlabelTeamDefinitionSelection.class.getSimpleName(); - Collection<IAtsTeamDefinition> selectedTeamDefs = new HashSet<IAtsTeamDefinition>(); + Collection<IAtsTeamDefinition> selectedTeamDefs = new HashSet<>(); Collection<IAtsTeamDefinition> teamDefs; TeamDefinitionTreeWithChildrenDialog dialog = null; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateCombo.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateCombo.java index dbfbb5c59af..77ccbcb65cd 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateCombo.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateCombo.java @@ -39,7 +39,7 @@ public class XStateCombo extends XComboDam { } private String[] getStateNames() { - List<String> validStates = new ArrayList<String>(); + List<String> validStates = new ArrayList<>(); try { IAtsWorkDefinition workDef = null; if (getArtifact() instanceof AbstractWorkflowArtifact && ((AbstractWorkflowArtifact) getArtifact()).getParentTeamWorkflow() != null) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateSearchCombo.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateSearchCombo.java index 948e8668b26..765988ec30a 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateSearchCombo.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XStateSearchCombo.java @@ -27,7 +27,7 @@ import org.eclipse.swt.widgets.Composite; * @author Donald G. Dunne */ public class XStateSearchCombo extends XComboViewer { - protected static List<String> validStates = new ArrayList<String>(); + protected static List<String> validStates = new ArrayList<>(); public static final String WIDGET_ID = XStateSearchCombo.class.getSimpleName(); private String selectedState = null; @@ -49,7 +49,7 @@ public class XStateSearchCombo extends XComboViewer { super.createControls(parent, horizontalSpan); getComboViewer().setInput(validStates); - ArrayList<Object> defaultSelection = new ArrayList<Object>(); + ArrayList<Object> defaultSelection = new ArrayList<>(); defaultSelection.add("--select--"); setSelected(defaultSelection); addXModifiedListener(new XModifiedListener() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XTeamDefinitionCombo.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XTeamDefinitionCombo.java index abdf982d8df..ae728230338 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XTeamDefinitionCombo.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XTeamDefinitionCombo.java @@ -52,11 +52,11 @@ public class XTeamDefinitionCombo extends XComboViewer { OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, "Error loading team definitions", ex); } - List<IAtsTeamDefinition> sortedTeamDefs = new ArrayList<IAtsTeamDefinition>(); + List<IAtsTeamDefinition> sortedTeamDefs = new ArrayList<>(); sortedTeamDefs.addAll(teamDefs); Collections.sort(sortedTeamDefs, new TeamDefinitionSorter()); getComboViewer().setInput(sortedTeamDefs); - ArrayList<Object> defaultSelection = new ArrayList<Object>(); + ArrayList<Object> defaultSelection = new ArrayList<>(); defaultSelection.add("--select--"); setSelected(defaultSelection); addXModifiedListener(new XModifiedListener() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchDeleteMerge.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchDeleteMerge.java index dad3c175bee..61560a9a426 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchDeleteMerge.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchDeleteMerge.java @@ -50,12 +50,12 @@ public class XWorkingBranchDeleteMerge extends XWorkingBranchButtonAbstract { try { Branch workingBranch = getTeamArt().getWorkingBranch(); if (isWorkingBranchCommitWithMergeInProgress()) { - List<Branch> selectedBranches = new ArrayList<Branch>(); + List<Branch> selectedBranches = new ArrayList<>(); Collection<IOseeBranch> branchesAlreadyCommitted = AtsClientService.get().getBranchService().getBranchesCommittedTo(getTeamArt()); List<MergeBranch> mergeBranches = BranchManager.getMergeBranches(workingBranch); - Set<Branch> destinationMinusAlreadyCommitted = new HashSet<Branch>(); + Set<Branch> destinationMinusAlreadyCommitted = new HashSet<>(); // Remove all the Merge branches having to do with a Destination branch that's already been committed, can't delete these merge branches for (MergeBranch branch : mergeBranches) { if (!branchesAlreadyCommitted.contains(branch.getDestinationBranch())) { @@ -101,7 +101,7 @@ public class XWorkingBranchDeleteMerge extends XWorkingBranchButtonAbstract { List<MergeBranch> mergeBranches = BranchManager.getMergeBranches(getWorkingBranch()); Collection<IOseeBranch> committedBranches = AtsClientService.get().getBranchService().getBranchesCommittedTo(getTeamArt()); - List<MergeBranch> remainingMergeBranches = new ArrayList<MergeBranch>(); + List<MergeBranch> remainingMergeBranches = new ArrayList<>(); for (MergeBranch mergeBranch : mergeBranches) { if (!committedBranches.contains(mergeBranch.getDestinationBranch())) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/CommitXManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/CommitXManager.java index 1ab5d4008b3..f92da32dc5b 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/CommitXManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/CommitXManager.java @@ -63,7 +63,7 @@ public class CommitXManager extends XViewer { } public List<Object> getSelectedArtifacts() { - List<Object> arts = new ArrayList<Object>(); + List<Object> arts = new ArrayList<>(); TreeItem items[] = getTree().getSelection(); if (items.length > 0) { for (TreeItem item : items) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitManager.java index c7f0f9dacc0..08938a66eeb 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitManager.java @@ -158,12 +158,12 @@ public class XCommitManager extends GenericXWidget implements IArtifactWidget, I } try { // commit all branches in order - Map<Long, Branch> branchUuidToBranchMap = new HashMap<Long, Branch>(); + Map<Long, Branch> branchUuidToBranchMap = new HashMap<>(); for (IOseeBranch destinationBranch : AtsClientService.get().getBranchService().getBranchesLeftToCommit( teamArt)) { branchUuidToBranchMap.put(destinationBranch.getUuid(), (Branch) destinationBranch); } - List<Long> branchUuids = new ArrayList<Long>(); + List<Long> branchUuids = new ArrayList<>(); branchUuids.addAll(branchUuidToBranchMap.keySet()); Arrays.sort(branchUuids.toArray(new Integer[branchUuids.size()])); for (Long branchUuid : branchUuids) { @@ -273,7 +273,7 @@ public class XCommitManager extends GenericXWidget implements IArtifactWidget, I @SuppressWarnings("rawtypes") public List<Branch> getSelectedBranches() { - List<Branch> items = new ArrayList<Branch>(); + List<Branch> items = new ArrayList<>(); if (xCommitManager == null) { return items; } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/DefectContentProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/DefectContentProvider.java index 52442dd52aa..57ff4a94272 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/DefectContentProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/DefectContentProvider.java @@ -24,7 +24,7 @@ import org.eclipse.osee.framework.ui.swt.Displays; */ public class DefectContentProvider implements ITreeContentProvider { - protected Collection<ReviewDefectItem> rootSet = new HashSet<ReviewDefectItem>(); + protected Collection<ReviewDefectItem> rootSet = new HashSet<>(); private final DefectXViewer xViewer; public DefectContentProvider(DefectXViewer WorldXViewer) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/DefectXViewer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/DefectXViewer.java index 8e43230e535..4f372b9ad60 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/DefectXViewer.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/DefectXViewer.java @@ -269,7 +269,7 @@ public class DefectXViewer extends XViewer { } public List<ReviewDefectItem> getSelectedDefectItems() { - List<ReviewDefectItem> arts = new ArrayList<ReviewDefectItem>(); + List<ReviewDefectItem> arts = new ArrayList<>(); TreeItem items[] = getTree().getSelection(); if (items.length > 0) { for (TreeItem item : items) { @@ -284,7 +284,7 @@ public class DefectXViewer extends XViewer { if (!xDefectViewer.isEditable()) { return; } - ArrayList<ReviewDefectItem> defectItems = new ArrayList<ReviewDefectItem>(); + ArrayList<ReviewDefectItem> defectItems = new ArrayList<>(); for (TreeItem item : treeItems) { defectItems.add((ReviewDefectItem) item.getData()); } @@ -312,7 +312,7 @@ public class DefectXViewer extends XViewer { try { XViewerColumn xCol = (XViewerColumn) treeColumn.getData(); ReviewDefectItem defectItem = (ReviewDefectItem) treeItem.getData(); - List<ReviewDefectItem> defectItems = new ArrayList<ReviewDefectItem>(); + List<ReviewDefectItem> defectItems = new ArrayList<>(); defectItems.add(defectItem); if (xCol.equals(DefectXViewerFactory.Severity_Col) || xCol.equals(DefectXViewerFactory.Disposition_Col) || xCol.equals(DefectXViewerFactory.Created_Date_Col) || xCol.equals(DefectXViewerFactory.Closed_Col) || xCol.equals(DefectXViewerFactory.Description_Col) || xCol.equals(DefectXViewerFactory.Resolution_Col) || xCol.equals(DefectXViewerFactory.Location_Col) || xCol.equals(DefectXViewerFactory.User_Col) || xCol.equals(DefectXViewerFactory.Injection_Activity_Col)) { return promptChangeData(xCol, defectItems, false); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/XDefectViewer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/XDefectViewer.java index b8bdece0413..9cc58290d28 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/XDefectViewer.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/defect/XDefectViewer.java @@ -92,7 +92,7 @@ public class XDefectViewer extends GenericXWidget implements IArtifactWidget, IA private Composite parentComposite; private ToolBar toolBar; private ReviewDefectManager defectManager; - private static Map<PeerToPeerReviewArtifact, Integer> tableHeight = new HashMap<PeerToPeerReviewArtifact, Integer>(); + private static Map<PeerToPeerReviewArtifact, Integer> tableHeight = new HashMap<>(); public XDefectViewer() { super("Defects"); @@ -412,7 +412,7 @@ public class XDefectViewer extends GenericXWidget implements IArtifactWidget, IA @SuppressWarnings("rawtypes") public List<ReviewDefectItem> getSelectedDefectItems() { - List<ReviewDefectItem> items = new ArrayList<ReviewDefectItem>(); + List<ReviewDefectItem> items = new ArrayList<>(); if (xViewer == null) { return items; } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemListDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemListDialog.java index 8be1b247ed8..338c5306411 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemListDialog.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemListDialog.java @@ -39,7 +39,7 @@ public class ActionableItemListDialog extends FilteredCheckboxTreeDialog { } public Set<IAtsActionableItem> getSelected() { - Set<IAtsActionableItem> selectedactionItems = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> selectedactionItems = new HashSet<>(); for (Object obj : getResult()) { selectedactionItems.add((IAtsActionableItem) obj); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemTreeWithChildrenDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemTreeWithChildrenDialog.java index da7ab5d5d7d..a8443fe6d7d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemTreeWithChildrenDialog.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/ActionableItemTreeWithChildrenDialog.java @@ -54,7 +54,7 @@ public class ActionableItemTreeWithChildrenDialog extends FilteredCheckboxTreeDi * @return selected AIs and children if recurseChildren was checked */ public Collection<IAtsActionableItem> getResultAndRecursedAIs() throws OseeCoreException { - Set<IAtsActionableItem> aias = new HashSet<IAtsActionableItem>(10); + Set<IAtsActionableItem> aias = new HashSet<>(10); for (Object obj : getResult()) { IAtsActionableItem ai = (IAtsActionableItem) obj; aias.add(ai); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamDefinitionTreeWithChildrenDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamDefinitionTreeWithChildrenDialog.java index f1d2252ee01..60833cdf3d5 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamDefinitionTreeWithChildrenDialog.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamDefinitionTreeWithChildrenDialog.java @@ -53,7 +53,7 @@ public class TeamDefinitionTreeWithChildrenDialog extends FilteredCheckboxTreeDi * @return selected team defs and children if recurseChildren was checked */ public Collection<IAtsTeamDefinition> getResultAndRecursedTeamDefs() throws OseeCoreException { - Set<IAtsTeamDefinition> teamDefs = new HashSet<IAtsTeamDefinition>(10); + Set<IAtsTeamDefinition> teamDefs = new HashSet<>(10); for (Object obj : getResult()) { teamDefs.add((IAtsTeamDefinition) obj); if (recurseChildren) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamVersionListDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamVersionListDialog.java index b44e509bd80..fe2a7a6d113 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamVersionListDialog.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/TeamVersionListDialog.java @@ -65,7 +65,7 @@ public class TeamVersionListDialog extends SelectionDialog { @Override protected Control createDialogArea(Composite container) { - ArrayList<Object> objs = new ArrayList<Object>(); + ArrayList<Object> objs = new ArrayList<>(); try { for (IAtsTeamDefinition art : TeamDefinitions.getTeamReleaseableDefinitions(active, AtsClientService.get().getConfig())) { @@ -95,7 +95,7 @@ public class TeamVersionListDialog extends SelectionDialog { @Override public void widgetSelected(SelectionEvent e) { - ArrayList<Object> objs = new ArrayList<Object>(); + ArrayList<Object> objs = new ArrayList<>(); try { selectedTeamDef = (IAtsTeamDefinition) teamCombo.getSelected(); for (IAtsVersion pda : selectedTeamDef.getVersions(VersionReleaseType.Both, VersionLockedType.Both)) { @@ -129,7 +129,7 @@ public class TeamVersionListDialog extends SelectionDialog { }; }); if (teamDef != null) { - objs = new ArrayList<Object>(); + objs = new ArrayList<>(); try { for (IAtsVersion pda : teamDef.getVersions(VersionReleaseType.Both, VersionLockedType.Both)) { objs.add(pda); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/VersionListDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/VersionListDialog.java index d0c7f4fa515..ae5796c7ec3 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/VersionListDialog.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/dialog/VersionListDialog.java @@ -80,7 +80,7 @@ public class VersionListDialog extends FilteredTreeDialog { public Object[] getElements(Object inputElement) { if (inputElement instanceof Collection) { Collection list = (Collection) inputElement; - Collection<Object> verArts = new LinkedList<Object>(); + Collection<Object> verArts = new LinkedList<>(); for (Object obj : list.toArray(new IAtsVersion[list.size()])) { IAtsVersion verArt = (IAtsVersion) obj; if (showReleased || (!showReleased && !verArt.isReleased())) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleContentProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleContentProvider.java index 2b01c17f449..091bde2aee4 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleContentProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleContentProvider.java @@ -24,7 +24,7 @@ import org.eclipse.osee.framework.ui.swt.Displays; */ public class UserRoleContentProvider implements ITreeContentProvider { - protected Collection<UserRole> rootSet = new HashSet<UserRole>(); + protected Collection<UserRole> rootSet = new HashSet<>(); private final UserRoleXViewer xViewer; public UserRoleContentProvider(UserRoleXViewer WorldXViewer) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleXViewer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleXViewer.java index 8a704d8f488..85c21d02cb0 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleXViewer.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/UserRoleXViewer.java @@ -119,7 +119,7 @@ public class UserRoleXViewer extends XViewer { } public List<UserRole> getSelectedUserRoleItems() { - List<UserRole> arts = new ArrayList<UserRole>(); + List<UserRole> arts = new ArrayList<>(); TreeItem items[] = getTree().getSelection(); if (items.length > 0) { for (TreeItem item : items) { @@ -134,7 +134,7 @@ public class UserRoleXViewer extends XViewer { if (!xUserRoleViewer.isEditable()) { return; } - ArrayList<UserRole> userRoles = new ArrayList<UserRole>(); + ArrayList<UserRole> userRoles = new ArrayList<>(); for (TreeItem item : treeItems) { userRoles.add((UserRole) item.getData()); } @@ -160,7 +160,7 @@ public class UserRoleXViewer extends XViewer { // treeItem); XViewerColumn aCol = (XViewerColumn) treeColumn.getData(); UserRole userRole = (UserRole) treeItem.getData(); - List<UserRole> userRoles = new ArrayList<UserRole>(); + List<UserRole> userRoles = new ArrayList<>(); userRoles.add(userRole); if (aCol.equals(UserRoleXViewerFactory.Completed_Col) || aCol.equals(UserRoleXViewerFactory.Hours_Spent_Col) || aCol.equals(UserRoleXViewerFactory.Num_Minor_Col) || aCol.equals(UserRoleXViewerFactory.Num_Major_Col) || aCol.equals(UserRoleXViewerFactory.Num_Issues_Col) || aCol.equals(UserRoleXViewerFactory.User_Col) || aCol.equals(UserRoleXViewerFactory.Role_Col)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/XUserRoleViewer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/XUserRoleViewer.java index 73f713d1ed9..e34df50c362 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/XUserRoleViewer.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/role/XUserRoleViewer.java @@ -90,7 +90,7 @@ public class XUserRoleViewer extends GenericXWidget implements IArtifactWidget, private ToolBar toolBar; private UserRoleManager roleMgr; - private static Map<PeerToPeerReviewArtifact, Integer> tableHeight = new HashMap<PeerToPeerReviewArtifact, Integer>(); + private static Map<PeerToPeerReviewArtifact, Integer> tableHeight = new HashMap<>(); public XUserRoleViewer() { super("Roles"); @@ -353,7 +353,7 @@ public class XUserRoleViewer extends GenericXWidget implements IArtifactWidget, @SuppressWarnings("rawtypes") public List<UserRole> getSelectedUserRoleItems() { - List<UserRole> items = new ArrayList<UserRole>(); + List<UserRole> items = new ArrayList<>(); if (xViewer == null) { return items; } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerAtsAttributeValueColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerAtsAttributeValueColumn.java index 35f8ab2db27..5ebd726ebd4 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerAtsAttributeValueColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerAtsAttributeValueColumn.java @@ -96,7 +96,7 @@ public class XViewerAtsAttributeValueColumn extends XViewerAtsAttributeColumn im return ((AbstractWorkflowArtifact) element).getAttributesToStringUnique(getAttributeType(), ";"); } if (Artifacts.isOfType(element, AtsArtifactTypes.Action)) { - Set<String> strs = new LinkedHashSet<String>(); + Set<String> strs = new LinkedHashSet<>(); for (TeamWorkFlowArtifact team : ActionManager.getTeams(element)) { String str = getColumnText(team, column, columnIndex); if (Strings.isValid(str)) { @@ -126,7 +126,7 @@ public class XViewerAtsAttributeValueColumn extends XViewerAtsAttributeColumn im @Override public void handleColumnMultiEdit(TreeColumn treeColumn, Collection<TreeItem> treeItems) { - Set<AbstractWorkflowArtifact> awas = new LinkedHashSet<AbstractWorkflowArtifact>(); + Set<AbstractWorkflowArtifact> awas = new LinkedHashSet<>(); for (TreeItem item : treeItems) { Artifact art = (Artifact) item.getData(); try { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerAtsColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerAtsColumn.java index b74a9389a4e..215b7e590fc 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerAtsColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerAtsColumn.java @@ -166,8 +166,8 @@ public abstract class XViewerAtsColumn extends XViewerColumn { colorColumn = AtsClientService.getConfigEndpoint().get().getColorColumns().getColumnById(getId()); hasColorColumn = colorColumn != null; if (hasColorColumn) { - elementToForegroundColor = new HashMap<Object, String>(100); - elementToBackgroundColor = new HashMap<Object, String>(100); + elementToForegroundColor = new HashMap<>(100); + elementToBackgroundColor = new HashMap<>(100); hexColorToColor = new HashMap<>(25); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/CreateNewVersionItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/CreateNewVersionItem.java index 3669329f7a4..c4048b0ae98 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/CreateNewVersionItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/CreateNewVersionItem.java @@ -79,7 +79,7 @@ public class CreateNewVersionItem extends XNavigateItemAction { MessageDialog.QUESTION, new String[] {"OK", "Cancel"}, 0); ed.setFillVertically(true); if (ed.open() == 0) { - Set<String> newVersionNames = new HashSet<String>(); + Set<String> newVersionNames = new HashSet<>(); for (String str : ed.getEntry().split(System.getProperty("line.separator"))) { newVersionNames.add(str); } @@ -107,7 +107,7 @@ public class CreateNewVersionItem extends XNavigateItemAction { } public static Collection<IAtsVersion> createVersions(XResultData resultData, IAtsChangeSet changes, IAtsTeamDefinition teamDefHoldingVersions, Collection<String> newVersionNames) { - List<IAtsVersion> versions = new ArrayList<IAtsVersion>(); + List<IAtsVersion> versions = new ArrayList<>(); for (String newVer : newVersionNames) { if (!Strings.isValid(newVer)) { resultData.error("Version name can't be blank"); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/VersionMetrics.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/VersionMetrics.java index b135c9130cb..e1ae1c75691 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/VersionMetrics.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/VersionMetrics.java @@ -98,7 +98,7 @@ public class VersionMetrics { public Collection<TeamWorkFlowArtifact> getTeamWorkFlows(ChangeType... changeType) throws OseeCoreException { List<ChangeType> changeTypes = Arrays.asList(changeType); - Set<TeamWorkFlowArtifact> teams = new HashSet<TeamWorkFlowArtifact>(); + Set<TeamWorkFlowArtifact> teams = new HashSet<>(); for (IAtsTeamWorkflow team : AtsClientService.get().getVersionService().getTargetedForTeamWorkflows(verArt)) { TeamWorkFlowArtifact teamArt = (TeamWorkFlowArtifact) team.getStoreObject(); if (changeTypes.contains(ChangeTypeUtil.getChangeType(teamArt))) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/VersionReportJob.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/VersionReportJob.java index 7ec71610a38..d8949a115c6 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/VersionReportJob.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/VersionReportJob.java @@ -79,7 +79,7 @@ public class VersionReportJob extends Job { public static String getFullReleaseReport(IAtsTeamDefinition teamDef, IProgressMonitor monitor) throws OseeCoreException { // Sort by release date and estimated release date - Map<String, IAtsVersion> dateToVerArt = new HashMap<String, IAtsVersion>(); + Map<String, IAtsVersion> dateToVerArt = new HashMap<>(); for (IAtsVersion verArt : teamDef.getVersions()) { Date estRelDate = verArt.getEstimatedReleaseDate(); Date relDate = verArt.getReleaseDate(); @@ -153,7 +153,7 @@ public class VersionReportJob extends Job { sb.append(AHTML.beginMultiColumnTable(100, 1, backgroundColor)); sb.append(AHTML.addHeaderRowMultiColumnTable(new String[] {"Type", "Team", "Priority", "Change", "Title", "ID"})); int x = 1; - Set<IAtsTeamDefinition> teamDefs = new HashSet<IAtsTeamDefinition>(); + Set<IAtsTeamDefinition> teamDefs = new HashSet<>(); for (TeamWorkFlowArtifact team : teamArts) { teamDefs.add(team.getTeamDefinition()); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/VersionTeamMetrics.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/VersionTeamMetrics.java index c763f27c64c..b281dd6e0a7 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/VersionTeamMetrics.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/version/VersionTeamMetrics.java @@ -36,9 +36,9 @@ import org.eclipse.osee.framework.skynet.core.relation.RelationManager; public class VersionTeamMetrics { private final IAtsTeamDefinition verTeamDef; - private final List<VersionMetrics> releasedOrderedVersions = new ArrayList<VersionMetrics>(); - private final Set<VersionMetrics> verMets = new HashSet<VersionMetrics>(); - Map<Date, VersionMetrics> relDateToVerMet = new HashMap<Date, VersionMetrics>(); + private final List<VersionMetrics> releasedOrderedVersions = new ArrayList<>(); + private final Set<VersionMetrics> verMets = new HashSet<>(); + Map<Date, VersionMetrics> relDateToVerMet = new HashMap<>(); public VersionTeamMetrics(IAtsTeamDefinition verTeamDef) throws OseeCoreException { this.verTeamDef = verTeamDef; @@ -61,7 +61,7 @@ public class VersionTeamMetrics { public Collection<TeamWorkFlowArtifact> getWorkflowsOriginatedBetween(Date startDate, Date endDate) throws OseeCoreException { if (teamWorkflowToOrigDate == null) { - teamWorkflowToOrigDate = new HashMap<TeamWorkFlowArtifact, Date>(); + teamWorkflowToOrigDate = new HashMap<>(); for (IAtsVersion verArt : verTeamDef.getVersions()) { for (IAtsTeamWorkflow team : AtsClientService.get().getVersionService().getTargetedForTeamWorkflows(verArt)) { Date origDate = team.getCreatedDate(); @@ -69,7 +69,7 @@ public class VersionTeamMetrics { } } } - Set<TeamWorkFlowArtifact> teams = new HashSet<TeamWorkFlowArtifact>(); + Set<TeamWorkFlowArtifact> teams = new HashSet<>(); for (Entry<TeamWorkFlowArtifact, Date> entry : teamWorkflowToOrigDate.entrySet()) { if (entry.getValue() != null && entry.getValue().after(startDate) && entry.getValue().before(endDate)) { teams.add(entry.getKey()); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/ActionWalkerContentProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/ActionWalkerContentProvider.java index 02cff9ba8a4..9ee49804e87 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/ActionWalkerContentProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/ActionWalkerContentProvider.java @@ -28,7 +28,7 @@ import org.eclipse.zest.core.viewers.IGraphEntityContentProvider; * @author Donald G. Dunne */ public class ActionWalkerContentProvider implements IGraphEntityContentProvider { - // private static final Collection<Artifact>EMPTY_LIST = new ArrayList<Artifact>(0); + // private static final Collection<Artifact>EMPTY_LIST = new ArrayList<>(0); private final ActionWalkerView view; @@ -43,7 +43,7 @@ public class ActionWalkerContentProvider implements IGraphEntityContentProvider @Override public Object[] getElements(Object entity) { - List<Object> objs = new ArrayList<Object>(5); + List<Object> objs = new ArrayList<>(5); try { if (!isTopArtifactGoal() && entity instanceof ActionArtifact) { objs.add(entity); @@ -90,7 +90,7 @@ public class ActionWalkerContentProvider implements IGraphEntityContentProvider if (!isTopArtifactGoal() && inputElement instanceof ActionArtifact) { return ((ActionArtifact) inputElement).getTeams().toArray(); } else if (inputElement instanceof TeamWorkFlowArtifact) { - List<Object> objs = new ArrayList<Object>(5); + List<Object> objs = new ArrayList<>(5); if (!isTopArtifactGoal()) { TeamWorkFlowArtifact teamArt = (TeamWorkFlowArtifact) inputElement; if (!view.isShowAll() && ReviewManager.getReviews(teamArt).size() > 4) { @@ -114,7 +114,7 @@ public class ActionWalkerContentProvider implements IGraphEntityContentProvider } return objs.toArray(); } else if (inputElement instanceof GoalArtifact) { - List<Object> objs = new ArrayList<Object>(5); + List<Object> objs = new ArrayList<>(5); GoalArtifact goal = (GoalArtifact) inputElement; if (!view.isShowAll() && goal.getMembers().size() > 10) { objs.add(new GoalMemberWrapper(goal)); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/WalkerLayoutManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/WalkerLayoutManager.java index bde9708ff34..6eaafd311cc 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/WalkerLayoutManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/WalkerLayoutManager.java @@ -30,7 +30,7 @@ public class WalkerLayoutManager { private HashMap<String, AbstractLayoutAlgorithm> layouts; private static final String RADIAL_RIGHT_LAYOUT = "Radial - Right"; private static final String RADIAL_DOWN_LAYOUT = "Radial - Down"; - private final List<String> layoutNames = new ArrayList<String>(); + private final List<String> layoutNames = new ArrayList<>(); private final ActionWalkerView view; private static final String defaultLayout = RADIAL_DOWN_LAYOUT; private String currentLayout = defaultLayout; @@ -65,7 +65,7 @@ public class WalkerLayoutManager { public void ensureLoaded() { if (layouts == null) { - layouts = new HashMap<String, AbstractLayoutAlgorithm>(); + layouts = new HashMap<>(); RadialLayoutAlgorithm radLayout = new RadialLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING); radLayout.setRangeToLayout(0, 180 * Math.PI / 360); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/AtsWorkDefinitionSheetProviders.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/AtsWorkDefinitionSheetProviders.java index 416932cd1fe..d8921d05c13 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/AtsWorkDefinitionSheetProviders.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/AtsWorkDefinitionSheetProviders.java @@ -68,7 +68,7 @@ public final class AtsWorkDefinitionSheetProviders { changes.add(folder); } List<WorkDefinitionSheet> sheets = getWorkDefinitionSheets(); - Set<String> stateNames = new HashSet<String>(); + Set<String> stateNames = new HashSet<>(); importWorkDefinitionSheets(resultData, changes, folder, sheets, stateNames); createStateNameArtifact(stateNames, folder, changes); importTeamsAndAis(resultData, changes, folder, sheets); @@ -80,7 +80,7 @@ public final class AtsWorkDefinitionSheetProviders { */ public synchronized static Collection<? extends String> getAllValidStateNames() { if (allValidStateNames == null) { - allValidStateNames = new ArrayList<String>(); + allValidStateNames = new ArrayList<>(); try { Artifact artifact = null; try { @@ -115,7 +115,7 @@ public final class AtsWorkDefinitionSheetProviders { ArtifactQuery.getArtifactFromToken(org.eclipse.osee.ats.api.data.AtsArtifactToken.WorkDef_State_Names, AtsUtilCore.getAtsBranch()); Collection<? extends String> currentStateNames = getAllValidStateNames(); - Set<String> newStateNames = new HashSet<String>(); + Set<String> newStateNames = new HashSet<>(); newStateNames.addAll(currentStateNames); for (String name : stateNames) { if (!currentStateNames.contains(name)) { @@ -176,7 +176,7 @@ public final class AtsWorkDefinitionSheetProviders { } public static List<WorkDefinitionSheet> getWorkDefinitionSheets() { - List<WorkDefinitionSheet> sheets = new ArrayList<WorkDefinitionSheet>(); + List<WorkDefinitionSheet> sheets = new ArrayList<>(); sheets.add(new WorkDefinitionSheet(WORK_DEF_TEAM_DEFAULT, getSupportFile(Activator.PLUGIN_ID, "support/WorkDef_Team_Default.ats"))); sheets.add(new WorkDefinitionSheet("WorkDef_Task_Default", getSupportFile(Activator.PLUGIN_ID, @@ -214,7 +214,7 @@ public final class AtsWorkDefinitionSheetProviders { if (teamWorkflowExtensionItems != null) { return teamWorkflowExtensionItems; } - teamWorkflowExtensionItems = new HashSet<IAtsWorkDefinitionSheetProvider>(); + teamWorkflowExtensionItems = new HashSet<>(); IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.osee.ats.AtsWorkDefinitionSheetProvider"); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/StateXWidgetPage.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/StateXWidgetPage.java index 3255206ab5a..4a2f8b29248 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/StateXWidgetPage.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/StateXWidgetPage.java @@ -70,7 +70,7 @@ import org.w3c.dom.Element; */ public class StateXWidgetPage implements IDynamicWidgetLayoutListener, IStateToken { - private static final Pair<IStatus, XWidget> OK_PAIR = new Pair<IStatus, XWidget>(Status.OK_STATUS, null); + private static final Pair<IStatus, XWidget> OK_PAIR = new Pair<>(Status.OK_STATUS, null); protected SwtXWidgetRenderer dynamicXWidgetLayout; protected final IAtsStateDefinition stateDefinition; protected final IAtsWorkDefinition workDefinition; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java index 2e6227ea3d9..848cb5ab20e 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportAIsAndTeamDefinitionsToDb.java @@ -64,11 +64,11 @@ public class ImportAIsAndTeamDefinitionsToDb { private final AtsDsl atsDsl; private final IAtsChangeSet changes; - private final Map<String, Artifact> newTeams = new HashMap<String, Artifact>(); - private final Map<String, Artifact> newAIs = new HashMap<String, Artifact>(); - private final Map<String, Artifact> newVersions = new HashMap<String, Artifact>(); + private final Map<String, Artifact> newTeams = new HashMap<>(); + private final Map<String, Artifact> newAIs = new HashMap<>(); + private final Map<String, Artifact> newVersions = new HashMap<>(); private final String modelName; - private final Map<String, Artifact> teamNameToTeamDefArt = new HashMap<String, Artifact>(); + private final Map<String, Artifact> teamNameToTeamDefArt = new HashMap<>(); public ImportAIsAndTeamDefinitionsToDb(String modelName, AtsDsl atsDsl, IAtsChangeSet changes) { this.modelName = modelName; @@ -179,7 +179,7 @@ public class ImportAIsAndTeamDefinitionsToDb { } private Set<Artifact> getUsers(EList<UserRef> userRefs) throws OseeCoreException { - Set<Artifact> users = new HashSet<Artifact>(); + Set<Artifact> users = new HashSet<>(); if (userRefs != null) { IAtsUserServiceClient userServiceClient = AtsClientService.get().getUserServiceClient(); for (String userId : UserRefUtil.getUserIds(userRefs)) { @@ -202,7 +202,7 @@ public class ImportAIsAndTeamDefinitionsToDb { private void importVersionDefinitions(EList<VersionDef> versionDefs, Artifact teamDef) throws OseeCoreException { - Map<String, Artifact> nameToVerArt = new HashMap<String, Artifact>(); + Map<String, Artifact> nameToVerArt = new HashMap<>(); for (VersionDef dslVersionDef : versionDefs) { String dslVerName = Strings.unquote(dslVersionDef.getName()); // System.out.println(" - Importing Version " + dslVerName); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportWorkDefinitionsItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportWorkDefinitionsItem.java index da9569f5b77..c2d55efad53 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportWorkDefinitionsItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/ImportWorkDefinitionsItem.java @@ -39,7 +39,7 @@ public class ImportWorkDefinitionsItem extends XNavigateItemAction { @Override public void run(TableLoadOption... tableLoadOptions) throws Exception { - List<WorkDefinitionSheet> importSheets = new ArrayList<WorkDefinitionSheet>(); + List<WorkDefinitionSheet> importSheets = new ArrayList<>(); for (WorkDefinitionSheet sheet : AtsWorkDefinitionSheetProviders.getWorkDefinitionSheets()) { if (!sheet.getName().endsWith("AIs_And_Teams")) { importSheets.add(sheet); @@ -52,7 +52,7 @@ public class ImportWorkDefinitionsItem extends XNavigateItemAction { AtsChangeSet changes = new AtsChangeSet(getName()); Artifact folder = OseeSystemArtifacts.getOrCreateArtifact(AtsArtifactToken.WorkDefinitionsFolder, AtsUtilCore.getAtsBranch()); - Set<String> stateNames = new HashSet<String>(); + Set<String> stateNames = new HashSet<>(); AtsWorkDefinitionSheetProviders.importWorkDefinitionSheets(resultData, changes, folder, dialog.getSelection(), stateNames); if (!resultData.isErrors()) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/WorkDefinitionCheckTreeDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/WorkDefinitionCheckTreeDialog.java index 1a9eb045043..1e2521a9222 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/WorkDefinitionCheckTreeDialog.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/config/WorkDefinitionCheckTreeDialog.java @@ -35,7 +35,7 @@ public class WorkDefinitionCheckTreeDialog extends FilteredCheckboxTreeDialog { } public Collection<WorkDefinitionSheet> getSelection() { - ArrayList<WorkDefinitionSheet> arts = new ArrayList<WorkDefinitionSheet>(); + ArrayList<WorkDefinitionSheet> arts = new ArrayList<>(); for (Object obj : getResult()) { arts.add((WorkDefinitionSheet) obj); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/provider/ConvertAIsAndTeamsToAtsDsl.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/provider/ConvertAIsAndTeamsToAtsDsl.java index 877346c24e7..6ff4ca2452c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/provider/ConvertAIsAndTeamsToAtsDsl.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/provider/ConvertAIsAndTeamsToAtsDsl.java @@ -41,8 +41,8 @@ public class ConvertAIsAndTeamsToAtsDsl { private final XResultData resultData; private AtsDsl atsDsl; - private final Map<String, TeamDef> dslTeamDefs = new HashMap<String, TeamDef>(); - private final Map<String, ActionableItemDef> dslAIDefs = new HashMap<String, ActionableItemDef>(); + private final Map<String, TeamDef> dslTeamDefs = new HashMap<>(); + private final Map<String, ActionableItemDef> dslAIDefs = new HashMap<>(); public ConvertAIsAndTeamsToAtsDsl(XResultData resultData) { this.resultData = resultData; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/AtsWorkDefConfigEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/AtsWorkDefConfigEditor.java index 035826266d7..c31a6776a38 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/AtsWorkDefConfigEditor.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/AtsWorkDefConfigEditor.java @@ -247,7 +247,7 @@ public class AtsWorkDefConfigEditor extends GraphicalEditorWithFlyoutPalette { workflowDef)) { StateDefShape pageShape = getStateDefShape(stateDef); // Handle to pages - Set<IAtsStateDefinition> toPages = new HashSet<IAtsStateDefinition>(); + Set<IAtsStateDefinition> toPages = new HashSet<>(); toPages.addAll(pageShape.getStateDefinition().getToStates()); List<IAtsStateDefinition> returnStateDefs = pageShape.getStateDefinition().getOverrideAttributeValidationStates(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/ModelElement.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/ModelElement.java index 4f32219b2ed..f2f543b1776 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/ModelElement.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/ModelElement.java @@ -46,7 +46,7 @@ public abstract class ModelElement implements IPropertySource { protected void initializePropertyValues() { if (propertyValues == null) { - propertyValues = new HashMap<Object, Object>(); + propertyValues = new HashMap<>(); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/Shape.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/Shape.java index 4ae2d4ae162..8bab4886926 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/Shape.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/Shape.java @@ -38,7 +38,7 @@ public abstract class Shape extends ModelElement { * @see #setPropertyValue(Object, Object) */ private IPropertyDescriptor[] descriptors; - private final List<IPropertyDescriptor> descriptorList = new ArrayList<IPropertyDescriptor>(); + private final List<IPropertyDescriptor> descriptorList = new ArrayList<>(); /** ID for the Height property value (used for by the corresponding property descriptor). */ private static final String HEIGHT_PROP = "Shape.Height"; /** Property ID to use when the location of this shape is modified. */ @@ -66,9 +66,9 @@ public abstract class Shape extends ModelElement { /** Size of this shape. */ private final Dimension size = new Dimension(50, 50); /** List of outgoing Connections. */ - private final List<Connection> sourceConnections = new ArrayList<Connection>(); + private final List<Connection> sourceConnections = new ArrayList<>(); /** List of incoming Connections. */ - private final List<Connection> targetConnections = new ArrayList<Connection>(); + private final List<Connection> targetConnections = new ArrayList<>(); private WorkDefinitionDiagram workflowDiagram; /** diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/WorkDefinitionDiagram.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/WorkDefinitionDiagram.java index a10fba6c79d..6be23271081 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/WorkDefinitionDiagram.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/WorkDefinitionDiagram.java @@ -29,8 +29,8 @@ public class WorkDefinitionDiagram extends ModelElement { public static final String CHILD_ADDED_PROP = "WorkflowDiagram.ChildAdded"; /** Property ID to use when a child is removed from this diagram. */ public static final String CHILD_REMOVED_PROP = "WorkflowDiagram.ChildRemoved"; - private final List<Shape> shapes = new ArrayList<Shape>(); - private final List<Shape> deletedShapes = new ArrayList<Shape>(); + private final List<Shape> shapes = new ArrayList<>(); + private final List<Shape> deletedShapes = new ArrayList<>(); private final IAtsWorkDefinition workDef; public WorkDefinitionDiagram(IAtsWorkDefinition workDef) { @@ -85,7 +85,7 @@ public class WorkDefinitionDiagram extends ModelElement { } public Set<Connection> getConnections() { - Set<Connection> connections = new HashSet<Connection>(); + Set<Connection> connections = new HashSet<>(); for (Shape shape : getChildren()) { connections.addAll(shape.getSourceConnections()); connections.addAll(shape.getTargetConnections()); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/ChangeTypeDialog.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/ChangeTypeDialog.java index cc18eec0b7a..8206870978c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/ChangeTypeDialog.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/ChangeTypeDialog.java @@ -62,7 +62,7 @@ public class ChangeTypeDialog extends ListDialog { layout.marginWidth = 20; getTableViewer().getTable().getParent().setLayout(layout); if (selected != null) { - ArrayList<Object> sel = new ArrayList<Object>(); + ArrayList<Object> sel = new ArrayList<>(); sel.add(selected); getTableViewer().setSelection(new StructuredSelection(sel.toArray(new Object[sel.size()]))); getTableViewer().getTable().setFocus(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionToMenu.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionToMenu.java index ec6ce31d19b..824a284cd27 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionToMenu.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/TransitionToMenu.java @@ -63,8 +63,8 @@ public class TransitionToMenu { public static MenuManager createTransitionToMenuManager(final XViewer xViewer, String name, final Collection<TreeItem> selectedTreeItems) { MenuManager editMenuManager = new MenuManager(name, ImageManager.getImageDescriptor(AtsImage.TRANSITION), "transition-to"); - final Set<IAtsWorkItem> workItems = new HashSet<IAtsWorkItem>(); - Set<IAtsStateDefinition> toStateDefs = new HashSet<IAtsStateDefinition>(); + final Set<IAtsWorkItem> workItems = new HashSet<>(); + Set<IAtsStateDefinition> toStateDefs = new HashSet<>(); for (TreeItem treeItem : selectedTreeItems) { if (treeItem.getData() instanceof AbstractWorkflowArtifact) { AbstractWorkflowArtifact awa = (AbstractWorkflowArtifact) treeItem.getData(); @@ -87,7 +87,7 @@ public class TransitionToMenu { }); } else { - Set<Integer> stateOrdinals = new HashSet<Integer>(); + Set<Integer> stateOrdinals = new HashSet<>(); for (final IAtsStateDefinition stateDef : toStateDefs) { stateOrdinals.add(stateDef.getOrdinal()); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java index 14fb51ec6b6..42f91459d61 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsMetricsComposite.java @@ -191,7 +191,7 @@ public class AtsMetricsComposite extends ScrolledComposite { } public void createOverviewChart(WorkflowMetrics sMet, Composite parent) throws OseeCoreException { - List<XBarGraphLine> lines = new ArrayList<XBarGraphLine>(); + List<XBarGraphLine> lines = new ArrayList<>(); lines.add(XBarGraphLine.getTextLine("Loaded", sMet.toStringObjectBreakout())); lines.add(XBarGraphLine.getTextLineRedIfTrue( @@ -265,14 +265,14 @@ public class AtsMetricsComposite extends ScrolledComposite { } public void createCompletedByAssigneesChart(WorkflowMetrics sMet, Composite parent) { - List<XBarGraphLine> lines = new ArrayList<XBarGraphLine>(); + List<XBarGraphLine> lines = new ArrayList<>(); for (IAtsUser user : sMet.getAssigneesAssignedOrCompleted()) { try { int numCompleted = sMet.getUserToCompletedSmas(user).size(); double cummulativePercentComplete = numCompleted * 100; int numInWork = sMet.getUserToAssignedSmas(user).size(); // Since table is loaded with arts and also shows children, don't want to count artifacts twice - Set<Artifact> processedArts = new HashSet<Artifact>(); + Set<Artifact> processedArts = new HashSet<>(); if (sMet.getUserToAssignedSmas().getValues(user) != null) { for (Artifact awa : sMet.getUserToAssignedSmas().getValues(user)) { if (!processedArts.contains(awa) && !sMet.getUserToCompletedSmas().containsValue(awa)) { @@ -320,7 +320,7 @@ public class AtsMetricsComposite extends ScrolledComposite { } public void createHoursRemainingByAssigneesChart(WorkflowMetrics sMet, Composite parent) { - List<XBarGraphLine> lines = new ArrayList<XBarGraphLine>(); + List<XBarGraphLine> lines = new ArrayList<>(); Double hoursRemain = null; if (sMet.getEstRelDate() != null) { hoursRemain = sMet.getHoursTillRel(); @@ -329,7 +329,7 @@ public class AtsMetricsComposite extends ScrolledComposite { try { double userHoursRemain = 0; for (TeamWorkFlowArtifact team : sMet.getTeamArts()) { - Collection<IAtsUser> users = new HashSet<IAtsUser>(); + Collection<IAtsUser> users = new HashSet<>(); users.addAll(team.getStateMgr().getAssignees()); if (users.contains(user)) { double hours = team.getRemainHoursTotal(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldComposite.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldComposite.java index 6e7307bfc9d..3cb57cdfa38 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldComposite.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldComposite.java @@ -75,8 +75,8 @@ import org.eclipse.swt.widgets.Control; public class WorldComposite extends ScrolledComposite implements ISelectedAtsArtifacts, IWorldViewerEventHandler, IOpenNewAtsWorldEditorHandler, IOpenNewAtsWorldEditorSelectedHandler, IRefreshActionHandler { private final WorldXViewer worldXViewer; - private final Set<Artifact> worldArts = new HashSet<Artifact>(200); - private final Set<Artifact> otherArts = new HashSet<Artifact>(200); + private final Set<Artifact> worldArts = new HashSet<>(200); + private final Set<Artifact> otherArts = new HashSet<>(200); protected IWorldEditor iWorldEditor; private final String id; @@ -362,7 +362,7 @@ public class WorldComposite extends ScrolledComposite implements ISelectedAtsArt @Override public Set<Artifact> getSelectedSMAArtifacts() { - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); for (Artifact art : getSelectedArtifacts()) { if (art instanceof AbstractWorkflowArtifact) { artifacts.add(art); @@ -373,7 +373,7 @@ public class WorldComposite extends ScrolledComposite implements ISelectedAtsArt @Override public List<Artifact> getSelectedAtsArtifacts() { - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); for (Artifact art : getSelectedArtifacts()) { if (art.isOfType(AtsArtifactTypes.AtsArtifact)) { artifacts.add(art); @@ -384,7 +384,7 @@ public class WorldComposite extends ScrolledComposite implements ISelectedAtsArt @Override public List<TaskArtifact> getSelectedTaskArtifacts() { - List<TaskArtifact> tasks = new ArrayList<TaskArtifact>(); + List<TaskArtifact> tasks = new ArrayList<>(); for (Artifact art : getSelectedArtifacts()) { if (art instanceof TaskArtifact) { tasks.add((TaskArtifact) art); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldContentProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldContentProvider.java index d8b77922389..19e13fcdd4b 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldContentProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldContentProvider.java @@ -47,7 +47,7 @@ import org.eclipse.osee.framework.ui.swt.Widgets; public class WorldContentProvider implements ITreeContentProvider { // Store off relatedArts as they are discovered so they're not garbage collected - protected Set<Artifact> relatedArts = new HashSet<Artifact>(); + protected Set<Artifact> relatedArts = new HashSet<>(); private final WorldXViewer xViewer; public WorldContentProvider(WorldXViewer WorldXViewer) { @@ -102,7 +102,7 @@ public class WorldContentProvider implements ITreeContentProvider { } if (artifact.isOfType(AtsArtifactTypes.TeamWorkflow)) { TeamWorkFlowArtifact teamArt = TeamWorkFlowManager.cast(artifact); - List<Artifact> arts = new ArrayList<Artifact>(); + List<Artifact> arts = new ArrayList<>(); // Convert artifacts to WorldArtifactItems arts.addAll(ReviewManager.getReviews(teamArt)); arts.addAll(teamArt.getTaskArtifactsSorted()); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java index 442657f3fc5..bed60ff8a88 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java @@ -84,7 +84,7 @@ public class WorldEditor extends FormEditor implements IWorldEditor, IDirtiableE } public static Collection<WorldEditor> getEditors() { - final List<WorldEditor> editors = new ArrayList<WorldEditor>(); + final List<WorldEditor> editors = new ArrayList<>(); Displays.pendInDisplayThread(new Runnable() { @Override public void run() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorInputFactory.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorInputFactory.java index 2d239a42bc5..1a9c1c6899e 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorInputFactory.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorInputFactory.java @@ -39,7 +39,7 @@ public class WorldEditorInputFactory implements IElementFactory { @Override public IAdaptable createElement(IMemento memento) { long branchUuid = 0; - List<Integer> artUuids = new ArrayList<Integer>(); + List<Integer> artUuids = new ArrayList<>(); String title = memento.getString(TITLE); try { if (Strings.isValid(memento.getString(BRANCH_KEY))) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorReloadProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorReloadProvider.java index 4092bd773a4..4df01786257 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorReloadProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorReloadProvider.java @@ -77,7 +77,7 @@ public class WorldEditorReloadProvider extends WorldEditorProvider { if (validartUuids.isEmpty()) { AWorkbench.popup("No valid ids to load"); } else { - artifacts = new ArrayList<Artifact>(); + artifacts = new ArrayList<>(); if (branchUuid == AtsUtilCore.getAtsBranch().getUuid()) { artifacts.addAll(ArtifactQuery.getArtifactListFromIds(new ArrayList<Integer>(validartUuids), AtsUtilCore.getAtsBranch())); @@ -89,7 +89,7 @@ public class WorldEditorReloadProvider extends WorldEditorProvider { } public List<Integer> getValidArtUuids() { - List<Integer> validartUuids = new ArrayList<Integer>(); + List<Integer> validartUuids = new ArrayList<>(); for (Integer artUuid : artUuids) { if (artUuid > 0) { validartUuids.add(artUuid); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldViewDragAndDrop.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldViewDragAndDrop.java index 3ae12bbcef4..502bb7ddfd6 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldViewDragAndDrop.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldViewDragAndDrop.java @@ -53,7 +53,7 @@ public class WorldViewDragAndDrop extends SkynetDragAndDrop { public Artifact[] getArtifacts() { IStructuredSelection selection = (IStructuredSelection) worldComposite.getXViewer().getSelection(); Iterator<?> i = selection.iterator(); - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); while (i.hasNext()) { Object object = i.next(); if (object instanceof Artifact) { @@ -97,7 +97,7 @@ public class WorldViewDragAndDrop extends SkynetDragAndDrop { protected IStatus run(IProgressMonitor monitor) { try { String name = "Dropped Artifacts"; - Set<Artifact> arts = new HashSet<Artifact>(); + Set<Artifact> arts = new HashSet<>(); if (artData != null) { Artifact[] artifacts = artData.getArtifacts(); if (artifacts.length == 1) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java index b52da0cc034..297b8f0bb26 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewer.java @@ -106,7 +106,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IPer public static final String SUBSCRIBE = "Subscribe for Notifications"; public static final String UN_SUBSCRIBE = "Un-Subscribe for Notifications"; public final WorldXViewer thisXViewer = this; - public List<IMenuActionProvider> menuActionProviders = new ArrayList<IMenuActionProvider>(); + public List<IMenuActionProvider> menuActionProviders = new ArrayList<>(); protected final IDirtiableEditor editor; private GoalArtifact parentGoalArtifact; private SprintArtifact parentSprintArtifact; @@ -249,7 +249,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IPer AWorkbench.popup("ERROR", "Can't retrieve attribute name from attribute column " + treeColumn.getText()); return; } - final Set<Artifact> useArts = new HashSet<Artifact>(); + final Set<Artifact> useArts = new HashSet<>(); for (TreeItem item : treeItems) { Artifact art = (Artifact) item.getData(); try { @@ -437,7 +437,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IPer } public List<Artifact> getLoadedArtifacts() { - List<Artifact> arts = new ArrayList<Artifact>(); + List<Artifact> arts = new ArrayList<>(); if (getRoot() != null) { for (Object artifact : (Collection<?>) getRoot()) { if (artifact instanceof Artifact) { @@ -469,7 +469,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IPer @Override public List<Artifact> getSelectedArtifacts() { - List<Artifact> arts = new ArrayList<Artifact>(); + List<Artifact> arts = new ArrayList<>(); TreeItem items[] = getTree().getSelection(); if (items.length > 0) { for (TreeItem item : items) { @@ -481,7 +481,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IPer @Override public List<TaskArtifact> getSelectedTaskArtifacts() { - List<TaskArtifact> arts = new ArrayList<TaskArtifact>(); + List<TaskArtifact> arts = new ArrayList<>(); TreeItem items[] = getTree().getSelection(); if (items.length > 0) { for (TreeItem item : items) { @@ -521,7 +521,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IPer */ @Override public Set<TeamWorkFlowArtifact> getSelectedTeamWorkflowArtifacts() { - Set<TeamWorkFlowArtifact> teamArts = new HashSet<TeamWorkFlowArtifact>(); + Set<TeamWorkFlowArtifact> teamArts = new HashSet<>(); TreeItem items[] = getTree().getSelection(); if (items.length > 0) { for (TreeItem item : items) { @@ -547,7 +547,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IPer */ @Override public Set<AbstractWorkflowArtifact> getSelectedSMAArtifacts() { - Set<AbstractWorkflowArtifact> smaArts = new HashSet<AbstractWorkflowArtifact>(); + Set<AbstractWorkflowArtifact> smaArts = new HashSet<>(); try { Iterator<?> i = ((IStructuredSelection) getSelection()).iterator(); while (i.hasNext()) { @@ -565,7 +565,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IPer } public Set<ActionArtifact> getSelectedActionArtifacts() { - Set<ActionArtifact> actionArts = new HashSet<ActionArtifact>(); + Set<ActionArtifact> actionArts = new HashSet<>(); TreeItem items[] = getTree().getSelection(); if (items.length > 0) { for (TreeItem item : items) { @@ -600,7 +600,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IPer } public List<Artifact> getSelectedArtifactItems() { - List<Artifact> arts = new ArrayList<Artifact>(); + List<Artifact> arts = new ArrayList<>(); TreeItem items[] = getTree().getSelection(); if (items.length > 0) { for (TreeItem item : items) { @@ -648,7 +648,7 @@ public class WorldXViewer extends XViewer implements ISelectedAtsArtifacts, IPer @Override public List<Artifact> getSelectedAtsArtifacts() { - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); Iterator<?> i = ((IStructuredSelection) getSelection()).iterator(); while (i.hasNext()) { Object obj = i.next(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerEventManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerEventManager.java index 4c55cf3fc01..ebf3e36c62c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerEventManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerEventManager.java @@ -104,7 +104,7 @@ public class WorldXViewerEventManager { Collection<Artifact> relModifiedArts = artifactEvent.getRelCacheArtifacts(); Collection<EventBasicGuidArtifact> deletedPurgedArts = artifactEvent.get(EventModType.Deleted, EventModType.Purged); - Collection<Artifact> goalMemberReordered = new HashSet<Artifact>(); + Collection<Artifact> goalMemberReordered = new HashSet<>(); for (DefaultBasicUuidRelationReorder reorder : artifactEvent.getRelationOrderRecords()) { if (reorder.is(AtsRelationTypes.Goal_Member)) { Artifact cachedArt = ArtifactCache.getActive(reorder.getParentArt()); @@ -113,7 +113,7 @@ public class WorldXViewerEventManager { } } } - Collection<Artifact> sprintMemberReordered = new HashSet<Artifact>(); + Collection<Artifact> sprintMemberReordered = new HashSet<>(); for (DefaultBasicUuidRelationReorder reorder : artifactEvent.getRelationOrderRecords()) { if (reorder.is(AtsRelationTypes.AgileSprintToItem_AtsItem)) { Artifact cachedArt = ArtifactCache.getActive(reorder.getParentArt()); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerUtil.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerUtil.java index e6c02a08a6c..14e80f9aadd 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerUtil.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerUtil.java @@ -77,7 +77,7 @@ public class WorldXViewerUtil { public static List<XViewerAtsAttributeValueColumn> getConfigurationColumns() { List<AtsAttributeValueColumn> columns = AtsClientService.getConfigEndpoint().get().getViews().getAttrColumns(); - List<XViewerAtsAttributeValueColumn> configColumns = new ArrayList<XViewerAtsAttributeValueColumn>(); + List<XViewerAtsAttributeValueColumn> configColumns = new ArrayList<>(); for (AtsAttributeValueColumn column : columns) { try { AttributeType attrType = AttributeTypeManager.getTypeByGuid(column.getAttrTypeId()); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXWidgetActionPage.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXWidgetActionPage.java index 1bc1e653af5..f8267892df6 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXWidgetActionPage.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXWidgetActionPage.java @@ -444,7 +444,7 @@ public class WorldXWidgetActionPage extends AtsXWidgetActionFormPage { @Override protected IStatus run(IProgressMonitor monitor) { try { - final Set<Artifact> arts = new HashSet<Artifact>(); + final Set<Artifact> arts = new HashSet<>(); for (Artifact art : artifacts) { if (art.isOfType(AtsArtifactTypes.Action)) { arts.add(art); @@ -471,7 +471,7 @@ public class WorldXWidgetActionPage extends AtsXWidgetActionFormPage { @Override protected IStatus run(IProgressMonitor monitor) { try { - final Set<Artifact> goals = new HashSet<Artifact>(); + final Set<Artifact> goals = new HashSet<>(); new GoalManager().getCollectors(artifacts, goals, true); worldComposite.load(worldEditor.getWorldXWidgetActionPage().getCurrentTitleLabel(), goals); } catch (OseeCoreException ex) { @@ -489,7 +489,7 @@ public class WorldXWidgetActionPage extends AtsXWidgetActionFormPage { @Override protected IStatus run(IProgressMonitor monitor) { try { - final Set<Artifact> arts = new HashSet<Artifact>(); + final Set<Artifact> arts = new HashSet<>(); for (Artifact art : artifacts) { if (art.isOfType(AtsArtifactTypes.Action)) { arts.addAll(ActionManager.getTeams(art)); @@ -516,7 +516,7 @@ public class WorldXWidgetActionPage extends AtsXWidgetActionFormPage { @Override protected IStatus run(IProgressMonitor monitor) { try { - final Set<Artifact> arts = new HashSet<Artifact>(); + final Set<Artifact> arts = new HashSet<>(); for (Artifact art : artifacts) { if (art.isOfType(AtsArtifactTypes.Action)) { for (TeamWorkFlowArtifact team : ActionManager.getTeams(art)) { @@ -542,7 +542,7 @@ public class WorldXWidgetActionPage extends AtsXWidgetActionFormPage { @Override protected IStatus run(IProgressMonitor monitor) { try { - final Set<Artifact> arts = new HashSet<Artifact>(); + final Set<Artifact> arts = new HashSet<>(); for (Artifact art : artifacts) { if (art.isOfType(AtsArtifactTypes.Action)) { for (TeamWorkFlowArtifact team : ActionManager.getTeams(art)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ActionableItemWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ActionableItemWorldSearchItem.java index 885223fd019..878a85e40c8 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ActionableItemWorldSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ActionableItemWorldSearchItem.java @@ -82,7 +82,7 @@ public class ActionableItemWorldSearchItem extends WorldUISearchItem { * @return All directly specified teamDefs plus if recurse, will get all children */ private Set<IAtsActionableItem> getSearchActionableItems() throws OseeCoreException { - Set<IAtsActionableItem> srchTeamDefs = new HashSet<IAtsActionableItem>(); + Set<IAtsActionableItem> srchTeamDefs = new HashSet<>(); for (IAtsActionableItem actionableItem : actionItems != null ? actionItems : selectedActionItems) { srchTeamDefs.add(actionableItem); } @@ -97,11 +97,11 @@ public class ActionableItemWorldSearchItem extends WorldUISearchItem { @Override public Collection<Artifact> performSearch(SearchType searchType) throws OseeCoreException { Set<IAtsActionableItem> items = getSearchActionableItems(); - List<String> actionItemGuids = new ArrayList<String>(items.size()); + List<String> actionItemGuids = new ArrayList<>(items.size()); for (IAtsActionableItem ai : items) { actionItemGuids.add(AtsUtilCore.getGuid(ai)); } - List<ArtifactSearchCriteria> criteria = new ArrayList<ArtifactSearchCriteria>(); + List<ArtifactSearchCriteria> criteria = new ArrayList<>(); criteria.add(new AttributeCriteria(AtsAttributeTypes.ActionableItem, actionItemGuids)); // exclude completed or canceled @@ -112,7 +112,7 @@ public class ActionableItemWorldSearchItem extends WorldUISearchItem { ArtifactQuery.getArtifactListFromCriteria(AtsUtilCore.getAtsBranch(), 1000, criteria); // show as actions if (selectedShowAction) { - Set<Artifact> arts = new HashSet<Artifact>(); + Set<Artifact> arts = new HashSet<>(); for (Artifact art : artifacts) { if (art.isOfType(AtsArtifactTypes.Action)) { arts.add(art); @@ -148,7 +148,7 @@ public class ActionableItemWorldSearchItem extends WorldUISearchItem { selectedRecurseChildren = diag.isRecurseChildren(); selectedShowAction = diag.isShowAction(); if (selectedActionItems == null) { - selectedActionItems = new HashSet<IAtsActionableItem>(); + selectedActionItems = new HashSet<>(); } else { selectedActionItems.clear(); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/AttributeValueQuickSearch.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/AttributeValueQuickSearch.java index 931fad6eae5..afb2728b3d2 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/AttributeValueQuickSearch.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/AttributeValueQuickSearch.java @@ -43,7 +43,7 @@ public class AttributeValueQuickSearch { * Must match full value of given value */ public Collection<Artifact> performSearch(boolean exactMatch) throws OseeCoreException { - List<Artifact> results = new ArrayList<Artifact>(); + List<Artifact> results = new ArrayList<>(); if (values != null && values.size() > 0) { for (String value : values) { List<Artifact> searchResult = diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GoalSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GoalSearchItem.java index 3045385049c..69732fda34f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GoalSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GoalSearchItem.java @@ -73,13 +73,13 @@ public class GoalSearchItem extends WorldUISearchItem { @Override public Collection<Artifact> performSearch(SearchType searchType) throws OseeCoreException { - Set<String> teamDefinitionGuids = new HashSet<String>(teamDefs != null ? teamDefs.size() : 0); + Set<String> teamDefinitionGuids = new HashSet<>(teamDefs != null ? teamDefs.size() : 0); if (teamDefs != null) { for (IAtsTeamDefinition teamDef : teamDefs) { teamDefinitionGuids.add(AtsUtilCore.getGuid(teamDef)); } } - List<ArtifactSearchCriteria> criteria = new ArrayList<ArtifactSearchCriteria>(); + List<ArtifactSearchCriteria> criteria = new ArrayList<>(); if (!teamDefinitionGuids.isEmpty()) { criteria.add(new AttributeCriteria(AtsAttributeTypes.TeamDefinition, teamDefinitionGuids)); } @@ -91,7 +91,7 @@ public class GoalSearchItem extends WorldUISearchItem { List<Artifact> artifacts = ArtifactQuery.getArtifactListFromTypeAnd(AtsArtifactTypes.Goal, AtsUtilCore.getAtsBranch(), 1000, criteria); - Set<Artifact> resultGoalArtifacts = new HashSet<Artifact>(); + Set<Artifact> resultGoalArtifacts = new HashSet<>(); for (Artifact art : artifacts) { for (Artifact goalArt : new GoalManager().getCollectors(art, true)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GroupWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GroupWorldSearchItem.java index fc777c35332..c78e9a7b77d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GroupWorldSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/GroupWorldSearchItem.java @@ -42,7 +42,7 @@ public class GroupWorldSearchItem extends WorldUISearchItem { public GroupWorldSearchItem(Artifact group) { super("Group Search", FrameworkImage.GROUP); - this.groups = new ArrayList<Artifact>(); + this.groups = new ArrayList<>(); this.groups.add(group); this.branch = group.getBranch(); } @@ -93,7 +93,7 @@ public class GroupWorldSearchItem extends WorldUISearchItem { if (getSearchGroups() == null) { return EMPTY_SET; } - Set<Artifact> arts = new HashSet<Artifact>(100); + Set<Artifact> arts = new HashSet<>(100); for (Artifact group : getSearchGroups()) { arts.addAll(group.getRelatedArtifacts(CoreRelationTypes.Universal_Grouping__Members)); } @@ -143,7 +143,7 @@ public class GroupWorldSearchItem extends WorldUISearchItem { * @param selectedGroup the selectedGroup to set */ public void setSelectedGroup(Artifact selectedGroup) { - this.selectedGroups = new ArrayList<Artifact>(); + this.selectedGroups = new ArrayList<>(); this.selectedGroups.add(selectedGroup); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/LegacyPCRActionsWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/LegacyPCRActionsWorldSearchItem.java index 5ef488ebbb8..5733fd6d93d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/LegacyPCRActionsWorldSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/LegacyPCRActionsWorldSearchItem.java @@ -62,9 +62,9 @@ public class LegacyPCRActionsWorldSearchItem extends WorldUISearchItem { @Override public Collection<Artifact> performSearch(SearchType searchType) throws OseeCoreException { - List<Artifact> pcrIdArts = new ArrayList<Artifact>(); - List<Artifact> teamDefArts = new ArrayList<Artifact>(); - List<String> teamDefGuids = new ArrayList<String>(); + List<Artifact> pcrIdArts = new ArrayList<>(); + List<Artifact> teamDefArts = new ArrayList<>(); + List<String> teamDefGuids = new ArrayList<>(); if (isPcrIdsSet()) { LegacyPcrIdQuickSearch srch = new LegacyPcrIdQuickSearch(pcrIds); @@ -77,7 +77,7 @@ public class LegacyPCRActionsWorldSearchItem extends WorldUISearchItem { } // If both set, return intersection; else return just what was set - List<Artifact> arts = new ArrayList<Artifact>(); + List<Artifact> arts = new ArrayList<>(); if (isPcrIdsSet() && isTeamDefsSet()) { arts = Collections.setIntersection(pcrIdArts, teamDefArts); } else if (isPcrIdsSet()) { @@ -86,7 +86,7 @@ public class LegacyPCRActionsWorldSearchItem extends WorldUISearchItem { arts = teamDefArts; } - List<IAtsWorkItem> workItems = new ArrayList<IAtsWorkItem>(); + List<IAtsWorkItem> workItems = new ArrayList<>(); for (Artifact art : arts) { workItems.add((IAtsWorkItem) art); } @@ -95,7 +95,7 @@ public class LegacyPCRActionsWorldSearchItem extends WorldUISearchItem { AtsClientService.get().getQueryService().createFilter(workItems).withOrValue(AtsAttributeTypes.LegacyPcrId, pcrIds).withOrValue(AtsAttributeTypes.TeamDefinition, teamDefGuids).isOfType(AtsArtifactTypes.TeamWorkflow); - List<Artifact> results = new ArrayList<Artifact>(); + List<Artifact> results = new ArrayList<>(); if (returnActions) { for (IAtsWorkItem workItem : filter.getItems()) { results.add(((AbstractWorkflowArtifact) workItem.getStoreObject()).getParentActionArtifact()); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchData.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchData.java index 69af1fa46a6..548f18cca02 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchData.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchData.java @@ -23,7 +23,7 @@ import org.eclipse.osee.framework.jdk.core.util.Strings; */ public class MultipleIdSearchData implements IWorldEditorConsumer { private String enteredIds = ""; - private List<String> ids = new ArrayList<String>(); + private List<String> ids = new ArrayList<>(); private boolean includeArtIds; private Branch branch; private String name; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchOperation.java index e0276a41b90..a0b49108610 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchOperation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchOperation.java @@ -59,9 +59,9 @@ import org.eclipse.ui.dialogs.ListDialog; * @author Donald G. Dunne */ public class MultipleIdSearchOperation extends AbstractOperation implements IWorldEditorConsumer { - private final Set<Artifact> resultAtsArts = new HashSet<Artifact>(); - private final Set<Artifact> resultNonAtsArts = new HashSet<Artifact>(); - private final Set<Artifact> artifacts = new HashSet<Artifact>(); + private final Set<Artifact> resultAtsArts = new HashSet<>(); + private final Set<Artifact> resultNonAtsArts = new HashSet<>(); + private final Set<Artifact> artifacts = new HashSet<>(); private final MultipleIdSearchData data; private boolean multiLine; @@ -109,7 +109,7 @@ public class MultipleIdSearchOperation extends AbstractOperation implements IWor } private void openChangeReport(Set<Artifact> artifacts, final String enteredIds) throws OseeCoreException { - final Set<Artifact> addedArts = new HashSet<Artifact>(); + final Set<Artifact> addedArts = new HashSet<>(); for (Artifact artifact : artifacts) { if (artifact.isOfType(AtsArtifactTypes.Action)) { for (TeamWorkFlowArtifact team : ActionManager.getTeams(artifact)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchUi.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchUi.java index cc9457c535b..a550ba3d5d5 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchUi.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchUi.java @@ -99,7 +99,7 @@ public class MultipleIdSearchUi { public String processEntry(String entry) { String result = entry; if (multiLine) { - Set<String> entries = new HashSet<String>(50); + Set<String> entries = new HashSet<>(50); for (String line : entry.split(System.getProperty("line.separator"))) { line = line.replaceFirst("^ +", ""); line = line.replaceFirst(" +$", ""); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyGoalWorkflowItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyGoalWorkflowItem.java index 2662abdee29..dc0e339f3a0 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyGoalWorkflowItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyGoalWorkflowItem.java @@ -55,7 +55,7 @@ public class MyGoalWorkflowItem extends UserSearchItem { protected Collection<Artifact> searchIt(IAtsUser user) throws OseeCoreException { Set<Artifact> assigned = AtsUtil.getAssigned(user); - Set<Artifact> artifacts = new HashSet<Artifact>(50); + Set<Artifact> artifacts = new HashSet<>(50); // Because user can be assigned directly to review or through being assigned to task, add in // all the original artifacts. artifacts.addAll(assigned); @@ -67,7 +67,7 @@ public class MyGoalWorkflowItem extends UserSearchItem { "<" + user.getUserId() + ">", AtsUtilCore.getAtsBranch(), QueryOption.CONTAINS_MATCH_OPTIONS)); } - List<Artifact> artifactsToReturn = new ArrayList<Artifact>(artifacts.size()); + List<Artifact> artifactsToReturn = new ArrayList<>(artifacts.size()); for (Artifact artifact : artifacts) { if (artifact.isOfType(AtsArtifactTypes.Goal) && (goalSearchState == GoalSearchState.All || goalSearchState == GoalSearchState.InWork && !((AbstractWorkflowArtifact) artifact).isCompletedOrCancelled())) { artifactsToReturn.add(artifact); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyReviewWorkflowItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyReviewWorkflowItem.java index 013efa1be09..94322042951 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyReviewWorkflowItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyReviewWorkflowItem.java @@ -55,7 +55,7 @@ public class MyReviewWorkflowItem extends UserSearchItem { protected Collection<Artifact> searchIt(IAtsUser user) throws OseeCoreException { Set<Artifact> assigned = AtsUtil.getAssigned(user); - Set<Artifact> artifacts = new HashSet<Artifact>(50); + Set<Artifact> artifacts = new HashSet<>(50); // Because user can be assigned directly to review or through being assigned to task, add in // all the original artifacts. artifacts.addAll(assigned); @@ -67,7 +67,7 @@ public class MyReviewWorkflowItem extends UserSearchItem { "<" + user.getUserId() + ">", AtsUtilCore.getAtsBranch(), QueryOption.CONTAINS_MATCH_OPTIONS)); } - List<Artifact> artifactsToReturn = new ArrayList<Artifact>(artifacts.size()); + List<Artifact> artifactsToReturn = new ArrayList<>(artifacts.size()); for (Artifact artifact : artifacts) { if (artifact instanceof AbstractReviewArtifact && (reviewState == ReviewState.All || reviewState == ReviewState.InWork && !((AbstractWorkflowArtifact) artifact).isCompletedOrCancelled())) { artifactsToReturn.add(artifact); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyWorldSearchItem.java index 1ad2d58abca..1a5e75d4b83 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyWorldSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MyWorldSearchItem.java @@ -48,7 +48,7 @@ public class MyWorldSearchItem extends UserSearchItem { public Collection<Artifact> searchIt(IAtsUser user) throws OseeCoreException { Set<Artifact> assigned = AtsUtil.getAssigned(user); - List<Artifact> artifactsToReturn = new ArrayList<Artifact>(assigned.size()); + List<Artifact> artifactsToReturn = new ArrayList<>(assigned.size()); for (Artifact artifact : assigned) { if (artifact instanceof AbstractWorkflowArtifact) { if (artifact.isOfType(AtsArtifactTypes.Task)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/NextVersionSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/NextVersionSearchItem.java index 4cf556b1a22..6d758775d19 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/NextVersionSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/NextVersionSearchItem.java @@ -87,7 +87,7 @@ public class NextVersionSearchItem extends WorldUISearchItem { AWorkbench.popup("ERROR", "No version marked as Next Release for \"" + getTeamDefinition() + "\""); return EMPTY_SET; } - List<Artifact> arts = new ArrayList<Artifact>(); + List<Artifact> arts = new ArrayList<>(); List<Artifact> castAll = Collections.castAll(AtsClientService.get().getVersionService().getTargetedForTeamWorkflows( getTeamDefinition().getNextReleaseVersion())); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ShowOpenWorkflowsByArtifactType.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ShowOpenWorkflowsByArtifactType.java index 1d6e50d2129..a2f94f4f921 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ShowOpenWorkflowsByArtifactType.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/ShowOpenWorkflowsByArtifactType.java @@ -51,7 +51,7 @@ public class ShowOpenWorkflowsByArtifactType extends WorldUISearchItem { List<Artifact> artifacts = null; if (!showFinished) { - List<ArtifactSearchCriteria> criteria = new ArrayList<ArtifactSearchCriteria>(); + List<ArtifactSearchCriteria> criteria = new ArrayList<>(); TeamWorldSearchItem.addIncludeCompletedCancelledCriteria(criteria, showFinished, showFinished); artifacts = ArtifactQuery.getArtifactListFromTypeAnd(artifactType, AtsUtilCore.getAtsBranch(), 500, criteria); } else { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java index 374bb4700fb..724033e729a 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TaskSearchWorldSearchItem.java @@ -107,7 +107,7 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem { @Override public Collection<? extends Artifact> getTaskEditorTaskArtifacts() throws OseeCoreException { - List<Artifact> workflows = new ArrayList<Artifact>(); + List<Artifact> workflows = new ArrayList<>(); Collection<IAtsTeamDefinition> teamDefs = getSelectedTeamDefinitions(); IAtsVersion verArt = getSelectedVersionArtifact(); Collection<Artifact> groups = getSelectedGroups(); @@ -125,7 +125,7 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem { ArtifactQuery.getArtifactListFromTypeAndAttribute(AtsArtifactTypes.Task, AtsAttributeTypes.State, "<" + user.getUserId() + ">", AtsUtilCore.getAtsBranch(), QueryOption.CONTAINS_MATCH_OPTIONS))); } - Set<TaskArtifact> removeTaskArts = new HashSet<TaskArtifact>(); + Set<TaskArtifact> removeTaskArts = new HashSet<>(); for (TaskArtifact taskArt : userTaskArts) { if (verArt != null && !verArt.equals(AtsClientService.get().getVersionService().getTargetedVersion( taskArt.getParentTeamWorkflow()))) { @@ -162,7 +162,7 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem { workflows.addAll(teamWorldSearchItem.performSearchGetResults(false, SearchType.Search)); // time.end(); } else if (groups.size() > 0) { - Set<TaskArtifact> taskArts = new HashSet<TaskArtifact>(); + Set<TaskArtifact> taskArts = new HashSet<>(); for (Artifact groupArt : groups) { for (Artifact art : groupArt.getRelatedArtifacts(CoreRelationTypes.Universal_Grouping__Members)) { if (art.isOfType(AtsArtifactTypes.Task)) { @@ -190,7 +190,7 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem { } private Set<TaskArtifact> getUserAssignedTaskArtifacts() throws OseeCoreException { - Set<TaskArtifact> tasks = new HashSet<TaskArtifact>(); + Set<TaskArtifact> tasks = new HashSet<>(); for (Artifact art : AtsUtil.getAssigned(getSelectedUser(), TaskArtifact.class)) { tasks.add((TaskArtifact) art); } @@ -198,7 +198,7 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem { } private Collection<TaskArtifact> filterByCompletedAndStateAndSelectedUser(Collection<? extends Artifact> artifacts) throws OseeCoreException { - Set<TaskArtifact> tasks = new HashSet<TaskArtifact>(); + Set<TaskArtifact> tasks = new HashSet<>(); String selectedState = getSelectedState(); boolean isSelectedStateValid = Strings.isValid(selectedState); for (Artifact art : artifacts) { @@ -351,7 +351,7 @@ public class TaskSearchWorldSearchItem extends TaskEditorParameterSearchItem { versionCombo.setDataStrings(new String[] {}); return; } - List<String> namesList = new ArrayList<String>(names); + List<String> namesList = new ArrayList<>(names); java.util.Collections.sort(namesList); versionCombo.setDataStrings(namesList.toArray(new String[namesList.size()])); } catch (Exception ex) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java index d3fca819711..111ac8a3533 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/TeamWorldSearchItem.java @@ -66,7 +66,7 @@ public class TeamWorldSearchItem extends WorldUISearchItem { private final String stateName; // If set attributeType will be searched for value private IAttributeType attrValueSearchType; - private final List<String> attrValueSearchOrValues = new ArrayList<String>(); + private final List<String> attrValueSearchOrValues = new ArrayList<>(); public TeamWorldSearchItem(String displayName, Collection<IAtsTeamDefinition> teamDefs, boolean includeCompleted, boolean includeCancelled, boolean showAction, boolean recurseChildren, IAtsVersion versionArt, IAtsUser userArt, ReleasedOption releasedOption, String stateName) { super(displayName, AtsImage.TEAM_WORKFLOW); @@ -110,7 +110,7 @@ public class TeamWorldSearchItem extends WorldUISearchItem { @Override public Collection<Artifact> performSearch(SearchType searchType) throws OseeCoreException { - Set<String> teamDefinitionGuids = new HashSet<String>(teamDefs.size()); + Set<String> teamDefinitionGuids = new HashSet<>(teamDefs.size()); for (IAtsTeamDefinition teamDef : teamDefs) { if (recurseChildren) { for (IAtsTeamDefinition childTeamDef : TeamDefinitions.getTeamsFromItemAndChildren(teamDef)) { @@ -120,7 +120,7 @@ public class TeamWorldSearchItem extends WorldUISearchItem { teamDefinitionGuids.add(AtsUtilCore.getGuid(teamDef)); } } - List<ArtifactSearchCriteria> criteria = new ArrayList<ArtifactSearchCriteria>(); + List<ArtifactSearchCriteria> criteria = new ArrayList<>(); if (teamDefinitionGuids.isEmpty()) { criteria.add(new AttributeCriteria(AtsAttributeTypes.TeamDefinition)); @@ -141,7 +141,7 @@ public class TeamWorldSearchItem extends WorldUISearchItem { List<Artifact> artifacts = ArtifactQuery.getArtifactListFromCriteria(AtsUtilCore.getAtsBranch(), 1000, criteria); - Set<Artifact> resultSet = new HashSet<Artifact>(); + Set<Artifact> resultSet = new HashSet<>(); for (Artifact art : artifacts) { if (art instanceof AbstractWorkflowArtifact) { AbstractWorkflowArtifact awa = (AbstractWorkflowArtifact) art; @@ -195,7 +195,7 @@ public class TeamWorldSearchItem extends WorldUISearchItem { if (!includeCancelled && !includeCompleted) { criteria.add(new AttributeCriteria(AtsAttributeTypes.CurrentStateType, StateType.Working.name())); } else { - List<String> cancelOrComplete = new ArrayList<String>(2); + List<String> cancelOrComplete = new ArrayList<>(2); cancelOrComplete.add(StateType.Working.name()); if (includeCompleted) { cancelOrComplete.add(StateType.Completed.name()); @@ -209,7 +209,7 @@ public class TeamWorldSearchItem extends WorldUISearchItem { } catch (OseeTypeDoesNotExist ex) { OseeLog.log(Activator.class, Level.SEVERE, ex); // Backward compatibility; remove after 0.9.7 release - List<String> cancelOrComplete = new ArrayList<String>(2); + List<String> cancelOrComplete = new ArrayList<>(2); if (!includeCancelled) { cancelOrComplete.add(TeamState.Cancelled.getName() + ";;;"); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserRelatedToAtsObjectSearch.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserRelatedToAtsObjectSearch.java index 90f9d9b043a..740bec24527 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserRelatedToAtsObjectSearch.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserRelatedToAtsObjectSearch.java @@ -55,7 +55,7 @@ public class UserRelatedToAtsObjectSearch extends UserSearchItem { return EMPTY_SET; } - List<Artifact> arts = new ArrayList<Artifact>(); + List<Artifact> arts = new ArrayList<>(); if (activeObjectsOnly) { arts.addAll(ArtifactQuery.getArtifactListFromAttributeKeywords(AtsUtilCore.getAtsBranch(), user.getUserId(), false, EXCLUDE_DELETED, false, AtsAttributeTypes.CurrentState)); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserWorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserWorldSearchItem.java index dbb83f297b4..d3b4ee58d46 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserWorldSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/UserWorldSearchItem.java @@ -66,7 +66,7 @@ public class UserWorldSearchItem { } public Collection<AbstractWorkflowArtifact> performSearch() throws OseeCoreException { - Set<AbstractWorkflowArtifact> searchArts = new HashSet<AbstractWorkflowArtifact>(); + Set<AbstractWorkflowArtifact> searchArts = new HashSet<>(); if (options.contains(UserSearchOption.Originator)) { searchArts.addAll(getOriginatorArtifacts()); } else if (options.contains(UserSearchOption.Subscribed)) { @@ -84,7 +84,7 @@ public class UserWorldSearchItem { } } - Collection<Class<?>> filterClasses = new ArrayList<Class<?>>(); + Collection<Class<?>> filterClasses = new ArrayList<>(); if (!options.contains(UserSearchOption.IncludeReviews)) { filterClasses.add(AbstractReviewArtifact.class); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/VersionTargetedForTeamSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/VersionTargetedForTeamSearchItem.java index c7021328c73..13b40eee440 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/VersionTargetedForTeamSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/VersionTargetedForTeamSearchItem.java @@ -83,7 +83,7 @@ public class VersionTargetedForTeamSearchItem extends WorldUISearchItem { throw new OseeArgumentException("Invalid release version"); } - ArrayList<Artifact> arts = new ArrayList<Artifact>(); + ArrayList<Artifact> arts = new ArrayList<>(); for (IAtsTeamWorkflow team : AtsClientService.get().getVersionService().getTargetedForTeamWorkflows( getSearchVersionArtifact())) { if (returnAction) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/WorldSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/WorldSearchItem.java index 4fa9fb10a30..cef55d88724 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/WorldSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/WorldSearchItem.java @@ -28,7 +28,7 @@ import org.eclipse.swt.graphics.Image; public abstract class WorldSearchItem { private final String name; - protected static final Set<Artifact> EMPTY_SET = new HashSet<Artifact>(); + protected static final Set<Artifact> EMPTY_SET = new HashSet<>(); protected boolean cancelled = false; private LoadView loadView; private KeyedImage oseeImage; diff --git a/plugins/org.eclipse.osee.authentication.admin.test/src/org/eclipse/osee/authentication/admin/internal/AuthenticationAdminImplTest.java b/plugins/org.eclipse.osee.authentication.admin.test/src/org/eclipse/osee/authentication/admin/internal/AuthenticationAdminImplTest.java index 410849658e3..0dfeadcaa50 100644 --- a/plugins/org.eclipse.osee.authentication.admin.test/src/org/eclipse/osee/authentication/admin/internal/AuthenticationAdminImplTest.java +++ b/plugins/org.eclipse.osee.authentication.admin.test/src/org/eclipse/osee/authentication/admin/internal/AuthenticationAdminImplTest.java @@ -138,7 +138,7 @@ public class AuthenticationAdminImplTest { iterable = admin.getAllowedSchemes(); assertEquals(false, iterable.iterator().hasNext()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(AuthenticationConstants.AUTHENTICATION_SCHEME_ALLOWED, SCHEME_1); admin.update(properties); @@ -166,7 +166,7 @@ public class AuthenticationAdminImplTest { iterable = admin.getAllowedSchemes(); assertEquals(false, iterable.iterator().hasNext()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(AuthenticationConstants.AUTHENTICATION_SCHEME_ALLOWED, SCHEME_1); admin.update(properties); @@ -197,7 +197,7 @@ public class AuthenticationAdminImplTest { iterable = admin.getAllowedSchemes(); assertEquals(false, iterable.iterator().hasNext()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(AuthenticationConstants.AUTHENTICATION_SCHEME_ALLOWED, SCHEME_1); admin.update(properties); @@ -221,7 +221,7 @@ public class AuthenticationAdminImplTest { actual = admin.isSchemeAllowed(SCHEME_2); assertEquals(false, actual); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(AuthenticationConstants.AUTHENTICATION_SCHEME_ALLOWED, SCHEME_1); admin.update(properties); @@ -246,7 +246,7 @@ public class AuthenticationAdminImplTest { Iterator<String> iterator = admin.getAllowedSchemes().iterator(); assertEquals(false, iterator.hasNext()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); admin.update(properties); iterator = admin.getAllowedSchemes().iterator(); @@ -278,7 +278,7 @@ public class AuthenticationAdminImplTest { actual = admin.isSchemeAllowed(SCHEME_2); assertEquals(false, actual); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(AuthenticationConstants.AUTHENTICATION_SCHEME_ALLOWED, SCHEME_1); admin.update(properties); diff --git a/plugins/org.eclipse.osee.authentication.admin.test/src/org/eclipse/osee/authentication/admin/internal/AuthenticationConfigurationBuilderTest.java b/plugins/org.eclipse.osee.authentication.admin.test/src/org/eclipse/osee/authentication/admin/internal/AuthenticationConfigurationBuilderTest.java index da5480c817c..53e3f92bd9d 100644 --- a/plugins/org.eclipse.osee.authentication.admin.test/src/org/eclipse/osee/authentication/admin/internal/AuthenticationConfigurationBuilderTest.java +++ b/plugins/org.eclipse.osee.authentication.admin.test/src/org/eclipse/osee/authentication/admin/internal/AuthenticationConfigurationBuilderTest.java @@ -68,7 +68,7 @@ public class AuthenticationConfigurationBuilderTest { @Test public void testConfigProperties() { - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(AuthenticationConstants.AUTHENTICATION_SCHEME_ALLOWED, SCHEME_1 + "," + SCHEME_2); properties.put(AuthenticationConstants.AUTHENTICATION_SCHEME_ALLOWED_DEFAULT, SCHEME_2); builder.properties(properties); diff --git a/plugins/org.eclipse.osee.authentication.admin.test/src/org/eclipse/osee/authentication/admin/internal/NoneAuthenticationProviderTest.java b/plugins/org.eclipse.osee.authentication.admin.test/src/org/eclipse/osee/authentication/admin/internal/NoneAuthenticationProviderTest.java index afef6b238a9..f2cc43fbe33 100644 --- a/plugins/org.eclipse.osee.authentication.admin.test/src/org/eclipse/osee/authentication/admin/internal/NoneAuthenticationProviderTest.java +++ b/plugins/org.eclipse.osee.authentication.admin.test/src/org/eclipse/osee/authentication/admin/internal/NoneAuthenticationProviderTest.java @@ -51,7 +51,7 @@ public class NoneAuthenticationProviderTest { NoneAuthenticationProvider provider = new NoneAuthenticationProvider(); admin.addAuthenticationProvider(provider); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(AuthenticationConstants.AUTHENTICATION_SCHEME_ALLOWED, NoneAuthenticationProvider.AUTHENTICATION_TYPE); diff --git a/plugins/org.eclipse.osee.authentication.admin/src/org/eclipse/osee/authentication/admin/AuthenticationConfigurationBuilder.java b/plugins/org.eclipse.osee.authentication.admin/src/org/eclipse/osee/authentication/admin/AuthenticationConfigurationBuilder.java index 19bba2fbc71..a6e735e1e75 100644 --- a/plugins/org.eclipse.osee.authentication.admin/src/org/eclipse/osee/authentication/admin/AuthenticationConfigurationBuilder.java +++ b/plugins/org.eclipse.osee.authentication.admin/src/org/eclipse/osee/authentication/admin/AuthenticationConfigurationBuilder.java @@ -58,7 +58,7 @@ public class AuthenticationConfigurationBuilder { private static final class AuthenticationConfigurationImpl implements AuthenticationConfiguration, Cloneable { - private final Set<String> schemes = new HashSet<String>(); + private final Set<String> schemes = new HashSet<>(); private String defaultScheme; @Override @@ -104,7 +104,7 @@ public class AuthenticationConfigurationBuilder { } public Collection<String> getSet(Map<String, Object> props, String key, String defaultValue) { - Set<String> toReturn = new HashSet<String>(); + Set<String> toReturn = new HashSet<>(); String joinedArray = get(props, key, ""); if (Strings.isValid(joinedArray)) { String[] split = joinedArray.split(","); diff --git a/plugins/org.eclipse.osee.authentication.admin/src/org/eclipse/osee/authentication/admin/internal/AuthenticationUtil.java b/plugins/org.eclipse.osee.authentication.admin/src/org/eclipse/osee/authentication/admin/internal/AuthenticationUtil.java index 1ba2b16a4f8..156305e0dbc 100644 --- a/plugins/org.eclipse.osee.authentication.admin/src/org/eclipse/osee/authentication/admin/internal/AuthenticationUtil.java +++ b/plugins/org.eclipse.osee.authentication.admin/src/org/eclipse/osee/authentication/admin/internal/AuthenticationUtil.java @@ -35,7 +35,7 @@ public final class AuthenticationUtil { } public static Iterable<String> unmodifiableSortedIterable(Collection<String> source) { - List<String> list = new ArrayList<String>(); + List<String> list = new ArrayList<>(); list.addAll(source); Collections.sort(list); return Collections.unmodifiableList(list); diff --git a/plugins/org.eclipse.osee.authentication.ldap.test/src/org/eclipse/osee/authentication/ldap/internal/LdapConfigurationBuilderTest.java b/plugins/org.eclipse.osee.authentication.ldap.test/src/org/eclipse/osee/authentication/ldap/internal/LdapConfigurationBuilderTest.java index 10efe4be780..11b1daaee5f 100644 --- a/plugins/org.eclipse.osee.authentication.ldap.test/src/org/eclipse/osee/authentication/ldap/internal/LdapConfigurationBuilderTest.java +++ b/plugins/org.eclipse.osee.authentication.ldap.test/src/org/eclipse/osee/authentication/ldap/internal/LdapConfigurationBuilderTest.java @@ -134,7 +134,7 @@ public class LdapConfigurationBuilderTest { @Test public void testConfigProperties() { - Map<String, Object> props = new HashMap<String, Object>(); + Map<String, Object> props = new HashMap<>(); add(props, LdapConstants.LDAP_AUTHENTICATION_TYPE, AUTHENTICATION_TYPE); add(props, LdapConstants.LDAP_CREDENTIALS_SOURCE, CREDENTIALS_SOURCE); diff --git a/plugins/org.eclipse.osee.authentication.ldap.test/src/org/eclipse/osee/authentication/ldap/internal/util/VariablePatternTest.java b/plugins/org.eclipse.osee.authentication.ldap.test/src/org/eclipse/osee/authentication/ldap/internal/util/VariablePatternTest.java index 2d2439c3105..c804a2f28ce 100644 --- a/plugins/org.eclipse.osee.authentication.ldap.test/src/org/eclipse/osee/authentication/ldap/internal/util/VariablePatternTest.java +++ b/plugins/org.eclipse.osee.authentication.ldap.test/src/org/eclipse/osee/authentication/ldap/internal/util/VariablePatternTest.java @@ -72,9 +72,9 @@ public class VariablePatternTest { @Parameters public static Collection<Object[]> getData() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); - Map<String, String> params = new HashMap<String, String>(); + Map<String, String> params = new HashMap<>(); params.put("y", "hello"); params.put("c", "ball"); params.put("a", "cat"); diff --git a/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/LdapAuthenticationManager.java b/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/LdapAuthenticationManager.java index 31b2e1dfada..433ccdc4761 100644 --- a/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/LdapAuthenticationManager.java +++ b/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/LdapAuthenticationManager.java @@ -130,7 +130,7 @@ public final class LdapAuthenticationManager { } private Set<String> getRoles(LdapConnection connection, String username, LdapAccount account) { - Set<String> roles = new LinkedHashSet<String>(); + Set<String> roles = new LinkedHashSet<>(); try { Set<LdapGroup> groups = connection.findGroups(ldapFilter, username, account); if (Strings.isValid(groupNamespace)) { diff --git a/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/LdapClient.java b/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/LdapClient.java index 6ce1c1eb0d2..3cf4ad15012 100644 --- a/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/LdapClient.java +++ b/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/LdapClient.java @@ -86,7 +86,7 @@ public class LdapClient implements ContextConfigProvider { @Override public Hashtable<String, String> getContextConfig() { - Hashtable<String, String> props = new Hashtable<String, String>(); + Hashtable<String, String> props = new Hashtable<>(); props.put(Context.INITIAL_CONTEXT_FACTORY, LDAP_INITIAL_CONTEXT_FACTORY); props.put(Context.PROVIDER_URL, getServerAddress()); props.put(Context.REFERRAL, getReferralHandling().getContextReferralName()); diff --git a/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/LdapConnection.java b/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/LdapConnection.java index 12d88514b85..4b1efa0388c 100644 --- a/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/LdapConnection.java +++ b/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/LdapConnection.java @@ -134,7 +134,7 @@ public class LdapConnection implements Closeable { LdapSearchScope accountSearchScope = LdapUtil.getValue(filter.getAccountSearchScope(), defaultFilter.getAccountSearchScope()); - Set<String> fieldsToGet = new HashSet<String>(); + Set<String> fieldsToGet = new HashSet<>(); VariablePattern accountSearchPattern = patternField(fieldsToGet, filter.getAccountPattern(), defaultFilter.getAccountPattern()); VariablePattern accountFullName = @@ -164,7 +164,7 @@ public class LdapConnection implements Closeable { .fields(fieldsToGet)// .scope(accountSearchScope); - HashMap<String, String> params = new HashMap<String, String>(); + HashMap<String, String> params = new HashMap<>(); params.put(usernameVariableName, username); ResultSet<LdapEntry> results = query.search(connection, params); @@ -186,7 +186,7 @@ public class LdapConnection implements Closeable { LdapSearchScope groupSearchScope = LdapUtil.getValue(filter.getGroupSearchScope(), defaultFilter.getGroupSearchScope()); - Set<String> fieldsToGet = new HashSet<String>(); + Set<String> fieldsToGet = new HashSet<>(); VariablePattern groupNamePattern = patternField(fieldsToGet, filter.getGroupName(), defaultFilter.getGroupName()); VariablePattern groupByGroupMemberPattern = patternField(fieldsToGet, filter.getGroupByGroupMemberPattern(), defaultFilter.getGroupByGroupMemberPattern()); @@ -206,7 +206,7 @@ public class LdapConnection implements Closeable { .fields(fieldsToGet)// .scope(groupSearchScope); - HashMap<String, String> params = new HashMap<String, String>(); + HashMap<String, String> params = new HashMap<>(); for (String key : query.getParameters()) { String value = account.getField(key); if (Strings.isValid(value)) { @@ -217,8 +217,8 @@ public class LdapConnection implements Closeable { results = query.search(connection, params); } - Set<LdapGroup> groups = new HashSet<LdapGroup>(); - Set<String> groupDns = new HashSet<String>(); + Set<LdapGroup> groups = new HashSet<>(); + Set<String> groupDns = new HashSet<>(); for (LdapEntry entry : results) { findSubGroups(groups, groupDns, groupNamePattern, memberOfField, entry); } diff --git a/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/util/LdapEntry.java b/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/util/LdapEntry.java index 61b480d0550..0f0b4e6f906 100644 --- a/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/util/LdapEntry.java +++ b/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/util/LdapEntry.java @@ -47,7 +47,7 @@ public final class LdapEntry { } public Map<String, String> asMap() throws NamingException { - Map<String, String> toReturn = new HashMap<String, String>(); + Map<String, String> toReturn = new HashMap<>(); for (String key : keySet()) { toReturn.put(key, get(key)); } diff --git a/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/util/LdapQuery.java b/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/util/LdapQuery.java index 092cd206a4d..841b6b526e9 100644 --- a/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/util/LdapQuery.java +++ b/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/util/LdapQuery.java @@ -41,7 +41,7 @@ public final class LdapQuery { private LdapSearchScope searchScope; private VariablePattern pattern; - private final Set<String> itemsToReturn = new HashSet<String>(); + private final Set<String> itemsToReturn = new HashSet<>(); public LdapQuery(Log logger) { this.logger = logger; @@ -97,7 +97,7 @@ public final class LdapQuery { if (!itemsToReturn.isEmpty()) { attributesToReturn = itemsToReturn.toArray(new String[itemsToReturn.size()]); } - List<LdapEntry> results = new LinkedList<LdapEntry>(); + List<LdapEntry> results = new LinkedList<>(); search(results, connection, base, searchPattern, searchBindings, attributesToReturn, searchDepth); return ResultSets.newResultSet(results); } @@ -150,7 +150,7 @@ public final class LdapQuery { private static abstract class AttributeProcessor { public LdapEntry process(SearchResult rSet) { - Map<String, Attribute> attributes = new HashMap<String, Attribute>(); + Map<String, Attribute> attributes = new HashMap<>(); String distinguishedName = rSet.getNameInNamespace(); Attribute attribute = new BasicAttribute(LdapEntry.LDAP_ENTRY__DISTINGUISHED_NAME_KEY, distinguishedName); diff --git a/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/util/VariablePattern.java b/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/util/VariablePattern.java index 809a12d3c9b..c64a0f302a4 100644 --- a/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/util/VariablePattern.java +++ b/plugins/org.eclipse.osee.authentication.ldap/src/org/eclipse/osee/authentication/ldap/internal/util/VariablePattern.java @@ -54,7 +54,7 @@ public final class VariablePattern { } public List<String> getVariableNames() { - List<String> toReturn = new ArrayList<String>(variables.size()); + List<String> toReturn = new ArrayList<>(variables.size()); for (Variable variable : variables) { toReturn.add(variable.getName()); } @@ -86,7 +86,7 @@ public final class VariablePattern { } public static VariablePattern newPattern(String pattern) { - List<Variable> variables = new ArrayList<Variable>(); + List<Variable> variables = new ArrayList<>(); StringBuilder builder = new StringBuilder(); int size = pattern.length(); int index = 0; diff --git a/plugins/org.eclipse.osee.authorization.admin.test/src/org/eclipse/osee/authorization/admin/internal/AuthorizationAdminImplTest.java b/plugins/org.eclipse.osee.authorization.admin.test/src/org/eclipse/osee/authorization/admin/internal/AuthorizationAdminImplTest.java index cb0af22089c..318ddb08058 100644 --- a/plugins/org.eclipse.osee.authorization.admin.test/src/org/eclipse/osee/authorization/admin/internal/AuthorizationAdminImplTest.java +++ b/plugins/org.eclipse.osee.authorization.admin.test/src/org/eclipse/osee/authorization/admin/internal/AuthorizationAdminImplTest.java @@ -149,7 +149,7 @@ public class AuthorizationAdminImplTest { public void testAuthorizeExceptionProviderReturnsNull() { admin.addAuthorizationProvider(provider1); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(AuthorizationConstants.AUTHORIZATION_OVERRIDE, AuthorizationOverride.NONE); properties.put(AuthorizationConstants.AUTHORIZATION_SCHEME_ALLOWED, SCHEME_1); admin.update(properties); @@ -174,7 +174,7 @@ public class AuthorizationAdminImplTest { public void testAuthorizeExceptionProviderWasNull() { Date date = new Date(); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(AuthorizationConstants.AUTHORIZATION_OVERRIDE, AuthorizationOverride.NONE); properties.put(AuthorizationConstants.AUTHORIZATION_SCHEME_ALLOWED, SCHEME_1); admin.update(properties); @@ -198,7 +198,7 @@ public class AuthorizationAdminImplTest { Date date = new Date(); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(AuthorizationConstants.AUTHORIZATION_OVERRIDE, AuthorizationOverride.NONE); properties.put(AuthorizationConstants.AUTHORIZATION_SCHEME_ALLOWED, SCHEME_1); admin.update(properties); @@ -235,7 +235,7 @@ public class AuthorizationAdminImplTest { iterator = admin.getAllowedSchemes().iterator(); assertEquals(false, iterator.hasNext()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(AuthorizationConstants.AUTHORIZATION_SCHEME_ALLOWED, SCHEME_1); admin.update(properties); @@ -262,7 +262,7 @@ public class AuthorizationAdminImplTest { actual = admin.isSchemeAllowed(SCHEME_2); assertEquals(false, actual); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(AuthorizationConstants.AUTHORIZATION_SCHEME_ALLOWED, SCHEME_1); admin.update(properties); @@ -290,7 +290,7 @@ public class AuthorizationAdminImplTest { assertEquals(DEFAULT_SCHEME, iterator.next()); assertEquals(false, iterator.hasNext()); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); admin.update(properties); iterator = admin.getAvailableSchemes().iterator(); @@ -310,7 +310,7 @@ public class AuthorizationAdminImplTest { public void testAuthorizeWithDefault() { Date date = new Date(); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(AuthorizationConstants.AUTHORIZATION_SCHEME_ALLOWED, DEFAULT_SCHEME); admin.update(properties); @@ -340,7 +340,7 @@ public class AuthorizationAdminImplTest { Date date = new Date(); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(AuthorizationConstants.AUTHORIZATION_OVERRIDE, AuthorizationOverride.NONE); properties.put(AuthorizationConstants.AUTHORIZATION_SCHEME_ALLOWED, SCHEME_1); admin.update(properties); diff --git a/plugins/org.eclipse.osee.authorization.admin.test/src/org/eclipse/osee/authorization/admin/internal/AuthorizationConfigurationBuilderTest.java b/plugins/org.eclipse.osee.authorization.admin.test/src/org/eclipse/osee/authorization/admin/internal/AuthorizationConfigurationBuilderTest.java index 39b0419f9a5..5da7222a1df 100644 --- a/plugins/org.eclipse.osee.authorization.admin.test/src/org/eclipse/osee/authorization/admin/internal/AuthorizationConfigurationBuilderTest.java +++ b/plugins/org.eclipse.osee.authorization.admin.test/src/org/eclipse/osee/authorization/admin/internal/AuthorizationConfigurationBuilderTest.java @@ -69,7 +69,7 @@ public class AuthorizationConfigurationBuilderTest { @Test public void testConfigProperties() { - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(AuthorizationConstants.AUTHORIZATION_OVERRIDE, AuthorizationOverride.DENY_ALL); properties.put(AuthorizationConstants.AUTHORIZATION_SCHEME_ALLOWED, SCHEME_2); builder.properties(properties); diff --git a/plugins/org.eclipse.osee.authorization.admin/src/org/eclipse/osee/authorization/admin/AuthorizationConfigurationBuilder.java b/plugins/org.eclipse.osee.authorization.admin/src/org/eclipse/osee/authorization/admin/AuthorizationConfigurationBuilder.java index 3adbdbb5d87..ac94f5a2944 100644 --- a/plugins/org.eclipse.osee.authorization.admin/src/org/eclipse/osee/authorization/admin/AuthorizationConfigurationBuilder.java +++ b/plugins/org.eclipse.osee.authorization.admin/src/org/eclipse/osee/authorization/admin/AuthorizationConfigurationBuilder.java @@ -59,7 +59,7 @@ public class AuthorizationConfigurationBuilder { private static final class AuthorizationConfigurationImpl implements AuthorizationConfiguration, Cloneable { private AuthorizationOverride override; - private final Set<String> schemes = new HashSet<String>(); + private final Set<String> schemes = new HashSet<>(); private String defaultScheme; @Override @@ -129,7 +129,7 @@ public class AuthorizationConfigurationBuilder { } private Collection<String> getSet(Map<String, Object> props, String key, String defaultValue) { - Set<String> toReturn = new HashSet<String>(); + Set<String> toReturn = new HashSet<>(); String joinedArray = get(props, key, ""); if (Strings.isValid(joinedArray)) { String[] split = joinedArray.split(","); diff --git a/plugins/org.eclipse.osee.authorization.admin/src/org/eclipse/osee/authorization/admin/internal/AuthorizationAdminImpl.java b/plugins/org.eclipse.osee.authorization.admin/src/org/eclipse/osee/authorization/admin/internal/AuthorizationAdminImpl.java index ff0c139db4f..265773d5615 100644 --- a/plugins/org.eclipse.osee.authorization.admin/src/org/eclipse/osee/authorization/admin/internal/AuthorizationAdminImpl.java +++ b/plugins/org.eclipse.osee.authorization.admin/src/org/eclipse/osee/authorization/admin/internal/AuthorizationAdminImpl.java @@ -38,7 +38,7 @@ public class AuthorizationAdminImpl implements AuthorizationAdmin { private static final Authority PERMIT_ALL_OVERRIDE = new PermitAllAuthority(); private static final Authority DENY_ALL_OVERRIDE = new DenyAllAuthority(); - private final Map<String, AuthorizationProvider> providers = new ConcurrentHashMap<String, AuthorizationProvider>(); + private final Map<String, AuthorizationProvider> providers = new ConcurrentHashMap<>(); private Log logger; private AuthorizationConfiguration config; diff --git a/plugins/org.eclipse.osee.authorization.admin/src/org/eclipse/osee/authorization/admin/internal/AuthorizationUtil.java b/plugins/org.eclipse.osee.authorization.admin/src/org/eclipse/osee/authorization/admin/internal/AuthorizationUtil.java index 6dff7b922fa..8ac835bd2e9 100644 --- a/plugins/org.eclipse.osee.authorization.admin/src/org/eclipse/osee/authorization/admin/internal/AuthorizationUtil.java +++ b/plugins/org.eclipse.osee.authorization.admin/src/org/eclipse/osee/authorization/admin/internal/AuthorizationUtil.java @@ -30,7 +30,7 @@ public final class AuthorizationUtil { } public static Iterable<String> unmodifiableSortedIterable(Collection<String> source) { - List<String> list = new ArrayList<String>(); + List<String> list = new ArrayList<>(); list.addAll(source); Collections.sort(list); return Collections.unmodifiableList(list); diff --git a/plugins/org.eclipse.osee.cache.admin.test/src/org/eclipse/osee/cache/admin/internal/LoadingCacheTest.java b/plugins/org.eclipse.osee.cache.admin.test/src/org/eclipse/osee/cache/admin/internal/LoadingCacheTest.java index d656bc44b26..9163537dca4 100644 --- a/plugins/org.eclipse.osee.cache.admin.test/src/org/eclipse/osee/cache/admin/internal/LoadingCacheTest.java +++ b/plugins/org.eclipse.osee.cache.admin.test/src/org/eclipse/osee/cache/admin/internal/LoadingCacheTest.java @@ -144,7 +144,7 @@ public class LoadingCacheTest { Iterable<? extends String> keysInStore = Arrays.asList(KEY_1, KEY_2); when(keyLoader.getAllKeys()).thenAnswer(createAnswer(keysInStore)); - Map<String, Object> data = new LinkedHashMap<String, Object>(); + Map<String, Object> data = new LinkedHashMap<>(); data.put(KEY_1, OBJECT_1); data.put(KEY_2, OBJECT_2); when(dataLoader.load(Matchers.<Iterable<? extends String>> any())).thenAnswer(createAnswer(data)); @@ -189,7 +189,7 @@ public class LoadingCacheTest { Iterable<? extends String> keysInStore = Arrays.asList(KEY_1, KEY_2); when(keyLoader.getAllKeys()).thenAnswer(createAnswer(keysInStore)); - Map<String, Object> data = new LinkedHashMap<String, Object>(); + Map<String, Object> data = new LinkedHashMap<>(); data.put(KEY_1, OBJECT_1); data.put(KEY_2, OBJECT_2); when(dataLoader.load(Matchers.<Iterable<? extends String>> any())).thenAnswer(createAnswer(data)); @@ -244,7 +244,7 @@ public class LoadingCacheTest { Iterable<? extends String> keysInStore = Arrays.asList(KEY_1, KEY_2, KEY_3); when(keyLoader.getAllKeys()).thenAnswer(createAnswer(keysInStore)); - Map<String, Object> data = new LinkedHashMap<String, Object>(); + Map<String, Object> data = new LinkedHashMap<>(); data.put(KEY_1, OBJECT_1); data.put(KEY_2, OBJECT_2); data.put(KEY_3, OBJECT_3); @@ -266,7 +266,7 @@ public class LoadingCacheTest { Iterable<? extends String> keysInStore = Arrays.asList(KEY_1, KEY_2, KEY_3); when(keyLoader.getAllKeys()).thenAnswer(createAnswer(keysInStore)); - Map<String, Object> data = new LinkedHashMap<String, Object>(); + Map<String, Object> data = new LinkedHashMap<>(); data.put(KEY_1, OBJECT_1); data.put(KEY_2, OBJECT_2); data.put(KEY_3, OBJECT_3); @@ -291,7 +291,7 @@ public class LoadingCacheTest { Iterable<? extends String> keysInStore = Arrays.asList(KEY_1, KEY_2, KEY_3); when(keyLoader.getAllKeys()).thenAnswer(createAnswer(keysInStore)); - Map<String, Object> data = new LinkedHashMap<String, Object>(); + Map<String, Object> data = new LinkedHashMap<>(); data.put(KEY_1, OBJECT_1); data.put(KEY_2, OBJECT_2); data.put(KEY_3, OBJECT_3); @@ -316,7 +316,7 @@ public class LoadingCacheTest { Iterable<? extends String> keysInStore = Arrays.asList(KEY_1, KEY_2, KEY_3); when(keyLoader.getAllKeys()).thenAnswer(createAnswer(keysInStore)); - Map<String, Object> data = new LinkedHashMap<String, Object>(); + Map<String, Object> data = new LinkedHashMap<>(); data.put(KEY_1, OBJECT_1); data.put(KEY_2, OBJECT_2); data.put(KEY_3, OBJECT_3); diff --git a/plugins/org.eclipse.osee.cache.admin/src/org/eclipse/osee/cache/admin/CacheConfiguration.java b/plugins/org.eclipse.osee.cache.admin/src/org/eclipse/osee/cache/admin/CacheConfiguration.java index 881cd78dc45..8ac5778b4c7 100644 --- a/plugins/org.eclipse.osee.cache.admin/src/org/eclipse/osee/cache/admin/CacheConfiguration.java +++ b/plugins/org.eclipse.osee.cache.admin/src/org/eclipse/osee/cache/admin/CacheConfiguration.java @@ -20,7 +20,7 @@ import org.eclipse.osee.framework.jdk.core.type.Pair; public class CacheConfiguration { private static final int DEFAULT_UNSET = -1; - private static final Pair<Long, TimeUnit> UNSET_EXPIRATION = new Pair<Long, TimeUnit>(-1L, TimeUnit.NANOSECONDS); + private static final Pair<Long, TimeUnit> UNSET_EXPIRATION = new Pair<>(-1L, TimeUnit.NANOSECONDS); private int initialCapacity = DEFAULT_UNSET; private long maxSize = DEFAULT_UNSET; @@ -58,7 +58,7 @@ public class CacheConfiguration { } public void setExpireAfterAccess(long duration, TimeUnit timeUnit) { - this.expireAfterAccess = new Pair<Long, TimeUnit>(duration, timeUnit); + this.expireAfterAccess = new Pair<>(duration, timeUnit); } public boolean isExpireAfterWrite() { @@ -66,7 +66,7 @@ public class CacheConfiguration { } public void setExpireAfterWrite(long duration, TimeUnit timeUnit) { - this.expireAfterWrite = new Pair<Long, TimeUnit>(duration, timeUnit); + this.expireAfterWrite = new Pair<>(duration, timeUnit); } public boolean isRefreshAfterWrite() { @@ -74,7 +74,7 @@ public class CacheConfiguration { } public void setRefreshAfterWrite(long duration, TimeUnit timeUnit) { - this.refreshAfterWrite = new Pair<Long, TimeUnit>(duration, timeUnit); + this.refreshAfterWrite = new Pair<>(duration, timeUnit); } public int getInitialCapacity() { diff --git a/plugins/org.eclipse.osee.cache.admin/src/org/eclipse/osee/cache/admin/internal/CacheFactory.java b/plugins/org.eclipse.osee.cache.admin/src/org/eclipse/osee/cache/admin/internal/CacheFactory.java index 27ceb88f78e..858fff74b3f 100644 --- a/plugins/org.eclipse.osee.cache.admin/src/org/eclipse/osee/cache/admin/internal/CacheFactory.java +++ b/plugins/org.eclipse.osee.cache.admin/src/org/eclipse/osee/cache/admin/internal/CacheFactory.java @@ -35,7 +35,7 @@ public class CacheFactory { public <K, V> Cache<K, V> createCache(final CacheConfiguration config) throws Exception { Preconditions.checkNotNull(config, "cacheConfiguration"); com.google.common.cache.Cache<K, V> cache = createCacheBuilder(config).build(); - Cache<K, V> toReturn = new CacheProxy<K, V>(cache); + Cache<K, V> toReturn = new CacheProxy<>(cache); return toReturn; } @@ -62,7 +62,7 @@ public class CacheFactory { return Futures.immediateFuture(newValue); } }); - Cache<K, V> toReturn = new LoadingCacheProxy<K, V>(loadingCache, keyLoader); + Cache<K, V> toReturn = new LoadingCacheProxy<>(loadingCache, keyLoader); return toReturn; } diff --git a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/DemoSubsystems.java b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/DemoSubsystems.java index 4f8b51c17fa..1e2a6c3ed93 100644 --- a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/DemoSubsystems.java +++ b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/DemoSubsystems.java @@ -37,7 +37,7 @@ public enum DemoSubsystems { } public static Collection<String> getSubsystems() { - ArrayList<String> subsystems = new ArrayList<String>(); + ArrayList<String> subsystems = new ArrayList<>(); for (DemoSubsystems subsystem : DemoSubsystems.values()) { subsystems.add(subsystem.name()); } diff --git a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddDemoUsers.java b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddDemoUsers.java index 50c32fa1959..af770da90f5 100644 --- a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddDemoUsers.java +++ b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddDemoUsers.java @@ -30,7 +30,7 @@ public class AddDemoUsers implements IDbInitializationTask { @Override public void run() throws OseeCoreException { - List<User> admins = new ArrayList<User>(); + List<User> admins = new ArrayList<>(); SkynetTransaction transaction = TransactionManager.createTransaction(CoreBranches.COMMON, "Add Dev Users"); for (IUserToken userEnum : DemoUsers.values()) { diff --git a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddRequirementData.java b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddRequirementData.java index c9bf0002743..0b417e19a0d 100644 --- a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddRequirementData.java +++ b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/AddRequirementData.java @@ -176,7 +176,7 @@ public class AddRequirementData implements IDbInitializationTask { } // Create Test Script Artifacts - Set<Artifact> verificationTests = new HashSet<Artifact>(); + Set<Artifact> verificationTests = new HashSet<>(); Artifact verificationHeader = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Folder, "Verification Tests", branch); if (verificationHeader == null) { @@ -193,7 +193,7 @@ public class AddRequirementData implements IDbInitializationTask { Artifact verificationTestsArray[] = verificationTests.toArray(new Artifact[verificationTests.size()]); // Create Validation Test Procedure Artifacts - Set<Artifact> validationTests = new HashSet<Artifact>(); + Set<Artifact> validationTests = new HashSet<>(); Artifact validationHeader = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Folder, "Validation Tests", branch); if (validationHeader == null) { @@ -210,7 +210,7 @@ public class AddRequirementData implements IDbInitializationTask { Artifact validationTestsArray[] = validationTests.toArray(new Artifact[validationTests.size()]); // Create Integration Test Procedure Artifacts - Set<Artifact> integrationTests = new HashSet<Artifact>(); + Set<Artifact> integrationTests = new HashSet<>(); Artifact integrationHeader = ArtifactQuery.getArtifactFromTypeAndName(CoreArtifactTypes.Folder, "Integration Tests", branch); if (integrationHeader == null) { diff --git a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/traceability/DemoTraceParser.java b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/traceability/DemoTraceParser.java index ff6c8fec328..58ed3412cd5 100644 --- a/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/traceability/DemoTraceParser.java +++ b/plugins/org.eclipse.osee.client.demo/src/org/eclipse/osee/client/demo/internal/traceability/DemoTraceParser.java @@ -23,7 +23,7 @@ public class DemoTraceParser implements ITraceParser { @Override public Collection<TraceMark> getTraceMarks(CharBuffer fileBuffer) { - Collection<TraceMark> traceMarks = new HashSet<TraceMark>(); + Collection<TraceMark> traceMarks = new HashSet<>(); String type = "Uses"; traceMarks.add(new TraceMark(type, "Collaborative Robot")); traceMarks.add(new TraceMark(type, "Robot Object")); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java index 243781a2691..94e2d818070 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/ImportTraceUnitsOperationTest.java @@ -110,7 +110,7 @@ public final class ImportTraceUnitsOperationTest { @Test public void testImportTraceUnitsJob() throws Exception { - ArrayList<Integer> gammas = new ArrayList<Integer>(RUNS); + ArrayList<Integer> gammas = new ArrayList<>(RUNS); for (int i = 0; i < RUNS; i++) { runOperation(Arrays.asList(testFile.toURI())); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/TestPlanComplianceReportTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/TestPlanComplianceReportTest.java index a418a666c26..4db0bc6837b 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/TestPlanComplianceReportTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/define/TestPlanComplianceReportTest.java @@ -123,7 +123,7 @@ public final class TestPlanComplianceReportTest { ArtifactTypeManager.addArtifact(CoreArtifactTypes.TestPlanElement, SAW_Bld_1, "Sample_Test_Plan"); testPlan.persist(getClass().getSimpleName()); - dummyArtifactList = new ArrayList<Artifact>(); + dummyArtifactList = new ArrayList<>(); dummyArtifactList.add(testPlan); for (int i = 0; i < amountOfTestProcedures; i++) { diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/dsl/ui/integration/OseeDslRoleContextProviderTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/dsl/ui/integration/OseeDslRoleContextProviderTest.java index 2d476fc73a3..5a641777ce9 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/dsl/ui/integration/OseeDslRoleContextProviderTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/dsl/ui/integration/OseeDslRoleContextProviderTest.java @@ -79,7 +79,7 @@ public class OseeDslRoleContextProviderTest { Assert.assertEquals(2, contextIds.size()); Iterator<? extends IAccessContextId> iterator = contextIds.iterator(); - List<String> contextList = new LinkedList<String>(); + List<String> contextList = new LinkedList<>(); contextList.add(contextGuid1); contextList.add(contextGuid2); Assert.assertTrue(contextList.remove(iterator.next().getGuid())); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactCacheQueryTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactCacheQueryTest.java index d5e2c2d1807..cbf4eea6d17 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactCacheQueryTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactCacheQueryTest.java @@ -189,7 +189,7 @@ public class ArtifactCacheQueryTest { ex instanceof ArtifactDoesNotExist); } - Collection<Artifact> artifacts = new ArrayList<Artifact>(); + Collection<Artifact> artifacts = new ArrayList<>(); SkynetTransaction transaction = TransactionManager.createTransaction(branch, "testGetSingletonArtifactOrException"); for (int index = 0; index < 2; index++) { @@ -244,7 +244,7 @@ public class ArtifactCacheQueryTest { */ @org.junit.Test public void testGetSingletonArtifactStringStringBranch() throws OseeCoreException { - List<Artifact> itemsCreated = new ArrayList<Artifact>(); + List<Artifact> itemsCreated = new ArrayList<>(); // create single artifact with eee staticId Artifact artifact = diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java index f5fa20ca3b6..812f82baba7 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java @@ -202,7 +202,7 @@ public class ArtifactEventTest { Assert.assertTrue(orderedChildren.get(3).getName().endsWith(" 4")); Assert.assertTrue(orderedChildren.get(4).getName().endsWith(" 5")); - List<Artifact> artifactsInNewOrder = new ArrayList<Artifact>(); + List<Artifact> artifactsInNewOrder = new ArrayList<>(); artifactsInNewOrder.add(orderedChildren.get(0)); artifactsInNewOrder.add(orderedChildren.get(1)); artifactsInNewOrder.add(orderedChildren.get(3)); @@ -882,8 +882,8 @@ public class ArtifactEventTest { private static final class ArtifactEventListener implements IArtifactEventListener { - private final Set<EventBasicGuidArtifact> resultEventArtifacts = new HashSet<EventBasicGuidArtifact>(); - private final Set<EventBasicGuidRelation> resultEventRelations = new HashSet<EventBasicGuidRelation>(); + private final Set<EventBasicGuidArtifact> resultEventArtifacts = new HashSet<>(); + private final Set<EventBasicGuidRelation> resultEventRelations = new HashSet<>(); private final Set<DefaultBasicUuidRelationReorder> resultEventReorders = new HashSet<DefaultBasicUuidRelationReorder>(); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactLoaderTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactLoaderTest.java index 2536b1cdf20..016edf2b809 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactLoaderTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactLoaderTest.java @@ -111,7 +111,7 @@ public class ArtifactLoaderTest { ArtifactCache.deCache(artifact); } - Collection<LoadArtifacts> tasks = new ArrayList<LoadArtifacts>(); + Collection<LoadArtifacts> tasks = new ArrayList<>(); for (int x = 1; x <= TOTAL_THREADS; x++) { tasks.add(new LoadArtifacts()); } @@ -163,7 +163,7 @@ public class ArtifactLoaderTest { // now, de-cache them ArtifactCache.deCache(testArt); - List<Callable<String>> callables = new LinkedList<Callable<String>>(); + List<Callable<String>> callables = new LinkedList<>(); int size = 4; //create 4 threads to load the same artifact @@ -187,7 +187,7 @@ public class ArtifactLoaderTest { @Test(timeout = 5000) public void testLoadingNonExistingArtifactMultipleTimes() throws InterruptedException { - final List<Integer> artIds = new LinkedList<Integer>(); + final List<Integer> artIds = new LinkedList<>(); artIds.add(Integer.MAX_VALUE); artIds.add(Integer.MIN_VALUE); Job job1 = Operations.executeAsJob(new IOperation() { diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactQueryTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactQueryTest.java index 37f6f7e7f12..83221115590 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactQueryTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactQueryTest.java @@ -114,7 +114,7 @@ public class ArtifactQueryTest { @Test public void testGetArtifactListFromType() throws OseeCoreException { // Should exist - Set<Artifact> searchedArtifacts = new LinkedHashSet<Artifact>(); + Set<Artifact> searchedArtifacts = new LinkedHashSet<>(); List<Branch> branches = BranchManager.getBranches(new BranchFilter(BranchType.BASELINE)); for (IOseeBranch branch : branches) { List<Artifact> results = @@ -143,7 +143,7 @@ public class ArtifactQueryTest { @Test public void testNotTaggableGetArtifactListFromAttributeType() { - List<ArtifactSearchCriteria> criteria = new ArrayList<ArtifactSearchCriteria>(); + List<ArtifactSearchCriteria> criteria = new ArrayList<>(); criteria.add(new AttributeCriteria(CoreAttributeTypes.FavoriteBranch, "Common", QueryOption.TOKEN_DELIMITER__ANY)); // test against a couple of attributes types that are not taggable; expect exception @@ -215,8 +215,8 @@ public class ArtifactQueryTest { public void testQueryById() throws OseeCoreException { Branch branch = BranchManager.createTopLevelBranch(testInfo.getTestName() + " branch"); - List<Integer> newIdsInOrder = new LinkedList<Integer>(); - Map<Integer, TransactionRecord> idToTxId = new HashMap<Integer, TransactionRecord>(); + List<Integer> newIdsInOrder = new LinkedList<>(); + Map<Integer, TransactionRecord> idToTxId = new HashMap<>(); //create 3 artifacts, decache them for (int i = 0; i < 2; i++) { Artifact created = ArtifactTypeManager.addArtifact(CoreArtifactTypes.Folder, branch); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactTypeInheritanceTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactTypeInheritanceTest.java index 9ebfbcb4d99..7a84a10d091 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactTypeInheritanceTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactTypeInheritanceTest.java @@ -59,7 +59,7 @@ public class ArtifactTypeInheritanceTest { @Test public void testAttributeTypesOfDescendants() throws OseeCoreException { ArtifactType baseArtifactType = ArtifactTypeManager.getType(CoreArtifactTypes.Artifact); - Set<ArtifactType> allTypes = new HashSet<ArtifactType>(ArtifactTypeManager.getAllTypes()); + Set<ArtifactType> allTypes = new HashSet<>(ArtifactTypeManager.getAllTypes()); allTypes.remove(baseArtifactType); Branch branch = BranchManager.getBranch(CoreBranches.SYSTEM_ROOT); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/AttributePurgeTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/AttributePurgeTest.java index 58681379d88..b4f6675bdb2 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/AttributePurgeTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/AttributePurgeTest.java @@ -65,7 +65,7 @@ public class AttributePurgeTest { // Count rows and check that increased Asserts.assertThatIncreased(initialRowCount, TestUtil.getTableRowCounts(TABLES)); - Set<Attribute<?>> attributesToPurge = new HashSet<Attribute<?>>(); + Set<Attribute<?>> attributesToPurge = new HashSet<>(); for (Artifact softArt : softArts) { attributesToPurge.addAll(softArt.getAttributes(CoreAttributeTypes.StaticId)); } diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeDataTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeDataTest.java index 51dd50cbbac..b7a528f3bcc 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeDataTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeDataTest.java @@ -60,7 +60,7 @@ public class ChangeDataTest { @Before public void setUp() throws OseeCoreException { workingBranch = BranchManager.createWorkingBranch(DemoBranches.SAW_Bld_1, method.getQualifiedTestName()); - ArrayList<Change> theChanges = new ArrayList<Change>(); + ArrayList<Change> theChanges = new ArrayList<>(); Artifact artifactStart = ArtifactTypeManager.addArtifact(CoreArtifactTypes.SoftwareRequirement, workingBranch); Artifact artifactEnd = artifactStart.duplicate(workingBranch); @@ -139,7 +139,7 @@ public class ChangeDataTest { @Test public void testGetSubset() throws Exception { - ArrayList<IAttributeType> typesToIgnore = new ArrayList<IAttributeType>(); + ArrayList<IAttributeType> typesToIgnore = new ArrayList<>(); typesToIgnore.add(CoreAttributeTypes.CrewInterfaceRequirement); Collection<Artifact> theChanges = diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeManagerTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeManagerTest.java index 7fce33b046a..13077e2513d 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeManagerTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ChangeManagerTest.java @@ -106,7 +106,7 @@ public class ChangeManagerTest { public static boolean checkArtifactModType(Artifact artifact, ModificationType modificationType) throws OseeCoreException { boolean pass = false; - Collection<Change> changes = new ArrayList<Change>(); + Collection<Change> changes = new ArrayList<>(); IOperation operation = ChangeManager.comparedToParent(artifact.getBranch(), changes); Operations.executeWorkAndCheckStatus(operation); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ConflictDeletionTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ConflictDeletionTest.java index 394310f1607..9e03f11bd9b 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ConflictDeletionTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ConflictDeletionTest.java @@ -86,7 +86,7 @@ public class ConflictDeletionTest { SevereLoggingMonitor monitorLog = new SevereLoggingMonitor(); OseeLog.registerLoggerListener(monitorLog); Collection<Artifact> artifacts = ConflictTestManager.getArtifacts(true, ConflictTestManager.DELETION_TEST_QUERY); - Collection<Artifact> artifactsToCheck = new LinkedList<Artifact>(); + Collection<Artifact> artifactsToCheck = new LinkedList<>(); int deletionTransaction = 0; for (Artifact artifact : artifacts) { artifactsToCheck.add(artifact); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/CreateBranchOperationTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/CreateBranchOperationTest.java index 7822f8370cb..d7ca346dea4 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/CreateBranchOperationTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/CreateBranchOperationTest.java @@ -89,7 +89,7 @@ public class CreateBranchOperationTest { */ @Test public void test_checkPreconditions_DisallowWorkingBranchCreation() throws OseeCoreException { - Set<BranchState> subset = new HashSet<BranchState>(Arrays.asList(BranchState.values())); + Set<BranchState> subset = new HashSet<>(Arrays.asList(BranchState.values())); Collection<BranchState> allowedStates = Arrays.asList(BranchState.DELETED, BranchState.REBASELINED); subset.removeAll(allowedStates); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/NativeArtifactTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/NativeArtifactTest.java index 01b5e77e4b3..a43564008ce 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/NativeArtifactTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/NativeArtifactTest.java @@ -52,7 +52,7 @@ public class NativeArtifactTest { private static final String ARTIFACT_NAME = NativeArtifactTest.class.getSimpleName(); - private final Set<Artifact> testArtifacts = new HashSet<Artifact>(); + private final Set<Artifact> testArtifacts = new HashSet<>(); @After public void cleanup() throws Exception { diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/OseeEnumerationValidationTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/OseeEnumerationValidationTest.java index 9c851eb542b..322ab01785f 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/OseeEnumerationValidationTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/OseeEnumerationValidationTest.java @@ -78,7 +78,7 @@ public class OseeEnumerationValidationTest { @Parameters public static Collection<Object[]> getData() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); addTest(data, "Test 1: Null", null, errorStatus("No enum const [enum.req.gfe.cfe].[null]")); addTest(data, "Test 2: Empty String", "", errorStatus("No enum const [enum.req.gfe.cfe].[]")); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationCacheTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationCacheTest.java index 505ba01eb16..6f2bbfe74ab 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationCacheTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationCacheTest.java @@ -83,7 +83,7 @@ public class RelationCacheTest { sourceLinksRelType1 = TestUtil.createLinks(4, branch1, relType1); sourceLinksRelType2 = TestUtil.createLinks(4, branch1, relType2); - sourceLinksRelType1AndType2 = new ArrayList<RelationLink>(); + sourceLinksRelType1AndType2 = new ArrayList<>(); sourceLinksRelType1AndType2.addAll(sourceLinksRelType1); sourceLinksRelType1AndType2.addAll(sourceLinksRelType2); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationDeletionTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationDeletionTest.java index e0472d8985c..d0463ad12eb 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationDeletionTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationDeletionTest.java @@ -52,7 +52,7 @@ public class RelationDeletionTest { @Before public void setup() { - artifacts = new ArrayList<Artifact>(); + artifacts = new ArrayList<>(); } @After diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationFilterUtilTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationFilterUtilTest.java index d8ded68692e..e24a0300b48 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationFilterUtilTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationFilterUtilTest.java @@ -63,7 +63,7 @@ public class RelationFilterUtilTest { List<RelationLink> sourceLinks = TestUtil.createLinks(4, branch1); Assert.assertEquals(4, sourceLinks.size()); - List<RelationLink> destination = new ArrayList<RelationLink>(); + List<RelationLink> destination = new ArrayList<>(); RelationFilterUtil.filter(null, destination, null); Assert.assertEquals(0, destination.size()); @@ -78,7 +78,7 @@ public class RelationFilterUtilTest { RelationMatcher excludeDeleteds = RelationFilterUtil.createMatcher(DeletionFlag.EXCLUDE_DELETED); - List<RelationLink> destination = new ArrayList<RelationLink>(); + List<RelationLink> destination = new ArrayList<>(); RelationFilterUtil.filter(sourceLinks, destination, excludeDeleteds); Assert.assertEquals(10, destination.size()); @@ -100,7 +100,7 @@ public class RelationFilterUtilTest { @Test public void testFindFirstRelationLinkIdFilter() { List<RelationLink> sourceLinks = TestUtil.createLinks(4, branch1); - List<RelationLink> destination = new ArrayList<RelationLink>(); + List<RelationLink> destination = new ArrayList<>(); int relationLinkToFind = 2; RelationMatcher relationLinkIdMatcher = @@ -136,7 +136,7 @@ public class RelationFilterUtilTest { // Test Side A Match RelationMatcher sideAmatcher = RelationFilterUtil.createFindFirstRelatedArtIdMatcher(55, RelationSide.SIDE_A); - List<RelationLink> destination = new ArrayList<RelationLink>(); + List<RelationLink> destination = new ArrayList<>(); RelationFilterUtil.filter(sourceLinks, destination, sideAmatcher); Assert.assertEquals(1, destination.size()); @@ -144,7 +144,7 @@ public class RelationFilterUtilTest { // Test Side B Match RelationMatcher sideBmatcher = RelationFilterUtil.createFindFirstRelatedArtIdMatcher(55, RelationSide.SIDE_B); - List<RelationLink> destination2 = new ArrayList<RelationLink>(); + List<RelationLink> destination2 = new ArrayList<>(); RelationFilterUtil.filter(sourceLinks, destination2, sideBmatcher); Assert.assertEquals(1, destination2.size()); @@ -166,7 +166,7 @@ public class RelationFilterUtilTest { // Find 3rd link since 2nd link is excluded because it is deleted RelationMatcher matcher1 = RelationFilterUtil.createMatcher(DeletionFlag.EXCLUDE_DELETED, sideBmatcher); - List<RelationLink> destination = new ArrayList<RelationLink>(); + List<RelationLink> destination = new ArrayList<>(); RelationFilterUtil.filter(sourceLinks, destination, matcher1); Assert.assertEquals(1, destination.size()); @@ -174,7 +174,7 @@ public class RelationFilterUtilTest { // Find 2nd link since we are including deleteds RelationMatcher matcher2 = RelationFilterUtil.createMatcher(DeletionFlag.INCLUDE_DELETED, sideBmatcher); - List<RelationLink> destination2 = new ArrayList<RelationLink>(); + List<RelationLink> destination2 = new ArrayList<>(); RelationFilterUtil.filter(sourceLinks, destination2, matcher2); Assert.assertEquals(1, destination2.size()); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationOrderingTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationOrderingTest.java index 7ffb2c98d3c..b488fcd5675 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationOrderingTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/RelationOrderingTest.java @@ -66,7 +66,7 @@ public class RelationOrderingTest { @Before public void setupArtifacts() throws Exception { - itemsToDelete = new HashSet<Artifact>(); + itemsToDelete = new HashSet<>(); parent = ArtifactTypeManager.addArtifact(CoreArtifactTypes.Folder, branch, "parent"); addToCleanup(parent); @@ -173,7 +173,7 @@ public class RelationOrderingTest { } private void checkUserDefined() throws OseeCoreException { - List<Artifact> children = new ArrayList<Artifact>(); + List<Artifact> children = new ArrayList<>(); children.add(child2); children.add(child3); children.add(child1); @@ -217,7 +217,7 @@ public class RelationOrderingTest { mainFolder.setSingletonAttributeValue(CoreAttributeTypes.StaticId, method.getQualifiedTestName()); OseeSystemArtifacts.getDefaultHierarchyRootArtifact(branch).addChild(mainFolder); - List<Artifact> children = new ArrayList<Artifact>(); + List<Artifact> children = new ArrayList<>(); for (int x = 0; x < 3; x++) { Artifact childArt = ArtifactTypeManager.addArtifact(CoreArtifactTypes.Folder, branch, "New Child " + x + " - " + guid); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/SkynetTransactionTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/SkynetTransactionTest.java index 416145493da..7d818c0bcfc 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/SkynetTransactionTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/SkynetTransactionTest.java @@ -222,7 +222,7 @@ public final class SkynetTransactionTest { private class WorkerThread extends Thread { private final IOseeBranch branch; private final Object lock; - private final Set<Artifact> data = new HashSet<Artifact>(); + private final Set<Artifact> data = new HashSet<>(); private Throwable ex; private final WorkerType workerType; diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/UserManagerTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/UserManagerTest.java index c5bfe8052ee..9e3f37bb3e6 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/UserManagerTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/UserManagerTest.java @@ -77,7 +77,7 @@ public final class UserManagerTest { transaction.execute(); - Set<Artifact> groups = new HashSet<Artifact>(); + Set<Artifact> groups = new HashSet<>(); groups.addAll(lithium.getRelatedArtifacts(CoreRelationTypes.Users_Artifact)); groups.addAll(sodium.getRelatedArtifacts(CoreRelationTypes.Users_Artifact)); @@ -85,7 +85,7 @@ public final class UserManagerTest { Assert.assertTrue(groups.size() > TEST_DEFAULT_GROUPS.length); - Set<String> verifiedNames = new HashSet<String>(); + Set<String> verifiedNames = new HashSet<>(); for (Artifact group : groups) { for (String groupName : TEST_DEFAULT_GROUPS) { if (group.getName().equals(groupName)) { diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/WordMlLinkHandlerTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/WordMlLinkHandlerTest.java index ed87d712efc..33aa3f9a53f 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/WordMlLinkHandlerTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/WordMlLinkHandlerTest.java @@ -128,7 +128,7 @@ public class WordMlLinkHandlerTest { addArtifact.setSoleAttributeFromString(CoreAttributeTypes.WordTemplateContent, wordData); addArtifact.persist(method.getTestName()); - Set<String> unknownGuids = new HashSet<String>(); + Set<String> unknownGuids = new HashSet<>(); WordMlLinkHandler.link(LinkType.OSEE_SERVER_LINK, addArtifact, wordData, unknownGuids); Assert.assertTrue(unknownGuids.size() == 1); Assert.assertTrue(unknownGuids.iterator().next().endsWith("BLAH")); @@ -170,7 +170,7 @@ public class WordMlLinkHandlerTest { } private Map<String, TestData> getTestData() { - Map<String, TestData> toReturn = new LinkedHashMap<String, TestData>(); + Map<String, TestData> toReturn = new LinkedHashMap<>(); Bundle bundle = FrameworkUtil.getBundle(WordMlLinkHandlerTest.class); Enumeration<?> urls = bundle.findEntries("support/WordMlLinkData", "*.*", true); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/WordOutlineTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/WordOutlineTest.java index 916aba57988..b8ea56ab9d2 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/WordOutlineTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/WordOutlineTest.java @@ -70,7 +70,7 @@ public final class WordOutlineTest { */ @Parameters public static Collection<Object[]> getData() { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); addTest(data, OUTLINE_WITH_NUMBER, data("1.0", "Outline TITLE", "")); addTest(data, OUTLINE_WITH_NUMBER_AND_CONTENT, data("5.0", "SCOPE", ""), data("5.0", "SCOPE", "content content content more content")); @@ -94,7 +94,7 @@ public final class WordOutlineTest { Matcher matcher = PARAGRAPH_REGEX.matcher(rawData); boolean foundSomething = false; - List<DelegateData> actualData = new ArrayList<DelegateData>(); + List<DelegateData> actualData = new ArrayList<>(); while (matcher.find()) { foundSomething = true; diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java index fe900ec3e12..823ff5e9c02 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java @@ -72,7 +72,7 @@ public class ConflictTestManager { private static final int NUMBER_OF_ARTIFACTS = 32; private static Artifact[] destArtifacts = new Artifact[NUMBER_OF_ARTIFACTS]; private static Artifact[] sourceArtifacts = new Artifact[NUMBER_OF_ARTIFACTS]; - private static List<ArtifactModification> modifications = new LinkedList<ArtifactModification>(); + private static List<ArtifactModification> modifications = new LinkedList<>(); private static ConflictDefinition[] conflictDefs = new ConflictDefinition[NUMBER_OF_ARTIFACTS]; public static int DELETION_TEST_QUERY = 1; @@ -644,7 +644,7 @@ public class ConflictTestManager { } public static List<Artifact> getArtifacts(boolean sourceBranch, int queryId) { - List<Artifact> queriedArtifacts = new LinkedList<Artifact>(); + List<Artifact> queriedArtifacts = new LinkedList<>(); for (int i = 0; i < NUMBER_OF_ARTIFACTS; i++) { if (conflictDefs[i].queryNumber == queryId) { if (sourceBranch) { @@ -691,8 +691,8 @@ public class ConflictTestManager { } static final class ConflictDefinition { - final Collection<AttributeValue> values = new HashSet<AttributeValue>(); - final Collection<AttributeValue> newAttributes = new HashSet<AttributeValue>(); + final Collection<AttributeValue> values = new HashSet<>(); + final Collection<AttributeValue> newAttributes = new HashSet<>(); IArtifactType artifactType; boolean sourceDelete; boolean destDelete; diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/TestUtil.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/TestUtil.java index d6aa8ad0c83..736ce5bc0b5 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/TestUtil.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/TestUtil.java @@ -62,7 +62,7 @@ public final class TestUtil { } public static Collection<Artifact> createSimpleArtifacts(IArtifactType artifactType, int numArts, String name, IOseeBranch branch) throws OseeCoreException { - List<Artifact> arts = new ArrayList<Artifact>(); + List<Artifact> arts = new ArrayList<>(); for (int x = 1; x < numArts + 1; x++) { arts.add(createSimpleArtifact(artifactType, name + " " + x, branch)); } @@ -70,7 +70,7 @@ public final class TestUtil { } public static Map<String, Integer> getTableRowCounts(String... tables) throws OseeCoreException { - Map<String, Integer> data = new HashMap<String, Integer>(); + Map<String, Integer> data = new HashMap<>(); for (String tableName : tables) { data.put(tableName, getTableRowCount(tableName)); } @@ -94,7 +94,7 @@ public final class TestUtil { } public static List<RelationLink> createLinks(int total, Branch branch) { - List<RelationLink> links = new ArrayList<RelationLink>(); + List<RelationLink> links = new ArrayList<>(); for (int index = 0; index < total; index++) { RelationType relationType = createRelationType(index); RelationLink link = createRelationLink(index, index + 1, index + 2, branch, relationType); @@ -104,7 +104,7 @@ public final class TestUtil { } public static List<RelationLink> createLinks(int total, Branch branch, RelationType relationType) { - List<RelationLink> links = new ArrayList<RelationLink>(); + List<RelationLink> links = new ArrayList<>(); for (int index = 0; index < total; index++) { RelationLink link = createRelationLink(index, index + 1, index + 2, branch, relationType); links.add(link); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ArtifactImportWizardTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ArtifactImportWizardTest.java index a3914499623..3fff7d47640 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ArtifactImportWizardTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ArtifactImportWizardTest.java @@ -145,7 +145,7 @@ public final class ArtifactImportWizardTest { // add paragraph number to sample artifacts, result should have copied that paragraph over... // copy paragraph over... because they will be matched on guid... - Map<String, String> answerParagraphNumbers = new HashMap<String, String>(); + Map<String, String> answerParagraphNumbers = new HashMap<>(); answerParagraphNumbers.put("B", "3"); answerParagraphNumbers.put("D", "2"); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AttributeTypeEditPresenterTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AttributeTypeEditPresenterTest.java index 8654832ed5c..c60da5fd29c 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AttributeTypeEditPresenterTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AttributeTypeEditPresenterTest.java @@ -113,7 +113,7 @@ public class AttributeTypeEditPresenterTest { // None Selected display.setSelected(); - List<IAttributeType> selectable = new ArrayList<IAttributeType>(Arrays.asList(selectableTypes)); + List<IAttributeType> selectable = new ArrayList<>(Arrays.asList(selectableTypes)); performOp(controller, operationType); Assert.assertNull(display.getAddWidgetsAttributeTypes()); @@ -262,7 +262,7 @@ public class AttributeTypeEditPresenterTest { @Override public void showInformation(String title, String message) { - showInfo = new Pair<String, String>(title, message); + showInfo = new Pair<>(title, message); } public Pair<String, String> getShowInfo() { diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/HtmlRendererTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/HtmlRendererTest.java index 964cbbc1f0b..dc5365ec302 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/HtmlRendererTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/HtmlRendererTest.java @@ -75,7 +75,7 @@ public class HtmlRendererTest { Artifact htmlArtifact; renderer = new HTMLRenderer(); // create example artifact - theArtifacts = new ArrayList<Artifact>(); + theArtifacts = new ArrayList<>(); String branchName = method.getQualifiedTestName(); rootBranch = BranchManager.createTopLevelBranch(branchName); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/PreviewAndMultiPreviewTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/PreviewAndMultiPreviewTest.java index b3f609f0a69..5f3fa6345c0 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/PreviewAndMultiPreviewTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/PreviewAndMultiPreviewTest.java @@ -48,7 +48,7 @@ public class PreviewAndMultiPreviewTest { private static final IOseeBranch BRANCH = DemoBranches.SAW_Bld_1; - private final List<Artifact> testArtifacts = new ArrayList<Artifact>(); + private final List<Artifact> testArtifacts = new ArrayList<>(); @After public void tearDown() throws Exception { diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java index 51ef9dea817..ba5a603d90b 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/RelationIntegrityCheckTest.java @@ -112,7 +112,7 @@ public class RelationIntegrityCheckTest { } private void applyFix() throws OseeCoreException { - List<Object[]> rowsToDelete = new LinkedList<Object[]>(); + List<Object[]> rowsToDelete = new LinkedList<>(); for (LocalRelationLink relLink : map.allValues()) { rowsToDelete.add(new Object[] {relLink.gammaId, relLink.relTransId, relLink.branchUuid}); } diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ReplaceWithBaselineTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ReplaceWithBaselineTest.java index 86e816fb817..aee2e4d994e 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ReplaceWithBaselineTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ReplaceWithBaselineTest.java @@ -158,7 +158,7 @@ public final class ReplaceWithBaselineTest { @Parameters public static List<Object[]> getData() { - List<Object[]> data = new LinkedList<Object[]>(); + List<Object[]> data = new LinkedList<>(); data.add(new Object[] {"Case 0", Arrays.asList(new TestData(Item.ARTIFACT, ChangeItem.NEW, false)), 0}); data.add(new Object[] {"Case 1", Arrays.asList(new TestData(Item.ARTIFACT, ChangeItem.DELETED, true)), 0}); @@ -169,7 +169,7 @@ public final class ReplaceWithBaselineTest { data.add(new Object[] {"Case 5", Arrays.asList(new TestData(Item.ATTRBUTE, ChangeItem.DELETED, true)), 0}); data.add(new Object[] {"Case 6", Arrays.asList(new TestData(Item.ATTRBUTE, ChangeItem.MODIFIED, true)), 0}); - List<TestData> combinedCases = new ArrayList<TestData>(data.size()); + List<TestData> combinedCases = new ArrayList<>(data.size()); for (Object[] objects : data) { @SuppressWarnings("unchecked") @@ -193,7 +193,7 @@ public final class ReplaceWithBaselineTest { Collection<Change> changesAfterRevert = getBranchChanges(workingBranch); - List<Artifact> artifactsToRevert = new ArrayList<Artifact>(); + List<Artifact> artifactsToRevert = new ArrayList<>(); Artifact artifactToRevert; for (TestData testData : testDatas) { artifactToRevert = @@ -451,7 +451,7 @@ public final class ReplaceWithBaselineTest { } private void revertAttributes(Collection<Change> changes, Attribute<?> attributeToRevert) throws OseeCoreException { - List<Change> attrChanges = new ArrayList<Change>(1); + List<Change> attrChanges = new ArrayList<>(1); for (Change change : changes) { if (change.getChangeType() == LoadChangeType.attribute && change.getItemId() == attributeToRevert.getId()) { @@ -462,7 +462,7 @@ public final class ReplaceWithBaselineTest { } private List<Change> getBranchChanges(IOseeBranch branch) throws OseeCoreException { - List<Change> changes = new ArrayList<Change>(); + List<Change> changes = new ArrayList<>(); Operations.executeWorkAndCheckStatus(ChangeManager.comparedToParent(branch, changes), MONITOR); return changes; } diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/StringGuidsToArtifactListOperationTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/StringGuidsToArtifactListOperationTest.java index a70902443e0..ffc4f357125 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/StringGuidsToArtifactListOperationTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/StringGuidsToArtifactListOperationTest.java @@ -55,7 +55,7 @@ public class StringGuidsToArtifactListOperationTest { private Branch testBranch; - private final Collection<Object> artifacts = new ArrayList<Object>(capacity); + private final Collection<Object> artifacts = new ArrayList<>(capacity); private final String[] guids = new String[capacity]; @Before diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ViewWordChangeAndDiffTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ViewWordChangeAndDiffTest.java index 526b33a1b48..48a43f74f67 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ViewWordChangeAndDiffTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ViewWordChangeAndDiffTest.java @@ -78,7 +78,7 @@ public final class ViewWordChangeAndDiffTest { Artifact newerArtifact = loadHistorical(artifacts.get(0)); Artifact baseArtifact = loadHistorical(artifacts.get(1)); - final Collection<CompareData> testDatas = new ArrayList<CompareData>(); + final Collection<CompareData> testDatas = new ArrayList<>(); CompareDataCollector collector = new CompareDataCollector() { @@ -139,7 +139,7 @@ public final class ViewWordChangeAndDiffTest { } private static Collection<Change> getChanges(IOseeBranch testBranch) throws OseeCoreException { - Collection<Change> changes = new ArrayList<Change>(); + Collection<Change> changes = new ArrayList<>(); IOperation operation = ChangeManager.comparedToParent(testBranch, changes); Operations.executeWorkAndCheckStatus(operation); return changes; @@ -161,7 +161,7 @@ public final class ViewWordChangeAndDiffTest { } private static ArrayList<Artifact> asArtifacts(Collection<Change> changes) { - ArrayList<Artifact> arts = new ArrayList<Artifact>(); + ArrayList<Artifact> arts = new ArrayList<>(); for (Change artifactChange : changes) { arts.add(artifactChange.getChangeArtifact()); } diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/WordOutlineAndStyleTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/WordOutlineAndStyleTest.java index 85b0c6c928d..a598c94a218 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/WordOutlineAndStyleTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/WordOutlineAndStyleTest.java @@ -141,7 +141,7 @@ public final class WordOutlineAndStyleTest { @Parameters public static List<Object[]> getData() { - List<Object[]> data = new LinkedList<Object[]>(); + List<Object[]> data = new LinkedList<>(); data.add(new Object[] {"Case 1", CASE_1, Arrays.asList("A", "B", "C", "D")}); data.add(new Object[] {"Case 2", CASE_2, Arrays.asList("A", "B")}); @@ -173,7 +173,7 @@ public final class WordOutlineAndStyleTest { IArtifactExtractor extractor = new WordOutlineExtractor(); extractor.setDelegate(new WordOutlineExtractorDelegate()); - List<IArtifactType> list = new ArrayList<IArtifactType>(); + List<IArtifactType> list = new ArrayList<>(); list.add(CoreArtifactTypes.HeadingMSWord); IOperation operation = diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/WordTemplateRendererTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/WordTemplateRendererTest.java index 370f97898f2..338dc5eed3c 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/WordTemplateRendererTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/WordTemplateRendererTest.java @@ -238,7 +238,7 @@ public class WordTemplateRendererTest { public void testPublishWithoutDiff() throws OseeCoreException { modifyOption("Branch", updateBranch); modifyOption("Publish As Diff", false); - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); artifacts.add(docFolder); renderer.publish(singleTemplate, null, artifacts, options); @@ -257,7 +257,7 @@ public class WordTemplateRendererTest { public void testPublishWithDiff() throws OseeCoreException { modifyOption("Branch", updateBranch); modifyOption("Publish As Diff", true); - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); Artifact updateDoc = ArtifactQuery.getArtifactFromId(docFolder.getArtId(), updateBranch); artifacts.add(updateDoc); renderer.publish(singleTemplate, null, artifacts, options); @@ -277,7 +277,7 @@ public class WordTemplateRendererTest { public void testPublishWithoutDiffRecurseTemplate() throws OseeCoreException { modifyOption("Branch", updateBranch); modifyOption("Publish As Diff", false); - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); artifacts.add(docFolder); renderer.publish(recurseTemplate, null, artifacts, options); @@ -296,7 +296,7 @@ public class WordTemplateRendererTest { public void testPublishWithDiffRecurseTemplate() throws OseeCoreException { modifyOption("Branch", updateBranch); modifyOption("Publish As Diff", true); - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); Artifact updateDoc = ArtifactQuery.getArtifactFromId(docFolder.getArtId(), updateBranch); artifacts.add(updateDoc); renderer.publish(recurseTemplate, null, artifacts, options); @@ -318,7 +318,7 @@ public class WordTemplateRendererTest { modifyOption("Publish As Diff", true); modifyOption("compareBranch", rootBranch); modifyOption("linkType", LinkType.INTERNAL_DOC_REFERENCE_USE_PARAGRAPH_NUMBER); - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); Artifact updateDoc = ArtifactQuery.getArtifactFromId(docFolder.getArtId(), updateBranch); artifacts.add(updateDoc); renderer.publish(singleTemplate, null, artifacts, options); @@ -352,7 +352,7 @@ public class WordTemplateRendererTest { modifyOption("Publish As Diff", true); modifyOption("compareBranch", null); modifyOption("linkType", LinkType.INTERNAL_DOC_REFERENCE_USE_PARAGRAPH_NUMBER_AND_NAME); - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); Artifact updateDoc = ArtifactQuery.getArtifactFromId(docFolder.getArtId(), updateBranch); artifacts.add(updateDoc); renderer.publish(singleTemplateAttrib, null, artifacts, options); @@ -403,7 +403,7 @@ public class WordTemplateRendererTest { modifyOption("Publish As Diff", false); modifyOption("linkType", LinkType.INTERNAL_DOC_REFERENCE_USE_PARAGRAPH_NUMBER_AND_NAME); modifyOption(WordTemplateRenderer.UPDATE_PARAGRAPH_NUMBER_OPTION, true); - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); Artifact updateDoc = ArtifactQuery.getArtifactFromId(docFolder.getArtId(), updateBranch); artifacts.add(updateDoc); renderer.publish(singleTemplateAttrib, null, artifacts, options); @@ -440,7 +440,7 @@ public class WordTemplateRendererTest { modifyOption("Publish As Diff", true); modifyOption("linkType", LinkType.INTERNAL_DOC_REFERENCE_USE_PARAGRAPH_NUMBER_AND_NAME); modifyOption(ITemplateRenderer.USE_TEMPLATE_ONCE, false); - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); Artifact updateDoc = ArtifactQuery.getArtifactFromId(docFolder.getArtId(), updateBranch); artifacts.add(updateDoc); renderer.publish(singleTemplateAttrib, null, artifacts, options); @@ -468,7 +468,7 @@ public class WordTemplateRendererTest { public void testPublishSoftwareRequirements() throws OseeCoreException { modifyOption("Branch", updateBranch); modifyOption("Publish As Diff", false); - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); artifacts.add(swReqFolder); renderer.publish(masterTemplate, slaveTemplate, artifacts, options); @@ -500,7 +500,7 @@ public class WordTemplateRendererTest { public void testPublishUsingIds() throws OseeCoreException { modifyOption("Branch", updateBranch); modifyOption("Publish As Diff", false); - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); artifacts.add(swReqFolder); renderer.publish(masterTemplate_idOnly, slaveTemplate, artifacts, options); @@ -532,7 +532,7 @@ public class WordTemplateRendererTest { public void testPublishUsingIdAndName() throws OseeCoreException { modifyOption("Branch", updateBranch); modifyOption("Publish As Diff", false); - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); artifacts.add(swReqFolder); renderer.publish(masterTemplate_idAndName, slaveTemplate, artifacts, options); @@ -564,7 +564,7 @@ public class WordTemplateRendererTest { public void testPublishDiffWithFieldCodes() throws OseeCoreException { modifyOption("Branch", updateBranch); modifyOption("Publish As Diff", true); - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); setupFieldCodeChange(); Artifact updateDoc = ArtifactQuery.getArtifactFromId(docFolder.getArtId(), updateBranch); artifacts.add(updateDoc); @@ -591,7 +591,7 @@ public class WordTemplateRendererTest { public void testPublishDiffWithOutFieldCodes() throws OseeCoreException { modifyOption("Branch", updateBranch); modifyOption("Publish As Diff", true); - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); setupFieldCodeChange(); UserManager.setSetting(MsWordPreferencePage.IGNORE_FIELD_CODE_CHANGES, "true"); Artifact updateDoc = ArtifactQuery.getArtifactFromId(docFolder.getArtId(), updateBranch); diff --git a/plugins/org.eclipse.osee.client.test.framework/src/org/eclipse/osee/client/test/framework/internal/AssertLib.java b/plugins/org.eclipse.osee.client.test.framework/src/org/eclipse/osee/client/test/framework/internal/AssertLib.java index caf141bafeb..8c2f236a13b 100644 --- a/plugins/org.eclipse.osee.client.test.framework/src/org/eclipse/osee/client/test/framework/internal/AssertLib.java +++ b/plugins/org.eclipse.osee.client.test.framework/src/org/eclipse/osee/client/test/framework/internal/AssertLib.java @@ -88,7 +88,7 @@ public class AssertLib { } private static Collection<String> mergeIgnoreLogs(Collection<String> ignoreLogs) { - Collection<String> logsToIgnore = new HashSet<String>(); + Collection<String> logsToIgnore = new HashSet<>(); logsToIgnore.addAll(DEFAULT_IGNORE_LOGS); for (String toIgnore : ignoreLogs) { logsToIgnore.add(toIgnore); diff --git a/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterProxy.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterProxy.java index e3c634d5563..39e0ad65e02 100644 --- a/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterProxy.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterProxy.java @@ -29,7 +29,7 @@ public class ClusterProxy implements Cluster { @Override public Set<Member> getMembers() { - Set<Member> members = new HashSet<Member>(); + Set<Member> members = new HashSet<>(); for (com.hazelcast.core.Member member : getProxyObject().getMembers()) { members.add(new MemberProxy(member)); } diff --git a/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterServiceImpl.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterServiceImpl.java index 0a782482dd4..352f8b2737e 100644 --- a/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterServiceImpl.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/ClusterServiceImpl.java @@ -57,7 +57,7 @@ import com.hazelcast.impl.GroupProperties; */ public class ClusterServiceImpl implements ClusterService, InstanceManager { - private final Map<Object, DistributedObject> distributedObjects = new ConcurrentHashMap<Object, DistributedObject>(); + private final Map<Object, DistributedObject> distributedObjects = new ConcurrentHashMap<>(); private final ProxyCleaner proxyCleaner = new ProxyCleaner(); private Log logger; private EventService eventService; diff --git a/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedExecutorServiceImpl.java b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedExecutorServiceImpl.java index bf007943349..85b23a4711d 100644 --- a/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedExecutorServiceImpl.java +++ b/plugins/org.eclipse.osee.cluster.hazelcast/src/org/eclipse/osee/cluster/hazelcast/internal/DistributedExecutorServiceImpl.java @@ -110,7 +110,7 @@ public class DistributedExecutorServiceImpl implements DistributedExecutorServic @SuppressWarnings("unchecked") @Override public <T> Future<T> submit(Callable<T> worker, Callback<T> callback) { - DistributedTask<T> task = new DistributedTask<T>(worker); + DistributedTask<T> task = new DistributedTask<>(worker); addCallback(task, callback); return (Future<T>) getProxyObject().submit(task); } @@ -118,7 +118,7 @@ public class DistributedExecutorServiceImpl implements DistributedExecutorServic @SuppressWarnings("unchecked") @Override public <T> Future<T> submitOnKeyOwner(Callable<T> worker, Callback<T> callback, Object key) { - DistributedTask<T> task = new DistributedTask<T>(worker, key); + DistributedTask<T> task = new DistributedTask<>(worker, key); addCallback(task, callback); return (Future<T>) getProxyObject().submit(task); } @@ -127,7 +127,7 @@ public class DistributedExecutorServiceImpl implements DistributedExecutorServic @Override public <T> Future<T> submitOnMember(Callable<T> worker, Callback<T> callback, Member member) { MemberProxy memberProxy = (MemberProxy) member; - DistributedTask<T> task = new DistributedTask<T>(worker, memberProxy.getProxyObject()); + DistributedTask<T> task = new DistributedTask<>(worker, memberProxy.getProxyObject()); addCallback(task, callback); return (Future<T>) getProxyObject().submit(task); } @@ -135,12 +135,12 @@ public class DistributedExecutorServiceImpl implements DistributedExecutorServic @SuppressWarnings("unchecked") @Override public <T> Future<T> submitOnMembers(Callable<T> worker, Callback<T> callback, Set<Member> members) { - Set<com.hazelcast.core.Member> xMembers = new HashSet<com.hazelcast.core.Member>(); + Set<com.hazelcast.core.Member> xMembers = new HashSet<>(); for (Member member : members) { MemberProxy memberProxy = (MemberProxy) member; xMembers.add(memberProxy.getProxyObject()); } - DistributedTask<T> task = new DistributedTask<T>(worker, xMembers); + DistributedTask<T> task = new DistributedTask<>(worker, xMembers); addCallback(task, callback); return (Future<T>) getProxyObject().submit(task); } diff --git a/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/ClusterRestApplication.java b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/ClusterRestApplication.java index 353b4018ad9..48450d60dfa 100644 --- a/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/ClusterRestApplication.java +++ b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/ClusterRestApplication.java @@ -42,7 +42,7 @@ public class ClusterRestApplication extends Application { @Override public Set<Class<?>> getClasses() { - Set<Class<?>> resources = new HashSet<Class<?>>(); + Set<Class<?>> resources = new HashSet<>(); resources.add(MembersResource.class); resources.add(JobsResource.class); return resources; diff --git a/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/MembersResource.java b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/MembersResource.java index 5af2415eedb..0daf06f3201 100644 --- a/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/MembersResource.java +++ b/plugins/org.eclipse.osee.cluster.rest/src/org/eclipse/osee/cluster/rest/internal/MembersResource.java @@ -36,7 +36,7 @@ public class MembersResource { @GET @Produces(MediaType.TEXT_XML) public List<XmlMember> getMemberBrowser() { - List<XmlMember> todos = new ArrayList<XmlMember>(); + List<XmlMember> todos = new ArrayList<>(); for (Member member : ClusterRestApplication.getMembers()) { todos.add(ClusterUtil.fromMember(member)); } @@ -46,7 +46,7 @@ public class MembersResource { @GET @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON}) public List<XmlMember> getMembers() { - List<XmlMember> todos = new ArrayList<XmlMember>(); + List<XmlMember> todos = new ArrayList<>(); for (Member member : ClusterRestApplication.getMembers()) { todos.add(ClusterUtil.fromMember(member)); } diff --git a/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/ClusterServiceUtils.java b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/ClusterServiceUtils.java index 9e020b04373..a7e3971ff66 100644 --- a/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/ClusterServiceUtils.java +++ b/plugins/org.eclipse.osee.cluster/src/org/eclipse/osee/cluster/ClusterServiceUtils.java @@ -23,7 +23,7 @@ public final class ClusterServiceUtils { } public static Map<String, Object> toMap(String componentName, String contextName) { - Map<String, Object> data = new HashMap<String, Object>(); + Map<String, Object> data = new HashMap<>(); data.put("component.name", componentName); data.put("context.name", contextName); return data; diff --git a/plugins/org.eclipse.osee.config.admin.test/src/org/eclipse/osee/config/admin/internal/ConfigManagerConfigurationBuilderTest.java b/plugins/org.eclipse.osee.config.admin.test/src/org/eclipse/osee/config/admin/internal/ConfigManagerConfigurationBuilderTest.java index fc37316cc14..d0a39f6e473 100644 --- a/plugins/org.eclipse.osee.config.admin.test/src/org/eclipse/osee/config/admin/internal/ConfigManagerConfigurationBuilderTest.java +++ b/plugins/org.eclipse.osee.config.admin.test/src/org/eclipse/osee/config/admin/internal/ConfigManagerConfigurationBuilderTest.java @@ -68,7 +68,7 @@ public class ConfigManagerConfigurationBuilderTest { try { System.setProperty(ConfigManagerConstants.CONFIGURATION_URI, "helloConfig"); - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); builder.properties(properties); ConfigManagerConfiguration actual = builder.build(); @@ -83,7 +83,7 @@ public class ConfigManagerConfigurationBuilderTest { @Test public void testConfigProperties() { - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(ConfigManagerConstants.CONFIGURATION_URI, CONFIG_URI); properties.put(ConfigManagerConstants.CONFIGURATION_POLL_TIME, POLL_TIME); properties.put(ConfigManagerConstants.CONFIGURATION_POLL_TIME_UNIT, POLL_TIME_UNIT); diff --git a/plugins/org.eclipse.osee.config.admin/src/org/eclipse/osee/config/admin/internal/ConfigManagerImpl.java b/plugins/org.eclipse.osee.config.admin/src/org/eclipse/osee/config/admin/internal/ConfigManagerImpl.java index 5a591d12783..1903530ab74 100644 --- a/plugins/org.eclipse.osee.config.admin/src/org/eclipse/osee/config/admin/internal/ConfigManagerImpl.java +++ b/plugins/org.eclipse.osee.config.admin/src/org/eclipse/osee/config/admin/internal/ConfigManagerImpl.java @@ -39,8 +39,8 @@ public class ConfigManagerImpl implements UriWatcherListener { private ConfigurationAdmin configAdmin; private ConfigManagerConfiguration config; - private final AtomicReference<UriWatcher> watcherRef = new AtomicReference<UriWatcher>(); - private final Map<String, ServiceConfig> services = new HashMap<String, ServiceConfig>(); + private final AtomicReference<UriWatcher> watcherRef = new AtomicReference<>(); + private final Map<String, ServiceConfig> services = new HashMap<>(); public void setLogger(Log logger) { this.logger = logger; @@ -109,7 +109,7 @@ public class ConfigManagerImpl implements UriWatcherListener { private void processUri(URI uri) { try { String source = Lib.inputStreamToString(uri.toURL().openStream()); - final Map<String, Dictionary<String, Object>> newConfigs = new HashMap<String, Dictionary<String, Object>>(); + final Map<String, Dictionary<String, Object>> newConfigs = new HashMap<>(); parser.process(new ConfigWriter() { @Override diff --git a/plugins/org.eclipse.osee.config.admin/src/org/eclipse/osee/config/admin/internal/ConfigParser.java b/plugins/org.eclipse.osee.config.admin/src/org/eclipse/osee/config/admin/internal/ConfigParser.java index fba9cb8c0c5..3f3bc690507 100644 --- a/plugins/org.eclipse.osee.config.admin/src/org/eclipse/osee/config/admin/internal/ConfigParser.java +++ b/plugins/org.eclipse.osee.config.admin/src/org/eclipse/osee/config/admin/internal/ConfigParser.java @@ -57,7 +57,7 @@ public class ConfigParser { for (int index = 0; index < jsonArray.length(); index++) { JSONObject object = jsonArray.getJSONObject(index); String serviceId = null; - Hashtable<String, Object> properties = new Hashtable<String, Object>(); + Hashtable<String, Object> properties = new Hashtable<>(); String[] names = JSONObject.getNames(object); for (String key : names) { String value = object.getString(key); diff --git a/plugins/org.eclipse.osee.console.admin.test/src/org/eclipse/osee/console/admin/internal/ConsoleAdminUtilsTest.java b/plugins/org.eclipse.osee.console.admin.test/src/org/eclipse/osee/console/admin/internal/ConsoleAdminUtilsTest.java index 01f587cdb4a..a181ac4ddd8 100644 --- a/plugins/org.eclipse.osee.console.admin.test/src/org/eclipse/osee/console/admin/internal/ConsoleAdminUtilsTest.java +++ b/plugins/org.eclipse.osee.console.admin.test/src/org/eclipse/osee/console/admin/internal/ConsoleAdminUtilsTest.java @@ -33,7 +33,7 @@ public class ConsoleAdminUtilsTest { @Test public void testParsingArguments() { - List<String> args = new ArrayList<String>(); + List<String> args = new ArrayList<>(); args.add("CoMMaND"); args.add("hello=12345"); args.add("var2=\"var1\""); @@ -88,7 +88,7 @@ public class ConsoleAdminUtilsTest { ConsoleCommand cmd3 = new MockConsoleCommand("123 test"); ConsoleCommand cmd4 = new MockConsoleCommand("abcdefg"); - List<ConsoleCommand> list = new ArrayList<ConsoleCommand>(); + List<ConsoleCommand> list = new ArrayList<>(); list.add(cmd1); list.add(cmd2); list.add(cmd3); diff --git a/plugins/org.eclipse.osee.console.admin/src/org/eclipse/osee/console/admin/internal/CommandDispatcher.java b/plugins/org.eclipse.osee.console.admin/src/org/eclipse/osee/console/admin/internal/CommandDispatcher.java index 0c150b653bf..2a615fab95d 100644 --- a/plugins/org.eclipse.osee.console.admin/src/org/eclipse/osee/console/admin/internal/CommandDispatcher.java +++ b/plugins/org.eclipse.osee.console.admin/src/org/eclipse/osee/console/admin/internal/CommandDispatcher.java @@ -31,9 +31,9 @@ public class CommandDispatcher { private static final String CONSOLE_EXECUTOR_ID = "org.eclipse.osee.console.executor"; - private final Map<String, ConsoleCommand> registered = new ConcurrentHashMap<String, ConsoleCommand>(); - private final Map<String, Map<String, Future<?>>> futures = new ConcurrentHashMap<String, Map<String, Future<?>>>(); - private final Map<String, String> commandNameToId = new ConcurrentHashMap<String, String>(); + private final Map<String, ConsoleCommand> registered = new ConcurrentHashMap<>(); + private final Map<String, Map<String, Future<?>>> futures = new ConcurrentHashMap<>(); + private final Map<String, String> commandNameToId = new ConcurrentHashMap<>(); private final Log logger; private final ExecutorAdmin executorAdmin; @@ -114,7 +114,7 @@ public class CommandDispatcher { Map<String, Future<?>> items = futures.get(cmdId); if (items == null) { - items = new ConcurrentHashMap<String, Future<?>>(); + items = new ConcurrentHashMap<>(); futures.put(cmdId, items); } items.put(guid, future); diff --git a/plugins/org.eclipse.osee.console.admin/src/org/eclipse/osee/console/admin/internal/ConsoleAdminUtils.java b/plugins/org.eclipse.osee.console.admin/src/org/eclipse/osee/console/admin/internal/ConsoleAdminUtils.java index 17224ee6df1..ea9d346bcae 100644 --- a/plugins/org.eclipse.osee.console.admin/src/org/eclipse/osee/console/admin/internal/ConsoleAdminUtils.java +++ b/plugins/org.eclipse.osee.console.admin/src/org/eclipse/osee/console/admin/internal/ConsoleAdminUtils.java @@ -55,14 +55,14 @@ public final class ConsoleAdminUtils { } public static Map<String, String> toMap(String componentName, String contextName) { - Map<String, String> data = new HashMap<String, String>(); + Map<String, String> data = new HashMap<>(); data.put("component.name", componentName); data.put("context.name", contextName); return data; } public static List<ConsoleCommand> sort(Collection<ConsoleCommand> origCommands) { - List<ConsoleCommand> cmds = new ArrayList<ConsoleCommand>(origCommands); + List<ConsoleCommand> cmds = new ArrayList<>(origCommands); Collections.sort(cmds, new Comparator<ConsoleCommand>() { @Override public int compare(ConsoleCommand o1, ConsoleCommand o2) { @@ -87,7 +87,7 @@ public final class ConsoleAdminUtils { String commandName = ""; StringBuilder rawString = new StringBuilder(); PropertyStore store = new PropertyStore(); - Set<String> options = new HashSet<String>(); + Set<String> options = new HashSet<>(); int count = 0; String arg = ci.nextArgument(); diff --git a/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/DataRightInput.java b/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/DataRightInput.java index 837948332c3..17abc131a36 100644 --- a/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/DataRightInput.java +++ b/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/DataRightInput.java @@ -27,7 +27,7 @@ public class DataRightInput implements Iterable<DataRightEntry> { public Set<DataRightEntry> getData() { if (data == null) { - data = new HashSet<DataRightEntry>(); + data = new HashSet<>(); } return data; } diff --git a/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/DataRightResult.java b/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/DataRightResult.java index c6a399ee81a..1cc6614a082 100644 --- a/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/DataRightResult.java +++ b/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/DataRightResult.java @@ -39,7 +39,7 @@ public class DataRightResult { @XmlElement public Collection<DataRightAnchor> getDataRightAnchors() { if (dataRightAnchors == null) { - dataRightAnchors = new ArrayList<DataRightAnchor>(); + dataRightAnchors = new ArrayList<>(); } return dataRightAnchors; } @@ -51,7 +51,7 @@ public class DataRightResult { @XmlElement public Collection<DataRight> getDataRights() { if (dataRights == null) { - dataRights = new ArrayList<DataRight>(); + dataRights = new ArrayList<>(); } return dataRights; } @@ -107,8 +107,8 @@ public class DataRightResult { private void checkInitialized() { if (dataRightIdToDataRight == null || guidToAnchor == null) { - dataRightIdToDataRight = new HashMap<DataRightId, DataRight>(); - guidToAnchor = new HashMap<String, DataRightAnchor>(); + dataRightIdToDataRight = new HashMap<>(); + guidToAnchor = new HashMap<>(); for (DataRightAnchor anchor : dataRightAnchors) { guidToAnchor.put(anchor.getId(), anchor); } diff --git a/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/WordArtifactChange.java b/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/WordArtifactChange.java index 0bcda8e5490..88999110b35 100644 --- a/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/WordArtifactChange.java +++ b/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/WordArtifactChange.java @@ -20,7 +20,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class WordArtifactChange { long artId; - List<Long> changedAttrTypes = new LinkedList<Long>(); + List<Long> changedAttrTypes = new LinkedList<>(); boolean changed = false; boolean created = false; boolean safetyRelated = false; diff --git a/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/WordUpdateChange.java b/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/WordUpdateChange.java index e58a87157ed..8a745230d0b 100644 --- a/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/WordUpdateChange.java +++ b/plugins/org.eclipse.osee.define.report.api/src/org/eclipse/osee/define/report/api/WordUpdateChange.java @@ -21,7 +21,7 @@ import javax.xml.bind.annotation.XmlRootElement; public class WordUpdateChange { Integer tx; Long branchUuid; - List<WordArtifactChange> changedArts = new LinkedList<WordArtifactChange>(); + List<WordArtifactChange> changedArts = new LinkedList<>(); public Integer getTx() { return tx; diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/DataRightBuilder.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/DataRightBuilder.java index fb211bd0338..b7d77422509 100644 --- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/DataRightBuilder.java +++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/DataRightBuilder.java @@ -64,7 +64,7 @@ public class DataRightBuilder { } private List<DataRightEntry> getOrderedList(DataRightInput request) { - List<DataRightEntry> orderedData = new ArrayList<DataRightEntry>(); + List<DataRightEntry> orderedData = new ArrayList<>(); orderedData.addAll(request.getData()); Collections.sort(orderedData, new Comparator<DataRightEntry>() { @@ -127,13 +127,13 @@ public class DataRightBuilder { } private Map<String, DataRight> getClassificationToDataRights(QueryBuilder query) { - Map<String, DataRight> toReturn = new HashMap<String, DataRight>(); + Map<String, DataRight> toReturn = new HashMap<>(); @SuppressWarnings("unchecked") ArtifactReadable footerMappingArt = query.andIds(MAPPING_ARTIFACT).getResults().getOneOrNull(); if (footerMappingArt != null) { - List<String> footers = new ArrayList<String>(); + List<String> footers = new ArrayList<>(); footers = footerMappingArt.getAttributeValues(CoreAttributeTypes.GeneralStringData); for (String footer : footers) { String[] enumToFooter = footer.split("\\n", 2); diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/OseeReportApplication.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/OseeReportApplication.java index ad9cb8a7ab1..e3a365c16fa 100644 --- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/OseeReportApplication.java +++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/OseeReportApplication.java @@ -29,7 +29,7 @@ import org.eclipse.osee.orcs.OrcsApi; */ @ApplicationPath("define") public final class OseeReportApplication extends Application { - private final Set<Object> singletons = new HashSet<Object>(); + private final Set<Object> singletons = new HashSet<>(); private OrcsApi orcsApi; private Log logger; private DefineApi defineApi; diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/ParagraphNumberComparator.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/ParagraphNumberComparator.java index 6a0301cc1b9..15bf097cd23 100644 --- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/ParagraphNumberComparator.java +++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/ParagraphNumberComparator.java @@ -60,7 +60,7 @@ public final class ParagraphNumberComparator implements Comparator<ArtifactReada } private Integer[] getParagraphIndices(String paragraph) { - List<Integer> paragraphs = new ArrayList<Integer>(); + List<Integer> paragraphs = new ArrayList<>(); if (Strings.isValid(paragraph)) { String[] values = paragraph.split("\\."); for (int index = 0; index < values.length; index++) { diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqStreamingOutput.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqStreamingOutput.java index d98129d11a1..20e710ecef0 100644 --- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqStreamingOutput.java +++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqStreamingOutput.java @@ -50,14 +50,14 @@ public final class PublishLowHighReqStreamingOutput implements StreamingOutput { private final OrcsTypes types; private final BranchReadable branch; private final Log logger; - private final Map<String, Integer> summarySubsystemCounter = new HashMap<String, Integer>(); - private final Map<String, Integer> summaryTraceCounter = new HashMap<String, Integer>(); - private final Map<String, Integer> summaryAllocationCounter = new HashMap<String, Integer>(); + private final Map<String, Integer> summarySubsystemCounter = new HashMap<>(); + private final Map<String, Integer> summaryTraceCounter = new HashMap<>(); + private final Map<String, Integer> summaryAllocationCounter = new HashMap<>(); private ExcelXmlWriter writer; private final Collection<IArtifactType> includeOnlyArtifactTypes; private final String REQUIREMENT_TRACE_TYPE = "Requirement Trace"; private final String ALLOCATION_TRACE_TYPE = "Allocation Trace"; - private final Map<String, IArtifactType> allTypesMap = new HashMap<String, IArtifactType>(); + private final Map<String, IArtifactType> allTypesMap = new HashMap<>(); public PublishLowHighReqStreamingOutput(Log logger, OrcsApi orcsApi, long branchUuid, String selectedTypes) { this.logger = logger; @@ -353,7 +353,7 @@ public final class PublishLowHighReqStreamingOutput implements StreamingOutput { } StringTokenizer parser = new StringTokenizer(csvTypes, ","); - ArrayList<IArtifactType> theReturn = new ArrayList<IArtifactType>(); + ArrayList<IArtifactType> theReturn = new ArrayList<>(); while (parser.hasMoreTokens()) { IArtifactType type = allTypesMap.get(parser.nextToken()); if (type != null) { diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqTraceabilityResource.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqTraceabilityResource.java index 21078754b41..966475489a7 100644 --- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqTraceabilityResource.java +++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/PublishLowHighReqTraceabilityResource.java @@ -83,7 +83,7 @@ public final class PublishLowHighReqTraceabilityResource { private Set<String> getTypes() { OrcsTypes orcsTypes = orcsApi.getOrcsTypes(); ArtifactTypes artifactTypes = orcsTypes.getArtifactTypes(); - Set<String> toReturn = new HashSet<String>(); + Set<String> toReturn = new HashSet<>(); for (IArtifactType type : artifactTypes.getAll()) { toReturn.add(type.getName()); diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/SafetyInformationAccumulator.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/SafetyInformationAccumulator.java index 079f2509428..2647c5c7b20 100644 --- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/SafetyInformationAccumulator.java +++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/SafetyInformationAccumulator.java @@ -256,7 +256,7 @@ public final class SafetyInformationAccumulator { public List<String> getAttributesToStringList(ArtifactReadable artifact, IAttributeType attributeType) { - List<String> items = new ArrayList<String>(); + List<String> items = new ArrayList<>(); for (AttributeReadable<?> attribute : artifact.getAttributes(attributeType)) { items.add(attribute.getDisplayableString()); } diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/TraceAccumulator.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/TraceAccumulator.java index 676de0a1936..2a08535ef95 100644 --- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/TraceAccumulator.java +++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/TraceAccumulator.java @@ -35,7 +35,7 @@ public class TraceAccumulator { private final SetMultimap<CaseInsensitiveString, String> traceMarkToFiles = HashMultimap.create(); private final SetMultimap<String, String> fileToMalformeddMarks = HashMultimap.create(); - private final LinkedList<String> noTraceFiles = new LinkedList<String>(); + private final LinkedList<String> noTraceFiles = new LinkedList<>(); private final Pattern filePattern; private final Iterable<TraceMatch> traceMatches; private SetMultimap<String, CaseInsensitiveString> fileToTraceMarks; diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/MergeEditArtifactElementExtractor.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/MergeEditArtifactElementExtractor.java index ffdb828730e..e43a30f008b 100644 --- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/MergeEditArtifactElementExtractor.java +++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/MergeEditArtifactElementExtractor.java @@ -39,8 +39,8 @@ public class MergeEditArtifactElementExtractor implements IElementExtractor { @Override public Collection<WordExtractorData> extractElements() throws DOMException, OseeCoreException { - final Collection<WordExtractorData> artifactElements = new LinkedList<WordExtractorData>(); - Collection<Element> sectList = new LinkedList<Element>(); + final Collection<WordExtractorData> artifactElements = new LinkedList<>(); + Collection<Element> sectList = new LinkedList<>(); Element rootElement = document.getDocumentElement(); oleDataElement = null; diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/OseeLinkParser.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/OseeLinkParser.java index 30f999851dd..b4347016605 100644 --- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/OseeLinkParser.java +++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/OseeLinkParser.java @@ -32,7 +32,7 @@ public final class OseeLinkParser { private final Map<String, String> parameterMap; public OseeLinkParser() { - this.parameterMap = new HashMap<String, String>(); + this.parameterMap = new HashMap<>(); } public void parse(String link) { diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordImageArtifactElementExtractor.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordImageArtifactElementExtractor.java index 1f1bba87637..50b7e066857 100644 --- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordImageArtifactElementExtractor.java +++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordImageArtifactElementExtractor.java @@ -60,7 +60,7 @@ public class WordImageArtifactElementExtractor implements IElementExtractor { this.document = document; this.numberOfEndTags = 0; this.numberOfStartTags = 0; - this.pictureMap = new HashMap<String, Element>(); + this.pictureMap = new HashMap<>(); WordImageArtifactElementExtractor.START_IMAGE_CHECKSUM = -1; WordImageArtifactElementExtractor.END_IMAGE_CHECKSUM = -1; @@ -86,7 +86,7 @@ public class WordImageArtifactElementExtractor implements IElementExtractor { } public List<WordExtractorData> extractElements(OseeLinkBuilder linkBuilder) throws DOMException, OseeCoreException { - final List<WordExtractorData> artifactElements = new LinkedList<WordExtractorData>(); + final List<WordExtractorData> artifactElements = new LinkedList<>(); Element rootElement = document.getDocumentElement(); resetClassFields(); @@ -166,7 +166,7 @@ public class WordImageArtifactElementExtractor implements IElementExtractor { } private Node cloneWithoutArtifactEditImage(Element element, Side keepSide, OseeLinkBuilder linkBuilder) { - Collection<Node> removals = new LinkedList<Node>(); + Collection<Node> removals = new LinkedList<>(); Element clonedElement = (Element) element.cloneNode(true); boolean beforeEditTag = true; diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordMlLinkHandler.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordMlLinkHandler.java index ab3cc5feef0..e2fc4a12953 100644 --- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordMlLinkHandler.java +++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordMlLinkHandler.java @@ -146,7 +146,7 @@ public class WordMlLinkHandler { * @return locations where WordMlLinks were found grouped by GUID */ public static HashCollection<String, MatchRange> parseOseeWordMLLinks(String content) throws OseeCoreException { - HashCollection<String, MatchRange> matchMap = new HashCollection<String, MatchRange>(); + HashCollection<String, MatchRange> matchMap = new HashCollection<>(); OseeLinkParser linkParser = new OseeLinkParser(); WORDML_LINK.reset(content); @@ -177,7 +177,7 @@ public class WordMlLinkHandler { } private static List<String> getGuidsNotFound(List<String> guidsFromLinks, List<ArtifactReadable> artifactsFound) { - Set<String> artGuids = new HashSet<String>(); + Set<String> artGuids = new HashSet<>(); for (ArtifactReadable artifact : artifactsFound) { artGuids.add(artifact.getGuid()); } @@ -188,7 +188,7 @@ public class WordMlLinkHandler { IOseeBranch branch = source.getBranch(); ChangeSet changeSet = new ChangeSet(original); List<ArtifactReadable> artifactsFromSearch = null; - List<String> guidsFromLinks = new ArrayList<String>(matchMap.keySet()); + List<String> guidsFromLinks = new ArrayList<>(matchMap.keySet()); artifactsFromSearch = findArtifacts(queryFactory, source.getBranch(), guidsFromLinks); boolean isMergeBranch = queryFactory.branchQuery().andIds(branch).andIsOfType(BranchType.MERGE).getCount() > 0; @@ -198,7 +198,7 @@ public class WordMlLinkHandler { queryFactory.branchQuery().andUuids(branchReadable.getParentBranch()).getResults().getExactlyOne(); List<String> unknownGuids = getGuidsNotFound(guidsFromLinks, artifactsFromSearch); - List<ArtifactReadable> union = new ArrayList<ArtifactReadable>(); + List<ArtifactReadable> union = new ArrayList<>(); union.addAll(findArtifacts(queryFactory, sourceBranch, unknownGuids)); union.addAll(artifactsFromSearch); artifactsFromSearch = union; diff --git a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordUtilities.java b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordUtilities.java index 10013f8b572..3db7bb81b65 100644 --- a/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordUtilities.java +++ b/plugins/org.eclipse.osee.define.report/src/org/eclipse/osee/define/report/internal/wordupdate/WordUtilities.java @@ -57,7 +57,7 @@ public class WordUtilities { } public static String referencesOnly(String content) { - List<String> references = new ArrayList<String>(); + List<String> references = new ArrayList<>(); Matcher referenceMatcher = referencePattern.matcher(content); while (referenceMatcher.find()) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/DataRightsImporter.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/DataRightsImporter.java index 68e837b8f41..9b081ffcbb2 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/DataRightsImporter.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/DataRightsImporter.java @@ -74,7 +74,7 @@ public class DataRightsImporter extends AbstractBlam { QueryBuilderArtifact builder = ArtifactQuery.createQueryBuilder(branch); builder.andIsOfType(CodeUnit); ResultSet<Artifact> results = builder.getResults(); - nameToArtifact = new HashMap<String, Artifact>(); + nameToArtifact = new HashMap<>(); for (Artifact artifact : results) { nameToArtifact.put(artifact.getName(), artifact); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributeOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributeOperation.java index 068f841e4e1..580e0a341c9 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributeOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributeOperation.java @@ -77,7 +77,7 @@ public class FixAttributeOperation extends AbstractOperation { if (commitChangesBool) { transaction = TransactionManager.createTransaction(branch, "Fixing Duplicate Enumerated Types"); } - List<String[]> rowData = new ArrayList<String[]>(); + List<String[]> rowData = new ArrayList<>(); for (Entry<Artifact, Collection<IAttributeType>> entry : artifactAttributeMap.entrySet()) { Artifact artifact = entry.getKey(); @@ -149,7 +149,7 @@ public class FixAttributeOperation extends AbstractOperation { private boolean hasDuplicates(List<Object> attributeValues) { boolean result = false; - Set<Object> set = new HashSet<Object>(); + Set<Object> set = new HashSet<>(); for (Object object : attributeValues) { if (!set.add(object)) { result = true; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributesUIReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributesUIReport.java index 6d6509fdd15..db750dd1040 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributesUIReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributesUIReport.java @@ -38,7 +38,7 @@ public class FixAttributesUIReport implements Display { @Override public void displayReport(String reportName, List<String[]> values) { - List<XViewerColumn> columns = new ArrayList<XViewerColumn>(); + List<XViewerColumn> columns = new ArrayList<>(); addColumn(columns, "Branch Name"); addColumn(columns, "Artifact Guid"); addColumn(columns, "Artifact Name"); @@ -46,12 +46,12 @@ public class FixAttributesUIReport implements Display { addColumn(columns, "Was Value"); addColumn(columns, "Fixed Value"); - List<IResultsXViewerRow> rows = new ArrayList<IResultsXViewerRow>(); + List<IResultsXViewerRow> rows = new ArrayList<>(); for (String[] row : values) { rows.add(new ResultsXViewerRow(row)); } - List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>(); + List<IResultsEditorTab> tabs = new ArrayList<>(); tabs.add(new ResultsEditorTableTab("Results", columns, rows)); ReportProvider report = new ReportProvider(reportName, tabs); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixEmbeddedLinksBlam.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixEmbeddedLinksBlam.java index 801d7721afc..8a85329b13c 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixEmbeddedLinksBlam.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixEmbeddedLinksBlam.java @@ -63,7 +63,7 @@ public class FixEmbeddedLinksBlam extends AbstractBlam { if (artifact.isAttributeTypeValid(CoreAttributeTypes.WholeWordContent)) { String content = artifact.getSoleAttributeValueAsString(CoreAttributeTypes.WholeWordContent, ""); if (Strings.isValid(content)) { - Set<String> unknownGuids = new HashSet<String>(); + Set<String> unknownGuids = new HashSet<>(); content = WordMlLinkHandler.link(linkType, artifact, content, unknownGuids); artifact.setSoleAttributeFromString(CoreAttributeTypes.WholeWordContent, content); artifact.persist(tx); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSystemLevelSSDD.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSystemLevelSSDD.java index 888fd361a68..8d6e39bd41a 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSystemLevelSSDD.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSystemLevelSSDD.java @@ -56,7 +56,7 @@ public class PublishSystemLevelSSDD extends AbstractBlam { } public PublishSystemLevelSSDD() { - subsystemToRequirements = new HashCollection<Artifact, Artifact>(false, LinkedList.class); + subsystemToRequirements = new HashCollection<>(false, LinkedList.class); } private void init() throws IOException { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementsTestReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementsTestReport.java index df174f7db1c..84bdc995717 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementsTestReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementsTestReport.java @@ -144,7 +144,7 @@ public class RequirementsTestReport extends AbstractBlam { } private void load() throws OseeCoreException { - requirementsBulkLoad = new ArrayList<Artifact>(); + requirementsBulkLoad = new ArrayList<>(); for (Artifact input : inputArtifacts) { requirementsBulkLoad.addAll(input.getDescendants()); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java index d6c00f2219e..7c3489859b0 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java @@ -64,7 +64,7 @@ public class SubsystemFullTraceReport extends AbstractBlam { private HashCollection<Artifact, String> requirementsToCodeUnits; private static int SOFTWARE_REQUIREMENT_INDEX = 9; private static int TEST_INDEX = 13; - private final ArrayList<String> tests = new ArrayList<String>(50); + private final ArrayList<String> tests = new ArrayList<>(50); private final String SCRIPT_ROOT_DIR = "Script Root Directory"; private final String USE_TRACE_IN_OSEE = "Use traceability from Subsystem Requirements"; @@ -97,7 +97,7 @@ public class SubsystemFullTraceReport extends AbstractBlam { String scriptDir = variableMap.getString(SCRIPT_ROOT_DIR); Boolean checked = variableMap.getBoolean(USE_TRACE_IN_OSEE); - Collection<TraceHandler> traceHandlers = new LinkedList<TraceHandler>(); + Collection<TraceHandler> traceHandlers = new LinkedList<>(); for (String handler : availableTraceHandlers) { if (variableMap.getBoolean(handler)) { TraceHandler traceHandler = TraceUnitExtensionManager.getInstance().getTraceHandlerByName(handler); @@ -124,7 +124,7 @@ public class SubsystemFullTraceReport extends AbstractBlam { } private List<Artifact> prepareSubsystemRequirements(List<Artifact> artifacts) throws OseeCoreException { - List<Artifact> subsystemRequirements = new ArrayList<Artifact>(400); + List<Artifact> subsystemRequirements = new ArrayList<>(400); for (Artifact artifact : artifacts) { if (artifact.isOfType(CoreArtifactTypes.Folder)) { subsystemRequirements.addAll(artifact.getDescendants()); @@ -217,7 +217,7 @@ public class SubsystemFullTraceReport extends AbstractBlam { sb.append("<xWidgets>"); sb.append("<XWidget xwidgetType=\"XCheckBox\" displayName=\"" + USE_TRACE_IN_OSEE + "\" defaultValue=\"true\" labelAfter=\"true\" horizontalLabel=\"true\" />"); sb.append("<XWidget xwidgetType=\"XText\" displayName=\"" + SCRIPT_ROOT_DIR + "\" defaultValue=\"C:/UserData/workspaceScripts\" toolTip=\"Leave blank if test script traceability is not needed.\" />"); - availableTraceHandlers = new LinkedList<String>(); + availableTraceHandlers = new LinkedList<>(); sb.append("<XWidget xwidgetType=\"XLabel\" displayName=\"Select appropriate script parser (if script traceability needed):\" />"); Collection<String> traceHandlerNames = TraceUnitExtensionManager.getInstance().getAllTraceHandlerNames(); for (String handler : traceHandlerNames) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java index dd63643eda9..f3f486996d0 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java @@ -59,9 +59,9 @@ public class SubsystemToLowLevelReqTraceReport extends AbstractBlam { } public SubsystemToLowLevelReqTraceReport() { - subsysToSubsysReqsMap = new HashMap<String, List<Artifact>>(); - components = new HashSet<Artifact>(); - lowLevelReqs = new ArrayList<Artifact>(1000); + subsysToSubsysReqsMap = new HashMap<>(); + components = new HashSet<>(); + lowLevelReqs = new ArrayList<>(1000); } private void init() throws IOException { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SystemSubsystemReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SystemSubsystemReport.java index 552f516b465..2463a72bb2f 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SystemSubsystemReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SystemSubsystemReport.java @@ -77,9 +77,9 @@ public class SystemSubsystemReport extends AbstractBlam { private static final int COMP_ENUM_COUNT = SubsystemCompletness.values().length; public SystemSubsystemReport() { - subsysToSubsysReqsMap = new HashMap<String, Set<Artifact>>(); - subsysToSysReqsMap = new HashMap<String, Set<Artifact>>(); - components = new LinkedHashSet<Artifact>(250); + subsysToSubsysReqsMap = new HashMap<>(); + subsysToSysReqsMap = new HashMap<>(); + components = new LinkedHashSet<>(250); } private void init() throws IOException { @@ -132,7 +132,7 @@ public class SystemSubsystemReport extends AbstractBlam { } private void storeInHierarchyOrderBySubsystem(String subSysName, List<Artifact> sysReqByComp) { - Set<Artifact> orderedSysReqs = new LinkedHashSet<Artifact>(sysReqByComp.size()); + Set<Artifact> orderedSysReqs = new LinkedHashSet<>(sysReqByComp.size()); for (Artifact sysReq : sysReqs) { if (sysReqByComp.contains(sysReq)) { orderedSysReqs.add(sysReq); @@ -156,7 +156,7 @@ public class SystemSubsystemReport extends AbstractBlam { "Req GUID not allocated"}; excelWriter.writeRow(row); - CountingMap<Artifact> allocatedSysReqCounter = new CountingMap<Artifact>(sysReqs.size()); + CountingMap<Artifact> allocatedSysReqCounter = new CountingMap<>(sysReqs.size()); for (Artifact subsysFolder : subsysTopFolder.getChildren()) { resetCounters(); @@ -168,7 +168,7 @@ public class SystemSubsystemReport extends AbstractBlam { List<Artifact> sysReqByComp = component.getRelatedArtifacts(CoreRelationTypes.Allocation__Requirement); storeInHierarchyOrderBySubsystem(subSysName, sysReqByComp); allocatedSysReqCounter.put(sysReqByComp); - Set<String> missingAllocationGuids = new LinkedHashSet<String>(); + Set<String> missingAllocationGuids = new LinkedHashSet<>(); recurseWholeSubsystem(subSysName, subsysFolder, missingAllocationGuids); @@ -313,7 +313,7 @@ public class SystemSubsystemReport extends AbstractBlam { } private void recurseWholeSubsystem(String subSysName, Artifact subsysFolder, Set<String> missingAllocationGuids) throws OseeCoreException { - Set<Artifact> subsysReqs = new LinkedHashSet<Artifact>(); + Set<Artifact> subsysReqs = new LinkedHashSet<>(); subsysToSubsysReqsMap.put(subSysName, subsysReqs); countDescendants(subSysName, subsysReqs, subsysFolder, missingAllocationGuids); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestPlanComplianceReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestPlanComplianceReport.java index 902d7dd8cad..179a26a8f38 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestPlanComplianceReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestPlanComplianceReport.java @@ -114,7 +114,7 @@ public final class TestPlanComplianceReport extends AbstractBlam { } private void writeRow(String testPlan, List<String> perfSpecs, List<String> pids, List<String> testProcNames, List<String> testProcStatuses, List<String> testResultNames, List<String> errors) throws IOException { - List<List<List<String>>> allPartitions = new LinkedList<List<List<String>>>(); + List<List<List<String>>> allPartitions = new LinkedList<>(); allPartitions.add(Lists.partition(perfSpecs, maxRowsPerCell)); allPartitions.add(Lists.partition(pids, maxRowsPerCell)); allPartitions.add(Lists.partition(testProcNames, maxRowsPerCell)); @@ -161,9 +161,9 @@ public final class TestPlanComplianceReport extends AbstractBlam { } private TestStatusAndResults calculateTestStatusAndResults(List<Artifact> testProcedures) { - List<String> testProcStatus = new LinkedList<String>(); - List<String> testResultNames = new LinkedList<String>(); - List<String> errors = new LinkedList<String>(); + List<String> testProcStatus = new LinkedList<>(); + List<String> testResultNames = new LinkedList<>(); + List<String> errors = new LinkedList<>(); for (Artifact testProc : testProcedures) { String status = testProc.getSoleAttributeValue(CoreAttributeTypes.TestProcedureStatus, BLANK_SPACE); Collection<Artifact> testResults = @@ -215,7 +215,7 @@ public final class TestPlanComplianceReport extends AbstractBlam { private List<String> getRequirementsAsString(Artifact testPlan, IRelationTypeSide rts) throws OseeCoreException { Collection<Artifact> requirementArtifacts = testPlan.getRelatedArtifacts(rts); - List<String> requirementNames = new ArrayList<String>(); + List<String> requirementNames = new ArrayList<>(); for (Artifact req : requirementArtifacts) { String paragraphNumber = req.getSoleAttributeValue(CoreAttributeTypes.ParagraphNumber, ""); requirementNames.add(paragraphNumber + BLANK_SPACE + req.getName()); @@ -280,7 +280,7 @@ public final class TestPlanComplianceReport extends AbstractBlam { } private void load() throws OseeCoreException { - testPlans = new ArrayList<Artifact>(); + testPlans = new ArrayList<>(); for (Artifact input : inputArtifacts) { testPlans.addAll(input.getDescendants()); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestStatusEnum.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestStatusEnum.java index 6e0eda5637b..8a63a841d00 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestStatusEnum.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestStatusEnum.java @@ -21,7 +21,7 @@ public enum TestStatusEnum { COMPLETED_WITH_ISSUES_CODE("Completed -- With Issues"), COMPLETED_WITH_ISSUES_RESOLVED_CODE("Completed -- With Issues Resolved"), PARTIALLY_COMPLETED_CODE("Partially Complete"); - private final static Map<String, TestStatusEnum> testStatusToCodeMap = new HashMap<String, TestStatusEnum>(); + private final static Map<String, TestStatusEnum> testStatusToCodeMap = new HashMap<>(); public String testStatus; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/errorhandler/ErrorHandler.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/errorhandler/ErrorHandler.java index 0b7a080ae75..ed7b0b72571 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/errorhandler/ErrorHandler.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/errorhandler/ErrorHandler.java @@ -23,7 +23,7 @@ public class ErrorHandler { */ public ErrorHandler() { super(); - this.set = new HashSet<Resolver>(); + this.set = new HashSet<>(); this.value = new StateValue(); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/navigate/DefineNavigateViewItems.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/navigate/DefineNavigateViewItems.java index ac1dc7c7513..9ed63af241c 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/navigate/DefineNavigateViewItems.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/navigate/DefineNavigateViewItems.java @@ -37,7 +37,7 @@ import org.osgi.framework.Bundle; * @author Donald G. Dunne */ public class DefineNavigateViewItems implements XNavigateViewItems, IXNavigateCommonItem { - private final List<XNavigateItem> items = new CopyOnWriteArrayList<XNavigateItem>(); + private final List<XNavigateItem> items = new CopyOnWriteArrayList<>(); @Override public List<XNavigateItem> getSearchNavigateItems() { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/ExtractTestRelations.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/ExtractTestRelations.java index 7b52fd05f8b..a27e2740dcb 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/ExtractTestRelations.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/ExtractTestRelations.java @@ -52,7 +52,7 @@ public class ExtractTestRelations { } public void run() { - ArrayList<String> patterns = new ArrayList<String>(); + ArrayList<String> patterns = new ArrayList<>(); patterns.add(scriptsDir); Find app = new Find("RequirementId\\(\\\"([^\\\"]+)\\\"", new File(scriptsDir), fileNamePattern); app.find(999999, true); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ArtifactOperations.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ArtifactOperations.java index cd8997db2a8..3578fe20db5 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ArtifactOperations.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ArtifactOperations.java @@ -97,7 +97,7 @@ public class ArtifactOperations { public List<String> getPartitions() { if (partitions == null) { - partitions = new ArrayList<String>(); + partitions = new ArrayList<>(); try { partitions.addAll(artifact.getAttributesToStringList(CoreAttributeTypes.Partition)); if (partitions.isEmpty()) { @@ -151,7 +151,7 @@ public class ArtifactOperations { } public static HashCollection<String, Artifact> sortByPartition(Collection<Artifact> source) { - HashCollection<String, Artifact> partitionMap = new HashCollection<String, Artifact>(false, TreeSet.class); + HashCollection<String, Artifact> partitionMap = new HashCollection<>(false, TreeSet.class); for (Artifact artifact : source) { ArtifactOperations operator = new ArtifactOperations(artifact); List<String> partitions = operator.getPartitions(); @@ -163,7 +163,7 @@ public class ArtifactOperations { } public static List<Artifact> sortByParagraphNumbers(Collection<Artifact> source) { - List<Artifact> toReturn = new ArrayList<Artifact>(source); + List<Artifact> toReturn = new ArrayList<>(source); Collections.sort(toReturn, new Comparator<Artifact>() { @Override public int compare(Artifact art1, Artifact art2) { @@ -199,7 +199,7 @@ public class ArtifactOperations { } private static Integer[] getParagraphIndices(String paragraph) { - List<Integer> paragraphs = new ArrayList<Integer>(); + List<Integer> paragraphs = new ArrayList<>(); if (Strings.isValid(paragraph)) { String[] values = paragraph.split("\\."); for (int index = 0; index < values.length; index++) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/BranchTraceabilityOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/BranchTraceabilityOperation.java index a4fa33aef75..dbc0d46e630 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/BranchTraceabilityOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/BranchTraceabilityOperation.java @@ -88,15 +88,15 @@ public class BranchTraceabilityOperation extends TraceabilityProviderOperation { @Override protected void doWork(IProgressMonitor monitor) throws Exception { requirementData.initialize(monitor); - requirementToTestUnitsMap = new HashCollection<Artifact, String>(); + requirementToTestUnitsMap = new HashCollection<>(); List<Artifact> unitsOnBranch = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.TestCase, branch); - testUnits = new HashMap<String, Artifact>(); + testUnits = new HashMap<>(); for (Artifact unit : unitsOnBranch) { testUnits.put(convertToJavaFileName(unit.getName()), unit); } - List<Artifact> reqs = new ArrayList<Artifact>(); + List<Artifact> reqs = new ArrayList<>(); for (IArtifactType type : types) { if (withInheritance) { reqs.addAll(ArtifactQuery.getArtifactListFromTypeWithInheritence(type, branch, DeletionFlag.EXCLUDE_DELETED)); @@ -107,7 +107,7 @@ public class BranchTraceabilityOperation extends TraceabilityProviderOperation { for (Artifact req : reqs) { List<Artifact> verifiers = req.getRelatedArtifacts(CoreRelationTypes.Verification__Verifier); - Collection<String> verifierNames = new HashSet<String>(); + Collection<String> verifierNames = new HashSet<>(); String inspection = getInspectionQual(req); if (Strings.isValid(inspection)) { verifierNames.add(inspection); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/HierarchyHandler.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/HierarchyHandler.java index 84af0ec3a7e..48cbecdc815 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/HierarchyHandler.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/HierarchyHandler.java @@ -32,7 +32,7 @@ import org.eclipse.osee.framework.skynet.core.utility.Requirements; */ public final class HierarchyHandler { private static final Matcher subsystemMatcher = Pattern.compile("(\\w*)\\.ss").matcher(""); - private final Map<String, Artifact> folderNameToArtifact = new HashMap<String, Artifact>(50); + private final Map<String, Artifact> folderNameToArtifact = new HashMap<>(50); private final SkynetTransaction transaction; private final IOseeBranch branch; private Artifact root; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java index ef387d285d4..b30fbd39164 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java @@ -60,7 +60,7 @@ public class ImportTraceabilityPage extends WizardDataTransferPage { setTitle("Import traceability into OSEE Define"); setDescription("Import relations between artifacts"); - traceUnitHandlers = new HashMap<Button, Boolean>(); + traceUnitHandlers = new HashMap<>(); if (selection != null && selection.size() == 1) { Object firstElement = selection.getFirstElement(); @@ -163,7 +163,7 @@ public class ImportTraceabilityPage extends WizardDataTransferPage { } public String[] getTraceUnitHandlerIds() { - List<String> selectedIds = new ArrayList<String>(); + List<String> selectedIds = new ArrayList<>(); for (Button button : traceUnitHandlers.keySet()) { Boolean value = traceUnitHandlers.get(button); if (value != null && value == true) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java index 7f01b262486..6bdcc1f5121 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java @@ -41,7 +41,7 @@ public class ImportTraceabilityWizard extends Wizard implements IImportWizard { try { IOseeBranch branch = mainPage.getSelectedBranch(); File file = mainPage.getImportFile(); - Collection<TraceHandler> handlers = new LinkedList<TraceHandler>(); + Collection<TraceHandler> handlers = new LinkedList<>(); for (String handlerId : mainPage.getTraceUnitHandlerIds()) { handlers.add(TraceUnitExtensionManager.getInstance().getTraceUnitHandlerById(handlerId)); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/RequirementTraceabilityData.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/RequirementTraceabilityData.java index 6fd0fc057fa..be4f6c64a77 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/RequirementTraceabilityData.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/RequirementTraceabilityData.java @@ -48,8 +48,8 @@ public class RequirementTraceabilityData { private HashCollection<Artifact, String> requirementsToCodeUnits; private final HashCollection<String, Artifact> requirementNameToTestProcedures = new HashCollection<String, Artifact>(); - private final Set<String> codeUnits = new TreeSet<String>(); - private final Map<String, Artifact> testProcedures = new HashMap<String, Artifact>(); + private final Set<String> codeUnits = new TreeSet<>(); + private final Map<String, Artifact> testProcedures = new HashMap<>(); private File testProcedureFilter; public RequirementTraceabilityData(IOseeBranch testProcedureBranch, TraceabilityProviderOperation traceabilityProvider) { @@ -93,7 +93,7 @@ public class RequirementTraceabilityData { private void getTestProcedureTraceability(IOseeBranch testProcedureBranch) throws OseeCoreException { // Map Software Requirements from TestProcedure IOseeBranch to Requirements IOseeBranch - Map<String, Artifact> testProcedureBranchReqsToReqsBranchMap = new HashMap<String, Artifact>(); + Map<String, Artifact> testProcedureBranchReqsToReqsBranchMap = new HashMap<>(); for (Artifact tpRequirement : ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.SoftwareRequirement, testProcedureBranch)) { testProcedureBranchReqsToReqsBranchMap.put(tpRequirement.getName(), tpRequirement); @@ -104,7 +104,7 @@ public class RequirementTraceabilityData { Artifact requirement = entry.getValue(); Set<Artifact> foundProcedures = new HashSet<Artifact>(requirement.getRelatedArtifacts(CoreRelationTypes.Validation__Validator)); - Set<Artifact> toAdd = new HashSet<Artifact>(); + Set<Artifact> toAdd = new HashSet<>(); if (testProceduresFilter.isEmpty() != true) { for (Artifact artifact : foundProcedures) { if (testProceduresFilter.contains(artifact.getName())) { @@ -189,7 +189,7 @@ public class RequirementTraceabilityData { } private Set<String> getAllowedTestProcedures() { - Set<String> toReturn = new HashSet<String>(); + Set<String> toReturn = new HashSet<>(); File filter = getTestProcedureFilterFile(); if (filter != null && filter.exists() && filter.canRead()) { BufferedReader reader = null; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java index abb9d5e9682..c7178de5c13 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java @@ -67,11 +67,11 @@ public class ScriptTraceabilityOperation extends TraceabilityProviderOperation { private final Collection<TraceHandler> traceHandlers; private final File file; private final RequirementData requirementData; - private final ArrayList<String> noTraceabilityFiles = new ArrayList<String>(200); - private final CountingMap<Artifact> reqsTraceCounts = new CountingMap<Artifact>(); - private final HashCollection<Artifact, String> requirementToCodeUnitsMap = new HashCollection<Artifact, String>( + private final ArrayList<String> noTraceabilityFiles = new ArrayList<>(200); + private final CountingMap<Artifact> reqsTraceCounts = new CountingMap<>(); + private final HashCollection<Artifact, String> requirementToCodeUnitsMap = new HashCollection<>( false, LinkedHashSet.class); - private final HashSet<String> codeUnits = new HashSet<String>(); + private final HashSet<String> codeUnits = new HashSet<>(); private final CharBackedInputStream charBak; private final ISheetWriter excelWriter; private int pathPrefixLength; @@ -141,7 +141,7 @@ public class ScriptTraceabilityOperation extends TraceabilityProviderOperation { for (File sourceFile : Lib.recursivelyListFiles(directory, filePattern)) { CharBuffer buffer = Lib.fileToCharBuffer(sourceFile); - Collection<TraceMark> tracemarks = new LinkedList<TraceMark>(); + Collection<TraceMark> tracemarks = new LinkedList<>(); for (TraceHandler handler : traceHandlers) { Collection<TraceMark> marks = handler.getParser().getTraceMarks(buffer); tracemarks.addAll(marks); @@ -189,7 +189,7 @@ public class ScriptTraceabilityOperation extends TraceabilityProviderOperation { String secondary = structuredRequirementMatcher.group(2); if (Strings.isValid(primary) != false) { - toReturn = new Pair<String, String>(primary, secondary); + toReturn = new Pair<>(primary, secondary); } } return toReturn; @@ -325,7 +325,7 @@ public class ScriptTraceabilityOperation extends TraceabilityProviderOperation { @Override public Collection<Artifact> getTestUnitArtifacts(Artifact requirement) { - Collection<Artifact> toReturn = new HashSet<Artifact>(); + Collection<Artifact> toReturn = new HashSet<>(); Collection<String> scriptNames = requirementToCodeUnitsMap.getValues(requirement); if (scriptNames != null) { for (String script : scriptNames) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceUnitExtensionManager.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceUnitExtensionManager.java index 43ef040e5ac..05c889a1192 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceUnitExtensionManager.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceUnitExtensionManager.java @@ -41,7 +41,7 @@ public class TraceUnitExtensionManager { private static TraceUnitExtensionManager instance = null; private TraceUnitExtensionManager() { - contributions = new HashMap<String, TraceHandler>(); + contributions = new HashMap<>(); } public static TraceUnitExtensionManager getInstance() { @@ -95,7 +95,7 @@ public class TraceUnitExtensionManager { } public List<String> getAllTraceHandlerNames() throws OseeCoreException { - List<String> handlerNames = new LinkedList<String>(); + List<String> handlerNames = new LinkedList<>(); for (TraceHandler handler : getAllTraceHandlers()) { handlerNames.add(handler.getName()); } @@ -104,7 +104,7 @@ public class TraceUnitExtensionManager { public Collection<ITraceParser> getAllTraceParsers() throws OseeCoreException { checkObjectsLoaded(); - Set<ITraceParser> parsers = new HashSet<ITraceParser>(); + Set<ITraceParser> parsers = new HashSet<>(); for (TraceHandler traceHandler : contributions.values()) { ITraceParser parser = traceHandler.getParser(); if (parser != null) { @@ -116,7 +116,7 @@ public class TraceUnitExtensionManager { public Collection<ITraceUnitResourceLocator> getAllTraceUnitLocators() throws OseeCoreException { checkObjectsLoaded(); - Set<ITraceUnitResourceLocator> locators = new HashSet<ITraceUnitResourceLocator>(); + Set<ITraceUnitResourceLocator> locators = new HashSet<>(); for (TraceHandler traceHandler : contributions.values()) { ITraceUnitResourceLocator locator = traceHandler.getLocator(); if (locator != null) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceabilityExtractor.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceabilityExtractor.java index e2d1b18c3fb..4345b500d2a 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceabilityExtractor.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceabilityExtractor.java @@ -69,7 +69,7 @@ public class TraceabilityExtractor { } private List<String> getTraceMarks(CharBuffer buffer, Matcher matcher) { - List<String> toReturn = new ArrayList<String>(); + List<String> toReturn = new ArrayList<>(); matcher.reset(buffer); while (matcher.find() != false) { String mark = matcher.group(1); @@ -131,7 +131,7 @@ public class TraceabilityExtractor { String primary = structuredRequirementMatcher.group(1); String secondary = structuredRequirementMatcher.group(2); if (Strings.isValid(primary) != false) { - toReturn = new Pair<String, String>(primary, secondary); + toReturn = new Pair<>(primary, secondary); } } return toReturn; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/action/FindTraceUnitActionDelegate.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/action/FindTraceUnitActionDelegate.java index 59a39ba1005..15f9c58b3e7 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/action/FindTraceUnitActionDelegate.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/action/FindTraceUnitActionDelegate.java @@ -65,7 +65,7 @@ public class FindTraceUnitActionDelegate implements IWorkbenchWindowActionDelega selectedItems = currentSelection; } if (selectedItems != null && !selectedItems.isEmpty()) { - List<IResource> toReturn = new ArrayList<IResource>(); + List<IResource> toReturn = new ArrayList<>(); for (IResource resource : selectedItems) { if (resource instanceof IFile) { toReturn.add(resource); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/RemoveTraceMarksFromTraceUnits.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/RemoveTraceMarksFromTraceUnits.java index 925ab5bdc85..8788413a321 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/RemoveTraceMarksFromTraceUnits.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/RemoveTraceMarksFromTraceUnits.java @@ -94,7 +94,7 @@ public class RemoveTraceMarksFromTraceUnits extends AbstractBlam { } private TraceHandler getCheckedTraceHandler(VariableMap variableMap) throws OseeArgumentException { - List<TraceHandler> toReturn = new ArrayList<TraceHandler>(); + List<TraceHandler> toReturn = new ArrayList<>(); for (TraceHandler handler : getTraceHandlers()) { if (variableMap.getBoolean(handler.getName())) { toReturn.add(handler); @@ -189,7 +189,7 @@ public class RemoveTraceMarksFromTraceUnits extends AbstractBlam { } private List<TraceHandler> getTraceHandlers() { - List<TraceHandler> handlers = new ArrayList<TraceHandler>(); + List<TraceHandler> handlers = new ArrayList<>(); try { for (TraceHandler handler : TraceUnitExtensionManager.getInstance().getAllTraceHandlers()) { if (handler.getParser().isTraceRemovalAllowed()) { @@ -251,7 +251,7 @@ public class RemoveTraceMarksFromTraceUnits extends AbstractBlam { public void addModifiedItem(String name, CharBuffer original, CharBuffer modified) { if (modifiedRows == null) { - modifiedRows = new ArrayList<IResultsXViewerRow>(); + modifiedRows = new ArrayList<>(); } String delta = getDelta(original, modified); String[] entries = delta.split("(\\n|;)"); @@ -293,7 +293,7 @@ public class RemoveTraceMarksFromTraceUnits extends AbstractBlam { public void addNoChangeItem(String... name) { if (noChangeRows == null) { - noChangeRows = new ArrayList<IResultsXViewerRow>(); + noChangeRows = new ArrayList<>(); } noChangeRows.add(new ResultsXViewerRow(name)); } @@ -307,7 +307,7 @@ public class RemoveTraceMarksFromTraceUnits extends AbstractBlam { } private List<XViewerColumn> createColumnHelper(String... headers) { - List<XViewerColumn> columns = new ArrayList<XViewerColumn>(); + List<XViewerColumn> columns = new ArrayList<>(); for (String name : headers) { columns.add(new XViewerColumn(name, name, 80, SWT.LEFT, true, SortDataType.String, false, "")); } @@ -327,7 +327,7 @@ public class RemoveTraceMarksFromTraceUnits extends AbstractBlam { @Override public List<IResultsEditorTab> getResultsEditorTabs() { - List<IResultsEditorTab> resultsTabs = new ArrayList<IResultsEditorTab>(); + List<IResultsEditorTab> resultsTabs = new ArrayList<>(); if (modifiedRows != null && !modifiedRows.isEmpty()) { resultsTabs.add(new ResultsEditorTableTab("Modified Trace Units", getModifiedHeaders(), modifiedRows)); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/TraceReportBlam.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/TraceReportBlam.java index 74e6884d0dc..9dbc52fbd6f 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/TraceReportBlam.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/TraceReportBlam.java @@ -69,7 +69,7 @@ public class TraceReportBlam extends AbstractBlam { private final List<IResultsEditorTab> resultsTabs; public TraceReportBlam() { - this.resultsTabs = new ArrayList<IResultsEditorTab>(); + this.resultsTabs = new ArrayList<>(); } @Override @@ -132,7 +132,7 @@ public class TraceReportBlam extends AbstractBlam { // } private List<TraceTypeEnum> getCheckedTraceItems(VariableMap variableMap) throws OseeArgumentException { - List<TraceTypeEnum> toReturn = new ArrayList<TraceTypeEnum>(); + List<TraceTypeEnum> toReturn = new ArrayList<>(); for (TraceTypeEnum traceType : TraceTypeEnum.values()) { if (variableMap.getBoolean(traceType.asLabel())) { toReturn.add(traceType); @@ -161,8 +161,8 @@ public class TraceReportBlam extends AbstractBlam { } ISheetWriter writer = null; CharBackedInputStream excelInputStream = null; - Map<String, AbstractArtifactRelationReport> reports = new LinkedHashMap<String, AbstractArtifactRelationReport>(); - List<BaseTraceDataCache> traceCache = new ArrayList<BaseTraceDataCache>(); + Map<String, AbstractArtifactRelationReport> reports = new LinkedHashMap<>(); + List<BaseTraceDataCache> traceCache = new ArrayList<>(); RequirementData reqData = new RequirementData(branch); CodeUnitData codeUnit = null; TestUnitData testUnit = null; @@ -304,7 +304,7 @@ public class TraceReportBlam extends AbstractBlam { } private void openReport(final List<IResultsEditorTab> resultsTabs) { - final List<IResultsEditorTab> results = new ArrayList<IResultsEditorTab>(resultsTabs); + final List<IResultsEditorTab> results = new ArrayList<>(resultsTabs); if (!results.isEmpty()) { IExceptionableRunnable runnable = new IExceptionableRunnable() { @@ -487,14 +487,14 @@ public class TraceReportBlam extends AbstractBlam { @Override public void addRow(Object data, String... row) { if (rows == null) { - rows = new ArrayList<IResultsXViewerRow>(); + rows = new ArrayList<>(); } rows.add(new ResultsXViewerRow(row, data)); } @Override public void addTableHeader(String... header) { - this.columns = new ArrayList<XViewerColumn>(); + this.columns = new ArrayList<>(); for (String name : header) { columns.add(new XViewerColumn(name, name, 80, SWT.LEFT, true, SortDataType.String, false, "")); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/CodeUnitData.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/CodeUnitData.java index a5bd7c31744..fd24f2d2747 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/CodeUnitData.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/CodeUnitData.java @@ -29,7 +29,7 @@ public class CodeUnitData extends BaseTraceDataCache { public CodeUnitData(IOseeBranch branch) { super("Code Unit Data", branch); - this.codeUnitMap = new HashMap<String, Artifact>(); + this.codeUnitMap = new HashMap<>(); } @Override diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/RequirementData.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/RequirementData.java index 19ccf68682e..72edb544b4e 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/RequirementData.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/RequirementData.java @@ -32,8 +32,8 @@ import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; public class RequirementData extends BaseTraceDataCache { private static final TraceabilityExtractor traceExtractor = TraceabilityExtractor.getInstance(); - private final List<Artifact> directRequirements = new ArrayList<Artifact>(); - private final HashMap<String, Artifact> allRequirementsMap = new HashMap<String, Artifact>(); + private final List<Artifact> directRequirements = new ArrayList<>(); + private final HashMap<String, Artifact> allRequirementsMap = new HashMap<>(); private final TraceabilityExtractor extractor = TraceabilityExtractor.getInstance(); private final Collection<? extends IArtifactType> types; private final boolean withInheritance; @@ -59,7 +59,7 @@ public class RequirementData extends BaseTraceDataCache { @Override protected void doBulkLoad(IProgressMonitor monitor) throws Exception { - List<Artifact> allSwRequirements = new ArrayList<Artifact>(); + List<Artifact> allSwRequirements = new ArrayList<>(); for (IArtifactType type : types) { if (withInheritance) { allSwRequirements.addAll(ArtifactQuery.getArtifactListFromTypeWithInheritence(type, getBranch(), diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TestUnitData.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TestUnitData.java index f07415914a5..a8c5702cb74 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TestUnitData.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TestUnitData.java @@ -39,15 +39,15 @@ public class TestUnitData extends BaseTraceDataCache { public TestUnitData(IOseeBranch branch) { super("Test Unit Data", branch); - this.testCaseMap = new HashMap<String, Artifact>(); - this.testProcedureMap = new HashMap<String, Artifact>(); - this.testSupportMap = new HashMap<String, Artifact>(); + this.testCaseMap = new HashMap<>(); + this.testProcedureMap = new HashMap<>(); + this.testSupportMap = new HashMap<>(); - this.testCases = new ArrayList<Artifact>(); - this.testProcedures = new ArrayList<Artifact>(); - this.testSupportItems = new ArrayList<Artifact>(); + this.testCases = new ArrayList<>(); + this.testProcedures = new ArrayList<>(); + this.testSupportItems = new ArrayList<>(); - this.allTestUnits = new TreeSet<Artifact>(); + this.allTestUnits = new TreeSet<>(); } @Override diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TraceUnit.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TraceUnit.java index e40c89d344c..20a7f70eeb2 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TraceUnit.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TraceUnit.java @@ -29,7 +29,7 @@ public class TraceUnit { public TraceUnit(IArtifactType traceUnitType, String name) { this.name = name; this.traceUnitType = traceUnitType; - this.traceMarks = new HashSet<TraceMark>(); + this.traceMarks = new HashSet<>(); } public URI getUriPath() { @@ -63,7 +63,7 @@ public class TraceUnit { } public Set<String> getTraceMarkTypes() { - Set<String> toReturn = new HashSet<String>(); + Set<String> toReturn = new HashSet<>(); for (TraceMark traceMark : traceMarks) { toReturn.add(traceMark.getTraceType()); } @@ -71,7 +71,7 @@ public class TraceUnit { } public Collection<TraceMark> getTraceMarksByType(String type) { - Set<TraceMark> toReturn = new HashSet<TraceMark>(); + Set<TraceMark> toReturn = new HashSet<>(); for (TraceMark traceMark : traceMarks) { if (traceMark.getTraceType().equalsIgnoreCase(type)) { toReturn.add(traceMark); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityContentProvider.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityContentProvider.java index b4d210b067f..50c4f33adec 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityContentProvider.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityContentProvider.java @@ -28,7 +28,7 @@ import org.eclipse.osee.framework.ui.skynet.results.table.ResultsXViewerRow; public class TraceabilityContentProvider implements ITreeContentProvider { - protected Collection<IResultsXViewerRow> rootSet = new HashSet<IResultsXViewerRow>(); + protected Collection<IResultsXViewerRow> rootSet = new HashSet<>(); private static Object[] EMPTY_ARRAY = new Object[0]; public TraceabilityContentProvider() { @@ -49,7 +49,7 @@ public class TraceabilityContentProvider implements ITreeContentProvider { Object data = row.getData(); if (data instanceof Artifact) { if (((Artifact) data).getArtifactType().inheritsFrom(CoreArtifactTypes.AbstractSoftwareRequirement)) { - List<Object> children = new LinkedList<Object>(); + List<Object> children = new LinkedList<>(); try { for (Artifact art : ((Artifact) data).getRelatedArtifacts(CoreRelationTypes.Verification__Verifier)) { children.add(new ResultsXViewerRow(new String[] {art.getName(), "Verifies"}, art)); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityResultsEditor.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityResultsEditor.java index 26718ef2b2f..4ad33b34444 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityResultsEditor.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityResultsEditor.java @@ -45,7 +45,7 @@ public class TraceabilityResultsEditor extends AbstractOperation { @Override protected void doWork(IProgressMonitor monitor) throws Exception { - List<IResultsXViewerRow> artRows = new LinkedList<IResultsXViewerRow>(); + List<IResultsXViewerRow> artRows = new LinkedList<>(); for (Artifact req : requirementArtifacts) { if (req.isOfType(CoreArtifactTypes.AbstractSoftwareRequirement)) { artRows.add(new ResultsXViewerRow(new String[] {req.getName(), ""}, req)); @@ -56,7 +56,7 @@ public class TraceabilityResultsEditor extends AbstractOperation { "Requirement Artifact"), new XViewerColumn("Relation", "Relation", 75, SWT.LEFT, true, SortDataType.String, false, "Relation Type")); - final List<IResultsEditorTab> toReturn = new LinkedList<IResultsEditorTab>(); + final List<IResultsEditorTab> toReturn = new LinkedList<>(); IResultsEditorLabelProvider provider = new IResultsEditorLabelProvider() { @Override diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java index 49fc0d4d87d..84b6ac3678d 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java @@ -107,8 +107,8 @@ public class ImportTraceUnitPage extends WizardDataTransferPage { super(PAGE_NAME); setTitle(PAGE_TITLE); setDescription(PAGE_DESCRIPTION); - this.traceUnitHandlers = new HashMap<Button, Boolean>(); - this.optionButtons = new HashMap<String, Button>(); + this.traceUnitHandlers = new HashMap<>(); + this.optionButtons = new HashMap<>(); this.isFolderRecursionAllowed = new MutableBoolean(false); this.isArtifactPersistanceAllowed = new MutableBoolean(false); @@ -116,7 +116,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage { this.isAddGuidToSourceFileAllowed = new MutableBoolean(true); if (selection != null && selection.size() >= 1) { - currentResourceSelection = new LinkedList<IResource>(); + currentResourceSelection = new LinkedList<>(); Iterator<?> it = selection.iterator(); while (it.hasNext()) { Object element = it.next(); @@ -342,7 +342,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage { public Iterable<URI> getSourceURI() { List<URI> toReturn = null; if (isWidgetAccessible(directoryFileSelector)) { - toReturn = new LinkedList<URI>(); + toReturn = new LinkedList<>(); for (File file : directoryFileSelector.getSelection()) { toReturn.add(file.toURI()); } @@ -371,7 +371,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage { } public String[] getTraceUnitHandlerIds() { - List<String> selectedIds = new ArrayList<String>(); + List<String> selectedIds = new ArrayList<>(); for (Button button : traceUnitHandlers.keySet()) { Boolean value = traceUnitHandlers.get(button); if (value != null && value == true) { @@ -422,7 +422,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage { String[] traceHandlers = settings.getArray(SELECTED_TRACE_HANDLERS_KEY); if (traceHandlers != null && traceHandlers.length > 0) { - Set<String> traceIds = new HashSet<String>(Arrays.asList(traceHandlers)); + Set<String> traceIds = new HashSet<>(Arrays.asList(traceHandlers)); for (Button button : traceUnitHandlers.keySet()) { Object data = button.getData(); if (data instanceof String) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java index 51210c1e5fe..3837d74940d 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java @@ -98,7 +98,7 @@ public final class FindTraceUnitFromResource { public static void search(Branch branch, IResource... resources) { HashCollection<IArtifactType, ResourceIdentifier> typeAndIds = toIdentifiers(resources); if (!typeAndIds.isEmpty()) { - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); for (IArtifactType artifactType : typeAndIds.keySet()) { Collection<ResourceIdentifier> items = typeAndIds.getValues(artifactType); if (items != null) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java index 78d5230da98..c63889b1010 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java @@ -43,7 +43,7 @@ public class ImportTraceUnitsOperation extends AbstractOperation { if (traceHandlerIds == null) { traceTypeIds = new String[0]; } else { - Set<String> traceSet = new HashSet<String>(Arrays.asList(traceHandlerIds)); + Set<String> traceSet = new HashSet<>(Arrays.asList(traceHandlerIds)); traceTypeIds = traceSet.toArray(new String[traceSet.size()]); } } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ResourceToTraceUnit.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ResourceToTraceUnit.java index fbd4878023f..b1fdb2b230e 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ResourceToTraceUnit.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ResourceToTraceUnit.java @@ -44,7 +44,7 @@ public class ResourceToTraceUnit { public ResourceToTraceUnit(final Iterable<URI> sources, final boolean isRecursionAllowed, final boolean isFileWithMultiplePaths) { super(); - this.traceUnitHandlers = new HashCollection<ITraceUnitResourceLocator, ITraceParser>(); + this.traceUnitHandlers = new HashCollection<>(); this.traceProcessors = Collections.synchronizedSet(new HashSet<ITraceUnitProcessor>()); this.resourceFinder = new UriResourceContentFinder(sources, isRecursionAllowed, isFileWithMultiplePaths); } @@ -80,7 +80,7 @@ public class ResourceToTraceUnit { } public void execute(IProgressMonitor monitor) throws OseeCoreException { - List<TraceUnitCollector> collectors = new ArrayList<TraceUnitCollector>(); + List<TraceUnitCollector> collectors = new ArrayList<>(); try { for (ITraceUnitResourceLocator locator : traceUnitHandlers.keySet()) { Collection<ITraceParser> parsers = traceUnitHandlers.getValues(locator); @@ -181,7 +181,7 @@ public class ResourceToTraceUnit { public TraceUnitCollector(ITraceUnitResourceLocator traceUnitLocator, ITraceParser traceParser) { this.traceParser = traceParser; this.traceUnitLocator = traceUnitLocator; - this.traceUnitToTraceMarks = new HashMap<IArtifactType, Map<String, TraceUnit>>(); + this.traceUnitToTraceMarks = new HashMap<>(); } @Override @@ -192,7 +192,7 @@ public class ResourceToTraceUnit { if (traceParser.addIfEmpty() || Conditions.hasValues(traceMarks)) { Map<String, TraceUnit> traceUnits = traceUnitToTraceMarks.get(traceUnitType); if (traceUnits == null) { - traceUnits = new HashMap<String, TraceUnit>(); + traceUnits = new HashMap<>(); traceUnitToTraceMarks.put(traceUnitType, traceUnits); } TraceUnit unit = traceUnits.get(name); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceResourceDropOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceResourceDropOperation.java index 3983381d231..34f5ca190f1 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceResourceDropOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceResourceDropOperation.java @@ -80,7 +80,7 @@ public class TraceResourceDropOperation extends AbstractOperation { } HierarchyHandler handler = new HierarchyHandler(transaction); - Map<Artifact, String> nameUpdateRequired = new TreeMap<Artifact, String>(); + Map<Artifact, String> nameUpdateRequired = new TreeMap<>(); for (URI resource : resources) { File file = new File(resource); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java index 99b7193eef7..7e0b2389719 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java @@ -80,9 +80,9 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { public TraceUnitToArtifactProcessor(IOseeBranch importIntoBranch, boolean addGuidToSourceFile) { this.importIntoBranch = importIntoBranch; - this.reportTraceNotFound = new HashCollection<TraceUnit, TraceMark>(false, HashSet.class); - this.unknownRelationError = new HashCollection<String, String>(false, HashSet.class); - this.unRelatedUnits = new HashSet<String>(); + this.reportTraceNotFound = new HashCollection<>(false, HashSet.class); + this.unknownRelationError = new HashCollection<>(false, HashSet.class); + this.unRelatedUnits = new HashSet<>(); this.addGuidToSourceFile = addGuidToSourceFile; } @@ -322,7 +322,7 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { } private List<XViewerColumn> createColumns(String... columnNames) { - List<XViewerColumn> columns = new ArrayList<XViewerColumn>(); + List<XViewerColumn> columns = new ArrayList<>(); for (String name : columnNames) { columns.add(new XViewerColumn(name, name, 80, SWT.LEFT, true, SortDataType.String, false, "")); } @@ -332,7 +332,7 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { private void addUnRelatedTraceUnit(List<IResultsEditorTab> toReturn) { if (!unRelatedUnits.isEmpty()) { List<XViewerColumn> columns = createColumns("Trace Unit Name"); - List<IResultsXViewerRow> rows = new ArrayList<IResultsXViewerRow>(); + List<IResultsXViewerRow> rows = new ArrayList<>(); for (String artifactName : unRelatedUnits) { rows.add(new ResultsXViewerRow(new String[] {artifactName})); } @@ -345,7 +345,7 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { List<XViewerColumn> columns = createColumns("Trace Unit Name", "Trace Unit Type", "Trace Mark Type", "Trace Mark"); - List<IResultsXViewerRow> rows = new ArrayList<IResultsXViewerRow>(); + List<IResultsXViewerRow> rows = new ArrayList<>(); for (TraceUnit unit : reportTraceNotFound.keySet()) { Collection<TraceMark> traceMarks = reportTraceNotFound.getValues(unit); for (TraceMark traceMark : traceMarks) { @@ -363,7 +363,7 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { private void addRelationTypeNotFoundTab(List<IResultsEditorTab> toReturn) { if (!unknownRelationError.isEmpty()) { List<XViewerColumn> columns = createColumns("Artifact Type", "Trace Mark Type"); - List<IResultsXViewerRow> rows = new ArrayList<IResultsXViewerRow>(); + List<IResultsXViewerRow> rows = new ArrayList<>(); for (String artifactType : unknownRelationError.keySet()) { Collection<String> traceTypes = unknownRelationError.getValues(artifactType); for (String traceType : traceTypes) { @@ -376,7 +376,7 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { @Override public List<IResultsEditorTab> getResultsEditorTabs() { - List<IResultsEditorTab> toReturn = new ArrayList<IResultsEditorTab>(); + List<IResultsEditorTab> toReturn = new ArrayList<>(); addTraceNotFoundTab(toReturn); addUnRelatedTraceUnit(toReturn); addRelationTypeNotFoundTab(toReturn); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractArtifactRelationReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractArtifactRelationReport.java index d7586c400ef..0356acc89f3 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractArtifactRelationReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractArtifactRelationReport.java @@ -28,8 +28,8 @@ public abstract class AbstractArtifactRelationReport extends AbstractReport { public AbstractArtifactRelationReport() { super(); - this.artifactsToCheck = new HashSet<Artifact>(); - this.relationsToCheck = new ArrayList<IRelationTypeSide>(); + this.artifactsToCheck = new HashSet<>(); + this.relationsToCheck = new ArrayList<>(); } public void setArtifacts(Collection<Artifact> artifacts) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractReport.java index 49ac6b2d7df..88d73ba6791 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractReport.java @@ -24,7 +24,7 @@ public abstract class AbstractReport { private final Set<IReportDataCollector> dataCollectors; public AbstractReport() { - this.dataCollectors = new HashSet<IReportDataCollector>(); + this.dataCollectors = new HashSet<>(); } public void addReportDataCollector(IReportDataCollector collector) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactToRelatedArtifact.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactToRelatedArtifact.java index 79ebe897660..47c919a73c1 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactToRelatedArtifact.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactToRelatedArtifact.java @@ -30,7 +30,7 @@ public class ArtifactToRelatedArtifact extends AbstractArtifactRelationReport { } public String[] getHeader() { - List<String> toReturn = new ArrayList<String>(); + List<String> toReturn = new ArrayList<>(); toReturn.add("Name"); toReturn.add("Related By"); toReturn.add("Requirement"); @@ -38,11 +38,11 @@ public class ArtifactToRelatedArtifact extends AbstractArtifactRelationReport { } public List<String[]> getRelatedRows(IRelationTypeSide[] relations, Artifact artifact) throws OseeCoreException { - List<String[]> toReturn = new ArrayList<String[]>(); + List<String[]> toReturn = new ArrayList<>(); int maxSize = 0; - List<List<String>> items = new ArrayList<List<String>>(); + List<List<String>> items = new ArrayList<>(); for (IRelationTypeSide relationEnum : relations) { - List<String> entries = new ArrayList<String>(); + List<String> entries = new ArrayList<>(); for (Artifact relArtifact : artifact.getRelatedArtifacts(relationEnum)) { entries.add(relArtifact.getName()); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactTraceCount.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactTraceCount.java index 575c1ec1d53..aff375564ef 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactTraceCount.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactTraceCount.java @@ -30,7 +30,7 @@ public class ArtifactTraceCount extends AbstractArtifactRelationReport { } public String[] getHeader() { - List<String> header = new ArrayList<String>(); + List<String> header = new ArrayList<>(); header.add("Name"); header.add("Type"); for (IRelationTypeSide relation : getRelationsToCheck()) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/PublishStdStpTraceability.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/PublishStdStpTraceability.java index ef4fe134aa0..b3f4cb89f38 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/PublishStdStpTraceability.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/PublishStdStpTraceability.java @@ -89,7 +89,7 @@ public class PublishStdStpTraceability extends AbstractBlam { builder.append(searchInheritedTypes); builder.append("<XWidget xwidgetType=\"XLabel\" displayName=\"=== For traceability stored in test scripts, select the following ===\" />"); - availableTraceHandlers = new LinkedList<String>(); + availableTraceHandlers = new LinkedList<>(); builder.append("<XWidget xwidgetType=\"XLabel\" displayName=\"Select appropriate script parser:\" />"); Collection<String> traceHandlers = TraceUnitExtensionManager.getInstance().getAllTraceHandlerNames(); for (String handler : traceHandlers) { @@ -103,7 +103,7 @@ public class PublishStdStpTraceability extends AbstractBlam { } private List<TraceabilityStyle> getStyles(VariableMap variableMap) throws OseeArgumentException { - List<TraceabilityStyle> styles = new ArrayList<TraceabilityStyle>(); + List<TraceabilityStyle> styles = new ArrayList<>(); for (TraceabilityStyle style : TraceabilityStyle.values()) { boolean isSelected = variableMap.getBoolean(style.asLabel()); if (isSelected) { @@ -122,7 +122,7 @@ public class PublishStdStpTraceability extends AbstractBlam { File scriptDir = new File(variableMap.getString("Script Root Directory")); List<TraceabilityStyle> selectedReports = getStyles(variableMap); - Collection<TraceHandler> traceHandlers = new LinkedList<TraceHandler>(); + Collection<TraceHandler> traceHandlers = new LinkedList<>(); for (String handler : availableTraceHandlers) { if (variableMap.getBoolean(handler)) { TraceHandler traceHandler = TraceUnitExtensionManager.getInstance().getTraceHandlerByName(handler); @@ -151,7 +151,7 @@ public class PublishStdStpTraceability extends AbstractBlam { } else if (status.getSeverity() == IStatus.OK) { monitor.worked(1); int count = 0; - List<IFile> files = new ArrayList<IFile>(); + List<IFile> files = new ArrayList<>(); for (TraceabilityStyle style : selectedReports) { monitor.subTask(String.format("Creating table: [%s] [%s of %s]", style.asLabel(), ++count, selectedReports.size())); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/RequirementStatus.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/RequirementStatus.java index bc95f1aa791..31ab2bb0aa3 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/RequirementStatus.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/RequirementStatus.java @@ -29,8 +29,8 @@ public class RequirementStatus implements Comparable<RequirementStatus> { this.legacyId = legacyId; this.swEnhancement = swEnhancement; this.partitionStatuses = new StringBuilder(); - this.percents = new LinkedList<Integer>(); - this.testPocs = new HashSet<IAtsUser>(); + this.percents = new LinkedList<>(); + this.testPocs = new HashSet<>(); } public void addPartitionStatus(int percentComplete, String partition, String resolution) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdCsciToTestTable.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdCsciToTestTable.java index fa0860b4183..0b84208aa1f 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdCsciToTestTable.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdCsciToTestTable.java @@ -134,7 +134,7 @@ public class StdCsciToTestTable implements ISimpleTable { String toReturn = ""; Collection<String> codeUnits = source.getRequirementsToCodeUnits().getValues(artifact); if (codeUnits != null) { - List<String> units = new ArrayList<String>(); + List<String> units = new ArrayList<>(); for (String codeUnit : codeUnits) { if (Strings.isValid(codeUnit)) { int index = codeUnit.lastIndexOf(File.separator); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdTestToCsciTable.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdTestToCsciTable.java index 07c99944a63..bfe017ca32b 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdTestToCsciTable.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdTestToCsciTable.java @@ -134,7 +134,7 @@ public class StdTestToCsciTable implements ISimpleTable { } for (String partition : new TreeSet<String>(partitionToQualificationMethod.keySet())) { - List<String> units = new ArrayList<String>(partitionToQualificationMethod.getValues(partition)); + List<String> units = new ArrayList<>(partitionToQualificationMethod.getValues(partition)); Collections.sort(units); for (String codeUnit : units) { List<Artifact> artifacts = @@ -145,7 +145,7 @@ public class StdTestToCsciTable implements ISimpleTable { } private HashCollection<Artifact, String> getQualificationMethods(RequirementTraceabilityData source) { - HashCollection<Artifact, String> toReturn = new HashCollection<Artifact, String>(false, LinkedList.class); + HashCollection<Artifact, String> toReturn = new HashCollection<>(false, LinkedList.class); HashCollection<Artifact, String> requirementsToCodeUnits = source.getRequirementsToCodeUnits(); // Combine Test Scripts and Test Procedures @@ -159,9 +159,9 @@ public class StdTestToCsciTable implements ISimpleTable { } private void processRow(ISheetWriter sheetWriter, String partition, String codeUnit, Collection<Artifact> artifacts) throws Exception { - List<String> paragraphTitles = new ArrayList<String>(); - List<String> paragraphNumbers = new ArrayList<String>(); - List<String> artifactTypes = new ArrayList<String>(); + List<String> paragraphTitles = new ArrayList<>(); + List<String> paragraphNumbers = new ArrayList<>(); + List<String> artifactTypes = new ArrayList<>(); for (Artifact artifact : artifacts) { ArtifactOperations operator = new ArtifactOperations(artifact); String name = operator.getName(); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/utility/UriResourceContentFinder.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/utility/UriResourceContentFinder.java index 02d5ad3f439..61fee405c22 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/utility/UriResourceContentFinder.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/utility/UriResourceContentFinder.java @@ -46,7 +46,7 @@ public class UriResourceContentFinder { this.sources = sources; this.isRecursionAllowed = isRecursionAllowed; this.isFileWithMultiplePaths = isFileWithMultiplePaths; - this.locatorMap = new HashCollection<IResourceLocator, IResourceHandler>(); + this.locatorMap = new HashCollection<>(); } public void addLocator(IResourceLocator locator, IResourceHandler... handler) { diff --git a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoConnectorTest.java b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoConnectorTest.java index 0eec8a2e060..f42919d5802 100644 --- a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoConnectorTest.java +++ b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoConnectorTest.java @@ -53,7 +53,7 @@ public class DispoConnectorTest { dispoItem = new DispoItemData(); dispoConnector = new DispoConnector(); - Map<String, JSONObject> discrepancies = new HashMap<String, JSONObject>(); + Map<String, JSONObject> discrepancies = new HashMap<>(); for (int i = 1; i <= 5; i++) { Discrepancy discrepancy = new Discrepancy(); @@ -226,7 +226,7 @@ public class DispoConnectorTest { @Test public void testAllDiscrepanciesAnnotatedManyComplete() throws JSONException { - List<JSONObject> annotationsAsList = new ArrayList<JSONObject>(); + List<JSONObject> annotationsAsList = new ArrayList<>(); // Create 4 annotations, one for every discrepancy covered DispoAnnotationData annotationOne = new DispoAnnotationData(); annotationOne.setLocationRefs("1-5"); diff --git a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/LocationRangesCompressorTest.java b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/LocationRangesCompressorTest.java index 4a76c887623..6158435deff 100644 --- a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/LocationRangesCompressorTest.java +++ b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/LocationRangesCompressorTest.java @@ -21,7 +21,7 @@ import org.junit.Test; public class LocationRangesCompressorTest { @Test public void testRangeCompressor() { - List<Integer> locationPoints = new ArrayList<Integer>(); + List<Integer> locationPoints = new ArrayList<>(); locationPoints.add(83); locationPoints.add(84); String result = LocationRangesCompressor.compress(locationPoints); @@ -45,7 +45,7 @@ public class LocationRangesCompressorTest { result = LocationRangesCompressor.compress(locationPoints); Assert.assertEquals("1-5, 21, 83-84, 89, 92-93", result); - List<Integer> locationPointsZero = new ArrayList<Integer>(); + List<Integer> locationPointsZero = new ArrayList<>(); locationPointsZero.add(0); result = LocationRangesCompressor.compress(locationPointsZero); Assert.assertEquals("0", result); diff --git a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/report/STRSReportTest.java b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/report/STRSReportTest.java index e7badb5adf5..49a0f8b3889 100644 --- a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/report/STRSReportTest.java +++ b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/report/STRSReportTest.java @@ -67,12 +67,12 @@ public class STRSReportTest { STRSReport reportWriter = new STRSReport(dispoApi); - List<DispoItem> itemsForPrimary = new ArrayList<DispoItem>(); + List<DispoItem> itemsForPrimary = new ArrayList<>(); itemsForPrimary.add(item1); itemsForPrimary.add(item2); Mockito.when(dispoApi.getDispoItems(program, set1.getGuid())).thenReturn(itemsForPrimary); - List<DispoItem> itemsForSecondary = new ArrayList<DispoItem>(); + List<DispoItem> itemsForSecondary = new ArrayList<>(); itemsForSecondary.add(item1); itemsForSecondary.add(item2); Mockito.when(dispoApi.getDispoItems(program, set1.getGuid())).thenReturn(itemsForSecondary); @@ -94,7 +94,7 @@ public class STRSReportTest { Pattern cellPattern = Pattern.compile("<Cell>.*?</Cell>"); Matcher cellMatcher = cellPattern.matcher(firstItemRow); - List<String> cellsFirstRow = new ArrayList<String>(); + List<String> cellsFirstRow = new ArrayList<>(); int i = 0; while (cellMatcher.find()) { cellsFirstRow.add(i++, cellMatcher.group()); @@ -129,7 +129,7 @@ public class STRSReportTest { discrepanciesListItem1.put("two", DispoUtil.discrepancyToJsonObj(discrepancy2)); item1.setDiscrepanciesList(discrepanciesListItem1); - List<JSONObject> annotationsItem1 = new ArrayList<JSONObject>(); + List<JSONObject> annotationsItem1 = new ArrayList<>(); DispoAnnotationData annotation1 = new DispoAnnotationData(); annotation1.setLocationRefs("1"); annotation1.setResolutionType("CODE"); @@ -164,7 +164,7 @@ public class STRSReportTest { discrepanciesListItem2.put("fff", DispoUtil.discrepancyToJsonObj(discrepancy4)); item2.setDiscrepanciesList(discrepanciesListItem2); - List<JSONObject> annotationsItem2 = new ArrayList<JSONObject>(); + List<JSONObject> annotationsItem2 = new ArrayList<>(); DispoAnnotationData annotation3 = new DispoAnnotationData(); annotation3.setLocationRefs("4"); diff --git a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/AnnotationResourceTest.java b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/AnnotationResourceTest.java index 80a74dc27dd..47034344906 100644 --- a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/AnnotationResourceTest.java +++ b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/AnnotationResourceTest.java @@ -94,7 +94,7 @@ public class AnnotationResourceTest { DispoAnnotationData annotation = new DispoAnnotationData(); annotation.setId(mockId); annotation.setLocationRefs("1-10"); - List<DispoAnnotationData> resultSet = new ArrayList<DispoAnnotationData>(); + List<DispoAnnotationData> resultSet = new ArrayList<>(); resultSet.add(annotation); when(dispositionApi.getDispoAnnotations(program, "itemId")).thenReturn(resultSet); diff --git a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/DispoItemResourceTest.java b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/DispoItemResourceTest.java index 46e4324a2e8..09ee7fa1804 100644 --- a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/DispoItemResourceTest.java +++ b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/DispoItemResourceTest.java @@ -60,7 +60,7 @@ public class DispoItemResourceTest { @Test public void testGetAll() throws Exception { // No Items - List<DispoItem> emptyResultSet = new ArrayList<DispoItem>(); + List<DispoItem> emptyResultSet = new ArrayList<>(); when(dispositionApi.getDispoItems(program, "setId")).thenReturn(emptyResultSet); Response noItemsResponse = resource.getAllDispoItems(false); assertEquals(Response.Status.OK.getStatusCode(), noItemsResponse.getStatus()); diff --git a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/DispoSetResourceTest.java b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/DispoSetResourceTest.java index 75cf31383be..a86eeeeca8d 100644 --- a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/DispoSetResourceTest.java +++ b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/resources/DispoSetResourceTest.java @@ -119,7 +119,7 @@ public class DispoSetResourceTest { @Test public void testGetAll() throws JSONException { // No Sets - List<DispoSet> emptyResultSet = new ArrayList<DispoSet>(); + List<DispoSet> emptyResultSet = new ArrayList<>(); when(dispositionApi.getDispoSets(program)).thenReturn(emptyResultSet); Response noSetsResponse = resource.getAllDispoSets("testScript"); String messageActual = (String) noSetsResponse.getEntity(); diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java index 858760db061..82f5660e034 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java @@ -323,7 +323,7 @@ public class DispoApiImpl implements DispoApi { @Override public List<DispoAnnotationData> getDispoAnnotations(DispoProgram program, String itemId) { - List<DispoAnnotationData> toReturn = new ArrayList<DispoAnnotationData>(); + List<DispoAnnotationData> toReturn = new ArrayList<>(); DispoItem dispoItem = getQuery().findDispoItemById(program, itemId); JSONArray annotationsList = dispoItem.getAnnotationsList(); try { @@ -384,8 +384,8 @@ public class DispoApiImpl implements DispoApi { List<DispoItem> itemsFromParse = importer.importDirectory(nameToItemMap, new File(setToEdit.getImportPath()), report); - List<DispoItem> itemsToCreate = new ArrayList<DispoItem>(); - List<DispoItem> itemsToEdit = new ArrayList<DispoItem>(); + List<DispoItem> itemsToCreate = new ArrayList<>(); + List<DispoItem> itemsToEdit = new ArrayList<>(); for (DispoItem item : itemsFromParse) { // if the ID is non-empty then we are updating an item instead of creating a new one @@ -448,7 +448,7 @@ public class DispoApiImpl implements DispoApi { } private HashMap<String, DispoItem> getItemsMap(DispoProgram program, DispoSet set) { - HashMap<String, DispoItem> toReturn = new HashMap<String, DispoItem>(); + HashMap<String, DispoItem> toReturn = new HashMap<>(); List<DispoItem> dispoItems = getDispoItems(program, set.getGuid()); for (DispoItem item : dispoItems) { toReturn.put(item.getName(), item); @@ -511,12 +511,12 @@ public class DispoApiImpl implements DispoApi { @Override public String copyDispoSet(DispoProgram program, DispoSet destination, DispoSet source, CopySetParams params) { List<DispoItem> sourceItems = getDispoItems(program, source.getGuid()); - Map<String, DispoItemData> namesToDestItems = new HashMap<String, DispoItemData>(); + Map<String, DispoItemData> namesToDestItems = new HashMap<>(); for (DispoItem itemArt : getDispoItems(program, destination.getGuid())) { DispoItemData itemData = DispoUtil.itemArtToItemData(itemArt, true, true); namesToDestItems.put(itemData.getName(), itemData); } - Map<String, DispoItem> namesToToEditItems = new HashMap<String, DispoItem>(); + Map<String, DispoItem> namesToToEditItems = new HashMap<>(); OperationReport report = new OperationReport(); DispoSetCopier copier = new DispoSetCopier(dispoConnector); diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConfigArtifact.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConfigArtifact.java index 349a9f7423c..055e45339e8 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConfigArtifact.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConfigArtifact.java @@ -35,7 +35,7 @@ public class DispoConfigArtifact implements DispoConfig { @Override public List<ResolutionMethod> getValidResolutions() { - List<ResolutionMethod> toReturn = new ArrayList<ResolutionMethod>(); + List<ResolutionMethod> toReturn = new ArrayList<>(); List<String> attributes = artifact.getAttributeValues(CoreAttributeTypes.GeneralStringData); String resolutionsJson = "[]"; diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConnector.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConnector.java index 8abd96cb7df..94ba0e3dab4 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConnector.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConnector.java @@ -92,7 +92,7 @@ public class DispoConnector { @SuppressWarnings("unchecked") private ArrayList<Integer> createDiscrepanciesList(JSONObject discrepancies) throws JSONException { - ArrayList<Integer> toReturn = new ArrayList<Integer>(); + ArrayList<Integer> toReturn = new ArrayList<>(); Iterator<String> iterator = discrepancies.keys(); while (iterator.hasNext()) { String key = iterator.next(); @@ -105,7 +105,7 @@ public class DispoConnector { } private HashSet<Integer> getAllCoveredDiscrepanciesFromAnnotations(JSONObject discrepancies, JSONArray annotations) throws JSONException { - HashSet<Integer> toReturn = new HashSet<Integer>(); + HashSet<Integer> toReturn = new HashSet<>(); int length = annotations.length(); for (int j = 0; j < length; j++) { JSONObject annotationAsObject = annotations.getJSONObject(j); @@ -128,7 +128,7 @@ public class DispoConnector { boolean isAllLocRefValid = true; HashMap<Integer, String> testPointNumberToId = getPointNumbersToIds(discrepanciesList); List<LocationRange> listOfLocationRefs = sortList(annotation.getLocationRefs()); - List<String> workingIdsOfCovered = new ArrayList<String>(); + List<String> workingIdsOfCovered = new ArrayList<>(); for (LocationRange singleLocationRef : listOfLocationRefs) { if (singleLocationRef.getStart() != singleLocationRef.getEnd()) { @@ -171,7 +171,7 @@ public class DispoConnector { @SuppressWarnings("unchecked") private HashMap<Integer, String> getPointNumbersToIds(JSONObject discrepancies) throws JSONException { - HashMap<Integer, String> toReturn = new HashMap<Integer, String>(); + HashMap<Integer, String> toReturn = new HashMap<>(); Iterator<String> iterator = discrepancies.keys(); while (iterator.hasNext()) { String key = iterator.next(); @@ -191,9 +191,9 @@ public class DispoConnector { int firstUncoveredIndex = startIndex; Collections.reverse(allLocationRefs); - Stack<LocationRange> locationRefsStack = new Stack<LocationRange>(); + Stack<LocationRange> locationRefsStack = new Stack<>(); locationRefsStack.addAll(allLocationRefs); - List<LocationRange> allUncovered = new ArrayList<LocationRange>(); + List<LocationRange> allUncovered = new ArrayList<>(); while (locationRefsStack.size() > 0) { LocationRange locRef = locationRefsStack.pop(); @@ -244,7 +244,7 @@ public class DispoConnector { private List<LocationRange> sortList(String allLocationRefsString) { allLocationRefsString = allLocationRefsString.replaceAll("\\s*", ""); - List<LocationRange> toReturn = new ArrayList<LocationRange>(); + List<LocationRange> toReturn = new ArrayList<>(); StringTokenizer tokenizer = new StringTokenizer(allLocationRefsString, ","); while (tokenizer.hasMoreTokens()) { String singleLocationRefString = tokenizer.nextToken(); diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetDataCleaner.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetDataCleaner.java index 8e27a8771a5..c6c592a7094 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetDataCleaner.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetDataCleaner.java @@ -26,7 +26,7 @@ import org.json.JSONException; public class DispoSetDataCleaner { public static List<DispoItem> cleanUpPcrTypes(List<DispoItem> items) { - List<DispoItem> toModify = new ArrayList<DispoItem>(); + List<DispoItem> toModify = new ArrayList<>(); for (DispoItem item : items) { JSONArray annotationsList = item.getAnnotationsList(); if (checkForBadReqType(annotationsList)) { diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java index 188f1461d6a..557adeded06 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java @@ -185,7 +185,7 @@ public class OrcsStorageImpl implements Storage { .andTypeEquals(DispoConstants.DispoSet)// .getResults(); - List<DispoSet> toReturn = new ArrayList<DispoSet>(); + List<DispoSet> toReturn = new ArrayList<>(); for (ArtifactReadable art : results) { toReturn.add(new DispoSetArtifact(art)); } @@ -211,7 +211,7 @@ public class OrcsStorageImpl implements Storage { ArtifactReadable setArt = findDispoArtifact(program, setId, DispoConstants.DispoSet); ResultSet<ArtifactReadable> results = setArt.getChildren(); - List<DispoItem> toReturn = new ArrayList<DispoItem>(); + List<DispoItem> toReturn = new ArrayList<>(); for (ArtifactReadable art : results) { DispoItemArtifact dispoItemArtifact = new DispoItemArtifact(art); dispoItemArtifact.getAborted(); @@ -424,7 +424,7 @@ public class OrcsStorageImpl implements Storage { @Override public List<IOseeBranch> getDispoBranches() { - List<IOseeBranch> dispoBranchesNormalized = new ArrayList<IOseeBranch>(); + List<IOseeBranch> dispoBranchesNormalized = new ArrayList<>(); BranchReadable dispoBranch = getQuery().branchQuery().andNameEquals("Dispo Parent").getResults().getExactlyOne(); ResultSet<BranchReadable> dispoBranches = @@ -444,7 +444,7 @@ public class OrcsStorageImpl implements Storage { public Collection<DispoItem> findDispoItemByAnnoationText(DispoProgram program, String setId, String keyword) { ArtifactReadable dispoSetArt = findDispoArtifact(program, setId, DispoConstants.DispoSet); - Set<DispoItem> toReturn = new HashSet<DispoItem>(); + Set<DispoItem> toReturn = new HashSet<>(); ResultSet<ArtifactReadable> dispoArtifacts = getQuery()// .fromBranch(program.getUuid())// @@ -528,7 +528,7 @@ public class OrcsStorageImpl implements Storage { } private Map<String, ArtifactReadable> getChildrenRecurse(List<ArtifactReadable> descendants) { - Map<String, ArtifactReadable> toReturn = new HashMap<String, ArtifactReadable>(); + Map<String, ArtifactReadable> toReturn = new HashMap<>(); for (ArtifactReadable descendant : descendants) { if (!descendant.getAttributeValues(CoverageUtil.Item).isEmpty()) { diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoItemDataCopier.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoItemDataCopier.java index 9386cc1d953..f26a141d19d 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoItemDataCopier.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoItemDataCopier.java @@ -78,7 +78,7 @@ public class DispoItemDataCopier { private static String rebuildLocRef(JSONArray idsOfCoveredDiscrepancies, JSONObject discrepancies, HashMap<String, Integer> idsToUpdate, StringBuilder message) throws JSONException { boolean isGaveup = false; int length = idsOfCoveredDiscrepancies.length(); - List<Integer> testPointNumber = new ArrayList<Integer>(); + List<Integer> testPointNumber = new ArrayList<>(); for (int i = 0; i < length; i++) { String id = idsOfCoveredDiscrepancies.getString(i); if (discrepancies.has(id)) { @@ -110,7 +110,7 @@ public class DispoItemDataCopier { private static HashMap<String, Integer> matchupOldDiscrepancies(JSONObject oldDiscrepancies, JSONObject newDiscrepancies, JSONArray annotations, StringBuilder message, Boolean needsReview) throws JSONException { HashMap<String, Pair<Discrepancy, Boolean>> textToNewDiscrepancies = createTextToDiscrepanciesMap(newDiscrepancies); - HashMap<String, Integer> idsToUpdate = new HashMap<String, Integer>(); + HashMap<String, Integer> idsToUpdate = new HashMap<>(); Iterator<String> iterator = oldDiscrepancies.keys(); while (iterator.hasNext()) { @@ -194,7 +194,7 @@ public class DispoItemDataCopier { @SuppressWarnings("unchecked") private static HashMap<String, Pair<Discrepancy, Boolean>> createTextToDiscrepanciesMap(JSONObject discrepancies) throws JSONException { - HashMap<String, Pair<Discrepancy, Boolean>> textToDiscrepancy = new HashMap<String, Pair<Discrepancy, Boolean>>(); + HashMap<String, Pair<Discrepancy, Boolean>> textToDiscrepancy = new HashMap<>(); Iterator<String> iterator = discrepancies.keys(); while (iterator.hasNext()) { String key = iterator.next(); @@ -202,7 +202,7 @@ public class DispoItemDataCopier { Discrepancy discrepancy = DispoUtil.jsonObjToDiscrepancy(discrepancyAsObject); String normalizedText = discrepancy.getText().replaceFirst(".*?\\.", ""); // Want to exclude Point number from text we match with - Pair newPair = new Pair<Discrepancy, Boolean>(discrepancy, textToDiscrepancy.containsKey(normalizedText)); + Pair newPair = new Pair<>(discrepancy, textToDiscrepancy.containsKey(normalizedText)); textToDiscrepancy.put(normalizedText, newPair); } diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSaxHandler.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSaxHandler.java index 6c99f6948f4..c2796736ad6 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSaxHandler.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSaxHandler.java @@ -26,7 +26,7 @@ public class DispoSaxHandler extends AbstractSaxHandler { Map<String, ElementHandlers> handlers; public DispoSaxHandler() throws Exception { - handlers = new HashMap<String, ElementHandlers>(); + handlers = new HashMap<>(); addHandlers(new TestPoint()); addHandlers(new Number()); addHandlers(new Result()); diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSetCopier.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSetCopier.java index 25b37277749..765e3ca7dc6 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSetCopier.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSetCopier.java @@ -44,7 +44,7 @@ public class DispoSetCopier { } public List<DispoItem> copyAllDispositions(Map<String, DispoItemData> nameToDestItems, Collection<DispoItem> sourceItems, boolean isCoverageCopy, OperationReport report) { - List<DispoItem> modifiedItems = new ArrayList<DispoItem>(); + List<DispoItem> modifiedItems = new ArrayList<>(); // Iterate through every source item since we want to try to find a match for every item in the source for (DispoItem sourceItem : sourceItems) { @@ -189,7 +189,7 @@ public class DispoSetCopier { } private Set<String> getDefaultAnnotations(DispoItemData item) throws JSONException { - Set<String> defaultAnnotationLocations = new HashSet<String>(); + Set<String> defaultAnnotationLocations = new HashSet<>(); JSONArray annotations = item.getAnnotationsList(); if (annotations == null) { annotations = new JSONArray(); @@ -235,7 +235,7 @@ public class DispoSetCopier { } private Map<Integer, String> generateLocationToTextMap(DispoItem item) throws JSONException { - Map<Integer, String> locationToText = new HashMap<Integer, String>(); + Map<Integer, String> locationToText = new HashMap<>(); JSONObject discrepancies = item.getDiscrepanciesList(); @SuppressWarnings("unchecked") Iterator<String> iterator = discrepancies.keys(); diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/ElementHandlers.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/ElementHandlers.java index 7a90606c19a..5837733ecc4 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/ElementHandlers.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/ElementHandlers.java @@ -20,7 +20,7 @@ import org.xml.sax.Attributes; public abstract class ElementHandlers { private final String name; - private final List<IBaseSaxElementListener> listeners = new ArrayList<IBaseSaxElementListener>(); + private final List<IBaseSaxElementListener> listeners = new ArrayList<>(); public ElementHandlers(String name) { this.name = name; diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmoImporter.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmoImporter.java index 520aa0c840f..9b4ca59b26a 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmoImporter.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmoImporter.java @@ -47,7 +47,7 @@ public class TmoImporter implements DispoImporterApi { @Override public List<DispoItem> importDirectory(Map<String, DispoItem> exisitingItems, File tmoDirectory, OperationReport report) { - List<DispoItem> toReturn = new LinkedList<DispoItem>(); + List<DispoItem> toReturn = new LinkedList<>(); if (tmoDirectory.isDirectory()) { List<File> listOfFiles = Lib.recursivelyListFiles(tmoDirectory, Pattern.compile(".*\\.tmo")); @@ -57,7 +57,7 @@ public class TmoImporter implements DispoImporterApi { int remainder = listOfFiles.size() % numThreads; int startIndex = 0; int endIndex = 0; - List<Future<List<DispoItem>>> futures = new LinkedList<Future<List<DispoItem>>>(); + List<Future<List<DispoItem>>> futures = new LinkedList<>(); for (int i = 0; i < numThreads; i++) { startIndex = endIndex; endIndex = startIndex + partitionSize; @@ -102,7 +102,7 @@ public class TmoImporter implements DispoImporterApi { @Override public List<DispoItem> call() throws Exception { - List<DispoItem> fromThread = new LinkedList<DispoItem>(); + List<DispoItem> fromThread = new LinkedList<>(); for (File file : sublist) { InputStream inputStream = null; try { diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmzImporter.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmzImporter.java index 92a62cf356f..4224c352777 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmzImporter.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmzImporter.java @@ -54,7 +54,7 @@ public class TmzImporter implements DispoImporterApi { @Override public List<DispoItem> importDirectory(Map<String, DispoItem> exisitingItems, File filesDir, OperationReport report) { - List<DispoItem> toReturn = new LinkedList<DispoItem>(); + List<DispoItem> toReturn = new LinkedList<>(); if (!filesDir.exists() || !filesDir.isDirectory()) { throw new OseeArgumentException("Input directory does not exists or is not a directory [%s]", filesDir.getAbsolutePath()); diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/CoverageAdapter.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/CoverageAdapter.java index 18cd11e1c09..34173d0d34b 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/CoverageAdapter.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/CoverageAdapter.java @@ -46,7 +46,7 @@ public class CoverageAdapter { public List<DispoItem> copyData(Map<String, ArtifactReadable> nameToCoverageUnit, List<DispoItem> dispoItems, OperationReport report) { Map<String, DispoItem> nameToDispoItem = getNameToDispoItemMap(dispoItems); - List<DispoItem> modifiedItems = new ArrayList<DispoItem>(); + List<DispoItem> modifiedItems = new ArrayList<>(); for (Entry<String, ArtifactReadable> entry : nameToCoverageUnit.entrySet()) { DispoItem dispoItem = nameToDispoItem.get(entry.getKey()); @@ -132,7 +132,7 @@ public class CoverageAdapter { } private Map<String, Discrepancy> getTextToDiscrepancyMap(DispoItem dest) { - Map<String, Discrepancy> toReturn = new HashMap<String, Discrepancy>(); + Map<String, Discrepancy> toReturn = new HashMap<>(); JSONObject discrepanciesList = dest.getDiscrepanciesList(); @SuppressWarnings("rawtypes") @@ -152,7 +152,7 @@ public class CoverageAdapter { } private Map<String, DispoItem> getNameToDispoItemMap(List<DispoItem> items) { - Map<String, DispoItem> toReturn = new HashMap<String, DispoItem>(); + Map<String, DispoItem> toReturn = new HashMap<>(); for (DispoItem item : items) { toReturn.put(item.getName(), item); } diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java index aef442118ad..f0d33b8c3f6 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java @@ -62,9 +62,9 @@ public class LisFileParser implements DispoImporterApi { private final DispoDataFactory dataFactory; private static final Pattern fileMethodLineNumberPattern = Pattern.compile("\\s*([0-9]+)\\s+([0-9]+)\\s+([0-9]+)"); - private final Map<String, DispoItemData> datIdToItem = new HashMap<String, DispoItemData>(); - private final Set<String> datIdsCoveredByException = new HashSet<String>(); - private final Set<String> alreadyUsedDatIds = new HashSet<String>(); + private final Map<String, DispoItemData> datIdToItem = new HashMap<>(); + private final Set<String> datIdsCoveredByException = new HashSet<>(); + private final Set<String> alreadyUsedDatIds = new HashSet<>(); private final DispoConnector dispoConnector = new DispoConnector(); @@ -117,17 +117,17 @@ public class LisFileParser implements DispoImporterApi { // This is a reimport so we'll need to copy all the annotations if (!exisitingItems.isEmpty()) { DispoSetCopier copier = new DispoSetCopier(dispoConnector); - List<DispoItemData> itemsFromImport = new ArrayList<DispoItemData>(); + List<DispoItemData> itemsFromImport = new ArrayList<>(); itemsFromImport.addAll(values); - Map<String, DispoItemData> nameToItem = new HashMap<String, DispoItemData>(); + Map<String, DispoItemData> nameToItem = new HashMap<>(); for (DispoItemData item : itemsFromImport) { nameToItem.put(item.getName(), item); } toReturn = copier.copyAllDispositions(nameToItem, exisitingItems.values(), false, report); } else { - toReturn = new ArrayList<DispoItem>(); + toReturn = new ArrayList<>(); toReturn.addAll(values); } return toReturn; @@ -154,7 +154,7 @@ public class LisFileParser implements DispoImporterApi { } private Collection<VCastInstrumentedFile> getInstrumentedFiles(VCastDataStore dataStore, OperationReport report) { - Collection<VCastInstrumentedFile> instrumentedFiles = new ArrayList<VCastInstrumentedFile>(); + Collection<VCastInstrumentedFile> instrumentedFiles = new ArrayList<>(); try { /** * Note: the LIS_file field of the instrumentedFiles may have a fictious absolute path - but the path is @@ -227,7 +227,7 @@ public class LisFileParser implements DispoImporterApi { instrumentedFile.getId(), function.getId(), ex.getMessage()); } - Map<String, JSONObject> discrepancies = new HashMap<String, JSONObject>(); + Map<String, JSONObject> discrepancies = new HashMap<>(); for (VCastStatementCoverage statementCoverageItem : statementCoverageItems) { processStatement(lisFile, lisFileParser, fileNum, functionNum, function, statementCoverageItem, discrepancies, diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java index c3072e3f5a9..6dff14875e0 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java @@ -148,7 +148,7 @@ public class ExportSet { } private Map<String, DispoAnnotationData> getDiscrepancyIdToCoveringAnnotation(DispoItem item) throws JSONException { - Map<String, DispoAnnotationData> toReturn = new HashMap<String, DispoAnnotationData>(); + Map<String, DispoAnnotationData> toReturn = new HashMap<>(); JSONArray annotationsList = item.getAnnotationsList(); for (int i = 0; i < annotationsList.length(); i++) { DispoAnnotationData annotation = DispoUtil.jsonObjToDispoAnnotationData(annotationsList.getJSONObject(i)); diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/OperationReport.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/OperationReport.java index bd14ef4d834..2cce8034218 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/OperationReport.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/OperationReport.java @@ -21,10 +21,10 @@ import java.util.Set; public class OperationReport { - private final Map<String, String> itemToSummaryMap = new HashMap<String, String>(); - private final Set<String> newItems = new HashSet<String>(); + private final Map<String, String> itemToSummaryMap = new HashMap<>(); + private final Set<String> newItems = new HashSet<>(); private String summary; - private final Set<String> otherMessages = new HashSet<String>(); + private final Set<String> otherMessages = new HashSet<>(); public OperationReport() { diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/STRSReport.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/STRSReport.java index 3611b4b3408..fb4d5b2a0f1 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/STRSReport.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/STRSReport.java @@ -93,7 +93,7 @@ public class STRSReport { } private HashMap<String, DispoItem> convertToMap(List<DispoItem> list) { - HashMap<String, DispoItem> toReturn = new HashMap<String, DispoItem>(); + HashMap<String, DispoItem> toReturn = new HashMap<>(); for (DispoItem item : list) { toReturn.put(item.getName(), item); } @@ -136,7 +136,7 @@ public class STRSReport { } private HashMap<String, Integer> convertToIssueTypeToCounttMap(JSONArray jsonArray) { - HashMap<String, Integer> toReturn = new HashMap<String, Integer>(); + HashMap<String, Integer> toReturn = new HashMap<>(); int codeCount = 0; int scriptCount = 0; int reqCount = 0; diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoApplication.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoApplication.java index b2aa90a3d57..89f59a0ce3e 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoApplication.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoApplication.java @@ -30,7 +30,7 @@ public final class DispoApplication extends Application { private DispoApi dispoApi; - private final Set<Object> singletons = new HashSet<Object>(); + private final Set<Object> singletons = new HashSet<>(); public void setDispoApi(DispoApi dispoApi) { this.dispoApi = dispoApi; diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoUtil.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoUtil.java index f8891520e98..bec21ee3e6f 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoUtil.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoUtil.java @@ -146,7 +146,7 @@ public final class DispoUtil { @SuppressWarnings("unchecked") public static String discrepanciesToString(JSONObject discrepanciesList) { - List<Integer> discrepanciesPoints = new ArrayList<Integer>(); + List<Integer> discrepanciesPoints = new ArrayList<>(); Iterator<String> iterator = discrepanciesList.keys(); while (iterator.hasNext()) { try { @@ -393,7 +393,7 @@ public final class DispoUtil { } public static List<DispoAnnotationData> asAnnotationsList(JSONArray annotations) { - List<DispoAnnotationData> toReturn = new ArrayList<DispoAnnotationData>(); + List<DispoAnnotationData> toReturn = new ArrayList<>(); for (int i = 0; i < annotations.length(); i++) { try { toReturn.add(jsonObjToDispoAnnotationData(annotations.getJSONObject(i))); diff --git a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/DoorsArtifact.java b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/DoorsArtifact.java index ad394a89962..f66d2f714a8 100644 --- a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/DoorsArtifact.java +++ b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/DoorsArtifact.java @@ -45,7 +45,7 @@ public class DoorsArtifact implements INamedElement { * */ public DoorsArtifact() { - this.children = new ArrayList<DoorsArtifact>(); + this.children = new ArrayList<>(); } /** diff --git a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/QueryCapabilities.java b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/QueryCapabilities.java index c27ab6220a6..75b9198cd93 100644 --- a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/QueryCapabilities.java +++ b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/QueryCapabilities.java @@ -23,7 +23,7 @@ public class QueryCapabilities extends DoorsArtifact { * Constructor to instantiate requirements list */ public QueryCapabilities() { - this.requirements = new ArrayList<Requirement>(); + this.requirements = new ArrayList<>(); } /** diff --git a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/oauth/DWAOAuthService.java b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/oauth/DWAOAuthService.java index f4f3a347731..480569cf47c 100644 --- a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/oauth/DWAOAuthService.java +++ b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/oauth/DWAOAuthService.java @@ -135,7 +135,7 @@ public class DWAOAuthService { // generate signature // create the OAuth Authorization header // return the method - Map<String, String> oauth_parameters = new HashMap<String, String>(); + Map<String, String> oauth_parameters = new HashMap<>(); if (isTokenRequired) { oauth_parameters.put(OAuthConstants.TOKEN, token.getToken()); } diff --git a/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/handler/DoorsCreator.java b/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/handler/DoorsCreator.java index 00af5adb423..dc54c0da1b3 100644 --- a/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/handler/DoorsCreator.java +++ b/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/handler/DoorsCreator.java @@ -29,12 +29,12 @@ public class DoorsCreator { /* * Collection of the display names which are merged into the branch. */ - private final Set<String> nodeDisplayNamesAdded = new HashSet<String>(); + private final Set<String> nodeDisplayNamesAdded = new HashSet<>(); /* * Collection of the display names which cannot be merged into the branch. */ - private final Set<String> nodeDisplayNamesnotAdded = new HashSet<String>(); + private final Set<String> nodeDisplayNamesnotAdded = new HashSet<>(); /** * @param url : Url of the module from DWA response diff --git a/plugins/org.eclipse.osee.event.osgi/src/org/eclipse/osee/event/osgi/internal/EventHandlerConsumer.java b/plugins/org.eclipse.osee.event.osgi/src/org/eclipse/osee/event/osgi/internal/EventHandlerConsumer.java index e70babda3b9..9b95dfc7e5b 100644 --- a/plugins/org.eclipse.osee.event.osgi/src/org/eclipse/osee/event/osgi/internal/EventHandlerConsumer.java +++ b/plugins/org.eclipse.osee.event.osgi/src/org/eclipse/osee/event/osgi/internal/EventHandlerConsumer.java @@ -59,7 +59,7 @@ public class EventHandlerConsumer { } public void registerHandler(EventHandler handler, Map<String, ?> properties) { - Hashtable<String, Object> serviceProps = new Hashtable<String, Object>(); + Hashtable<String, Object> serviceProps = new Hashtable<>(); serviceProps.putAll(properties); if (isReady()) { registerHelper(handler, serviceProps); diff --git a/plugins/org.eclipse.osee.executor.admin/src/org/eclipse/osee/executor/admin/WorkUtility.java b/plugins/org.eclipse.osee.executor.admin/src/org/eclipse/osee/executor/admin/WorkUtility.java index 42f2e1933b3..933a970b038 100644 --- a/plugins/org.eclipse.osee.executor.admin/src/org/eclipse/osee/executor/admin/WorkUtility.java +++ b/plugins/org.eclipse.osee.executor.admin/src/org/eclipse/osee/executor/admin/WorkUtility.java @@ -37,12 +37,12 @@ public final class WorkUtility { } public static <INPUT, OUTPUT> List<Callable<Collection<OUTPUT>>> partitionWork(Iterable<INPUT> work, PartitionFactory<INPUT, OUTPUT> factory) throws Exception { - List<Callable<Collection<OUTPUT>>> callables = new LinkedList<Callable<Collection<OUTPUT>>>(); + List<Callable<Collection<OUTPUT>>> callables = new LinkedList<>(); int size = Iterables.size(work); if (size > 0) { int partitionSize = Math.max(1, size / NUM_PARTITIONS); - List<INPUT> subList = new LinkedList<INPUT>(); + List<INPUT> subList = new LinkedList<>(); int index = 0; @@ -53,7 +53,7 @@ public final class WorkUtility { if (index != 0 && partitionSize != 0 && (index % partitionSize == 0)) { Callable<Collection<OUTPUT>> worker = factory.createWorker(subList); callables.add(worker); - subList = new LinkedList<INPUT>(); + subList = new LinkedList<>(); } index++; } @@ -79,7 +79,7 @@ public final class WorkUtility { } public static <INPUT, OUTPUT> List<Future<Collection<OUTPUT>>> partitionAndScheduleWork(ExecutorAdmin executorAdmin, String executorId, PartitionFactory<INPUT, OUTPUT> factory, Iterable<INPUT> items, ExecutionCallback<Collection<OUTPUT>> callback) throws Exception { - List<Future<Collection<OUTPUT>>> futures = new LinkedList<Future<Collection<OUTPUT>>>(); + List<Future<Collection<OUTPUT>>> futures = new LinkedList<>(); List<Callable<Collection<OUTPUT>>> callables = partitionWork(items, factory); if (!callables.isEmpty()) { for (Callable<Collection<OUTPUT>> callable : callables) { diff --git a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessControlProviderTest.java b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessControlProviderTest.java index 88d931c3483..72482d0e539 100644 --- a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessControlProviderTest.java +++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessControlProviderTest.java @@ -65,7 +65,7 @@ public class CmAccessControlProviderTest { } private static void assertCMProvider(IBasicArtifact<?> user, Object objectToCheck, MockConfigurationManagement expectedCM, MockConfigurationManagement... extraCms) throws OseeCoreException { - Collection<CmAccessControl> cmServices = new HashSet<CmAccessControl>(); + Collection<CmAccessControl> cmServices = new HashSet<>(); for (CmAccessControl extraCm : extraCms) { cmServices.add(extraCm); } diff --git a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessProviderTest.java b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessProviderTest.java index 84c3f25faa9..6257b2dcc3c 100644 --- a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessProviderTest.java +++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/CmAccessProviderTest.java @@ -47,7 +47,7 @@ public class CmAccessProviderTest { @Test public void testCmProviderReturnsNull() throws OseeCoreException { - Collection<Object> objects = new ArrayList<Object>(); + Collection<Object> objects = new ArrayList<>(); objects.add(expectedObject); MockConfigurationManagementProvider cmProvider = new MockConfigurationManagementProvider(expectedUser, expectedObject, null); @@ -63,7 +63,7 @@ public class CmAccessProviderTest { MockAccessModel accessModel = new MockAccessModel(); MockCMWithAccessModel cm = new MockCMWithAccessModel(accessModel, expectedUser, expectedObject, false, Collections.singleton(contextId1)); - Collection<Object> objects = new ArrayList<Object>(); + Collection<Object> objects = new ArrayList<>(); objects.add(expectedObject); MockConfigurationManagementProvider cmProvider = new MockConfigurationManagementProvider(expectedUser, expectedObject, cm); diff --git a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/MockDataFactory.java b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/MockDataFactory.java index e70a2752dfa..36de151921a 100644 --- a/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/MockDataFactory.java +++ b/plugins/org.eclipse.osee.framework.access.test/src/org/eclipse/osee/framework/access/test/internal/cm/MockDataFactory.java @@ -39,9 +39,9 @@ public final class MockDataFactory { public static <T> AccessDetail<T> createAccessDetails(T expAccessObject, PermissionEnum expPermission, String expReason, Scope scope) { AccessDetail<T> target; if (expReason != null) { - target = new AccessDetail<T>(expAccessObject, expPermission, scope, expReason); + target = new AccessDetail<>(expAccessObject, expPermission, scope, expReason); } else { - target = new AccessDetail<T>(expAccessObject, expPermission, scope); + target = new AccessDetail<>(expAccessObject, expPermission, scope); } return target; } diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java index 25a6710021d..7e942a6e83e 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java @@ -115,8 +115,8 @@ public class AccessControlService implements IAccessControlService { new DoubleKeyHashMap<Integer, AccessObject, PermissionEnum>(); private final HashCollection<AccessObject, Integer> objectToSubjectCache = new HashCollection<AccessObject, Integer>(true); // <subjectId, groupId> - private final HashCollection<Integer, Integer> subjectToGroupCache = new HashCollection<Integer, Integer>(true); // <groupId, subjectId> - private final HashCollection<Integer, Integer> groupToSubjectsCache = new HashCollection<Integer, Integer>(true); // <artId, branchUuid> + private final HashCollection<Integer, Integer> subjectToGroupCache = new HashCollection<>(true); // <groupId, subjectId> + private final HashCollection<Integer, Integer> groupToSubjectsCache = new HashCollection<>(true); // <artId, branchUuid> // branch_id, art_id, subject_id private final CompositeKeyHashMap<Long, Integer, Integer> artifactLockCache = @@ -344,7 +344,7 @@ public class AccessControlService implements IAccessControlService { @Override public AccessDataQuery getAccessData(final IBasicArtifact<?> userArtifact, final Collection<?> objectsToCheck) throws OseeCoreException { ensurePopulated(); - List<String> key = new LinkedList<String>(); + List<String> key = new LinkedList<>(); for (Object o : objectsToCheck) { if (o instanceof Branch) { key.add(String.valueOf(((Branch) o).getGuid())); @@ -567,7 +567,7 @@ public class AccessControlService implements IAccessControlService { } public List<AccessControlData> getAccessControlList(Object object) { - List<AccessControlData> datas = new LinkedList<AccessControlData>(); + List<AccessControlData> datas = new LinkedList<>(); AccessObject accessObject = null; try { @@ -587,7 +587,7 @@ public class AccessControlService implements IAccessControlService { public List<AccessControlData> generateAccessControlList(AccessObject accessObject) throws OseeCoreException { ensurePopulated(); - List<AccessControlData> datas = new LinkedList<AccessControlData>(); + List<AccessControlData> datas = new LinkedList<>(); Collection<Integer> subjects = objectToSubjectCache.getValues(accessObject); if (subjects == null) { @@ -667,7 +667,7 @@ public class AccessControlService implements IAccessControlService { ensurePopulated(); AccessControlEvent event = new AccessControlEvent(); event.setEventType(AccessControlEventType.ArtifactsLocked); - Set<Artifact> lockedArts = new HashSet<Artifact>(); + Set<Artifact> lockedArts = new HashSet<>(); for (Artifact object : objects) { Integer objectArtId = object.getArtId(); Integer subjectArtId = subject.getArtId(); @@ -695,7 +695,7 @@ public class AccessControlService implements IAccessControlService { ensurePopulated(); AccessControlEvent event = new AccessControlEvent(); event.setEventType(AccessControlEventType.ArtifactsUnlocked); - Set<Artifact> lockedArts = new HashSet<Artifact>(); + Set<Artifact> lockedArts = new HashSet<>(); for (Artifact object : objects) { Integer objectArtId = object.getArtId(); Long branchUuid = object.getFullBranch().getUuid(); diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessProviderVisitor.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessProviderVisitor.java index 177d27989dc..418421995c0 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessProviderVisitor.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessProviderVisitor.java @@ -25,7 +25,7 @@ import org.eclipse.osee.framework.lifecycle.AbstractLifecycleVisitor; */ public class AccessProviderVisitor extends AbstractLifecycleVisitor<IAccessProvider> { - public static final Type<IAccessProvider> TYPE = new Type<IAccessProvider>(); + public static final Type<IAccessProvider> TYPE = new Type<>(); private final IBasicArtifact<?> userArtifact; private final Collection<?> artsToCheck; diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessControlProviderImpl.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessControlProviderImpl.java index d73e21d197b..356c46669c5 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessControlProviderImpl.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessControlProviderImpl.java @@ -47,7 +47,7 @@ public class CmAccessControlProviderImpl implements CmAccessControlProvider { return cmContainer.getAccessControl(); } else { CmAccessControl cmToReturn; - Collection<CmAccessControl> applicableCms = new ArrayList<CmAccessControl>(); + Collection<CmAccessControl> applicableCms = new ArrayList<>(); for (CmAccessControl cmService : cmServices) { if (cmService.isApplicable(userArtifact, object)) { applicableCms.add(cmService); diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProvider.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProvider.java index 7632e7f1344..18641c837c0 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProvider.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProvider.java @@ -49,7 +49,7 @@ public class CmAccessProvider implements IAccessProvider { for (IAccessContextId contextId : contextIds) { Collection<Object> entries = cmToCheckObjects.get(management, contextId); if (entries == null) { - entries = new HashSet<Object>(); + entries = new HashSet<>(); cmToCheckObjects.put(management, contextId, entries); } entries.add(objectToCheck); diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProviderProxy.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProviderProxy.java index dcc11f8094a..44c23964ca6 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProviderProxy.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProviderProxy.java @@ -38,7 +38,7 @@ public final class CmAccessProviderProxy implements IAccessProvider { private final List<ServiceReference<CmAccessControl>> pending = new CopyOnWriteArrayList<ServiceReference<CmAccessControl>>(); - private final Collection<CmAccessControl> cmServices = new CopyOnWriteArraySet<CmAccessControl>(); + private final Collection<CmAccessControl> cmServices = new CopyOnWriteArraySet<>(); private IAccessProvider accessProvider; private CmAccessControlProvider cmProvider; diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java index 79577a1b85f..6ed2bf8eff2 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/data/BranchAccessObject.java @@ -22,7 +22,7 @@ import org.eclipse.osee.framework.skynet.core.utility.ConnectionHandler; */ public class BranchAccessObject extends AccessObject { private final Long branchUuid; - private static final Map<Long, BranchAccessObject> cache = new HashMap<Long, BranchAccessObject>(); + private static final Map<Long, BranchAccessObject> cache = new HashMap<>(); @Override public int hashCode() { diff --git a/plugins/org.eclipse.osee.framework.authentication.ldap.core/src/org/eclipse/osee/framework/authentication/ldap/core/LDAPAuthenticationProvider.java b/plugins/org.eclipse.osee.framework.authentication.ldap.core/src/org/eclipse/osee/framework/authentication/ldap/core/LDAPAuthenticationProvider.java index 3604207d7fd..17147b76369 100644 --- a/plugins/org.eclipse.osee.framework.authentication.ldap.core/src/org/eclipse/osee/framework/authentication/ldap/core/LDAPAuthenticationProvider.java +++ b/plugins/org.eclipse.osee.framework.authentication.ldap.core/src/org/eclipse/osee/framework/authentication/ldap/core/LDAPAuthenticationProvider.java @@ -120,7 +120,7 @@ public class LDAPAuthenticationProvider extends AbstractAuthenticationProvider { */ private Hashtable<String, String> createLDAPContextProperies(final ILDAPService ldapService) { - Hashtable<String, String> env = new Hashtable<String, String>(); + Hashtable<String, String> env = new Hashtable<>(); // The factory responsible to LDAPContext creation env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); // Context Authentication type diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/ClientJdbcServiceImpl.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/ClientJdbcServiceImpl.java index 18f14f27886..415032773b3 100644 --- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/ClientJdbcServiceImpl.java +++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/ClientJdbcServiceImpl.java @@ -38,7 +38,7 @@ public class ClientJdbcServiceImpl implements JdbcService { private Set<String> bindings; public void start(Map<String, Object> props) { - bindings = new LinkedHashSet<String>(); + bindings = new LinkedHashSet<>(); String[] values = getBindings(props); for (String value : values) { bindings.add(value); diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java index 09ff49428f7..7a1886fcdb7 100644 --- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java +++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/internal/InternalClientSessionManager.java @@ -168,7 +168,7 @@ public class InternalClientSessionManager { } private void internalReleaseSession(String sessionId) throws OseeCoreException { - Map<String, String> parameters = new HashMap<String, String>(); + Map<String, String> parameters = new HashMap<>(); parameters.put("operation", "release"); parameters.put("sessionId", sessionId); try { @@ -185,9 +185,9 @@ public class InternalClientSessionManager { } public List<String> getAuthenticationProtocols() { - List<String> toReturn = new ArrayList<String>(); + List<String> toReturn = new ArrayList<>(); try { - Map<String, String> parameters = new HashMap<String, String>(); + Map<String, String> parameters = new HashMap<>(); String url = HttpUrlBuilderClient.getInstance().getOsgiServletServiceUrl(OseeServerContext.SESSION_CONTEXT, parameters); if (Strings.isValid(url)) { @@ -218,7 +218,7 @@ public class InternalClientSessionManager { private OseeSessionGrant internalAcquireSession(OseeCredential credential) throws OseeCoreException, MalformedURLException { OseeSessionGrant session = null; - Map<String, String> parameters = new HashMap<String, String>(); + Map<String, String> parameters = new HashMap<>(); parameters.put("operation", "create"); String url = HttpUrlBuilderClient.getInstance().getOsgiServletServiceUrl(OseeServerContext.SESSION_CONTEXT, parameters); diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpRequest.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpRequest.java index 9b998e9aa83..90378624784 100644 --- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpRequest.java +++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpRequest.java @@ -53,10 +53,10 @@ public class HttpRequest { protected HttpRequest(Socket socket) throws Exception { this.socket = socket; - this.parameterMap = new HashMap<String, String>(); + this.parameterMap = new HashMap<>(); this.rawRequest = ""; this.urlRequest = ""; - this.httpHeader = new HashMap<String, String>(); + this.httpHeader = new HashMap<>(); this.httpMethod = HttpMethod.INVALID; this.inputStream = new BufferedInputStream(socket.getInputStream()); diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpRequestHandler.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpRequestHandler.java index a59f94ac6c7..01c9e9f4583 100644 --- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpRequestHandler.java +++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpRequestHandler.java @@ -27,7 +27,7 @@ public class HttpRequestHandler implements Runnable { private static Map<HttpMethod, IHttpMethod> httpMethodHandlers; static { - httpMethodHandlers = new HashMap<HttpMethod, IHttpMethod>(); + httpMethodHandlers = new HashMap<>(); httpMethodHandlers.put(HttpMethod.RESOURCE_GET, HttpResourceRequest.getInstance()); httpMethodHandlers.put(HttpMethod.GET, new HttpGetMethod()); } diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpResponse.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpResponse.java index 49d493d9589..473d3e4a148 100644 --- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpResponse.java +++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpResponse.java @@ -45,7 +45,7 @@ public class HttpResponse { private static Map<Integer, String> codes; static { - HttpResponse.codes = new HashMap<Integer, String>(); + HttpResponse.codes = new HashMap<>(); codes.put(100, StatusCodes.STATUS_100); codes.put(101, StatusCodes.STATUS_101); codes.put(200, StatusCodes.STATUS_200); @@ -96,7 +96,7 @@ public class HttpResponse { protected HttpResponse(Socket socket) throws Exception { this.socket = socket; this.outputStream = socket.getOutputStream(); - this.responseHeaderMap = new LinkedHashMap<String, String>(); + this.responseHeaderMap = new LinkedHashMap<>(); this.printStream = new PrintStream(outputStream, true, "UTF-8"); } diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactTypeRestrictionHandlerTest.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactTypeRestrictionHandlerTest.java index a51e1e7a723..9e8833acd15 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactTypeRestrictionHandlerTest.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactTypeRestrictionHandlerTest.java @@ -88,7 +88,7 @@ public class ArtifactTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe DslAsserts.assertNullAccessDetail(getRestrictionHandler(), restriction, artData, expectedScope); // Make expectedAccessObject inherit from ArtifactType - Set<ArtifactType> superTypes = new HashSet<ArtifactType>(); + Set<ArtifactType> superTypes = new HashSet<>(); superTypes.add(new ArtifactType(CoreArtifactTypes.Artifact.getGuid(), CoreArtifactTypes.Artifact.getName(), false)); expectedAccessObject.setSuperTypes(superTypes); DslAsserts.assertAccessDetail(getRestrictionHandler(), restriction, artData, expectedAccessObject, diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/AttributeTypeRestrictionHandlerTest.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/AttributeTypeRestrictionHandlerTest.java index 7c08ed8a83f..255dc5aec66 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/AttributeTypeRestrictionHandlerTest.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/AttributeTypeRestrictionHandlerTest.java @@ -153,7 +153,7 @@ public class AttributeTypeRestrictionHandlerTest extends BaseRestrictionHandlerT ArtifactType artArtifactType = new ArtifactType(artifactType2.getGuid(), artifactType2.getName(), false); // Make expectedAccessObject inherit from ArtifactType - Set<ArtifactType> superTypes = new HashSet<ArtifactType>(); + Set<ArtifactType> superTypes = new HashSet<>(); superTypes.add(new ArtifactType(CoreArtifactTypes.Artifact.getGuid(), CoreArtifactTypes.Artifact.getName(), false)); artArtifactType.setSuperTypes(superTypes); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/OseeUtilTest.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/OseeUtilTest.java index d4dceafc360..98bbd6dcdd7 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/OseeUtilTest.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/OseeUtilTest.java @@ -140,7 +140,7 @@ public class OseeUtilTest { @Test public void testGetRelationOrderType() throws OseeCoreException { - Map<String, String> testData = new HashMap<String, String>(); + Map<String, String> testData = new HashMap<>(); testData.put(RelationOrderBaseTypes.LEXICOGRAPHICAL_ASC.getGuid(), "Lexicographical_Ascending"); testData.put(RelationOrderBaseTypes.LEXICOGRAPHICAL_DESC.getGuid(), "Lexicographical_Descending"); testData.put(RelationOrderBaseTypes.UNORDERED.getGuid(), "Unordered"); @@ -169,7 +169,7 @@ public class OseeUtilTest { @Test public void testOrderTypeNameToGuid() throws OseeCoreException { - Map<String, String> testData = new HashMap<String, String>(); + Map<String, String> testData = new HashMap<>(); testData.put("Lexicographical_Ascending", RelationOrderBaseTypes.LEXICOGRAPHICAL_ASC.getGuid()); testData.put("Lexicographical_Descending", RelationOrderBaseTypes.LEXICOGRAPHICAL_DESC.getGuid()); testData.put("Unordered", RelationOrderBaseTypes.UNORDERED.getGuid()); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandlerTest.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandlerTest.java index fba507d46c9..500489501fc 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandlerTest.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandlerTest.java @@ -114,7 +114,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe IArtifactType artTypeToken1 = CoreArtifactTypes.SoftwareRequirement; ArtifactType artArtType = new ArtifactType(artTypeToken1.getGuid(), artTypeToken1.getName(), false); - Set<ArtifactType> superTypes = new HashSet<ArtifactType>(); + Set<ArtifactType> superTypes = new HashSet<>(); superTypes.add(new ArtifactType(CoreArtifactTypes.Artifact.getGuid(), CoreArtifactTypes.Artifact.getName(), false)); artArtType.setSuperTypes(superTypes); @@ -166,7 +166,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe IArtifactType artTypeToken1 = CoreArtifactTypes.SoftwareRequirement; ArtifactType artArtType = new ArtifactType(artTypeToken1.getGuid(), artTypeToken1.getName(), false); - Set<ArtifactType> superTypes = new HashSet<ArtifactType>(); + Set<ArtifactType> superTypes = new HashSet<>(); superTypes.add(new ArtifactType(CoreArtifactTypes.Artifact.getGuid(), CoreArtifactTypes.Artifact.getName(), false)); artArtType.setSuperTypes(superTypes); @@ -193,7 +193,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe IArtifactType artTypeToken1 = CoreArtifactTypes.SoftwareRequirement; ArtifactType artArtType = new ArtifactType(artTypeToken1.getGuid(), artTypeToken1.getName(), false); - Set<ArtifactType> superTypes = new HashSet<ArtifactType>(); + Set<ArtifactType> superTypes = new HashSet<>(); superTypes.add(new ArtifactType(CoreArtifactTypes.Artifact.getGuid(), CoreArtifactTypes.Artifact.getName(), false)); artArtType.setSuperTypes(superTypes); @@ -202,7 +202,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe RelationTypeSide expectedObject1 = new RelationTypeSide(testRelationType, RelationSide.SIDE_A); RelationTypeSide expectedObject2 = new RelationTypeSide(testRelationType, RelationSide.SIDE_B); - final List<AccessDetail<?>> actualAccesses = new ArrayList<AccessDetail<?>>(); + final List<AccessDetail<?>> actualAccesses = new ArrayList<>(); AccessDetailCollector collector = new AccessDetailCollector() { @Override @@ -238,7 +238,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe IArtifactType artTypeToken1 = CoreArtifactTypes.SoftwareRequirement; ArtifactType artArtType = new ArtifactType(artTypeToken1.getGuid(), artTypeToken1.getName(), false); - Set<ArtifactType> superTypes = new HashSet<ArtifactType>(); + Set<ArtifactType> superTypes = new HashSet<>(); superTypes.add(new ArtifactType(CoreArtifactTypes.Artifact.getGuid(), CoreArtifactTypes.Artifact.getName(), false)); artArtType.setSuperTypes(superTypes); @@ -247,7 +247,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe RelationTypeSide expectedObject1 = new RelationTypeSide(testRelationType, RelationSide.SIDE_A); RelationTypeSide expectedObject2 = new RelationTypeSide(testRelationType, RelationSide.SIDE_B); - final List<AccessDetail<?>> actualAccesses = new ArrayList<AccessDetail<?>>(); + final List<AccessDetail<?>> actualAccesses = new ArrayList<>(); AccessDetailCollector collector = new AccessDetailCollector() { @Override @@ -291,7 +291,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe IArtifactType artTypeToken1 = CoreArtifactTypes.SoftwareRequirement; ArtifactType artArtType = new ArtifactType(artTypeToken1.getGuid(), artTypeToken1.getName(), false); - Set<ArtifactType> superTypes = new HashSet<ArtifactType>(); + Set<ArtifactType> superTypes = new HashSet<>(); superTypes.add(new ArtifactType(CoreArtifactTypes.AbstractSoftwareRequirement.getGuid(), CoreArtifactTypes.AbstractSoftwareRequirement.getName(), false)); artArtType.setSuperTypes(superTypes); @@ -330,7 +330,7 @@ public class RelationTypeRestrictionHandlerTest extends BaseRestrictionHandlerTe IArtifactType artTypeToken1 = CoreArtifactTypes.SoftwareRequirement; ArtifactType artArtType = new ArtifactType(artTypeToken1.getGuid(), artTypeToken1.getName(), false); - Set<ArtifactType> superTypes = new HashSet<ArtifactType>(); + Set<ArtifactType> superTypes = new HashSet<>(); superTypes.add(new ArtifactType(CoreArtifactTypes.Artifact.getGuid(), CoreArtifactTypes.Artifact.getName(), false)); artArtType.setSuperTypes(superTypes); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/OseeDslAccessModel.java b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/OseeDslAccessModel.java index 01fcf7cc620..51e7d9aa977 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/OseeDslAccessModel.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/OseeDslAccessModel.java @@ -50,7 +50,7 @@ public class OseeDslAccessModel implements AccessModel { "No matching access context was found in access dsl for [%s]", contextId); for (Object objectToCheck : objectsToCheck) { - List<AccessDetail<?>> accessDetail = new LinkedList<AccessDetail<?>>(); + List<AccessDetail<?>> accessDetail = new LinkedList<>(); AccessDetailCollector collector = new AccessDataCollector(accessDetail); interpreter.computeAccessDetails(collector, context, objectToCheck); accessData.addAll(objectToCheck, accessDetail); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/AccessModelInterpreterImpl.java b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/AccessModelInterpreterImpl.java index 68c395d090d..ef7a26eb552 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/AccessModelInterpreterImpl.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/AccessModelInterpreterImpl.java @@ -39,7 +39,7 @@ public class AccessModelInterpreterImpl implements AccessModelInterpreter { public AccessModelInterpreterImpl(ArtifactDataProvider provider, ArtifactMatchInterpreter matcher, RestrictionHandler<?>... restricitionHandlers) { this.provider = provider; this.matcher = matcher; - this.restrictionHandlers = new HashSet<RestrictionHandler<?>>(); + this.restrictionHandlers = new HashSet<>(); for (RestrictionHandler<?> handler : restricitionHandlers) { restrictionHandlers.add(handler); } diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreter.java b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreter.java index fa0121abe47..151f51f65c3 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreter.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchInterpreter.java @@ -140,6 +140,6 @@ public class ArtifactMatchInterpreter { } return result; } - private final Map<String, Matcher> expressions = new ConcurrentHashMap<String, Matcher>(); + private final Map<String, Matcher> expressions = new ConcurrentHashMap<>(); } diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeDslSegmentParser.java b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeDslSegmentParser.java index c66fc9da316..ceb307a1b4b 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeDslSegmentParser.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/util/OseeDslSegmentParser.java @@ -49,8 +49,8 @@ public class OseeDslSegmentParser { public Collection<OseeDslSegment> getSegments(Collection<TagLocation> tagLocations) throws OseeCoreException { Conditions.checkNotNull(tagLocations, "tagLocations"); - Collection<OseeDslSegment> segments = new ArrayList<OseeDslSegment>(); - Stack<TagLocation> segmentStack = new Stack<TagLocation>(); + Collection<OseeDslSegment> segments = new ArrayList<>(); + Stack<TagLocation> segmentStack = new Stack<>(); for (TagLocation segment : tagLocations) { if (segment.isStartTag()) { segmentStack.push(segment); @@ -81,7 +81,7 @@ public class OseeDslSegmentParser { public Collection<TagLocation> getTagLocations(String source) throws OseeCoreException { Conditions.checkNotNull(source, "artifact source data"); - Collection<TagLocation> segments = new ArrayList<TagLocation>(); + Collection<TagLocation> segments = new ArrayList<>(); Pattern pattern = Pattern.compile("\\s?//@(.*?)_artifact\\s+branch/(.*?)/artifact/(.*?)/\\s+\\(.*?\\)"); Matcher matcher = pattern.matcher(source); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/ArtifactDataProviderImpl.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/ArtifactDataProviderImpl.java index 5221f86b298..882413d83f9 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/ArtifactDataProviderImpl.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/ArtifactDataProviderImpl.java @@ -88,7 +88,7 @@ public final class ArtifactDataProviderImpl implements ArtifactDataProvider { @Override public Collection<ArtifactProxy> getHierarchy() { - Collection<ArtifactProxy> hierarchy = new HashSet<ArtifactProxy>(); + Collection<ArtifactProxy> hierarchy = new HashSet<>(); try { Artifact artifactPtr = self.getParent(); while (artifactPtr != null) { diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslArtifactUpdateOperation.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslArtifactUpdateOperation.java index 839ae398877..cd7f8155b44 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslArtifactUpdateOperation.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslArtifactUpdateOperation.java @@ -54,7 +54,7 @@ public class OseeDslArtifactUpdateOperation extends AbstractOperation { double workPercentage = 0.80 * 1.0 / segments.size(); int workAmount = calculateWork(workPercentage); - Map<Branch, SkynetTransaction> transactionMap = new HashMap<Branch, SkynetTransaction>(); + Map<Branch, SkynetTransaction> transactionMap = new HashMap<>(); for (OseeDslSegment segment : segments) { int startAt = segment.start(); int endAt = segment.end(); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeTypeModifier.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeTypeModifier.java index 97e4005f93a..e8687a0126b 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeTypeModifier.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeTypeModifier.java @@ -62,7 +62,7 @@ public class OseeTypeModifier implements AttributeModifier { OseeExceptions.wrapAndThrow(ex); } - Set<Long> uuids = new HashSet<Long>(); + Set<Long> uuids = new HashSet<>(); for (EObject object : oseeDsl.eContents()) { if (object instanceof OseeType) { addUuid(uuids, (OseeType) object); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeDslRoleContextProvider.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeDslRoleContextProvider.java index 6e4342f1de2..d356c639893 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeDslRoleContextProvider.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeDslRoleContextProvider.java @@ -76,13 +76,13 @@ public class OseeDslRoleContextProvider implements RoleContextProvider { Set<Role> applicableRoles = getApplicableRoles(dsl.getRoleDeclarations(), applicableGuids); if (!applicableRoles.isEmpty()) { - Map<String, String> accessContextMap = new HashMap<String, String>(); + Map<String, String> accessContextMap = new HashMap<>(); for (AccessContext ac : dsl.getAccessDeclarations()) { accessContextMap.put(ac.getName(), ac.getGuid()); } //now get the context id's - toReturn = new HashSet<IAccessContextId>(); + toReturn = new HashSet<>(); for (Role role : applicableRoles) { for (ReferencedContext ref : role.getReferencedContexts()) { String contextName = ref.getAccessContextRef(); @@ -95,7 +95,7 @@ public class OseeDslRoleContextProvider implements RoleContextProvider { } private Set<Role> getApplicableRoles(List<Role> roles, List<String> applicableGuids) { - Queue<Role> applicableRoles = new LinkedList<Role>(); + Queue<Role> applicableRoles = new LinkedList<>(); for (Role role : roles) { for (UsersAndGroups uag : role.getUsersAndGroups()) { if (applicableGuids.contains(uag.getUserOrGroupGuid()) && !applicableRoles.contains(role)) { @@ -105,13 +105,13 @@ public class OseeDslRoleContextProvider implements RoleContextProvider { } } - Set<Role> includesInherited = new HashSet<Role>(); + Set<Role> includesInherited = new HashSet<>(); getSuperRoles(includesInherited, applicableRoles); return includesInherited; } private List<String> getApplicableGuids(Artifact user) { - List<String> applicableGuids = new LinkedList<String>(); + List<String> applicableGuids = new LinkedList<>(); List<Artifact> groups = Collections.emptyList(); try { diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/AccessContextImpl.java b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/AccessContextImpl.java index 5437f387c26..692d8a776e8 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/AccessContextImpl.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/AccessContextImpl.java @@ -166,7 +166,7 @@ public class AccessContextImpl extends MinimalEObjectImpl.Container implements A { if (superAccessContexts == null) { - superAccessContexts = new EObjectResolvingEList<AccessContext>(AccessContext.class, this, OseeDslPackage.ACCESS_CONTEXT__SUPER_ACCESS_CONTEXTS); + superAccessContexts = new EObjectResolvingEList<>(AccessContext.class, this, OseeDslPackage.ACCESS_CONTEXT__SUPER_ACCESS_CONTEXTS); } return superAccessContexts; } @@ -203,7 +203,7 @@ public class AccessContextImpl extends MinimalEObjectImpl.Container implements A { if (accessRules == null) { - accessRules = new EObjectContainmentEList<ObjectRestriction>(ObjectRestriction.class, this, OseeDslPackage.ACCESS_CONTEXT__ACCESS_RULES); + accessRules = new EObjectContainmentEList<>(ObjectRestriction.class, this, OseeDslPackage.ACCESS_CONTEXT__ACCESS_RULES); } return accessRules; } @@ -217,7 +217,7 @@ public class AccessContextImpl extends MinimalEObjectImpl.Container implements A { if (hierarchyRestrictions == null) { - hierarchyRestrictions = new EObjectContainmentEList<HierarchyRestriction>(HierarchyRestriction.class, this, OseeDslPackage.ACCESS_CONTEXT__HIERARCHY_RESTRICTIONS); + hierarchyRestrictions = new EObjectContainmentEList<>(HierarchyRestriction.class, this, OseeDslPackage.ACCESS_CONTEXT__HIERARCHY_RESTRICTIONS); } return hierarchyRestrictions; } diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/CompoundConditionImpl.java b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/CompoundConditionImpl.java index 59471e55ede..fa6920b776e 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/CompoundConditionImpl.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/CompoundConditionImpl.java @@ -86,7 +86,7 @@ public class CompoundConditionImpl extends ConditionImpl implements CompoundCond { if (conditions == null) { - conditions = new EObjectContainmentEList<SimpleCondition>(SimpleCondition.class, this, OseeDslPackage.COMPOUND_CONDITION__CONDITIONS); + conditions = new EObjectContainmentEList<>(SimpleCondition.class, this, OseeDslPackage.COMPOUND_CONDITION__CONDITIONS); } return conditions; } @@ -100,7 +100,7 @@ public class CompoundConditionImpl extends ConditionImpl implements CompoundCond { if (operators == null) { - operators = new EDataTypeEList<XLogicOperator>(XLogicOperator.class, this, OseeDslPackage.COMPOUND_CONDITION__OPERATORS); + operators = new EDataTypeEList<>(XLogicOperator.class, this, OseeDslPackage.COMPOUND_CONDITION__OPERATORS); } return operators; } diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/HierarchyRestrictionImpl.java b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/HierarchyRestrictionImpl.java index 20d6bbb3635..89e80c92386 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/HierarchyRestrictionImpl.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/HierarchyRestrictionImpl.java @@ -132,7 +132,7 @@ public class HierarchyRestrictionImpl extends MinimalEObjectImpl.Container imple { if (accessRules == null) { - accessRules = new EObjectContainmentEList<ObjectRestriction>(ObjectRestriction.class, this, OseeDslPackage.HIERARCHY_RESTRICTION__ACCESS_RULES); + accessRules = new EObjectContainmentEList<>(ObjectRestriction.class, this, OseeDslPackage.HIERARCHY_RESTRICTION__ACCESS_RULES); } return accessRules; } diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/OseeDslImpl.java b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/OseeDslImpl.java index b29569f318b..536fe9ec468 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/OseeDslImpl.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/OseeDslImpl.java @@ -183,7 +183,7 @@ public class OseeDslImpl extends MinimalEObjectImpl.Container implements OseeDsl { if (imports == null) { - imports = new EObjectContainmentEList<Import>(Import.class, this, OseeDslPackage.OSEE_DSL__IMPORTS); + imports = new EObjectContainmentEList<>(Import.class, this, OseeDslPackage.OSEE_DSL__IMPORTS); } return imports; } @@ -197,7 +197,7 @@ public class OseeDslImpl extends MinimalEObjectImpl.Container implements OseeDsl { if (artifactTypes == null) { - artifactTypes = new EObjectContainmentEList<XArtifactType>(XArtifactType.class, this, OseeDslPackage.OSEE_DSL__ARTIFACT_TYPES); + artifactTypes = new EObjectContainmentEList<>(XArtifactType.class, this, OseeDslPackage.OSEE_DSL__ARTIFACT_TYPES); } return artifactTypes; } @@ -211,7 +211,7 @@ public class OseeDslImpl extends MinimalEObjectImpl.Container implements OseeDsl { if (relationTypes == null) { - relationTypes = new EObjectContainmentEList<XRelationType>(XRelationType.class, this, OseeDslPackage.OSEE_DSL__RELATION_TYPES); + relationTypes = new EObjectContainmentEList<>(XRelationType.class, this, OseeDslPackage.OSEE_DSL__RELATION_TYPES); } return relationTypes; } @@ -225,7 +225,7 @@ public class OseeDslImpl extends MinimalEObjectImpl.Container implements OseeDsl { if (attributeTypes == null) { - attributeTypes = new EObjectContainmentEList<XAttributeType>(XAttributeType.class, this, OseeDslPackage.OSEE_DSL__ATTRIBUTE_TYPES); + attributeTypes = new EObjectContainmentEList<>(XAttributeType.class, this, OseeDslPackage.OSEE_DSL__ATTRIBUTE_TYPES); } return attributeTypes; } @@ -239,7 +239,7 @@ public class OseeDslImpl extends MinimalEObjectImpl.Container implements OseeDsl { if (enumTypes == null) { - enumTypes = new EObjectContainmentEList<XOseeEnumType>(XOseeEnumType.class, this, OseeDslPackage.OSEE_DSL__ENUM_TYPES); + enumTypes = new EObjectContainmentEList<>(XOseeEnumType.class, this, OseeDslPackage.OSEE_DSL__ENUM_TYPES); } return enumTypes; } @@ -253,7 +253,7 @@ public class OseeDslImpl extends MinimalEObjectImpl.Container implements OseeDsl { if (enumOverrides == null) { - enumOverrides = new EObjectContainmentEList<XOseeEnumOverride>(XOseeEnumOverride.class, this, OseeDslPackage.OSEE_DSL__ENUM_OVERRIDES); + enumOverrides = new EObjectContainmentEList<>(XOseeEnumOverride.class, this, OseeDslPackage.OSEE_DSL__ENUM_OVERRIDES); } return enumOverrides; } @@ -267,7 +267,7 @@ public class OseeDslImpl extends MinimalEObjectImpl.Container implements OseeDsl { if (artifactTypeOverrides == null) { - artifactTypeOverrides = new EObjectContainmentEList<XOseeArtifactTypeOverride>(XOseeArtifactTypeOverride.class, this, OseeDslPackage.OSEE_DSL__ARTIFACT_TYPE_OVERRIDES); + artifactTypeOverrides = new EObjectContainmentEList<>(XOseeArtifactTypeOverride.class, this, OseeDslPackage.OSEE_DSL__ARTIFACT_TYPE_OVERRIDES); } return artifactTypeOverrides; } @@ -281,7 +281,7 @@ public class OseeDslImpl extends MinimalEObjectImpl.Container implements OseeDsl { if (artifactMatchRefs == null) { - artifactMatchRefs = new EObjectContainmentEList<XArtifactMatcher>(XArtifactMatcher.class, this, OseeDslPackage.OSEE_DSL__ARTIFACT_MATCH_REFS); + artifactMatchRefs = new EObjectContainmentEList<>(XArtifactMatcher.class, this, OseeDslPackage.OSEE_DSL__ARTIFACT_MATCH_REFS); } return artifactMatchRefs; } @@ -295,7 +295,7 @@ public class OseeDslImpl extends MinimalEObjectImpl.Container implements OseeDsl { if (accessDeclarations == null) { - accessDeclarations = new EObjectContainmentEList<AccessContext>(AccessContext.class, this, OseeDslPackage.OSEE_DSL__ACCESS_DECLARATIONS); + accessDeclarations = new EObjectContainmentEList<>(AccessContext.class, this, OseeDslPackage.OSEE_DSL__ACCESS_DECLARATIONS); } return accessDeclarations; } @@ -309,7 +309,7 @@ public class OseeDslImpl extends MinimalEObjectImpl.Container implements OseeDsl { if (roleDeclarations == null) { - roleDeclarations = new EObjectContainmentEList<Role>(Role.class, this, OseeDslPackage.OSEE_DSL__ROLE_DECLARATIONS); + roleDeclarations = new EObjectContainmentEList<>(Role.class, this, OseeDslPackage.OSEE_DSL__ROLE_DECLARATIONS); } return roleDeclarations; } diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/RoleImpl.java b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/RoleImpl.java index 990bcd1b3f7..0f33eecee37 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/RoleImpl.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/RoleImpl.java @@ -145,7 +145,7 @@ public class RoleImpl extends MinimalEObjectImpl.Container implements Role { if (superRoles == null) { - superRoles = new EObjectResolvingEList<Role>(Role.class, this, OseeDslPackage.ROLE__SUPER_ROLES); + superRoles = new EObjectResolvingEList<>(Role.class, this, OseeDslPackage.ROLE__SUPER_ROLES); } return superRoles; } @@ -159,7 +159,7 @@ public class RoleImpl extends MinimalEObjectImpl.Container implements Role { if (usersAndGroups == null) { - usersAndGroups = new EObjectContainmentEList<UsersAndGroups>(UsersAndGroups.class, this, OseeDslPackage.ROLE__USERS_AND_GROUPS); + usersAndGroups = new EObjectContainmentEList<>(UsersAndGroups.class, this, OseeDslPackage.ROLE__USERS_AND_GROUPS); } return usersAndGroups; } @@ -173,7 +173,7 @@ public class RoleImpl extends MinimalEObjectImpl.Container implements Role { if (referencedContexts == null) { - referencedContexts = new EObjectContainmentEList<ReferencedContext>(ReferencedContext.class, this, OseeDslPackage.ROLE__REFERENCED_CONTEXTS); + referencedContexts = new EObjectContainmentEList<>(ReferencedContext.class, this, OseeDslPackage.ROLE__REFERENCED_CONTEXTS); } return referencedContexts; } diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XArtifactMatcherImpl.java b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XArtifactMatcherImpl.java index c0f096671ec..56f73b39196 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XArtifactMatcherImpl.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XArtifactMatcherImpl.java @@ -134,7 +134,7 @@ public class XArtifactMatcherImpl extends MinimalEObjectImpl.Container implement { if (conditions == null) { - conditions = new EObjectContainmentEList<Condition>(Condition.class, this, OseeDslPackage.XARTIFACT_MATCHER__CONDITIONS); + conditions = new EObjectContainmentEList<>(Condition.class, this, OseeDslPackage.XARTIFACT_MATCHER__CONDITIONS); } return conditions; } @@ -148,7 +148,7 @@ public class XArtifactMatcherImpl extends MinimalEObjectImpl.Container implement { if (operators == null) { - operators = new EDataTypeEList<XLogicOperator>(XLogicOperator.class, this, OseeDslPackage.XARTIFACT_MATCHER__OPERATORS); + operators = new EDataTypeEList<>(XLogicOperator.class, this, OseeDslPackage.XARTIFACT_MATCHER__OPERATORS); } return operators; } diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XArtifactTypeImpl.java b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XArtifactTypeImpl.java index 7fc4a14c36a..2a8feb48213 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XArtifactTypeImpl.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XArtifactTypeImpl.java @@ -132,7 +132,7 @@ public class XArtifactTypeImpl extends OseeTypeImpl implements XArtifactType { if (superArtifactTypes == null) { - superArtifactTypes = new EObjectResolvingEList<XArtifactType>(XArtifactType.class, this, OseeDslPackage.XARTIFACT_TYPE__SUPER_ARTIFACT_TYPES); + superArtifactTypes = new EObjectResolvingEList<>(XArtifactType.class, this, OseeDslPackage.XARTIFACT_TYPE__SUPER_ARTIFACT_TYPES); } return superArtifactTypes; } @@ -146,7 +146,7 @@ public class XArtifactTypeImpl extends OseeTypeImpl implements XArtifactType { if (validAttributeTypes == null) { - validAttributeTypes = new EObjectContainmentEList<XAttributeTypeRef>(XAttributeTypeRef.class, this, OseeDslPackage.XARTIFACT_TYPE__VALID_ATTRIBUTE_TYPES); + validAttributeTypes = new EObjectContainmentEList<>(XAttributeTypeRef.class, this, OseeDslPackage.XARTIFACT_TYPE__VALID_ATTRIBUTE_TYPES); } return validAttributeTypes; } diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XOseeArtifactTypeOverrideImpl.java b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XOseeArtifactTypeOverrideImpl.java index a7d9f4af7b9..578a5d21d4d 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XOseeArtifactTypeOverrideImpl.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XOseeArtifactTypeOverrideImpl.java @@ -176,7 +176,7 @@ public class XOseeArtifactTypeOverrideImpl extends MinimalEObjectImpl.Container { if (overrideOptions == null) { - overrideOptions = new EObjectContainmentEList<AttributeOverrideOption>(AttributeOverrideOption.class, this, OseeDslPackage.XOSEE_ARTIFACT_TYPE_OVERRIDE__OVERRIDE_OPTIONS); + overrideOptions = new EObjectContainmentEList<>(AttributeOverrideOption.class, this, OseeDslPackage.XOSEE_ARTIFACT_TYPE_OVERRIDE__OVERRIDE_OPTIONS); } return overrideOptions; } diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XOseeEnumOverrideImpl.java b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XOseeEnumOverrideImpl.java index a79001138d5..6107e225fef 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XOseeEnumOverrideImpl.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XOseeEnumOverrideImpl.java @@ -175,7 +175,7 @@ public class XOseeEnumOverrideImpl extends OseeElementImpl implements XOseeEnumO { if (overrideOptions == null) { - overrideOptions = new EObjectContainmentEList<OverrideOption>(OverrideOption.class, this, OseeDslPackage.XOSEE_ENUM_OVERRIDE__OVERRIDE_OPTIONS); + overrideOptions = new EObjectContainmentEList<>(OverrideOption.class, this, OseeDslPackage.XOSEE_ENUM_OVERRIDE__OVERRIDE_OPTIONS); } return overrideOptions; } diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XOseeEnumTypeImpl.java b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XOseeEnumTypeImpl.java index b13bbf37b64..d2d4b1c4f84 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XOseeEnumTypeImpl.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/oseeDsl/impl/XOseeEnumTypeImpl.java @@ -73,7 +73,7 @@ public class XOseeEnumTypeImpl extends OseeTypeImpl implements XOseeEnumType { if (enumEntries == null) { - enumEntries = new EObjectContainmentEList<XOseeEnumEntry>(XOseeEnumEntry.class, this, OseeDslPackage.XOSEE_ENUM_TYPE__ENUM_ENTRIES); + enumEntries = new EObjectContainmentEList<>(XOseeEnumEntry.class, this, OseeDslPackage.XOSEE_ENUM_TYPE__ENUM_ENTRIES); } return enumEntries; } diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/validation/AbstractOseeDslJavaValidator.java b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/validation/AbstractOseeDslJavaValidator.java index 458f63bcc1e..ebce7973848 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/validation/AbstractOseeDslJavaValidator.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src-gen/org/eclipse/osee/framework/core/dsl/validation/AbstractOseeDslJavaValidator.java @@ -14,7 +14,7 @@ public class AbstractOseeDslJavaValidator extends org.eclipse.xtext.validation.A @Override protected List<EPackage> getEPackages() { - List<EPackage> result = new ArrayList<EPackage>(); + List<EPackage> result = new ArrayList<>(); result.add(org.eclipse.osee.framework.core.dsl.oseeDsl.OseeDslPackage.eINSTANCE); return result; } diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/OseeDslResourceUtil.java b/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/OseeDslResourceUtil.java index 110ddc20e34..e12746af418 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/OseeDslResourceUtil.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/OseeDslResourceUtil.java @@ -94,7 +94,7 @@ public final class OseeDslResourceUtil { } private static void saveResource(Resource resource, OutputStream outputStream, boolean compressOnSave) throws Exception { - Map<String, Boolean> options = new HashMap<String, Boolean>(); + Map<String, Boolean> options = new HashMap<>(); if (compressOnSave) { options.put(Resource.OPTION_ZIP, Boolean.TRUE); } diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/formatting/OseeDslFormatter.java b/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/formatting/OseeDslFormatter.java index 5c488ef2e2e..669d112fa3d 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/formatting/OseeDslFormatter.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/formatting/OseeDslFormatter.java @@ -67,7 +67,7 @@ public class OseeDslFormatter extends AbstractDeclarativeFormatter implements II // c.setIndentationSpace(" "); Iterable<Keyword> keywords = GrammarUtil.containedKeywords(access.getGrammar()); - Stack<Keyword> openBraceStack = new Stack<Keyword>(); + Stack<Keyword> openBraceStack = new Stack<>(); for (Keyword currentKeyword : keywords) { String current = currentKeyword.getValue(); diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/internal/OseeDslResourceImpl.java b/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/internal/OseeDslResourceImpl.java index b72c6cf9a83..eb6a8782bd0 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/internal/OseeDslResourceImpl.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/internal/OseeDslResourceImpl.java @@ -36,7 +36,7 @@ public class OseeDslResourceImpl implements OseeDslResource { @Override public Collection<String> getErrors() { - List<String> errors = new LinkedList<String>(); + List<String> errors = new LinkedList<>(); for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : resource.getErrors()) { errors.add(diagnostic.toString()); } diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/validation/OseeDslJavaValidator.java b/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/validation/OseeDslJavaValidator.java index f9984608099..c4b84396ced 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/validation/OseeDslJavaValidator.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/validation/OseeDslJavaValidator.java @@ -85,7 +85,7 @@ public class OseeDslJavaValidator extends AbstractOseeDslJavaValidator { @Check public void checkUuidValidity(OseeDsl oseeDsl) { - Map<String, OseeType> uuids = new HashMap<String, OseeType>(); + Map<String, OseeType> uuids = new HashMap<>(); EStructuralFeature feature = OseeDslPackage.Literals.OSEE_TYPE__UUID; int index = OseeDslPackage.OSEE_TYPE__UUID; for (EObject object : oseeDsl.eContents()) { @@ -114,8 +114,8 @@ public class OseeDslJavaValidator extends AbstractOseeDslJavaValidator { @Check public void checkTypeNameValidity(OseeDsl oseeDsl) { - Set<String> typeNames = new HashSet<String>(50); - Map<String, String> uuidToTypeName = new HashMap<String, String>(500); + Set<String> typeNames = new HashSet<>(50); + Map<String, String> uuidToTypeName = new HashMap<>(500); for (XAttributeType attrType : oseeDsl.getAttributeTypes()) { if (typeNames.contains(attrType.getName())) { String message = String.format("Duplicate attribute type name [%s]", attrType.getName()); @@ -177,7 +177,7 @@ public class OseeDslJavaValidator extends AbstractOseeDslJavaValidator { } private void checkHierarchyUnique(AccessContext accessContext, Collection<HierarchyRestriction> hierarchy) { - Map<String, XArtifactMatcher> references = new HashMap<String, XArtifactMatcher>(); + Map<String, XArtifactMatcher> references = new HashMap<>(); for (HierarchyRestriction restriction : hierarchy) { XArtifactMatcher artifactRef = restriction.getArtifactMatcherRef(); String name = artifactRef.getName(); @@ -203,10 +203,10 @@ public class OseeDslJavaValidator extends AbstractOseeDslJavaValidator { } private final class CheckSwitch extends OseeDslSwitch<Object> { - private final Map<String, XArtifactMatcher> artInstanceRestrictions = new HashMap<String, XArtifactMatcher>(); - private final Map<String, XArtifactType> artifactTypeRestrictions = new HashMap<String, XArtifactType>(); - private final Map<String, XRelationType> relationTypeRetrictions = new HashMap<String, XRelationType>(); - private final Collection<AttributeTypeRestriction> attrTypeRetrictions = new HashSet<AttributeTypeRestriction>(); + private final Map<String, XArtifactMatcher> artInstanceRestrictions = new HashMap<>(); + private final Map<String, XArtifactType> artifactTypeRestrictions = new HashMap<>(); + private final Map<String, XRelationType> relationTypeRetrictions = new HashMap<>(); + private final Collection<AttributeTypeRestriction> attrTypeRetrictions = new HashSet<>(); private final AccessContext accessContext; diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/validation/OseeNamesAreUniqueValidator.java b/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/validation/OseeNamesAreUniqueValidator.java index 480d45e454f..0023cab54f2 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/validation/OseeNamesAreUniqueValidator.java +++ b/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/validation/OseeNamesAreUniqueValidator.java @@ -45,7 +45,7 @@ public class OseeNamesAreUniqueValidator extends NamesAreUniqueValidator { @Override public void checkUniqueNames(Iterable<IEObjectDescription> descriptions, CancelIndicator cancelIndicator, ValidationMessageAcceptor acceptor) { - List<IEObjectDescription> validDescriptions = new ArrayList<IEObjectDescription>(); + List<IEObjectDescription> validDescriptions = new ArrayList<>(); for (IEObjectDescription description : descriptions) { if (!(description.getEObjectOrProxy() instanceof XArtifactType) && !(description.getEObjectOrProxy() instanceof XAttributeType) && !(description.getEObjectOrProxy() instanceof XRelationType)) { validDescriptions.add(description); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataTest.java index f7b6241d84c..a73fc7e23cb 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataTest.java @@ -110,7 +110,7 @@ public class AccessDataTest { @Test public void testAddAll() throws OseeCoreException { - Collection<AccessDetail<?>> expectedDetails = new ArrayList<AccessDetail<?>>(); + Collection<AccessDetail<?>> expectedDetails = new ArrayList<>(); createTestObjects(expectedDetails, branchToCheck1, artifactType, attributeType, wordAttributeType, artifactToCheck, relTypeSide1, relTypeSide2, branchToCheck2); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDetailTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDetailTest.java index 2b2ff5a171e..ab292abb3b1 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDetailTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDetailTest.java @@ -88,7 +88,7 @@ public class AccessDetailTest { Assert.assertFalse(target.equals(nulled)); Assert.assertTrue(target.hashCode() != nulled.hashCode()); - Collection<AccessDetail<?>> collect = new ArrayList<AccessDetail<?>>(); + Collection<AccessDetail<?>> collect = new ArrayList<>(); collect.add(target); Assert.assertEquals(1, collect.size()); Assert.assertTrue(collect.contains(target)); @@ -105,7 +105,7 @@ public class AccessDetailTest { @Parameters public static Collection<Object[]> getData() throws OseeCoreException { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); addTest(data, "Hello", PermissionEnum.DENY, "A reason", new Scope().add("hello_scope")); addTest(data, 456, PermissionEnum.WRITE, null, new Scope().add("456_scope")); addTest(data, MockDataFactory.createArtifactType(4), PermissionEnum.FULLACCESS, "reason3", new Scope()); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCacheTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCacheTest.java index c0c9ad0c300..933d4ce9f2e 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCacheTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCacheTest.java @@ -46,7 +46,7 @@ public abstract class AbstractOseeCacheTest<K, T extends AbstractOseeType<K>> { @org.junit.Test public void testAllItems() throws OseeCoreException { - List<T> actualTypes = new ArrayList<T>(cache.getAll()); + List<T> actualTypes = new ArrayList<>(cache.getAll()); java.util.Collections.sort(actualTypes, comparator); java.util.Collections.sort(data, comparator); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/ArtifactTypeCacheTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/ArtifactTypeCacheTest.java index 2322aed5d06..b9eb6879c88 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/ArtifactTypeCacheTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/ArtifactTypeCacheTest.java @@ -29,7 +29,7 @@ public class ArtifactTypeCacheTest extends AbstractOseeTypeCacheTest<ArtifactTyp @BeforeClass public static void prepareTestData() throws OseeCoreException { - artifactTypes = new ArrayList<ArtifactType>(); + artifactTypes = new ArrayList<>(); artCache = new ArtifactTypeCache(); int typeId = 100; diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/AttributeTypeCacheTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/AttributeTypeCacheTest.java index 9ec3234990c..abb14fa932d 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/AttributeTypeCacheTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/AttributeTypeCacheTest.java @@ -29,7 +29,7 @@ public class AttributeTypeCacheTest extends AbstractOseeTypeCacheTest<AttributeT @BeforeClass public static void prepareTestData() throws OseeCoreException { - attributeTypes = new ArrayList<AttributeType>(); + attributeTypes = new ArrayList<>(); attrCache = new AttributeTypeCache(); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/BranchCacheTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/BranchCacheTest.java index cc3d4f8cf16..566120fa093 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/BranchCacheTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/BranchCacheTest.java @@ -32,7 +32,7 @@ public class BranchCacheTest extends AbstractOseeCacheTest<Long, Branch> { @BeforeClass public static void prepareTestData() throws OseeCoreException { - branchData = new ArrayList<Branch>(); + branchData = new ArrayList<>(); BranchDataAccessor branchAccessor = new BranchDataAccessor(branchData); cache = new BranchCache(branchAccessor, new TransactionCache()); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/OseeEnumTypeCacheTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/OseeEnumTypeCacheTest.java index 3b20df1520f..63696820eed 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/OseeEnumTypeCacheTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/OseeEnumTypeCacheTest.java @@ -31,14 +31,14 @@ public class OseeEnumTypeCacheTest extends AbstractOseeTypeCacheTest<OseeEnumTyp @BeforeClass public static void prepareTestData() throws OseeCoreException { - data = new ArrayList<OseeEnumType>(); + data = new ArrayList<>(); cache = new OseeEnumTypeCache(); int typeId = 100; for (int index = 0; index < 10; index++) { OseeEnumType item = MockDataFactory.createEnumType(index); - List<OseeEnumEntry> entries = new ArrayList<OseeEnumEntry>(); + List<OseeEnumEntry> entries = new ArrayList<>(); for (int j = 1; j <= 5; j++) { OseeEnumEntry enumEntry = MockDataFactory.createEnumEntry(index + j); entries.add(enumEntry); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/RelationTypeCacheTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/RelationTypeCacheTest.java index a4de99558a4..8cd19d3d80a 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/RelationTypeCacheTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/cache/RelationTypeCacheTest.java @@ -29,7 +29,7 @@ public class RelationTypeCacheTest extends AbstractOseeTypeCacheTest<RelationTyp @BeforeClass public static void prepareTestData() throws OseeCoreException { - data = new ArrayList<RelationType>(); + data = new ArrayList<>(); cache = new RelationTypeCache(); int typeId = 100; diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/change/ChangeItemTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/change/ChangeItemTest.java index 9ce67f3cf22..daf8cd8343c 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/change/ChangeItemTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/change/ChangeItemTest.java @@ -87,7 +87,7 @@ public class ChangeItemTest { @Parameters public static List<Object[]> getData() { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); ChangeVersion base = ChangeTestUtility.createChange(1111L, ModificationType.NEW); ChangeVersion first = ChangeTestUtility.createChange(2222L, ModificationType.MODIFIED); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/ArtifactSuperTypeFieldTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/ArtifactSuperTypeFieldTest.java index e2e1bb0c2fd..1e6765426d4 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/ArtifactSuperTypeFieldTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/ArtifactSuperTypeFieldTest.java @@ -48,7 +48,7 @@ public class ArtifactSuperTypeFieldTest { @Test public void testSetGet() throws OseeCoreException { - List<ArtifactType> input = new ArrayList<ArtifactType>(); + List<ArtifactType> input = new ArrayList<>(); ArtifactSuperTypeField field = new ArtifactSuperTypeField(containingArt, input); Assert.assertEquals(false, field.isDirty()); @@ -72,7 +72,7 @@ public class ArtifactSuperTypeFieldTest { @Test(expected = OseeInvalidInheritanceException.class) public void testBaseCircularity() throws OseeCoreException { - List<ArtifactType> input = new ArrayList<ArtifactType>(); + List<ArtifactType> input = new ArrayList<>(); ArtifactSuperTypeField field = new ArtifactSuperTypeField(containingArt, input); Assert.assertEquals(false, field.isDirty()); @@ -81,7 +81,7 @@ public class ArtifactSuperTypeFieldTest { @Test(expected = OseeInvalidInheritanceException.class) public void testBaseArtifact() throws OseeCoreException { - List<ArtifactType> input = new ArrayList<ArtifactType>(); + List<ArtifactType> input = new ArrayList<>(); ArtifactSuperTypeField field = new ArtifactSuperTypeField(containingArt, input); Assert.assertEquals(false, field.isDirty()); @@ -90,7 +90,7 @@ public class ArtifactSuperTypeFieldTest { @Test public void testBaseArtifactNoSuperTypeRequired() throws OseeCoreException { - List<ArtifactType> input = new ArrayList<ArtifactType>(); + List<ArtifactType> input = new ArrayList<>(); ArtifactSuperTypeField field = new ArtifactSuperTypeField(base, input); Assert.assertEquals(false, field.isDirty()); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/ArtifactTypeAttributesFieldTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/ArtifactTypeAttributesFieldTest.java index 669ccc56a6f..b23bcfca038 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/ArtifactTypeAttributesFieldTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/ArtifactTypeAttributesFieldTest.java @@ -53,7 +53,7 @@ public class ArtifactTypeAttributesFieldTest { @Test public void testGetSet() throws OseeCoreException { - Map<IOseeBranch, Collection<AttributeType>> input = new LinkedHashMap<IOseeBranch, Collection<AttributeType>>(); + Map<IOseeBranch, Collection<AttributeType>> input = new LinkedHashMap<>(); ArtifactTypeAttributesField field = new ArtifactTypeAttributesField(input); Assert.assertEquals(false, field.isDirty()); @@ -85,7 +85,7 @@ public class ArtifactTypeAttributesFieldTest { } private static Map<IOseeBranch, Collection<AttributeType>> map(IOseeBranch branch, AttributeType... attrs) { - Map<IOseeBranch, Collection<AttributeType>> map = new LinkedHashMap<IOseeBranch, Collection<AttributeType>>(); + Map<IOseeBranch, Collection<AttributeType>> map = new LinkedHashMap<>(); map.put(branch, Arrays.asList(attrs)); return map; } diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/BaseOseeFieldTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/BaseOseeFieldTest.java index 89b6687c688..1c780f7c510 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/BaseOseeFieldTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/BaseOseeFieldTest.java @@ -75,7 +75,7 @@ public abstract class BaseOseeFieldTest { @SuppressWarnings("unchecked") @Parameters public static Collection<Object[]> data() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); data.add(new Object[] {// new OseeFieldTestData<Object>(new OseeField<Object>(), // diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/BranchAliasesFieldTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/BranchAliasesFieldTest.java index 2a779e60613..5164ff5173e 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/BranchAliasesFieldTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/BranchAliasesFieldTest.java @@ -28,7 +28,7 @@ public class BranchAliasesFieldTest { @Test public void testSetGet() throws OseeCoreException { - Collection<String> aliases = new ArrayList<String>(); + Collection<String> aliases = new ArrayList<>(); BranchAliasesField field = new BranchAliasesField(aliases); Assert.assertEquals(false, field.isDirty()); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/CollectionFieldTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/CollectionFieldTest.java index 68e3d519d16..f5788a5aaea 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/CollectionFieldTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/CollectionFieldTest.java @@ -26,8 +26,8 @@ public class CollectionFieldTest { @Test public void testSetGetString() throws OseeCoreException { - List<String> values = new ArrayList<String>(); - CollectionField<String> field = new CollectionField<String>(values); + List<String> values = new ArrayList<>(); + CollectionField<String> field = new CollectionField<>(values); Assert.assertFalse(field.isDirty()); FieldTestUtil.assertSetGet(field, Arrays.asList("a", "b", "c"), Arrays.asList("a", "b", "c"), true); @@ -51,8 +51,8 @@ public class CollectionFieldTest { @Test public void testSetGetInteger() throws OseeCoreException { - List<Integer> values = new ArrayList<Integer>(); - CollectionField<Integer> field = new CollectionField<Integer>(values); + List<Integer> values = new ArrayList<>(); + CollectionField<Integer> field = new CollectionField<>(values); Assert.assertFalse(field.isDirty()); FieldTestUtil.assertSetGet(field, Arrays.asList(1, 2, 3), Arrays.asList(1, 2, 3), true); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/FieldTestUtil.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/FieldTestUtil.java index 4ed11a31c4b..865ba0fe3bc 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/FieldTestUtil.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/FieldTestUtil.java @@ -29,7 +29,7 @@ public class FieldTestUtil { field.set(setValues); Assert.assertEquals(expectedDirty, field.isDirty()); - List<T> actual = new ArrayList<T>(field.get()); + List<T> actual = new ArrayList<>(field.get()); Assert.assertEquals(expected.size(), actual.size()); Assert.assertTrue(Collections.setComplement(actual, expected).isEmpty()); Assert.assertTrue(Collections.setComplement(expected, actual).isEmpty()); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/OseeFieldMainTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/OseeFieldMainTest.java index 673f0fe5e5f..6087adcc063 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/OseeFieldMainTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/OseeFieldMainTest.java @@ -78,7 +78,7 @@ public class OseeFieldMainTest { @SuppressWarnings("unchecked") @Parameters public static Collection<Object[]> data() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); data.add(new Object[] {// new OseeFieldTestData<Object>(new OseeField<Object>(), // diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/OseeFieldTestData.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/OseeFieldTestData.java index 150e8be8b0f..eadea42e927 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/OseeFieldTestData.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/OseeFieldTestData.java @@ -30,7 +30,7 @@ public class OseeFieldTestData<T> { this.field = field; this.initExpectedValue = initExpectedValue; this.initExpectedDirty = initExpectedDirty; - this.testDatas = new ArrayList<FieldGetSetTestData<T>>(); + this.testDatas = new ArrayList<>(); if (testDatas != null && testDatas.length > 0) { this.testDatas.addAll(Arrays.asList(testDatas)); } diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/UniqueIdFieldTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/UniqueIdFieldTest.java index 9911d0df366..42ee81f10c8 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/UniqueIdFieldTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/UniqueIdFieldTest.java @@ -37,7 +37,7 @@ public class UniqueIdFieldTest extends BaseOseeFieldTest { @SuppressWarnings("unchecked") @Parameters public static Collection<Object[]> data() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); data.add(new Object[] {new OseeFieldTestData<Long>(new UniqueIdField(), // IOseeStorable.UNPERSISTED_VALUE, true, // new FieldGetSetTestData<Long>(false, IOseeStorable.UNPERSISTED_VALUE, IOseeStorable.UNPERSISTED_VALUE, true), // diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockDataFactory.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockDataFactory.java index b8334154d8e..ba807a729de 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockDataFactory.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockDataFactory.java @@ -62,9 +62,9 @@ public final class MockDataFactory { public static <T> AccessDetail<T> createAccessDetails(T expAccessObject, PermissionEnum expPermission, String expReason, Scope scope) { AccessDetail<T> target; if (expReason != null) { - target = new AccessDetail<T>(expAccessObject, expPermission, scope, expReason); + target = new AccessDetail<>(expAccessObject, expPermission, scope, expReason); } else { - target = new AccessDetail<T>(expAccessObject, expPermission, scope); + target = new AccessDetail<>(expAccessObject, expPermission, scope); } return target; } @@ -100,7 +100,7 @@ public final class MockDataFactory { if (value == 0) { value++; } - MockOseeDataAccessor<Long, Branch> accessor = new MockOseeDataAccessor<Long, Branch>(); + MockOseeDataAccessor<Long, Branch> accessor = new MockOseeDataAccessor<>(); BranchCache cache = new BranchCache(accessor, new TransactionCache()); return new TransactionRecord(value * 47, branchUuid, "comment_" + value, new Date(), value * 37, value * 42, type, cache); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/ModelAsserts.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/ModelAsserts.java index 409493e03cf..df2ba3edcce 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/ModelAsserts.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/ModelAsserts.java @@ -189,7 +189,7 @@ public class ModelAsserts { ArtifactType target = artCache.getByGuid(artTypeGuid); Assert.assertNotNull(target); - List<ArtifactType> expectedSuperTypes = new ArrayList<ArtifactType>(); + List<ArtifactType> expectedSuperTypes = new ArrayList<>(); for (Long superTyperGuid : superTypeGuids) { ArtifactType superArtifactType = artCache.getByGuid(superTyperGuid); Assert.assertNotNull(superArtifactType); @@ -212,7 +212,7 @@ public class ModelAsserts { ArtifactType target = artCache.getByGuid(artTypeGuid); Assert.assertNotNull(target); - List<ArtifactType> expectedDescendants = new ArrayList<ArtifactType>(); + List<ArtifactType> expectedDescendants = new ArrayList<>(); for (Long type : descendantGuids) { ArtifactType childType = artCache.getByGuid(type); Assert.assertNotNull(childType); @@ -241,7 +241,7 @@ public class ModelAsserts { ArtifactType artifactType = artCache.getByGuid(artTypeGuid); Assert.assertNotNull(artifactType); - List<IAttributeType> expectedAttributes = new ArrayList<IAttributeType>(); + List<IAttributeType> expectedAttributes = new ArrayList<>(); for (Long attrGuid : attributeGuids) { IAttributeType attributeType = attrCache.getByGuid(attrGuid); Assert.assertNotNull(attributeType); @@ -272,7 +272,7 @@ public class ModelAsserts { Assert.assertEquals(maxValue == Integer.MAX_VALUE ? "n" : "1", relationType.getMultiplicity().asLimitLabel(relationSide)); - List<ArtifactType> allowedTypes = new ArrayList<ArtifactType>(); + List<ArtifactType> allowedTypes = new ArrayList<>(); for (Long guid : artifactTypesAllowed) { ArtifactType type = artCache.getByGuid(guid); Assert.assertNotNull(type); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/ArtifactTypeTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/ArtifactTypeTest.java index e5ca79e2696..6703edc7397 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/ArtifactTypeTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/ArtifactTypeTest.java @@ -83,7 +83,7 @@ public class ArtifactTypeTest extends AbstractOseeTypeTest<Long, ArtifactType> { @Parameters public static Collection<Object[]> getData() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); boolean isAbstract = true; for (int index = 1; index <= 3; index++) { Long guid = 0x00L; @@ -118,7 +118,7 @@ public class ArtifactTypeTest extends AbstractOseeTypeTest<Long, ArtifactType> { // ArtifactType baseType = artCache.getUniqueByName("BaseArtifactType"); // Assert.assertNotNull(baseType); // - // Set<ArtifactType> baseSuperType = new HashSet<ArtifactType>(); + // Set<ArtifactType> baseSuperType = new HashSet<>(); // baseSuperType.add(baseType); // // try { @@ -273,7 +273,7 @@ public class ArtifactTypeTest extends AbstractOseeTypeTest<Long, ArtifactType> { // private void setUpArtifactTypeInheritance(ArtifactTypeCache cache) throws OseeCoreException { // ArtifactType baseType = cache.getUniqueByName("BaseArtifactType"); // - // Set<ArtifactType> baseSuperType = new HashSet<ArtifactType>(); + // Set<ArtifactType> baseSuperType = new HashSet<>(); // baseSuperType.add(baseType); // // 0<-1 // cache.cacheArtifactSuperType(cache.getByGuid("111"), baseSuperType); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/BaseOseeTypeTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/BaseOseeTypeTest.java index 7da4c5d8381..e5092ef52ca 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/BaseOseeTypeTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/BaseOseeTypeTest.java @@ -31,7 +31,7 @@ public class BaseOseeTypeTest extends AbstractOseeTypeTest<Long, MockAbstractOse @Parameters public static Collection<Object[]> getData() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); for (int index = 1; index <= 2; index++) { Long guid = (long) index; String name = "index: " + index; diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/BranchTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/BranchTest.java index b940623830f..56c81eb7451 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/BranchTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/BranchTest.java @@ -64,7 +64,7 @@ public class BranchTest { // OseeTypesUtil.checkAliases(cache, "JJJ", "a merge branch"); // OseeTypesUtil.checkAliases(cache, "KKK", "a merge branch"); // - // List<Branch> aliasedbranch = new ArrayList<Branch>(cache.getByAlias("a merge branch")); + // List<Branch> aliasedbranch = new ArrayList<>(cache.getByAlias("a merge branch")); // Assert.assertEquals(2, aliasedbranch.size()); // // Collections.sort(aliasedbranch); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/RelationTypeTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/RelationTypeTest.java index 91c5cb4057c..cf185907e36 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/RelationTypeTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/RelationTypeTest.java @@ -74,7 +74,7 @@ public class RelationTypeTest { // private void setUpArtifactTypeInheritance(ArtifactTypeCache cache) throws OseeCoreException { // ArtifactType baseType = cache.getUniqueByName("BaseArtifactType"); // - // Set<ArtifactType> baseSuperType = new HashSet<ArtifactType>(); + // Set<ArtifactType> baseSuperType = new HashSet<>(); // baseSuperType.add(baseType); // // 0<-1 // cache.cacheArtifactSuperType(cache.getByGuid("111"), baseSuperType); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/TransactionRecordTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/TransactionRecordTest.java index b48e5bfa8ab..e615747afd1 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/TransactionRecordTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/type/TransactionRecordTest.java @@ -148,7 +148,7 @@ public class TransactionRecordTest { @Parameters public static Collection<Object[]> getData() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); for (int index = 1; index <= 2; index++) { int transactionNumber = index * 11; int branchUuid = index * 9; diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/AbstractOseeType.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/AbstractOseeType.java index c40660ecb4f..17418e899be 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/AbstractOseeType.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/AbstractOseeType.java @@ -31,7 +31,7 @@ public abstract class AbstractOseeType<KEY> extends FullyNamedIdentity<KEY> impl protected AbstractOseeType(KEY guid, String name) { super(guid, name); - this.fieldMap = new HashMap<String, IOseeField<?>>(); + this.fieldMap = new HashMap<>(); this.itemState = StorageState.CREATED; addField(UNIQUE_ID_FIELD_KEY, new UniqueIdField()); diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java index 11a236bfb19..b6915d76939 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/Branch.java @@ -37,7 +37,7 @@ public class Branch extends AbstractOseeType<Long> implements WriteableBranch, I private static final int SHORT_NAME_LIMIT = 35; - private final Collection<Branch> childBranches = new HashSet<Branch>(); + private final Collection<Branch> childBranches = new HashSet<>(); public Branch(Long uuid, String name, BranchType branchType, BranchState branchState, boolean isArchived, boolean inheritsAccessControl) { super(uuid, name); @@ -232,7 +232,7 @@ public class Branch extends AbstractOseeType<Long> implements WriteableBranch, I */ @Override public Collection<Branch> getChildBranches(boolean recurse) throws OseeCoreException { - Set<Branch> children = new HashSet<Branch>(); + Set<Branch> children = new HashSet<>(); BranchFilter filter = new BranchFilter(BranchArchivedState.UNARCHIVED); filter.setNegatedBranchTypes(BranchType.MERGE); @@ -247,7 +247,7 @@ public class Branch extends AbstractOseeType<Long> implements WriteableBranch, I */ @Override public Collection<Branch> getAllChildBranches(boolean recurse) throws OseeCoreException { - Set<Branch> children = new HashSet<Branch>(); + Set<Branch> children = new HashSet<>(); getChildBranches(children, recurse, new BranchFilter()); return children; } @@ -271,7 +271,7 @@ public class Branch extends AbstractOseeType<Long> implements WriteableBranch, I @Override public Collection<Branch> getAncestors() throws OseeCoreException { - List<Branch> ancestors = new ArrayList<Branch>(); + List<Branch> ancestors = new ArrayList<>(); Branch branchCursor = this; ancestors.add(branchCursor); while (branchCursor.hasParentBranch()) { diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessData.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessData.java index 7d1b59ec7e3..6543e843033 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessData.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessData.java @@ -44,7 +44,7 @@ public final class AccessData { } public Set<Object> keySet() { - Set<Object> toReturn = new HashSet<Object>(); + Set<Object> toReturn = new HashSet<>(); for (Pair<Object, Object> key : accessMap.keySet()) { toReturn.add(key.getFirst()); } diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/Scope.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/Scope.java index 4f5ee836b29..fbcd1b5d465 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/Scope.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/Scope.java @@ -22,7 +22,7 @@ public class Scope implements Cloneable { private static final String LEGACY_SCOPE = "##"; private static final String ARTIFACT_LOCK_SCOPE = "##**"; - private final List<String> scopePath = new ArrayList<String>(); + private final List<String> scopePath = new ArrayList<>(); public Scope() { // Do nothing diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AccessFilterChain.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AccessFilterChain.java index 6ce34d98768..1632d306d59 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AccessFilterChain.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AccessFilterChain.java @@ -28,7 +28,7 @@ public class AccessFilterChain { //attribute types public AccessFilterChain() { - this.filters = new LinkedList<IAccessFilter>(); + this.filters = new LinkedList<>(); } public void add(IAccessFilter filter) { diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AccessFilterFactory.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AccessFilterFactory.java index 9a163b1366f..20396d863fb 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AccessFilterFactory.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AccessFilterFactory.java @@ -17,11 +17,11 @@ import java.util.List; public class AccessFilterFactory { public Collection<IAccessFilter> createFilter() { - List<IAccessFilter> filters = new ArrayList<IAccessFilter>(); + List<IAccessFilter> filters = new ArrayList<>(); - // Collection<IOseeBranch> allowedBranches = new List<IOseeBranch>(); - // Collection<IBasicArtifact<T>> allowedArtifactType = new List<IArtifactType>(); - // Collection<IArtifactType> allowedArtifactType = new List<IArtifactType>(); + // Collection<IOseeBranch> allowedBranches = new List<>(); + // Collection<IBasicArtifact<T>> allowedArtifactType = new List<>(); + // Collection<IArtifactType> allowedArtifactType = new List<>(); // // filters.add(new BranchAccessFilter(artifact, branchPermission)); // filters.add(new ArtifactAccessFilter()); diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/ArtifactTypeFilter.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/ArtifactTypeFilter.java index cd52bc11892..25aa68b654a 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/ArtifactTypeFilter.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/ArtifactTypeFilter.java @@ -26,7 +26,7 @@ public final class ArtifactTypeFilter implements IAcceptFilter<IArtifactType> { public ArtifactTypeFilter(PermissionEnum toMatch, IArtifactType... itemsToCheck) { this.toMatch = toMatch; - this.itemsToCheck = new HashSet<IArtifactType>(); + this.itemsToCheck = new HashSet<>(); if (itemsToCheck != null) { for (IArtifactType type : itemsToCheck) { this.itemsToCheck.add(type); diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AttributeTypeFilter.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AttributeTypeFilter.java index d5e8ce8d535..111fb888efa 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AttributeTypeFilter.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/exp/AttributeTypeFilter.java @@ -24,7 +24,7 @@ public class AttributeTypeFilter implements IAcceptFilter<IAttributeType> { public AttributeTypeFilter(PermissionEnum toMatch, Collection<Pair<IBasicArtifact<?>, IAttributeType>> items) { this.toMatch = toMatch; - this.itemsToCheck = new HashMap<IBasicArtifact<?>, IAttributeType>(); + this.itemsToCheck = new HashMap<>(); for (Pair<IBasicArtifact<?>, IAttributeType> pair : items) { itemsToCheck.put(pair.getFirst(), pair.getSecond()); diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCache.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCache.java index f7bf3f8f1da..a1c2d0c422a 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCache.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCache.java @@ -34,10 +34,10 @@ import org.eclipse.osee.framework.jdk.core.util.GUID; * @author Roberto E. Escobar */ public abstract class AbstractOseeCache<K, T extends AbstractOseeType<K>> implements IOseeCache<K, T> { - private final HashCollection<String, T> nameToTypeMap = new HashCollection<String, T>(true, + private final HashCollection<String, T> nameToTypeMap = new HashCollection<>(true, CopyOnWriteArrayList.class); - private final ConcurrentHashMap<Long, T> idToTypeMap = new ConcurrentHashMap<Long, T>(); - private final ConcurrentHashMap<K, T> guidToTypeMap = new ConcurrentHashMap<K, T>(); + private final ConcurrentHashMap<Long, T> idToTypeMap = new ConcurrentHashMap<>(); + private final ConcurrentHashMap<K, T> guidToTypeMap = new ConcurrentHashMap<>(); private final OseeCacheEnum cacheId; private final boolean uniqueName; @@ -103,7 +103,7 @@ public abstract class AbstractOseeCache<K, T extends AbstractOseeType<K>> implem } private void decacheByName(T type) { - Set<String> keysToRemove = new HashSet<String>(); + Set<String> keysToRemove = new HashSet<>(); for (String name : nameToTypeMap.keySet()) { Collection<T> items = nameToTypeMap.getValues(name); @@ -144,7 +144,7 @@ public abstract class AbstractOseeCache<K, T extends AbstractOseeType<K>> implem private void checkNameUnique(T type) throws OseeCoreException { ensurePopulated(); Collection<T> cachedTypes = getByName(type.getName()); - Set<String> itemsFound = new HashSet<String>(); + Set<String> itemsFound = new HashSet<>(); // TODO Need to revisit this based on deleted types // for (T cachedType : cachedTypes) { // if (!cachedType.getGuid().equals(type.getGuid()) && !cachedType.getModificationType().isDeleted()) { @@ -188,7 +188,7 @@ public abstract class AbstractOseeCache<K, T extends AbstractOseeType<K>> implem public Collection<T> getByName(String typeName) throws OseeCoreException { ensurePopulated(); - Collection<T> types = new ArrayList<T>(); + Collection<T> types = new ArrayList<>(); Collection<T> values = nameToTypeMap.getValues(typeName); if (values != null) { types.addAll(values); @@ -225,7 +225,7 @@ public abstract class AbstractOseeCache<K, T extends AbstractOseeType<K>> implem @Override public Collection<T> getAllDirty() throws OseeCoreException { ensurePopulated(); - Collection<T> dirtyItems = new HashSet<T>(); + Collection<T> dirtyItems = new HashSet<>(); for (T type : guidToTypeMap.values()) { if (type.isDirty()) { dirtyItems.add(type); @@ -242,7 +242,7 @@ public abstract class AbstractOseeCache<K, T extends AbstractOseeType<K>> implem public void storeByGuid(Collection<K> guids) throws OseeCoreException { ensurePopulated(); Conditions.checkNotNull(guids, "guids to store"); - Collection<T> items = new HashSet<T>(); + Collection<T> items = new HashSet<>(); for (K guid : guids) { T type = getByGuid(guid); if (type == null) { diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java index 7c9854b0d44..9d80d10e8d2 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/BranchCache.java @@ -78,7 +78,7 @@ public class BranchCache extends AbstractOseeLoadingCache<Long, Branch> { public List<MergeBranch> findAllMergeBranches(Branch sourceBranch) throws OseeCoreException { Conditions.checkNotNull(sourceBranch, "source branch"); - List<MergeBranch> toReturn = new ArrayList<MergeBranch>(); + List<MergeBranch> toReturn = new ArrayList<>(); for (Branch branch : getAll()) { if (branch instanceof MergeBranch) { MergeBranch mergeBranch = (MergeBranch) branch; @@ -92,7 +92,7 @@ public class BranchCache extends AbstractOseeLoadingCache<Long, Branch> { public synchronized List<Branch> getBranches(BranchFilter branchFilter) throws OseeCoreException { Collection<Branch> allBranches = getRawValues(); - List<Branch> branches = new LinkedList<Branch>(); + List<Branch> branches = new LinkedList<>(); for (Branch branch : allBranches) { if (branchFilter.matches(branch)) { branches.add(branch); diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/TransactionCache.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/TransactionCache.java index d356e8ddfda..07a9d9b3f21 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/TransactionCache.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/TransactionCache.java @@ -130,7 +130,7 @@ public class TransactionCache implements IOseeLoadingCache<String, TransactionRe @Override public Collection<TransactionRecord> getAllDirty() { - Set<TransactionRecord> dirtys = new HashSet<TransactionRecord>(); + Set<TransactionRecord> dirtys = new HashSet<>(); for (TransactionRecord record : transactionIdCache.values()) { if (record.isDirty()) { dirtys.add(record); @@ -180,7 +180,7 @@ public class TransactionCache implements IOseeLoadingCache<String, TransactionRe public void loadTransactions(Collection<Integer> transactionIds) throws OseeCoreException { ensurePopulated(); - List<Integer> toLoad = new LinkedList<Integer>(); + List<Integer> toLoad = new LinkedList<>(); for (Integer txId : transactionIds) { if (getById(txId) == null) { toLoad.add(txId); diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java index 18605f25bed..a28d1b6b1de 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java @@ -70,7 +70,7 @@ public final class ArtifactTypeAttributesField extends AbstractOseeField<Map<IOs } else { Collection<AttributeType> cachedItems = validityMap.get(branch); if (cachedItems == null) { - cachedItems = new HashSet<AttributeType>(attributeTypes); + cachedItems = new HashSet<>(attributeTypes); validityMap.put(branch, cachedItems); } else { cachedItems.clear(); diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/BranchAliasesField.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/BranchAliasesField.java index 9dedc1789b5..58faa55755b 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/BranchAliasesField.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/BranchAliasesField.java @@ -24,7 +24,7 @@ public class BranchAliasesField extends CollectionField<String> { @Override protected Collection<String> checkInput(Collection<String> input) { - Collection<String> items = new HashSet<String>(); + Collection<String> items = new HashSet<>(); for (String alias : input) { items.add(alias.toLowerCase()); } diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/EnumEntryField.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/EnumEntryField.java index f94fd105669..f1fc093e06e 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/EnumEntryField.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/EnumEntryField.java @@ -32,9 +32,9 @@ public class EnumEntryField extends CollectionField<OseeEnumEntry> { @Override protected Collection<OseeEnumEntry> checkInput(Collection<OseeEnumEntry> input) throws OseeCoreException { checkEnumEntryIntegrity(input); - Set<OseeEnumEntry> toReturn = new HashSet<OseeEnumEntry>(); + Set<OseeEnumEntry> toReturn = new HashSet<>(); - Set<OseeEnumEntry> newEntries = new HashSet<OseeEnumEntry>(); + Set<OseeEnumEntry> newEntries = new HashSet<>(); Collection<OseeEnumEntry> currentEntries = get(); for (OseeEnumEntry entry : input) { boolean wasFound = false; @@ -63,8 +63,8 @@ public class EnumEntryField extends CollectionField<OseeEnumEntry> { private void checkEnumEntryIntegrity(Collection<OseeEnumEntry> oseeEnumEntries) throws OseeCoreException { // Use maps to speed up validation - Map<String, OseeEnumEntry> nameToEnum = new HashMap<String, OseeEnumEntry>(); - Map<Integer, OseeEnumEntry> ordinalToEnum = new HashMap<Integer, OseeEnumEntry>(); + Map<String, OseeEnumEntry> nameToEnum = new HashMap<>(); + Map<Integer, OseeEnumEntry> ordinalToEnum = new HashMap<>(); for (OseeEnumEntry entry : oseeEnumEntries) { Conditions.checkNotNullOrEmpty(entry.getName(), "Osee Enum Entry name"); diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/ColumnAbstract.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/ColumnAbstract.java index 0ca65740bf7..63def7d0a43 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/ColumnAbstract.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/ColumnAbstract.java @@ -17,7 +17,7 @@ import java.util.Collection; * @author Shawn F. Cook */ public abstract class ColumnAbstract implements Column { - private final Collection<ColumnAbstract> requiredCols = new ArrayList<ColumnAbstract>(); + private final Collection<ColumnAbstract> requiredCols = new ArrayList<>(); private final String headerString; private final boolean isVisible; diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/KeyColumnController.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/KeyColumnController.java index 9f01bed7e2b..9778f53e4e3 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/KeyColumnController.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/KeyColumnController.java @@ -19,7 +19,7 @@ import java.util.Iterator; * @author Shawn F. Cook */ public class KeyColumnController implements Iterator<Collection<Object>> { - private final Collection<KeyColumn> keyColumns = new ArrayList<KeyColumn>(); + private final Collection<KeyColumn> keyColumns = new ArrayList<>(); public KeyColumnController(KeyColumn... keyColumns) { this.keyColumns.addAll(Arrays.asList(keyColumns)); @@ -38,7 +38,7 @@ public class KeyColumnController implements Iterator<Collection<Object>> { @Override public Collection<Object> next() { - Collection<Object> keyList = new ArrayList<Object>(); + Collection<Object> keyList = new ArrayList<>(); if (hasNext()) { for (KeyColumn keyColumn : keyColumns) { if (!keyColumn.hasNext()) { diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/TableDataImpl.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/TableDataImpl.java index bdae75718a9..7ef44663e58 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/TableDataImpl.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/TableDataImpl.java @@ -24,8 +24,8 @@ import org.eclipse.osee.framework.logging.OseeLog; */ public class TableDataImpl implements TableData { - private final List<Column> columns = new ArrayList<Column>(); - private final List<KeyColumn> keyColumns = new ArrayList<KeyColumn>(); + private final List<Column> columns = new ArrayList<>(); + private final List<KeyColumn> keyColumns = new ArrayList<>(); private boolean firstRun = true; protected void addColumn(Column column) { @@ -43,7 +43,7 @@ public class TableDataImpl implements TableData { @Override public Collection<Object> getHeaderStrings() { - Collection<Object> headerStrings = new ArrayList<Object>(); + Collection<Object> headerStrings = new ArrayList<>(); for (Column col : columns) { if (col.isVisible()) { headerStrings.add(col.getHeaderString()); @@ -71,7 +71,7 @@ public class TableDataImpl implements TableData { @Override public Collection<Object> next() { - Collection<Object> cols = new ArrayList<Object>(); + Collection<Object> cols = new ArrayList<>(); try { beforeRow(); diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/example/ColumnErrors.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/example/ColumnErrors.java index 4c1ce830767..a7cab122d47 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/example/ColumnErrors.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/example/ColumnErrors.java @@ -20,7 +20,7 @@ import org.eclipse.osee.framework.core.model.tabledataframework.ColumnAbstract; public class ColumnErrors extends ColumnAbstract { private final static String HEADER_STRING = "Errors (CSV)"; - private final Collection<String> msgs = new ArrayList<String>(); + private final Collection<String> msgs = new ArrayList<>(); public ColumnErrors(boolean isVisible) { super(HEADER_STRING, isVisible); diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/example/KeyColumn_1to10.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/example/KeyColumn_1to10.java index 4d4156690b1..58e8e0bf1f3 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/example/KeyColumn_1to10.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/example/KeyColumn_1to10.java @@ -49,7 +49,7 @@ public class KeyColumn_1to10 implements KeyColumn { @Override public List<Object> getAll() { - List<Object> allValues = new ArrayList<Object>(); + List<Object> allValues = new ArrayList<>(); allValues.add(1); allValues.add(2); allValues.add(3); diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/example/KeyColumn_AtoG.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/example/KeyColumn_AtoG.java index fc1593a2862..d5fdfcf53c6 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/example/KeyColumn_AtoG.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/tabledataframework/example/KeyColumn_AtoG.java @@ -19,7 +19,7 @@ import org.eclipse.osee.framework.core.model.tabledataframework.KeyColumn; * @author Shawn F. Cook */ public class KeyColumn_AtoG implements KeyColumn { - List<String> listAtoG = new ArrayList<String>(Arrays.asList("A", "B", "C", "D", "E", "F", "G")); + List<String> listAtoG = new ArrayList<>(Arrays.asList("A", "B", "C", "D", "E", "F", "G")); private Integer currentIndex; private Integer nextIndex; @@ -52,7 +52,7 @@ public class KeyColumn_AtoG implements KeyColumn { @Override public List<Object> getAll() { - List<Object> retList = new ArrayList<Object>(); + List<Object> retList = new ArrayList<>(); retList.addAll(listAtoG); return retList; } diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java index 56b4a8e8505..26793937c92 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java @@ -36,8 +36,8 @@ public class ArtifactType extends AbstractOseeIdType<Long> implements IArtifactT public static final String ARTIFACT_INHERITANCE_FIELD_KEY = "osee.artifact.type.inheritance.field"; public static final String ARTIFACT_TYPE_ATTRIBUTES_FIELD_KEY = "osee.artifact.type.attributes.field"; - private final Set<ArtifactType> superTypes = new HashSet<ArtifactType>(); - private final Set<ArtifactType> childTypes = new HashSet<ArtifactType>(); + private final Set<ArtifactType> superTypes = new HashSet<>(); + private final Set<ArtifactType> childTypes = new HashSet<>(); private final Map<IOseeBranch, Collection<AttributeType>> attributes = new HashMap<IOseeBranch, Collection<AttributeType>>(); @@ -64,7 +64,7 @@ public class ArtifactType extends AbstractOseeIdType<Long> implements IArtifactT } public void setSuperTypes(Set<ArtifactType> superType) throws OseeCoreException { - Set<ArtifactType> originals = new HashSet<ArtifactType>(superTypes); + Set<ArtifactType> originals = new HashSet<>(superTypes); setField(ARTIFACT_INHERITANCE_FIELD_KEY, superType); for (ArtifactType supers : superType) { supers.childTypes.add(this); @@ -85,7 +85,7 @@ public class ArtifactType extends AbstractOseeIdType<Long> implements IArtifactT } private Collection<ArtifactType> getDescendants(ArtifactType artifactType, boolean isRecursionAllowed) throws OseeCoreException { - Collection<ArtifactType> descendants = new HashSet<ArtifactType>(); + Collection<ArtifactType> descendants = new HashSet<>(); populateDescendants(artifactType, descendants, isRecursionAllowed); return descendants; } @@ -120,7 +120,7 @@ public class ArtifactType extends AbstractOseeIdType<Long> implements IArtifactT public Collection<IAttributeType> getAttributeTypes(Branch branch) throws OseeCoreException { // Do not use ARTIFACT_TYPE_ATTRIBUTES_FIELD for this call since it must use branch inheritance to get all attribute types - Set<IAttributeType> attributeTypes = new HashSet<IAttributeType>(); + Set<IAttributeType> attributeTypes = new HashSet<>(); getAttributeTypes(attributeTypes, this, branch); return attributeTypes; } diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/OseeEnumType.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/OseeEnumType.java index 394ab9006e0..db5c299d0a9 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/OseeEnumType.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/OseeEnumType.java @@ -33,7 +33,7 @@ public class OseeEnumType extends AbstractOseeIdType<Long> { public static final String OSEE_ENUM_TYPE_ENTRIES_FIELD = "osee.enum.type.entries.field"; - private final Collection<OseeEnumEntry> enumEntries = new HashSet<OseeEnumEntry>(); + private final Collection<OseeEnumEntry> enumEntries = new HashSet<>(); public OseeEnumType(Long guid, String enumTypeName) { super(guid, enumTypeName); @@ -42,7 +42,7 @@ public class OseeEnumType extends AbstractOseeIdType<Long> { @Override public String toString() { - List<String> data = new ArrayList<String>(); + List<String> data = new ArrayList<>(); try { for (OseeEnumEntry entry : values()) { data.add(entry.toString()); @@ -55,7 +55,7 @@ public class OseeEnumType extends AbstractOseeIdType<Long> { public OseeEnumEntry[] values() throws OseeCoreException { Collection<OseeEnumEntry> values = getFieldValue(OSEE_ENUM_TYPE_ENTRIES_FIELD); - List<OseeEnumEntry> entries = new ArrayList<OseeEnumEntry>(values); + List<OseeEnumEntry> entries = new ArrayList<>(values); Collections.sort(entries); return entries.toArray(new OseeEnumEntry[entries.size()]); } @@ -71,7 +71,7 @@ public class OseeEnumType extends AbstractOseeIdType<Long> { } public Set<String> valuesAsOrderedStringSet() throws OseeCoreException { - Set<String> values = new LinkedHashSet<String>(); + Set<String> values = new LinkedHashSet<>(); for (OseeEnumEntry oseeEnumEntry : values()) { values.add(oseeEnumEntry.getName()); } @@ -112,14 +112,14 @@ public class OseeEnumType extends AbstractOseeIdType<Long> { } public void addEntry(OseeEnumEntry entry) throws OseeCoreException { - List<OseeEnumEntry> entries = new ArrayList<OseeEnumEntry>(); + List<OseeEnumEntry> entries = new ArrayList<>(); entries.addAll(Arrays.asList(values())); entries.add(entry); setEntries(entries); } public void removeEntry(OseeEnumEntry entry) throws OseeCoreException { - List<OseeEnumEntry> entries = new ArrayList<OseeEnumEntry>(); + List<OseeEnumEntry> entries = new ArrayList<>(); entries.addAll(Arrays.asList(values())); if (!entries.remove(entry)) { throw new OseeArgumentException("OseeEnumEntry[%s] does not exist on OseeEnumType[%s]", entry, this); diff --git a/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionFactoryTest.java b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionFactoryTest.java index f51718809b0..9618ed0aaaa 100644 --- a/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionFactoryTest.java +++ b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionFactoryTest.java @@ -82,7 +82,7 @@ public class SessionFactoryTest { @Parameters public static Collection<Object[]> getData() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); for (int index = 1; index <= 3; index++) { String guid = "ABCD" + String.valueOf(index); diff --git a/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionTest.java b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionTest.java index 7817b7f1127..f2c53d1906a 100644 --- a/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionTest.java +++ b/plugins/org.eclipse.osee.framework.core.server.test/src/org/eclipse/osee/framework/core/server/test/internal/session/SessionTest.java @@ -101,7 +101,7 @@ public class SessionTest { @Parameters public static Collection<Object[]> getData() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); for (int index = 1; index <= 3; index++) { String guid = "ABCD" + String.valueOf(index); String clientAddress = "addresss-" + index; diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/ApplicationServerDataStore.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/ApplicationServerDataStore.java index c93dbbe0db4..bb112994086 100644 --- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/ApplicationServerDataStore.java +++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/ApplicationServerDataStore.java @@ -93,7 +93,7 @@ public class ApplicationServerDataStore { } private void create(JdbcConnection connection) throws OseeCoreException { - List<Object[]> insertData = new ArrayList<Object[]>(); + List<Object[]> insertData = new ArrayList<>(); String serverId = data.getServerId(); URI serverUri = data.getUri(); String uri = serverUri.toString(); @@ -114,7 +114,7 @@ public class ApplicationServerDataStore { } private void delete(JdbcConnection connection) throws OseeCoreException { - List<Object[]> deleteData = new ArrayList<Object[]>(); + List<Object[]> deleteData = new ArrayList<>(); deleteData.add(new Object[] {data.getServerId()}); if (!deleteData.isEmpty()) { jdbcClient.runBatchUpdate(connection, DELETE_FROM_LOOKUP_TABLE_BY_ID, deleteData); diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/ApplicationServerManager.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/ApplicationServerManager.java index f072d2929cf..96c221c5cbb 100644 --- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/ApplicationServerManager.java +++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/ApplicationServerManager.java @@ -53,8 +53,8 @@ public class ApplicationServerManager implements IApplicationServerManager { private Timer timer; public ApplicationServerManager() { - this.oseeHttpServlets = new ConcurrentHashMap<String, InternalOseeHttpServlet>(); - this.threadFactories = new ConcurrentHashMap<String, OseeServerThreadFactory>(); + this.oseeHttpServlets = new ConcurrentHashMap<>(); + this.threadFactories = new ConcurrentHashMap<>(); } public void setLogger(Log logger) { @@ -199,7 +199,7 @@ public class ApplicationServerManager implements IApplicationServerManager { @Override public List<String> getCurrentProcesses() { - List<String> processList = new ArrayList<String>(); + List<String> processList = new ArrayList<>(); for (String key : threadFactories.keySet()) { for (OseeServerThread thread : getThreadsFromFactory(key)) { State state = thread.getState(); diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/OseeServerThreadFactory.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/OseeServerThreadFactory.java index 6360db730af..b103bc5fca2 100644 --- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/OseeServerThreadFactory.java +++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/OseeServerThreadFactory.java @@ -27,7 +27,7 @@ class OseeServerThreadFactory implements ThreadFactory { public OseeServerThreadFactory(String threadName, int priority) { this.threadName = threadName; - this.threads = new CopyOnWriteArrayList<WeakReference<OseeServerThread>>(); + this.threads = new CopyOnWriteArrayList<>(); this.priority = priority; } @@ -44,7 +44,7 @@ class OseeServerThreadFactory implements ThreadFactory { } List<OseeServerThread> getThreads() { - List<OseeServerThread> toReturn = new ArrayList<OseeServerThread>(); + List<OseeServerThread> toReturn = new ArrayList<>(); for (WeakReference<OseeServerThread> weak : threads) { OseeServerThread thread = weak.get(); if (thread != null) { diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/console/ServerStatsCommand.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/console/ServerStatsCommand.java index 972b6d3f5f6..eac3dc8a013 100644 --- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/console/ServerStatsCommand.java +++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/console/ServerStatsCommand.java @@ -36,7 +36,7 @@ import org.eclipse.osee.jdbc.JdbcService; */ public class ServerStatsCommand implements ConsoleCommand { - private final Map<String, JdbcService> jdbcServices = new ConcurrentHashMap<String, JdbcService>(); + private final Map<String, JdbcService> jdbcServices = new ConcurrentHashMap<>(); private IApplicationServerManager manager; private IAuthenticationManager authManager; @@ -129,7 +129,7 @@ public class ServerStatsCommand implements ConsoleCommand { private void logServlets(IApplicationServerManager manager) { console.writeln("Servlets:"); - List<String> contexts = new ArrayList<String>(manager.getRegisteredServlets()); + List<String> contexts = new ArrayList<>(manager.getRegisteredServlets()); Collections.sort(contexts); if (contexts.size() % 2 == 1) { contexts.add(""); diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/session/DatabaseSessionAccessor.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/session/DatabaseSessionAccessor.java index d5beab6f691..a4449ce53ef 100644 --- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/session/DatabaseSessionAccessor.java +++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/session/DatabaseSessionAccessor.java @@ -74,7 +74,7 @@ public final class DatabaseSessionAccessor implements CacheDataLoader<String, Se @Override public Map<String, Session> load(Iterable<? extends String> sessionIds) throws OseeCoreException { - final Map<String, Session> sessions = new LinkedHashMap<String, Session>(); + final Map<String, Session> sessions = new LinkedHashMap<>(); ISessionCollector collector = new ISessionCollector() { @Override @@ -107,7 +107,7 @@ public final class DatabaseSessionAccessor implements CacheDataLoader<String, Se @Override public Iterable<? extends String> getAllKeys() throws OseeCoreException { - final Set<String> ids = new LinkedHashSet<String>(); + final Set<String> ids = new LinkedHashSet<>(); ISessionCollector idCollector = new ISessionCollector() { @Override @@ -151,7 +151,7 @@ public final class DatabaseSessionAccessor implements CacheDataLoader<String, Se } private void create(JdbcConnection connection) throws OseeCoreException { - List<Object[]> insertData = new ArrayList<Object[]>(); + List<Object[]> insertData = new ArrayList<>(); for (Session session : sessions) { insertData.add(toInsert(session)); } @@ -161,7 +161,7 @@ public final class DatabaseSessionAccessor implements CacheDataLoader<String, Se } private void delete(JdbcConnection connection) throws OseeCoreException { - List<Object[]> deleteData = new ArrayList<Object[]>(); + List<Object[]> deleteData = new ArrayList<>(); for (Session session : sessions) { deleteData.add(toDelete(session)); } diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/session/SessionManagerImpl.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/session/SessionManagerImpl.java index f249eb0870f..46b5e34a547 100644 --- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/session/SessionManagerImpl.java +++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/session/SessionManagerImpl.java @@ -108,7 +108,7 @@ public final class SessionManagerImpl implements ISessionManager { @Override public Collection<ISession> getSessionByClientAddress(String clientAddress) throws OseeCoreException { Conditions.checkNotNull(clientAddress, "clientAddress"); - Set<ISession> sessions = new HashSet<ISession>(); + Set<ISession> sessions = new HashSet<>(); Iterable<Session> all = null; try { all = sessionCache.getAll(); @@ -128,7 +128,7 @@ public final class SessionManagerImpl implements ISessionManager { @Override public Collection<ISession> getSessionsByUserId(String userId) throws OseeCoreException { Conditions.checkNotNull(userId, "userId"); - Collection<ISession> toReturn = new HashSet<ISession>(); + Collection<ISession> toReturn = new HashSet<>(); for (ISession session : getAllSessions()) { if (session.getUserId().equals(userId)) { toReturn.add(session); @@ -139,7 +139,7 @@ public final class SessionManagerImpl implements ISessionManager { @Override public Collection<ISession> getAllSessions() throws OseeCoreException { - Collection<ISession> toReturn = new HashSet<ISession>(); + Collection<ISession> toReturn = new HashSet<>(); try { Iterable<Session> all = sessionCache.getAll(); for (Session session : all) { @@ -155,7 +155,7 @@ public final class SessionManagerImpl implements ISessionManager { public void releaseSessionImmediate(String... sessionIds) throws OseeCoreException { Conditions.checkNotNull(sessionIds, "sessionIds"); - Set<Session> sessions = new HashSet<Session>(); + Set<Session> sessions = new HashSet<>(); for (String sessionId : sessionIds) { Session session = getSessionById(sessionId); if (session != null) { diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/util/AbstractJoinQuery.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/util/AbstractJoinQuery.java index a1e8556dcec..d7d94ff3f5a 100644 --- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/util/AbstractJoinQuery.java +++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/util/AbstractJoinQuery.java @@ -36,7 +36,7 @@ public abstract class AbstractJoinQuery { private final Long expiresIn; private final int queryId; - protected final Set<IJoinRow> entries = new HashSet<IJoinRow>(); + protected final Set<IJoinRow> entries = new HashSet<>(); private boolean wasStored; private int storedSize; @@ -72,7 +72,7 @@ public abstract class AbstractJoinQuery { public void store(JdbcConnection connection) throws OseeCoreException { if (!this.wasStored) { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); for (IJoinRow joinArray : entries) { data.add(joinArray.toArray()); } diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/util/DatabaseJoinAccessor.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/util/DatabaseJoinAccessor.java index 5f61b373a64..fc2caa6ac0e 100644 --- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/util/DatabaseJoinAccessor.java +++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/util/DatabaseJoinAccessor.java @@ -85,7 +85,7 @@ public class DatabaseJoinAccessor implements IJoinAccessor { @Override public Collection<Integer> getAllQueryIds(JdbcConnection connection, JoinItem joinItem) throws OseeCoreException { - Collection<Integer> queryIds = new ArrayList<Integer>(); + Collection<Integer> queryIds = new ArrayList<>(); JdbcStatement chStmt = jdbcClient.getStatement(connection); try { String query = String.format(SELECT_QUERY_IDS, joinItem.getJoinTableName()); diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/util/OseeInfo.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/util/OseeInfo.java index cf083ba3f8b..e0b62ce3c7f 100644 --- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/util/OseeInfo.java +++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/util/OseeInfo.java @@ -21,7 +21,7 @@ import org.eclipse.osee.jdbc.JdbcClient; public class OseeInfo { private static final String GET_VALUE_SQL = "Select OSEE_VALUE FROM osee_info where OSEE_KEY = ?"; public static final String DB_ID_KEY = "osee.db.guid"; - private static Map<String, String> cache = new HashMap<String, String>(); + private static Map<String, String> cache = new HashMap<>(); public static String getValue(JdbcClient jdbcClient, String key) { String toReturn = jdbcClient.runPreparedQueryFetchObject("", GET_VALUE_SQL, key); diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/data/RelationTypeSideTest.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/data/RelationTypeSideTest.java index be460959877..8eed89e9026 100644 --- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/data/RelationTypeSideTest.java +++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/data/RelationTypeSideTest.java @@ -44,7 +44,7 @@ public class RelationTypeSideTest { IRelationTypeSide relTypeSide3 = create(uuid2, sideA, uuid2 + "_sideA"); IRelationTypeSide relTypeSide4 = create(uuid2, sideB, uuid2 + "_sideB"); - Map<IRelationType, String> data = new HashMap<IRelationType, String>(); + Map<IRelationType, String> data = new HashMap<>(); data.put(relTypeSide1, "a1"); data.put(relTypeSide2, "b2"); data.put(relTypeSide3, "c3"); diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/enums/PermissionEnumTest.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/enums/PermissionEnumTest.java index d37146d6363..57409476bc5 100644 --- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/enums/PermissionEnumTest.java +++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/enums/PermissionEnumTest.java @@ -48,7 +48,7 @@ public class PermissionEnumTest { } private static Collection<PermissionTestData> getTestData() { - Collection<PermissionTestData> data = new ArrayList<PermissionTestData>(); + Collection<PermissionTestData> data = new ArrayList<>(); add(data, DENY, DENY, false, DENY); add(data, DENY, FULLACCESS, false, DENY); add(data, DENY, LOCK, false, DENY); diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/exception/TestStringFormatMessages.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/exception/TestStringFormatMessages.java index 0d920c5fb8c..09ec9c223a2 100644 --- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/exception/TestStringFormatMessages.java +++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/exception/TestStringFormatMessages.java @@ -35,7 +35,7 @@ public class TestStringFormatMessages { private static final Pattern specifierPattern = Pattern.compile("%-?[\\d.]*(\\w)"); private FindResultsIterator getResultsIterator() { - List<String> patterns = new ArrayList<String>(2); + List<String> patterns = new ArrayList<>(2); patterns.add(throwPattern); patterns.add(formatPattern); diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/MultiServiceBinderTest.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/MultiServiceBinderTest.java index 48bdde4ba3a..525e5579715 100644 --- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/MultiServiceBinderTest.java +++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/MultiServiceBinderTest.java @@ -63,7 +63,7 @@ public class MultiServiceBinderTest { @Before public void setupTest() { - serviceMap = new ConcurrentHashMap<Class<?>, Collection<Object>>(); + serviceMap = new ConcurrentHashMap<>(); serviceBinder = new MultiServiceBinder(serviceMap, context, handler); handler.reset(); } diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/SingletonServiceBinderTest.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/SingletonServiceBinderTest.java index a1d80fae62d..2b2fb9a9d51 100644 --- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/SingletonServiceBinderTest.java +++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/SingletonServiceBinderTest.java @@ -66,7 +66,7 @@ public class SingletonServiceBinderTest { @Before public void setupTest() { - serviceMap = new ConcurrentHashMap<Class<?>, Collection<Object>>(); + serviceMap = new ConcurrentHashMap<>(); serviceBinder = new SingletonServiceBinder(serviceMap, context, handler); handler.reset(); } diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/mocks/MockTrackingHandler.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/mocks/MockTrackingHandler.java index a27fec67f67..4b28ab87f7c 100644 --- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/mocks/MockTrackingHandler.java +++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/mocks/MockTrackingHandler.java @@ -62,14 +62,14 @@ public class MockTrackingHandler extends AbstractTrackingHandler { public void onServiceAdded(BundleContext context, Class<?> clazz, Object services) { wasOnServiceAddedCalled = true; Assert.assertEquals(expContext, context); - serviceAdded = new Pair<Class<?>, Object>(clazz, services); + serviceAdded = new Pair<>(clazz, services); } @Override public void onServiceRemoved(BundleContext context, Class<?> clazz, Object services) { wasOnServiceRemovedCalled = true; Assert.assertEquals(expContext, context); - serviceRemoved = new Pair<Class<?>, Object>(clazz, services); + serviceRemoved = new Pair<>(clazz, services); } @Override diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/util/ServiceDependencyTrackerTest.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/util/ServiceDependencyTrackerTest.java index b68d1f329a9..e9b784c2677 100644 --- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/util/ServiceDependencyTrackerTest.java +++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/util/ServiceDependencyTrackerTest.java @@ -49,7 +49,7 @@ public class ServiceDependencyTrackerTest { @Override public Map<Class<?>, ServiceBindType> getConfiguredDependencies() { - Map<Class<?>, ServiceBindType> map = new LinkedHashMap<Class<?>, ServiceBindType>(); + Map<Class<?>, ServiceBindType> map = new LinkedHashMap<>(); map.putAll(super.getConfiguredDependencies()); map.put(Integer.class, ServiceBindType.MANY); return map; @@ -107,7 +107,7 @@ public class ServiceDependencyTrackerTest { } private final static class MockServiceBinderFactory implements ServiceBinderFactory { - private final Collection<MockServiceTracker> trackers = new ArrayList<MockServiceTracker>(); + private final Collection<MockServiceTracker> trackers = new ArrayList<>(); @Override public ServiceTracker createTracker(ServiceBindType bindType, Class<?> clazz) { diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/HelpContextRegistry.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/HelpContextRegistry.java index fdb520eefc0..200a483b03d 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/HelpContextRegistry.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/HelpContextRegistry.java @@ -17,7 +17,7 @@ import java.util.concurrent.ConcurrentHashMap; * @author Roberto E. Escobar */ public final class HelpContextRegistry { - private static final Map<String, HelpContext> contexts = new ConcurrentHashMap<String, HelpContext>(); + private static final Map<String, HelpContext> contexts = new ConcurrentHashMap<>(); public static HelpContext asContext(String pluginId, String name) { String key = HelpContext.asReference(pluginId, name); diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/ModificationType.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/ModificationType.java index 5e38a46e974..ddba7688540 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/ModificationType.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/ModificationType.java @@ -52,8 +52,8 @@ public enum ModificationType { //Attribute: Valid and can be used to replace the current version of an attribute with another historical version REPLACED_WITH_VERSION("Replace_with_version", 8); - private final static Set<ModificationType> ALL_NOT_HARD_DELETED = new HashSet<ModificationType>(); - private final static Set<ModificationType> ALL_MOD_TYPES = new HashSet<ModificationType>(); + private final static Set<ModificationType> ALL_NOT_HARD_DELETED = new HashSet<>(); + private final static Set<ModificationType> ALL_MOD_TYPES = new HashSet<>(); private int value; private String displayName; diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/PermissionEnum.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/PermissionEnum.java index 72a75c548df..aa55bd0522f 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/PermissionEnum.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/enums/PermissionEnum.java @@ -26,9 +26,9 @@ public enum PermissionEnum { // keeping this in sync with the number of permissions will ensure optimal memory usage private static final int COUNT = 4; - private static final Map<Integer, PermissionEnum> rankToPermissionHash = new HashMap<Integer, PermissionEnum>( + private static final Map<Integer, PermissionEnum> rankToPermissionHash = new HashMap<>( (int) (COUNT / .75) + 1, .75f); - private static final Map<String, PermissionEnum> NameToPermissionHash = new HashMap<String, PermissionEnum>( + private static final Map<String, PermissionEnum> NameToPermissionHash = new HashMap<>( (int) (COUNT / .75) + 1, .75f); private static final String[] NAME_ARRAY; diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/AbstractServiceBinder.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/AbstractServiceBinder.java index 3c6fdb8d558..920492c9cb8 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/AbstractServiceBinder.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/AbstractServiceBinder.java @@ -62,8 +62,8 @@ public abstract class AbstractServiceBinder { if (areServicesReady()) { isReady = true; - Set<Object> servicesReported = new HashSet<Object>(); - Map<Class<?>, Object> services = new HashMap<Class<?>, Object>(); + Set<Object> servicesReported = new HashSet<>(); + Map<Class<?>, Object> services = new HashMap<>(); for (Entry<Class<?>, Collection<Object>> entry : serviceMap.entrySet()) { Object serviceObject = entry.getValue().iterator().next(); servicesReported.add(serviceObject); diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/OperationBuilderImpl.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/OperationBuilderImpl.java index acd41f8fd9e..0cf773e202f 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/OperationBuilderImpl.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/OperationBuilderImpl.java @@ -42,7 +42,7 @@ public class OperationBuilderImpl implements OperationBuilder { private void reset() { behavior = OperationBehavior.TerminateOnError; logger = NullOperationLogger.getSingleton(); - operations = new ArrayList<Pair<Double, ? extends IOperation>>(); + operations = new ArrayList<>(); runningTotal = 0; itemsWithHints = 0; } diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/ServiceBinderFactoryImpl.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/ServiceBinderFactoryImpl.java index 8bb84600d90..5b41f1dece1 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/ServiceBinderFactoryImpl.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/ServiceBinderFactoryImpl.java @@ -29,7 +29,7 @@ public final class ServiceBinderFactoryImpl implements ServiceBinderFactory { public ServiceBinderFactoryImpl(BundleContext context, AbstractTrackingHandler handler) { super(); - Map<Class<?>, Collection<Object>> serviceMap = new ConcurrentHashMap<Class<?>, Collection<Object>>(); + Map<Class<?>, Collection<Object>> serviceMap = new ConcurrentHashMap<>(); singleBinder = new SingletonServiceBinder(serviceMap, context, handler); multiBinder = new MultiServiceBinder(serviceMap, context, handler); } diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/WeightedCompositeOperation.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/WeightedCompositeOperation.java index d8824ff0d4d..003eeaf9000 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/WeightedCompositeOperation.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/WeightedCompositeOperation.java @@ -31,7 +31,7 @@ public class WeightedCompositeOperation extends AbstractOperation { public static final Double EMPTY_WEIGHT_HINT = null; - private final List<IStatus> statuses = new ArrayList<IStatus>(); + private final List<IStatus> statuses = new ArrayList<>(); private final List<Pair<Double, ? extends IOperation>> operations; private final OperationBehavior behavior; private final double runningTotal; diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/threading/ThreadedWorkerExecutor.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/threading/ThreadedWorkerExecutor.java index 24ef93029c5..6921adac97e 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/threading/ThreadedWorkerExecutor.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/threading/ThreadedWorkerExecutor.java @@ -40,7 +40,7 @@ public class ThreadedWorkerExecutor<T> { public List<T> executeWorkersBlocking() throws OseeCoreException { ExecutorService executor = Executors.newFixedThreadPool(numberOfWorkers); - List<T> toReturn = new LinkedList<T>(); + List<T> toReturn = new LinkedList<>(); Collection<Callable<T>> workers = createWorkers(); try { @@ -60,7 +60,7 @@ public class ThreadedWorkerExecutor<T> { int remainder = factory.getWorkSize() % numberOfWorkers; int startIndex = 0; int endIndex = 0; - Collection<Callable<T>> workers = new LinkedList<Callable<T>>(); + Collection<Callable<T>> workers = new LinkedList<>(); for (int i = 0; i < numberOfWorkers; i++) { startIndex = endIndex; endIndex = startIndex + partitionSize; diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/AbstractTrackingHandler.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/AbstractTrackingHandler.java index 652fd7c7a13..67777521146 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/AbstractTrackingHandler.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/AbstractTrackingHandler.java @@ -43,7 +43,7 @@ public abstract class AbstractTrackingHandler { } public Map<Class<?>, ServiceBindType> getConfiguredDependencies() { - Map<Class<?>, ServiceBindType> dependencyMap = new LinkedHashMap<Class<?>, ServiceBindType>(); + Map<Class<?>, ServiceBindType> dependencyMap = new LinkedHashMap<>(); Class<?>[] dependencies = getDependencies(); if (dependencies != null) { for (Class<?> clazz : dependencies) { diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java index 936f2b857b7..52c47f9ecad 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java @@ -63,7 +63,7 @@ public class HttpProcessor { private static IProxyService proxyService; - private static final Map<String, IProxyData[]> proxiedData = new ConcurrentHashMap<String, IProxyData[]>(); + private static final Map<String, IProxyData[]> proxiedData = new ConcurrentHashMap<>(); private static int requests = 0; private static final Map<String, Pair<Integer, Long>> isAliveMap = diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/ServiceDependencyTracker.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/ServiceDependencyTracker.java index 5638517fe7a..705d78013a6 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/ServiceDependencyTracker.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/ServiceDependencyTracker.java @@ -37,7 +37,7 @@ public final class ServiceDependencyTracker implements Closeable { } public ServiceDependencyTracker(ServiceBinderFactory factory, BundleContext context, AbstractTrackingHandler handler) { - this.trackers = new ArrayList<ServiceTracker>(); + this.trackers = new ArrayList<>(); this.handler = handler; this.serviceBindFactory = factory; } diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/XResultData.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/XResultData.java index 5af40533aca..530ed787922 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/XResultData.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/XResultData.java @@ -66,7 +66,7 @@ public class XResultData { public void clear() { sb = new StringBuilder(); - count = new CountingMap<Type>(); + count = new CountingMap<>(); } public void addRaw(String str) { diff --git a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/DatabaseInitConfiguration.java b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/DatabaseInitConfiguration.java index 12569250674..f2bd0709d18 100644 --- a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/DatabaseInitConfiguration.java +++ b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/DatabaseInitConfiguration.java @@ -24,8 +24,8 @@ public class DatabaseInitConfiguration implements IDatabaseInitConfiguration { private final List<String> oseeTypeIds; public DatabaseInitConfiguration() { - this.dbInitTasks = new ArrayList<String>(); - this.oseeTypeIds = new ArrayList<String>(); + this.dbInitTasks = new ArrayList<>(); + this.oseeTypeIds = new ArrayList<>(); } public void addTask(String taskId) { @@ -46,7 +46,7 @@ public class DatabaseInitConfiguration implements IDatabaseInitConfiguration { @Override public List<String> getTaskExtensionIds() { - List<String> initTasks = new ArrayList<String>(); + List<String> initTasks = new ArrayList<>(); addDefaultTask(initTasks, DefaultDbInitTasks.BOOTSTRAP_TASK); initTasks.addAll(dbInitTasks); addDefaultTask(initTasks, DefaultDbInitTasks.DB_USER_CLEANUP); @@ -57,7 +57,7 @@ public class DatabaseInitConfiguration implements IDatabaseInitConfiguration { @Override public List<String> getOseeTypeExtensionIds() { - Set<String> oseeTypes = new LinkedHashSet<String>(); + Set<String> oseeTypes = new LinkedHashSet<>(); oseeTypes.addAll(oseeTypeIds); return new ArrayList<String>(oseeTypes); } diff --git a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/DatabaseInitActivator.java b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/DatabaseInitActivator.java index 891f1cb68a3..3efa47293f5 100644 --- a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/DatabaseInitActivator.java +++ b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/DatabaseInitActivator.java @@ -33,7 +33,7 @@ public class DatabaseInitActivator implements BundleActivator { new ServiceTracker<IOseeCachingService, IOseeCachingService>(context, IOseeCachingService.class, null); serviceTracker2.open(true); - serviceTracker3 = new ServiceTracker<JdbcService, JdbcService>(context, JdbcService.class, null); + serviceTracker3 = new ServiceTracker<>(context, JdbcService.class, null); serviceTracker3.open(true); } diff --git a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/GroupSelection.java b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/GroupSelection.java index 58d49566ae3..a64bfc8da22 100644 --- a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/GroupSelection.java +++ b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/GroupSelection.java @@ -27,7 +27,7 @@ import org.eclipse.osee.framework.plugin.core.util.ExtensionDefinedObjects; */ public class GroupSelection implements IGroupSelector { private static final GroupSelection instance = new GroupSelection(); - private final Map<String, IDatabaseInitConfiguration> initGroups = new HashMap<String, IDatabaseInitConfiguration>(); + private final Map<String, IDatabaseInitConfiguration> initGroups = new HashMap<>(); private boolean wasInitialized; @@ -60,7 +60,7 @@ public class GroupSelection implements IGroupSelector { } public List<String> getChoices() { - List<String> choices = new ArrayList<String>(initGroups.keySet()); + List<String> choices = new ArrayList<>(initGroups.keySet()); Collections.sort(choices); return choices; } diff --git a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/OseeTypesSetup.java b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/OseeTypesSetup.java index affa3540493..adfa20ceb2c 100644 --- a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/OseeTypesSetup.java +++ b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/OseeTypesSetup.java @@ -76,7 +76,7 @@ public class OseeTypesSetup { } public Map<String, URL> getOseeTypeExtensions() { - Map<String, URL> oseeTypes = new HashMap<String, URL>(); + Map<String, URL> oseeTypes = new HashMap<>(); for (IConfigurationElement element : ExtensionPoints.getExtensionElements(OSEE_TYPES_EXTENSION_ID, "OseeTypes")) { String resourceName = element.getAttribute("resource"); Bundle bundle = Platform.getBundle(element.getContributor().getName()); @@ -112,7 +112,7 @@ public class OseeTypesSetup { } private Map<String, URL> getOseeTypeExtensionsById(Collection<String> uniqueIdsToImport) { - Map<String, URL> items = new LinkedHashMap<String, URL>(); + Map<String, URL> items = new LinkedHashMap<>(); Map<String, URL> extensions = getOseeTypeExtensions(); for (String idsToImport : uniqueIdsToImport) { URL urlEntry = extensions.get(idsToImport); diff --git a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/SkynetDbBranchDataImport.java b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/SkynetDbBranchDataImport.java index 2de5d0ea4e3..e47761a1a09 100644 --- a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/SkynetDbBranchDataImport.java +++ b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/SkynetDbBranchDataImport.java @@ -80,8 +80,8 @@ public class SkynetDbBranchDataImport implements IDbInitializationTask { } private Collection<ImportData> loadDataFromExtensions() throws OseeCoreException { - List<ImportData> toReturn = new ArrayList<ImportData>(); - Map<String, String> selectedBranches = new HashMap<String, String>(); + List<ImportData> toReturn = new ArrayList<>(); + Map<String, String> selectedBranches = new HashMap<>(); List<IConfigurationElement> elements = ExtensionPoints.getExtensionElements(EXTENSION_POINT, ELEMENT_NAME); for (IConfigurationElement element : elements) { String bundleName = element.getContributor().getName(); @@ -147,7 +147,7 @@ public class SkynetDbBranchDataImport implements IDbInitializationTask { public ImportData(File exchangeFile) { super(); this.exchangeFile = exchangeFile; - this.selectedBranches = new HashSet<String>(); + this.selectedBranches = new HashSet<>(); } public void addSelectedBranch(String branchName) { diff --git a/plugins/org.eclipse.osee.framework.dev.help.ui.test/src/org/eclipse/osee/framework/dev/help/ui/util/HtmlParser.java b/plugins/org.eclipse.osee.framework.dev.help.ui.test/src/org/eclipse/osee/framework/dev/help/ui/util/HtmlParser.java index 5715f105c5c..aebb6ec7a38 100644 --- a/plugins/org.eclipse.osee.framework.dev.help.ui.test/src/org/eclipse/osee/framework/dev/help/ui/util/HtmlParser.java +++ b/plugins/org.eclipse.osee.framework.dev.help.ui.test/src/org/eclipse/osee/framework/dev/help/ui/util/HtmlParser.java @@ -56,7 +56,7 @@ public class HtmlParser { } public Set<String> parse(URL url) throws Exception { - Set<String> entries = new HashSet<String>(); + Set<String> entries = new HashSet<>(); entries.clear(); String pathPrefix = getPath(url.toString()); diff --git a/plugins/org.eclipse.osee.framework.dev.help.ui.test/src/org/eclipse/osee/framework/dev/help/ui/util/TocParser.java b/plugins/org.eclipse.osee.framework.dev.help.ui.test/src/org/eclipse/osee/framework/dev/help/ui/util/TocParser.java index 688fb20d7e8..03d5faa466d 100644 --- a/plugins/org.eclipse.osee.framework.dev.help.ui.test/src/org/eclipse/osee/framework/dev/help/ui/util/TocParser.java +++ b/plugins/org.eclipse.osee.framework.dev.help.ui.test/src/org/eclipse/osee/framework/dev/help/ui/util/TocParser.java @@ -32,7 +32,7 @@ public class TocParser { private static final String TOPIC = "topic"; private static final String HREF = "href"; - public Set<String> entries = new HashSet<String>(); + public Set<String> entries = new HashSet<>(); public String path; private String localName; diff --git a/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/HelpContextTest.java b/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/HelpContextTest.java index 8019a3fad66..3326279209a 100644 --- a/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/HelpContextTest.java +++ b/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/HelpContextTest.java @@ -72,7 +72,7 @@ public class HelpContextTest { } private static Map<String, HelpContext> getContexts(Class<?> clazz) throws IllegalArgumentException, IllegalAccessException { - Map<String, HelpContext> contexts = new HashMap<String, HelpContext>(); + Map<String, HelpContext> contexts = new HashMap<>(); for (Field field : clazz.getFields()) { Object object = field.get(null); if (object instanceof HelpContext) { diff --git a/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/util/ContextParser.java b/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/util/ContextParser.java index 37b205854e2..69e19f89e0c 100644 --- a/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/util/ContextParser.java +++ b/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/util/ContextParser.java @@ -36,7 +36,7 @@ public class ContextParser { private static final String HREF = "href"; private static final String ID_TAG = "id"; - public Map<String, ContextEntry> entries = new HashMap<String, ContextEntry>(); + public Map<String, ContextEntry> entries = new HashMap<>(); public String path; private String localName; @@ -121,7 +121,7 @@ public class ContextParser { public final class ContextEntry { private final String id; - private final Set<String> references = new LinkedHashSet<String>(); + private final Set<String> references = new LinkedHashSet<>(); public ContextEntry(String id) { super(); diff --git a/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/util/HtmlParser.java b/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/util/HtmlParser.java index 8f431a79aaf..fc0623a32e6 100644 --- a/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/util/HtmlParser.java +++ b/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/util/HtmlParser.java @@ -56,7 +56,7 @@ public class HtmlParser { } public Set<String> parse(URL url) throws Exception { - Set<String> entries = new HashSet<String>(); + Set<String> entries = new HashSet<>(); entries.clear(); String pathPrefix = getPath(url.toString()); diff --git a/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/util/TocParser.java b/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/util/TocParser.java index 25c5d76b035..84c2f334b9e 100644 --- a/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/util/TocParser.java +++ b/plugins/org.eclipse.osee.framework.help.ui.test/src/org/eclipse/osee/framework/help/ui/util/TocParser.java @@ -32,7 +32,7 @@ public class TocParser { private static final String TOPIC = "topic"; private static final String HREF = "href"; - public Set<String> entries = new HashSet<String>(); + public Set<String> entries = new HashSet<>(); public String path; private String localName; diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/text/UtfReadingRuleTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/text/UtfReadingRuleTest.java index bfc60ea24cb..0454631a081 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/text/UtfReadingRuleTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/text/UtfReadingRuleTest.java @@ -74,7 +74,7 @@ public final class UtfReadingRuleTest { @Test public void testCharset() { - Stack<String> charsetStack = new Stack<String>(); + Stack<String> charsetStack = new Stack<>(); charsetStack.add("UnknownCharset"); charsetStack.add("UTF-8"); diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMapTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMapTest.java index cbe4853433b..15e0adfc88d 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMapTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMapTest.java @@ -22,7 +22,7 @@ import org.junit.Test; public class CompositeKeyHashMapTest { @Test public void testEnumerateKeys() { - CompositeKeyHashMap<String, String, String> testMap = new CompositeKeyHashMap<String, String, String>(); + CompositeKeyHashMap<String, String, String> testMap = new CompositeKeyHashMap<>(); testMap.put("red", "blue", "value1"); testMap.put("red", "green", "value2"); testMap.put("red", "red", "value3"); diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/MatchLocationTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/MatchLocationTest.java index 5a422956587..281fe69b758 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/MatchLocationTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/MatchLocationTest.java @@ -57,7 +57,7 @@ public class MatchLocationTest { @org.junit.Test public void testHashCorrectness() { - HashMap<MatchLocation, Double> hash = new HashMap<MatchLocation, Double>(); + HashMap<MatchLocation, Double> hash = new HashMap<>(); hash.put(mapToPi, Math.PI); hash.put(mapToE, Math.E); Assert.assertTrue(hash.get(mapToPi).equals(Math.PI)); diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PairTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PairTest.java index 0caba61722a..1c6fb46d0cf 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PairTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PairTest.java @@ -20,13 +20,13 @@ import org.junit.Assert; public class PairTest { private static Integer a = Integer.valueOf(144); private static Integer b = Integer.valueOf(233); - private static Pair<Integer, Integer> mapToPi = new Pair<Integer, Integer>(a, b); - private static Pair<Integer, Integer> mapToE = new Pair<Integer, Integer>(b, a); - private static Pair<Integer, Integer> alsoMapToPi = new Pair<Integer, Integer>(a, b); - private static Pair<Integer, Integer> alsoMapToE = new Pair<Integer, Integer>(b, a); - private static Pair<Integer, Integer> firstEntryNull = new Pair<Integer, Integer>(null, 144); - private static Pair<Integer, Integer> secondEntryNull = new Pair<Integer, Integer>(144, null); - private static Pair<Integer, Integer> nonNull = new Pair<Integer, Integer>(15, 144); + private static Pair<Integer, Integer> mapToPi = new Pair<>(a, b); + private static Pair<Integer, Integer> mapToE = new Pair<>(b, a); + private static Pair<Integer, Integer> alsoMapToPi = new Pair<>(a, b); + private static Pair<Integer, Integer> alsoMapToE = new Pair<>(b, a); + private static Pair<Integer, Integer> firstEntryNull = new Pair<>(null, 144); + private static Pair<Integer, Integer> secondEntryNull = new Pair<>(144, null); + private static Pair<Integer, Integer> nonNull = new Pair<>(15, 144); @org.junit.Test public void testConstructor() { @@ -58,7 +58,7 @@ public class PairTest { @org.junit.Test public void testSetters() { - Pair<Integer, Integer> newPair = new Pair<Integer, Integer>(0, 0); + Pair<Integer, Integer> newPair = new Pair<>(0, 0); newPair.setFirst(a); newPair.setSecond(b); Assert.assertTrue(a.equals(newPair.getFirst())); @@ -70,7 +70,7 @@ public class PairTest { @org.junit.Test public void testHashCorrectness() { - HashMap<Pair<Integer, Integer>, Double> hash = new HashMap<Pair<Integer, Integer>, Double>(); + HashMap<Pair<Integer, Integer>, Double> hash = new HashMap<>(); hash.put(mapToPi, Math.PI); hash.put(mapToE, Math.E); Assert.assertTrue(hash.get(mapToPi).equals(Math.PI)); diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTest.java index 5e74549abc8..7364e13d719 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTest.java @@ -158,10 +158,10 @@ public class PropertyStoreTest { PropertyStoreTestUtil.createPropertyStore(PropertyStoreTestUtil.convertPropertiesToMap(System.getProperties())); store1.put("key9", nested); - Set<String> set1 = new TreeSet<String>(store1.keySet()); + Set<String> set1 = new TreeSet<>(store1.keySet()); PropertyStoreTestUtil.checkArrays(new String[] {"key1", "key2", "key3", "key4", "key5", "key6", "key6.5"}, set1.toArray(new String[set1.size()])); - Set<String> set2 = new TreeSet<String>(store1.arrayKeySet()); + Set<String> set2 = new TreeSet<>(store1.arrayKeySet()); PropertyStoreTestUtil.checkArrays(new String[] {"key7", "key8"}, set2.toArray(new String[set2.size()])); Assert.assertEquals("myId", store1.getId()); diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTestUtil.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTestUtil.java index b412c4f617c..3c051937e8a 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTestUtil.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTestUtil.java @@ -82,7 +82,7 @@ public final class PropertyStoreTestUtil { } public static Map<String, Object> convertPropertiesToMap(Properties props) { - Map<String, Object> result = new TreeMap<String, Object>(); + Map<String, Object> result = new TreeMap<>(); for (Entry<Object, Object> entry : props.entrySet()) { result.put((String) entry.getKey(), entry.getValue()); } diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/QuadTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/QuadTest.java index 0c20ce4c1c3..ab1786385bd 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/QuadTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/QuadTest.java @@ -22,14 +22,14 @@ public class QuadTest { private final Integer b = 233; private final Integer c = 433; private final Integer d = 555; - private final Quad<Integer, Integer, Integer, Integer> mapToPi = new Quad<Integer, Integer, Integer, Integer>(a, b, + private final Quad<Integer, Integer, Integer, Integer> mapToPi = new Quad<>(a, b, c, d); - private final Quad<Integer, Integer, Integer, Integer> mapToE = new Quad<Integer, Integer, Integer, Integer>(b, c, + private final Quad<Integer, Integer, Integer, Integer> mapToE = new Quad<>(b, c, d, a); - private final Quad<Integer, Integer, Integer, Integer> alsoMapToPi = new Quad<Integer, Integer, Integer, Integer>(a, + private final Quad<Integer, Integer, Integer, Integer> alsoMapToPi = new Quad<>(a, b, c, d); - private final Quad<Integer, Integer, Integer, Integer> alsoMapToE = new Quad<Integer, Integer, Integer, Integer>(b, + private final Quad<Integer, Integer, Integer, Integer> alsoMapToE = new Quad<>(b, c, d, a); private final Quad<Integer, Integer, Integer, Integer> firstEntryNull = @@ -40,7 +40,7 @@ public class QuadTest { new Quad<Integer, Integer, Integer, Integer>(111, 222, null, 444); private final Quad<Integer, Integer, Integer, Integer> fourthEntryNull = new Quad<Integer, Integer, Integer, Integer>(111, 222, 333, null); - private final Quad<Integer, Integer, Integer, Integer> nonNull = new Quad<Integer, Integer, Integer, Integer>(111, + private final Quad<Integer, Integer, Integer, Integer> nonNull = new Quad<>(111, 222, 333, 444); @org.junit.Test @@ -97,7 +97,7 @@ public class QuadTest { @org.junit.Test public void testSetters() { - Quad<Integer, Integer, Integer, Integer> newPair = new Quad<Integer, Integer, Integer, Integer>(0, 0, 0, 0); + Quad<Integer, Integer, Integer, Integer> newPair = new Quad<>(0, 0, 0, 0); newPair.setFirst(a); newPair.setSecond(b); newPair.setThird(c); @@ -124,7 +124,7 @@ public class QuadTest { Assert.assertFalse(d.equals(newPair.getSecond())); Assert.assertFalse(d.equals(newPair.getThird())); - Quad<Integer, Integer, Integer, Integer> anotherPair = new Quad<Integer, Integer, Integer, Integer>(0, 0, 0, 0); + Quad<Integer, Integer, Integer, Integer> anotherPair = new Quad<>(0, 0, 0, 0); Assert.assertTrue(anotherPair.set(a, b, c, d).equals(anotherPair)); } diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/ResultSetIterableTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/ResultSetIterableTest.java index bc8639b1587..8be1f8cee5e 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/ResultSetIterableTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/ResultSetIterableTest.java @@ -41,8 +41,8 @@ public class ResultSetIterableTest { public void init() { MockitoAnnotations.initMocks(this); - data = new LinkedHashSet<String>(); - result = new ResultSetIterable<String>(data); + data = new LinkedHashSet<>(); + result = new ResultSetIterable<>(data); } @Test diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/TripletTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/TripletTest.java index 95ddcd9e73d..2fa52259323 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/TripletTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/TripletTest.java @@ -21,19 +21,19 @@ public class TripletTest { private final Integer a = 144; private final Integer b = 233; private final Integer c = 533; - private final Triplet<Integer, Integer, Integer> mapToPi = new Triplet<Integer, Integer, Integer>(a, b, c); - private final Triplet<Integer, Integer, Integer> mapToE = new Triplet<Integer, Integer, Integer>(b, c, a); + private final Triplet<Integer, Integer, Integer> mapToPi = new Triplet<>(a, b, c); + private final Triplet<Integer, Integer, Integer> mapToE = new Triplet<>(b, c, a); - private final Triplet<Integer, Integer, Integer> alsoMapToPi = new Triplet<Integer, Integer, Integer>(a, b, c); - private final Triplet<Integer, Integer, Integer> alsoMapToE = new Triplet<Integer, Integer, Integer>(b, c, a); + private final Triplet<Integer, Integer, Integer> alsoMapToPi = new Triplet<>(a, b, c); + private final Triplet<Integer, Integer, Integer> alsoMapToE = new Triplet<>(b, c, a); - private final Triplet<Integer, Integer, Integer> firstEntryNull = new Triplet<Integer, Integer, Integer>(null, 222, + private final Triplet<Integer, Integer, Integer> firstEntryNull = new Triplet<>(null, 222, 333); - private final Triplet<Integer, Integer, Integer> secondEntryNull = new Triplet<Integer, Integer, Integer>(111, null, + private final Triplet<Integer, Integer, Integer> secondEntryNull = new Triplet<>(111, null, 333); - private final Triplet<Integer, Integer, Integer> thirdEntryNull = new Triplet<Integer, Integer, Integer>(111, 222, + private final Triplet<Integer, Integer, Integer> thirdEntryNull = new Triplet<>(111, 222, null); - private final Triplet<Integer, Integer, Integer> nonNull = new Triplet<Integer, Integer, Integer>(111, 222, 333); + private final Triplet<Integer, Integer, Integer> nonNull = new Triplet<>(111, 222, 333); @org.junit.Test public void testConstructor() { @@ -71,7 +71,7 @@ public class TripletTest { @org.junit.Test public void testSetters() { - Triplet<Integer, Integer, Integer> newPair = new Triplet<Integer, Integer, Integer>(0, 0, 0); + Triplet<Integer, Integer, Integer> newPair = new Triplet<>(0, 0, 0); newPair.setFirst(a); newPair.setSecond(b); newPair.setThird(c); @@ -89,7 +89,7 @@ public class TripletTest { Assert.assertFalse(c.equals(newPair.getFirst())); Assert.assertFalse(c.equals(newPair.getSecond())); - Triplet<Integer, Integer, Integer> anotherPair = new Triplet<Integer, Integer, Integer>(0, 0, 0); + Triplet<Integer, Integer, Integer> anotherPair = new Triplet<>(0, 0, 0); Assert.assertTrue(anotherPair.set(a, b, c).equals(anotherPair)); } diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CollectionsTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CollectionsTest.java index 78c9791055b..f9b872f64f6 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CollectionsTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CollectionsTest.java @@ -106,13 +106,13 @@ public class CollectionsTest { @Test public void test_flatten() { - Collection<Object> deepList = new ArrayList<Object>(); + Collection<Object> deepList = new ArrayList<>(); deepList.add("A"); deepList.add(Arrays.asList("B", "C")); deepList.add(Arrays.asList("D")); deepList.add(Arrays.asList("E")); - List<Object> flattened = new ArrayList<Object>(); + List<Object> flattened = new ArrayList<>(); Collections.flatten(deepList, flattened); List<Object> expected = Collections.castAll(Object.class, getTestList()); @@ -121,7 +121,7 @@ public class CollectionsTest { } private List<String> getTestList() { - List<String> newList = new ArrayList<String>(); + List<String> newList = new ArrayList<>(); newList.addAll(Arrays.asList("A", "B", "C", "D", "E")); return newList; } diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CompareTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CompareTest.java index 3658d0109f4..9987a440d3b 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CompareTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CompareTest.java @@ -48,7 +48,7 @@ public class CompareTest { @Parameters public static Collection<Object[]> data() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); data.add(new Object[] {"abc", "abc", false}); data.add(new Object[] {"abc", "abc1", true}); data.add(new Object[] {null, "abc", true}); @@ -77,10 +77,10 @@ public class CompareTest { } private static Map<Object, Collection<Object>> map(Object key, Object... values) { - Map<Object, Collection<Object>> map = new HashMap<Object, Collection<Object>>(); + Map<Object, Collection<Object>> map = new HashMap<>(); Collection<Object> objects = map.get(key); if (objects == null) { - objects = new ArrayList<Object>(); + objects = new ArrayList<>(); map.put(key, objects); } else { objects.clear(); diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/DateIteratorTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/DateIteratorTest.java index dd03f7d2bc4..b885fc0d775 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/DateIteratorTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/DateIteratorTest.java @@ -35,7 +35,7 @@ public class DateIteratorTest { private final int calendarFieldNormalize; //If normalize==false then this will be ignored private final int calendarValueNormalize; //If normalize==false then this will be ignored - // private final List<Calendar> calsExpected = new ArrayList<Calendar>(); + // private final List<Calendar> calsExpected = new ArrayList<>(); public DateIteratorTest(Calendar startCal, Calendar endCal, int calendarFieldIter, int iterRate, boolean normalize, int calendarFieldNormalize, int calendarValueNormalize) { this.startCal = startCal; @@ -50,8 +50,8 @@ public class DateIteratorTest { @Test public void testDefaultDateIterationOverCenturyYearChange() { //Collection object to retain the iterated dates from the DateIterator - List<Calendar> calsFromIter = new ArrayList<Calendar>(); - List<Calendar> calsExpected = new ArrayList<Calendar>(); + List<Calendar> calsFromIter = new ArrayList<>(); + List<Calendar> calsExpected = new ArrayList<>(); //Generate expected output Calendar iCal = (Calendar) startCal.clone(); @@ -102,7 +102,7 @@ public class DateIteratorTest { @Parameters public static Collection<Object[]> dateIterationTestData() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); Calendar startCal = Calendar.getInstance(); Calendar endCal = Calendar.getInstance(); @@ -181,8 +181,8 @@ public class DateIteratorTest { // String start = DateUtil.get(startCal.getTime()); // String end = DateUtil.get(endCal.getTime()); // - // List<Calendar> calsFromIter = new ArrayList<Calendar>(); - // List<Calendar> calsExpected = new ArrayList<Calendar>(); + // List<Calendar> calsFromIter = new ArrayList<>(); + // List<Calendar> calsExpected = new ArrayList<>(); // // //Populate calsExpected - // // Every day between startCal and endCal @@ -241,8 +241,8 @@ public class DateIteratorTest { // String start = DateUtil.get(startCal.getTime()); // String end = DateUtil.get(endCal.getTime()); // - // List<Calendar> calsFromIter = new ArrayList<Calendar>(); - // List<Calendar> calsExpected = new ArrayList<Calendar>(); + // List<Calendar> calsFromIter = new ArrayList<>(); + // List<Calendar> calsExpected = new ArrayList<>(); // // //Populate calsExpected - // // All Mondays between startCal and endCal. Including first Monday prior to startCal and first Monday after endCal diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/HashCollectionTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/HashCollectionTest.java index 888770ff0b0..efa2c96a561 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/HashCollectionTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/HashCollectionTest.java @@ -28,7 +28,7 @@ public class HashCollectionTest { */ @Test public void testPutKV() { - HashCollection<String, String> collection = new HashCollection<String, String>(); + HashCollection<String, String> collection = new HashCollection<>(); Assert.assertEquals(0, collection.size()); Assert.assertEquals(0, collection.getValues().size()); @@ -50,8 +50,8 @@ public class HashCollectionTest { */ @Test public void testPutKCollectionOfV() { - HashCollection<String, String> collection = new HashCollection<String, String>(); - List<String> values = new ArrayList<String>(); + HashCollection<String, String> collection = new HashCollection<>(); + List<String> values = new ArrayList<>(); for (int x = 1; x <= 5; x++) { values.add("value " + x); @@ -70,7 +70,7 @@ public class HashCollectionTest { */ @Test public void testRemoveValue() { - HashCollection<String, String> collection = new HashCollection<String, String>(); + HashCollection<String, String> collection = new HashCollection<>(); for (int x = 1; x <= 5; x++) { collection.put("key", "value " + x); } @@ -85,7 +85,7 @@ public class HashCollectionTest { */ @Test public void testRemoveValues() { - HashCollection<String, String> collection = new HashCollection<String, String>(); + HashCollection<String, String> collection = new HashCollection<>(); for (int x = 1; x <= 5; x++) { collection.put("key", "value " + x); } @@ -100,7 +100,7 @@ public class HashCollectionTest { */ @Test public void testKeySet() { - HashCollection<String, String> collection = new HashCollection<String, String>(); + HashCollection<String, String> collection = new HashCollection<>(); for (int x = 1; x <= 5; x++) { collection.put("key", "value " + x); } @@ -115,7 +115,7 @@ public class HashCollectionTest { */ @Test public void testClear() { - HashCollection<String, String> collection = new HashCollection<String, String>(); + HashCollection<String, String> collection = new HashCollection<>(); for (int x = 1; x <= 5; x++) { collection.put("key", "value " + x); } @@ -130,7 +130,7 @@ public class HashCollectionTest { */ @Test public void testContainsKey() { - HashCollection<String, String> collection = new HashCollection<String, String>(); + HashCollection<String, String> collection = new HashCollection<>(); for (int x = 1; x <= 5; x++) { collection.put("key", "value " + x); } @@ -142,7 +142,7 @@ public class HashCollectionTest { */ @Test public void testIsEmpty() { - HashCollection<String, String> collection = new HashCollection<String, String>(); + HashCollection<String, String> collection = new HashCollection<>(); Assert.assertTrue(collection.isEmpty()); collection.put("key", "value 1"); Assert.assertFalse(collection.isEmpty()); @@ -155,7 +155,7 @@ public class HashCollectionTest { */ @Test public void testContainsValue() { - HashCollection<String, String> collection = new HashCollection<String, String>(); + HashCollection<String, String> collection = new HashCollection<>(); for (int x = 1; x <= 5; x++) { collection.put("key", "value " + x); } @@ -165,7 +165,7 @@ public class HashCollectionTest { @Test public void testHashCollectionObject() { - HashCollection<Object, String> collection = new HashCollection<Object, String>(); + HashCollection<Object, String> collection = new HashCollection<>(); Assert.assertEquals(0, collection.size()); Assert.assertEquals(0, collection.getValues().size()); diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/UrlQueryTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/UrlQueryTest.java index 50b7782d42d..fdad16ccd25 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/UrlQueryTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/UrlQueryTest.java @@ -66,7 +66,7 @@ public class UrlQueryTest { Assert.assertFalse(query.containsKey("dummy")); Enumeration<String> keys = query.getParameterNames(); - Set<String> data = new HashSet<String>(); + Set<String> data = new HashSet<>(); while (keys.hasMoreElements()) { data.add(keys.nextElement()); } @@ -75,7 +75,7 @@ public class UrlQueryTest { for (Entry<String, List<String>> entry : expected.entrySet()) { String[] values = query.getParameterValues(entry.getKey()); - List<String> actual = new ArrayList<String>(); + List<String> actual = new ArrayList<>(); actual.addAll(Arrays.asList(values)); java.util.Collections.sort(actual); @@ -87,7 +87,7 @@ public class UrlQueryTest { for (Entry<String, String[]> entry : query.getParameterMap().entrySet()) { - List<String> actual = new ArrayList<String>(); + List<String> actual = new ArrayList<>(); actual.addAll(Arrays.asList(entry.getValue())); java.util.Collections.sort(actual); @@ -110,7 +110,7 @@ public class UrlQueryTest { @Parameters public static List<Object[]> getData() { - List<Object[]> data = new LinkedList<Object[]>(); + List<Object[]> data = new LinkedList<>(); add(data, "phrase=Hello+Dude&value1=%2212345%22&value2=4%3C6", new TestData().put("phrase", "Hello Dude").put("value1", "\"12345\"").put("value2", "4<6")); add(data, "query+name=Hello+dude&query+name=one+more+string", @@ -123,12 +123,12 @@ public class UrlQueryTest { } private static final class TestData { - private final Map<String, List<String>> data = new TreeMap<String, List<String>>(); + private final Map<String, List<String>> data = new TreeMap<>(); public TestData put(String key, String... values) { List<String> vals = get(key); if (vals == null) { - vals = new ArrayList<String>(); + vals = new ArrayList<>(); data.put(key, vals); } for (String value : values) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/annotation/AnnotationProcessorTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/annotation/AnnotationProcessorTest.java index 9341e6a51ac..2a9986127b4 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/annotation/AnnotationProcessorTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/annotation/AnnotationProcessorTest.java @@ -30,7 +30,7 @@ public class AnnotationProcessorTest { @Before public void setup() { - annotationHandlers = new HashMap<Class<? extends Annotation>, FieldAnnotationHandler<?>>(); + annotationHandlers = new HashMap<>(); annotationHandlers.put(Annotation1.class, new Handler1()); annotationHandlers.put(Annotation2.class, new Handler2()); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/collection/tree/Tree.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/collection/tree/Tree.java index 1d1a0c23de6..da0715a54b4 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/collection/tree/Tree.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/collection/tree/Tree.java @@ -15,11 +15,11 @@ public class Tree<treeType> { private final TreeNode<treeType> root; public Tree() { - this.root = new TreeNode<treeType>(); + this.root = new TreeNode<>(); } public Tree(treeType self) { - this.root = new TreeNode<treeType>(self); + this.root = new TreeNode<>(self); } public TreeNode<treeType> getRoot() { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/collection/tree/TreeNode.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/collection/tree/TreeNode.java index 087ceead472..18ea1351b5b 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/collection/tree/TreeNode.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/collection/tree/TreeNode.java @@ -23,7 +23,7 @@ public class TreeNode<treeType> { protected TreeNode(TreeNode<treeType> parent, treeType myself) { this.parent = parent; this.myself = myself; - this.children = new ArrayList<TreeNode<treeType>>(); + this.children = new ArrayList<>(); } public TreeNode(treeType myself) { @@ -47,7 +47,7 @@ public class TreeNode<treeType> { } public TreeNode<treeType> addChild(treeType child) { - TreeNode<treeType> newchild = new TreeNode<treeType>(this, child); + TreeNode<treeType> newchild = new TreeNode<>(this, child); this.children.add(newchild); return newchild; } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/directory/DirectoryPerson.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/directory/DirectoryPerson.java index db2caeaa685..85488546615 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/directory/DirectoryPerson.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/directory/DirectoryPerson.java @@ -45,7 +45,7 @@ public class DirectoryPerson implements Comparable<Object>, Serializable { private boolean hasPolicy = false; public DirectoryPerson() { - policies = new ArrayList<Integer>(); + policies = new ArrayList<>(); bemsid = -1; bluesId = -1; building = ""; diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/reportdata/ReportData.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/reportdata/ReportData.java index 77451d6f7aa..3f14c8d9f40 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/reportdata/ReportData.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/reportdata/ReportData.java @@ -29,7 +29,7 @@ public class ReportData implements Serializable { */ public ReportData(List<String> headers) { this.headers = headers; - items = new ArrayList<ReportDataItem>(); + items = new ArrayList<>(); } /** diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/ExtractComments.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/ExtractComments.java index de9f0a9dbed..adf4c7778a6 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/ExtractComments.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/ExtractComments.java @@ -29,7 +29,7 @@ public class ExtractComments { public ExtractComments() { in = null; line = null; - comments = new ArrayList<String>(); + comments = new ArrayList<>(); } public Object[] extract(String sourceFile) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/FindResults.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/FindResults.java index b9740d46d2e..3d98bc9eccd 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/FindResults.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/FindResults.java @@ -30,20 +30,20 @@ public class FindResults { private final HashMap<String, HashMap<File, List<String>>> results; public FindResults(int initialCapacity) { - results = new HashMap<String, HashMap<File, List<String>>>(initialCapacity * 4 / 3); + results = new HashMap<>(initialCapacity * 4 / 3); } public void addMatch(String pattern, File file, String region) { HashMap<File, List<String>> fileMatches = results.get(pattern); if (fileMatches == null) { - fileMatches = new HashMap<File, List<String>>(); + fileMatches = new HashMap<>(); results.put(pattern, fileMatches); } List<String> regions = fileMatches.get(file); if (regions == null) { - regions = new LinkedList<String>(); + regions = new LinkedList<>(); fileMatches.put(file, regions); } regions.add(region); @@ -71,7 +71,7 @@ public class FindResults { * Returns a simple set of all files that had matches (or anti-matches) */ public Set<File> getFileSet() { - Set<File> files = new LinkedHashSet<File>(1000); + Set<File> files = new LinkedHashSet<>(1000); for (Iterator<Entry<String, HashMap<File, List<String>>>> i = results.entrySet().iterator(); i.hasNext();) { Map.Entry<String, HashMap<File, List<String>>> entry = i.next(); HashMap<File, List<String>> fileMatches = entry.getValue(); @@ -81,11 +81,11 @@ public class FindResults { } public HashMap<String, List<File>> getRegionToFileMapping() { - HashMap<String, List<File>> mapping = new HashMap<String, List<File>>(1000); + HashMap<String, List<File>> mapping = new HashMap<>(1000); for (FindResultsIterator i = iterator(); i.hasNext();) { List<File> files = mapping.get(i.currentRegion); if (files == null) { - files = new LinkedList<File>(); + files = new LinkedList<>(); mapping.put(i.currentRegion, files); } files.add(i.currentFile); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/rules/InsertTypeGuids.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/rules/InsertTypeGuids.java index e8f119a4482..5b9f4235a72 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/rules/InsertTypeGuids.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/rules/InsertTypeGuids.java @@ -22,7 +22,7 @@ import org.eclipse.osee.framework.jdk.core.text.change.ChangeSet; */ public class InsertTypeGuids extends Rule { private static final Pattern classDeclarationP = Pattern.compile("Type \"([^\"]*)\".*?\\{\\s*"); //Type "([^"]*)".*?\{ - private static final Map<String, String> typeGuids = new HashMap<String, String>(); + private static final Map<String, String> typeGuids = new HashMap<>(); public InsertTypeGuids() { super(null); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/rules/Unique.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/rules/Unique.java index 9654d089d91..bf37dd88649 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/rules/Unique.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/rules/Unique.java @@ -20,7 +20,7 @@ import org.eclipse.osee.framework.jdk.core.text.change.ChangeSet; public class Unique extends Rule { @Override public ChangeSet computeChanges(CharSequence seq) { - LinkedHashSet<Object> set = new LinkedHashSet<Object>(); + LinkedHashSet<Object> set = new LinkedHashSet<>(); int start = 0; int end = 0; int length = seq.length(); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/Find.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/Find.java index 61002cad26f..5e9d7e8ab6b 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/Find.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/Find.java @@ -65,7 +65,7 @@ public class Find { private static FileToBufferConvert simpleToBuffer = new SimpleFileToBufferConvert(); private static ArrayList<String> toList(String pattern) { - ArrayList<String> patterns = new ArrayList<String>(); + ArrayList<String> patterns = new ArrayList<>(); patterns.add(pattern); return patterns; } @@ -84,7 +84,7 @@ public class Find { if (new File(args[0]).exists()) { patterns = Lib.readListFromFile(args[0]); } else { - patterns = new ArrayList<String>(); + patterns = new ArrayList<>(); patterns.add(args[0]); } File resultFile = new File("results.txt"); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/FindNonLocalFunctionCalls.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/FindNonLocalFunctionCalls.java index f1dadc8ef0b..8ac90f5d7d0 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/FindNonLocalFunctionCalls.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/FindNonLocalFunctionCalls.java @@ -31,7 +31,7 @@ public class FindNonLocalFunctionCalls { public FindNonLocalFunctionCalls(File[] files) { this.files = files; - set = new LinkedHashSet<String>(); + set = new LinkedHashSet<>(); } public static void main(String[] args) { @@ -55,7 +55,7 @@ public class FindNonLocalFunctionCalls { } private void look(CharSequence seq) { - ArrayList<String> localFunctions = new ArrayList<String>(); + ArrayList<String> localFunctions = new ArrayList<>(); Matcher functionDefM = functionDefPattern.matcher(seq); while (functionDefM.find()) { localFunctions.add(functionDefM.group(1)); @@ -74,7 +74,7 @@ public class FindNonLocalFunctionCalls { } public void print() { - ArrayList<String> list = new ArrayList<String>(set); + ArrayList<String> list = new ArrayList<>(set); Collections.sort(list); for (Iterator<String> iter = list.iterator(); iter.hasNext();) { System.out.println(iter.next()); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/FunctionCallStats.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/FunctionCallStats.java index d7d7b265f01..a32fe528609 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/FunctionCallStats.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/FunctionCallStats.java @@ -35,7 +35,7 @@ public class FunctionCallStats { return; } - ArrayList<String> patterns = new ArrayList<String>(); + ArrayList<String> patterns = new ArrayList<>(); patterns.add("\\W(\\w+)\\s*\\([^;{]*?\\)\\s*;"); BufferedWriter out = new BufferedWriter(new FileWriter("results.csv")); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/RpcrSignalChanges.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/RpcrSignalChanges.java index 16f83bd40b9..6ce27dc87f2 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/RpcrSignalChanges.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/RpcrSignalChanges.java @@ -29,7 +29,7 @@ public class RpcrSignalChanges { public RpcrSignalChanges(File file) throws IOException { rpcrName = file.getName().substring(0, 4); - this.signals = new ArrayList<String>(500); + this.signals = new ArrayList<>(500); BufferedReader in = null; try { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/SignalChanges.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/SignalChanges.java index 1ad00a7b132..f2e2900be5a 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/SignalChanges.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/tool/SignalChanges.java @@ -38,7 +38,7 @@ public class SignalChanges { // return list of RpcrSignalChanges found in the dat files in the given directory public static ArrayList<Object> loadList(String path) throws IOException { - ArrayList<Object> list = new ArrayList<Object>(20); + ArrayList<Object> list = new ArrayList<>(20); File directory = new File(path); File[] files = directory.listFiles(new MatchFilter(".*\\.txt")); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/AddingDoubleMap.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/AddingDoubleMap.java index 7c5ecac3bd3..b3b4d38a1bc 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/AddingDoubleMap.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/AddingDoubleMap.java @@ -22,11 +22,11 @@ public class AddingDoubleMap<K> { private final HashMap<K, MutableDouble> addingMap; public AddingDoubleMap(int initialCapacity) { - addingMap = new HashMap<K, MutableDouble>(initialCapacity); + addingMap = new HashMap<>(initialCapacity); } public AddingDoubleMap() { - addingMap = new HashMap<K, MutableDouble>(); + addingMap = new HashMap<>(); } public double get(K key) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMap.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMap.java index d59a5d3e746..f88fa8a8e49 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMap.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMap.java @@ -45,11 +45,11 @@ public class CompositeKeyHashMap<KeyOne, KeyTwo, Value> implements Map<Pair<KeyO public CompositeKeyHashMap(int initialCapacity, boolean isThreadSafe) { if (isThreadSafe) { - map = new ConcurrentHashMap<Pair<KeyOne, KeyTwo>, Value>(initialCapacity); + map = new ConcurrentHashMap<>(initialCapacity); } else { - map = new HashMap<Pair<KeyOne, KeyTwo>, Value>(initialCapacity); + map = new HashMap<>(initialCapacity); } - singleKeyMap = new HashCollection<KeyOne, KeyTwo>(isThreadSafe, HashSet.class); + singleKeyMap = new HashCollection<>(isThreadSafe, HashSet.class); } @Override @@ -101,7 +101,7 @@ public class CompositeKeyHashMap<KeyOne, KeyTwo, Value> implements Map<Pair<KeyO if (key2s == null) { return Collections.emptyMap(); } - Map<KeyTwo, Value> values = new HashMap<KeyTwo, Value>(key2s.size()); + Map<KeyTwo, Value> values = new HashMap<>(key2s.size()); for (KeyTwo key2 : key2s) { values.put(key2, get(key1, key2)); } @@ -113,7 +113,7 @@ public class CompositeKeyHashMap<KeyOne, KeyTwo, Value> implements Map<Pair<KeyO if (key2s == null) { return Collections.emptyList(); } - ArrayList<Value> values = new ArrayList<Value>(key2s.size()); + ArrayList<Value> values = new ArrayList<>(key2s.size()); for (KeyTwo key2 : key2s) { values.add(get(key1, key2)); } @@ -125,7 +125,7 @@ public class CompositeKeyHashMap<KeyOne, KeyTwo, Value> implements Map<Pair<KeyO } public List<Pair<KeyOne, KeyTwo>> getEnumeratedKeys() { - List<Pair<KeyOne, KeyTwo>> toReturn = new ArrayList<Pair<KeyOne, KeyTwo>>(); + List<Pair<KeyOne, KeyTwo>> toReturn = new ArrayList<>(); for (KeyOne firstKey : singleKeyMap.keySet()) { for (KeyTwo secondKey : singleKeyMap.getValues(firstKey)) { toReturn.add(new Pair<KeyOne, KeyTwo>(firstKey, secondKey)); @@ -177,7 +177,7 @@ public class CompositeKeyHashMap<KeyOne, KeyTwo, Value> implements Map<Pair<KeyO if (key2s == null) { return null; } - ArrayList<Value> values = new ArrayList<Value>(key2s.size()); + ArrayList<Value> values = new ArrayList<>(key2s.size()); for (KeyTwo key2 : key2s) { values.add(map.remove(threadLocalKey.get().set(key1, key2))); } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyQuadHashMap.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyQuadHashMap.java index 0f5721fa4d4..330293e5e03 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyQuadHashMap.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyQuadHashMap.java @@ -35,7 +35,7 @@ public class CompositeKeyQuadHashMap<KeyOne, KeyTwo, KeyThree, KeyFour, Value> i }; public CompositeKeyQuadHashMap() { - map = new HashMap<Quad<KeyOne, KeyTwo, KeyThree, KeyFour>, Value>(); + map = new HashMap<>(); } public CompositeKeyQuadHashMap(Map<Quad<KeyOne, KeyTwo, KeyThree, KeyFour>, Value> map) { @@ -43,7 +43,7 @@ public class CompositeKeyQuadHashMap<KeyOne, KeyTwo, KeyThree, KeyFour, Value> i } public CompositeKeyQuadHashMap(int initialCapacity) { - map = new HashMap<Quad<KeyOne, KeyTwo, KeyThree, KeyFour>, Value>(initialCapacity); + map = new HashMap<>(initialCapacity); } @Override diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyTripleHashMap.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyTripleHashMap.java index 6dc1d070d04..882f29d19e9 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyTripleHashMap.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyTripleHashMap.java @@ -35,7 +35,7 @@ public class CompositeKeyTripleHashMap<KeyOne, KeyTwo, KeyThree, Value> implemen }; public CompositeKeyTripleHashMap() { - map = new HashMap<Triplet<KeyOne, KeyTwo, KeyThree>, Value>(); + map = new HashMap<>(); } public CompositeKeyTripleHashMap(Map<Triplet<KeyOne, KeyTwo, KeyThree>, Value> map) { @@ -43,7 +43,7 @@ public class CompositeKeyTripleHashMap<KeyOne, KeyTwo, KeyThree, Value> implemen } public CompositeKeyTripleHashMap(int initialCapacity) { - map = new HashMap<Triplet<KeyOne, KeyTwo, KeyThree>, Value>(initialCapacity); + map = new HashMap<>(initialCapacity); } @Override diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CountingMap.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CountingMap.java index 416e26de3c1..39646838983 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CountingMap.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CountingMap.java @@ -22,11 +22,11 @@ public class CountingMap<K> { private final HashMap<K, MutableInteger> countingMap; public CountingMap(int initialCapacity) { - countingMap = new HashMap<K, MutableInteger>(initialCapacity); + countingMap = new HashMap<>(initialCapacity); } public CountingMap() { - countingMap = new HashMap<K, MutableInteger>(); + countingMap = new HashMap<>(); } public int get(K key) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyCountingMap.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyCountingMap.java index d2855c19220..786ae46e0dc 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyCountingMap.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyCountingMap.java @@ -24,15 +24,15 @@ public class DoubleKeyCountingMap<KeyOne, KeyTwo> { HashMap<KeyOne, HashMap<KeyTwo, MutableInteger>> k1ToHashMap; public DoubleKeyCountingMap() { - k1ToHashMap = new HashMap<KeyOne, HashMap<KeyTwo, MutableInteger>>(); + k1ToHashMap = new HashMap<>(); } public DoubleKeyCountingMap(int initialCapacity) { - k1ToHashMap = new HashMap<KeyOne, HashMap<KeyTwo, MutableInteger>>(initialCapacity); + k1ToHashMap = new HashMap<>(initialCapacity); } public Map<KeyOne, KeyTwo> keySet() { - Map<KeyOne, KeyTwo> keySet = new HashMap<KeyOne, KeyTwo>(); + Map<KeyOne, KeyTwo> keySet = new HashMap<>(); for (KeyOne one : k1ToHashMap.keySet()) { for (KeyTwo two : k1ToHashMap.get(one).keySet()) { keySet.put(one, two); @@ -64,7 +64,7 @@ public class DoubleKeyCountingMap<KeyOne, KeyTwo> { if (o != null) { returnV = o.put(k2, new MutableInteger(v)); } else { - o = new HashMap<KeyTwo, MutableInteger>(20); + o = new HashMap<>(20); returnV = o.put(k2, new MutableInteger(v)); k1ToHashMap.put(k1, o); } @@ -83,7 +83,7 @@ public class DoubleKeyCountingMap<KeyOne, KeyTwo> { o.put(k2, new MutableInteger(v)); } } else { - o = new HashMap<KeyTwo, MutableInteger>(20); + o = new HashMap<>(20); returnV = o.put(k2, new MutableInteger(v)); k1ToHashMap.put(k1, o); } @@ -114,7 +114,7 @@ public class DoubleKeyCountingMap<KeyOne, KeyTwo> { * @return Return value collection */ public Collection<MutableInteger> allValues() { - Collection<MutableInteger> values = new HashSet<MutableInteger>(); + Collection<MutableInteger> values = new HashSet<>(); for (HashMap<KeyTwo, MutableInteger> map : k1ToHashMap.values()) { values.addAll(map.values()); } @@ -157,7 +157,7 @@ public class DoubleKeyCountingMap<KeyOne, KeyTwo> { * Test for DoubleKeyCountingMap */ public static void main(String[] args) { - DoubleKeyCountingMap<String, String> map = new DoubleKeyCountingMap<String, String>(23); + DoubleKeyCountingMap<String, String> map = new DoubleKeyCountingMap<>(23); map.put("aaa", "now", 4); System.out.println("Value should be 4 and is -> " + map.get("aaa", "now")); for (int x = 1; x < 3; x++) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyHashMap.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyHashMap.java index 8b7c089e155..e8ec9c0ae6b 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyHashMap.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyHashMap.java @@ -21,11 +21,11 @@ public class DoubleKeyHashMap<KeyOne, KeyTwo, Value> { private final HashMap<KeyOne, HashMap<KeyTwo, Value>> k1ToHashMap; public DoubleKeyHashMap() { - k1ToHashMap = new HashMap<KeyOne, HashMap<KeyTwo, Value>>(); + k1ToHashMap = new HashMap<>(); } public Map<KeyOne, KeyTwo> keySet() { - Map<KeyOne, KeyTwo> keySet = new HashMap<KeyOne, KeyTwo>(); + Map<KeyOne, KeyTwo> keySet = new HashMap<>(); for (KeyOne one : k1ToHashMap.keySet()) { for (KeyTwo two : k1ToHashMap.get(one).keySet()) { keySet.put(one, two); @@ -57,7 +57,7 @@ public class DoubleKeyHashMap<KeyOne, KeyTwo, Value> { if (o != null) { returnV = o.put(k2, v); } else { - o = new HashMap<KeyTwo, Value>(20); + o = new HashMap<>(20); returnV = o.put(k2, v); k1ToHashMap.put(k1, o); } @@ -92,7 +92,7 @@ public class DoubleKeyHashMap<KeyOne, KeyTwo, Value> { * @return Return value collection */ public Collection<Value> allValues() { - Collection<Value> values = new HashSet<Value>(); + Collection<Value> values = new HashSet<>(); for (HashMap<KeyTwo, Value> map : k1ToHashMap.values()) { values.addAll(map.values()); } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/HashCollection.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/HashCollection.java index 92f81628e2c..a9c699a736d 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/HashCollection.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/HashCollection.java @@ -50,9 +50,9 @@ public class HashCollection<K, V> { public HashCollection(boolean isSynchronized, Class<? extends Collection> collectionType, int initialCapacity, float loadFactor) { if (isSynchronized) { - map = new ConcurrentHashMap<K, Collection<V>>(initialCapacity, loadFactor); + map = new ConcurrentHashMap<>(initialCapacity, loadFactor); } else { - map = new HashMap<K, Collection<V>>(initialCapacity, loadFactor); + map = new HashMap<>(initialCapacity, loadFactor); } this.isSynchronized = isSynchronized; @@ -68,9 +68,9 @@ public class HashCollection<K, V> { */ public HashCollection(boolean isSynchronized, Class<? extends Collection> collectionType, int initialCapacity) { if (isSynchronized) { - map = new ConcurrentHashMap<K, Collection<V>>(initialCapacity); + map = new ConcurrentHashMap<>(initialCapacity); } else { - map = new HashMap<K, Collection<V>>(initialCapacity); + map = new HashMap<>(initialCapacity); } this.isSynchronized = isSynchronized; @@ -86,9 +86,9 @@ public class HashCollection<K, V> { */ public HashCollection(boolean isSynchronized, Class<? extends Collection> collectionType) { if (isSynchronized) { - map = new ConcurrentHashMap<K, Collection<V>>(); + map = new ConcurrentHashMap<>(); } else { - map = new HashMap<K, Collection<V>>(); + map = new HashMap<>(); } this.isSynchronized = isSynchronized; this.collectionType = collectionType; @@ -215,7 +215,7 @@ public class HashCollection<K, V> { * @return Return value collection reference */ public List<V> getValues() { - List<V> values = new ArrayList<V>(); + List<V> values = new ArrayList<>(); for (Collection<V> objectPair : map.values()) { if (objectPair != null) { values.addAll(objectPair); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/HashCollectionPlus.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/HashCollectionPlus.java index 5f033a4576e..344b0738ecd 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/HashCollectionPlus.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/HashCollectionPlus.java @@ -55,9 +55,9 @@ public class HashCollectionPlus<K, V, O> { public HashCollectionPlus(boolean isSynchronized, Class<? extends Collection> collectionType, int initialCapacity, float loadFactor, IPlusProvider<O> plusProvider) { if (isSynchronized) { - map = new ConcurrentHashMap<K, Pair<Collection<V>, O>>(initialCapacity, loadFactor); + map = new ConcurrentHashMap<>(initialCapacity, loadFactor); } else { - map = new HashMap<K, Pair<Collection<V>, O>>(initialCapacity, loadFactor); + map = new HashMap<>(initialCapacity, loadFactor); } this.isSynchronized = isSynchronized; @@ -74,9 +74,9 @@ public class HashCollectionPlus<K, V, O> { */ public HashCollectionPlus(boolean isSynchronized, Class<? extends Collection> collectionType, int initialCapacity, IPlusProvider<O> plusProvider) { if (isSynchronized) { - map = new ConcurrentHashMap<K, Pair<Collection<V>, O>>(initialCapacity); + map = new ConcurrentHashMap<>(initialCapacity); } else { - map = new HashMap<K, Pair<Collection<V>, O>>(initialCapacity); + map = new HashMap<>(initialCapacity); } this.isSynchronized = isSynchronized; @@ -93,9 +93,9 @@ public class HashCollectionPlus<K, V, O> { */ public HashCollectionPlus(boolean isSynchronized, Class<? extends Collection> collectionType, IPlusProvider<O> plusProvider) { if (isSynchronized) { - map = new ConcurrentHashMap<K, Pair<Collection<V>, O>>(); + map = new ConcurrentHashMap<>(); } else { - map = new HashMap<K, Pair<Collection<V>, O>>(); + map = new HashMap<>(); } this.isSynchronized = isSynchronized; @@ -240,7 +240,7 @@ public class HashCollectionPlus<K, V, O> { * @return Return value collection reference */ public List<V> getValues() { - List<V> values = new ArrayList<V>(); + List<V> values = new ArrayList<>(); for (Pair<Collection<V>, O> objectPair : map.values()) { if (objectPair != null) { values.addAll(objectPair.getFirst()); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/LazyObject.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/LazyObject.java index c4f65a1bc86..d7a79480085 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/LazyObject.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/LazyObject.java @@ -18,7 +18,7 @@ import java.util.concurrent.atomic.AtomicReference; */ public abstract class LazyObject<T> { - private final AtomicReference<T> instanceReference = new AtomicReference<T>(); + private final AtomicReference<T> instanceReference = new AtomicReference<>(); private final Object lock = new Object(); private FutureTask<T> lastLoader; diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreWriter.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreWriter.java index 10f493c4503..676d9550a59 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreWriter.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreWriter.java @@ -63,7 +63,7 @@ public class PropertyStoreWriter { } private void internalSave(PropertyStore store, XMLWriter out) { - Map<String, String> attributes = new HashMap<String, String>(2); + Map<String, String> attributes = new HashMap<>(2); String name = store.getId(); attributes.put(TAG_NAME, name == null ? "" : name); out.startTag(TAG_SECTION, attributes); @@ -105,7 +105,7 @@ public class PropertyStoreWriter { } private void processInnerStores(PropertyStore store, XMLWriter out) { - Map<String, String> attributes = new HashMap<String, String>(2); + Map<String, String> attributes = new HashMap<>(2); Map<String, Object> properties = store.getPropertyStores(); for (Entry<String, Object> entry : properties.entrySet()) { String key = entry.getKey(); @@ -130,7 +130,7 @@ public class PropertyStoreWriter { isInTagList = false; valueList = null; tagListKey = null; - innerStoreStack = new Stack<Pair<String, PropertyStore>>(); + innerStoreStack = new Stack<>(); } private boolean isInNestedStore() { @@ -221,7 +221,7 @@ public class PropertyStoreWriter { String value = reader.getAttributeValue(uri, TAG_VALUE); if (isInTagList) { if (valueList == null) { - valueList = new ArrayList<String>(); + valueList = new ArrayList<>(); } valueList.add(value); } else { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResourceRegistry.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResourceRegistry.java index 30a4817ce0d..68e71add908 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResourceRegistry.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResourceRegistry.java @@ -19,7 +19,7 @@ import java.util.concurrent.ConcurrentHashMap; */ public class ResourceRegistry implements IResourceRegistry { - private final ConcurrentHashMap<Long, ResourceToken> registry = new ConcurrentHashMap<Long, ResourceToken>(); + private final ConcurrentHashMap<Long, ResourceToken> registry = new ConcurrentHashMap<>(); @Override public ResourceToken registerResource(Long universalId, ResourceToken token) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResultSetIterable.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResultSetIterable.java index 65a3382a175..f7ccb5d07ca 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResultSetIterable.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResultSetIterable.java @@ -102,7 +102,7 @@ public class ResultSetIterable<T> implements ResultSet<T> { @Override public ResultSet<T> sort(Comparator<T> comparator) { - List<T> list = new LinkedList<T>(); + List<T> list = new LinkedList<>(); for (T item : data) { list.add(item); } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResultSetTransform.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResultSetTransform.java index 7b1f4dce76f..cb60daa5351 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResultSetTransform.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResultSetTransform.java @@ -29,7 +29,7 @@ public class ResultSetTransform<I, F extends Identity<I>, T extends Identity<I>> private final ResultSet<F> result; private final Function<I, F, T> function; - private final Map<I, T> objectMap = new HashMap<I, T>(); + private final Map<I, T> objectMap = new HashMap<>(); private List<T> data; protected ResultSetTransform(ResultSet<F> result, Function<I, F, T> factory) { @@ -110,7 +110,7 @@ public class ResultSetTransform<I, F extends Identity<I>, T extends Identity<I>> @Override public ResultSet<T> sort(Comparator<T> comparator) { - List<T> list = new LinkedList<T>(); + List<T> list = new LinkedList<>(); Iterator<T> iter = iterator(); while (iter.hasNext()) { list.add(iter.next()); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResultSets.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResultSets.java index 274d998ff4f..3b991099593 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResultSets.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ResultSets.java @@ -42,7 +42,7 @@ public final class ResultSets { if (item == null) { toReturn = emptyResultSet(); } else { - toReturn = new ResultSetList<T>(Collections.singletonList(item)); + toReturn = new ResultSetList<>(Collections.singletonList(item)); } return toReturn; } @@ -52,7 +52,7 @@ public final class ResultSets { if (list == null || list.isEmpty()) { toReturn = emptyResultSet(); } else { - toReturn = new ResultSetList<T>(list); + toReturn = new ResultSetList<>(list); } return toReturn; } @@ -62,7 +62,7 @@ public final class ResultSets { if (iterable == null || !iterable.iterator().hasNext()) { toReturn = emptyResultSet(); } else { - toReturn = new ResultSetIterable<T>(iterable); + toReturn = new ResultSetIterable<>(iterable); } return toReturn; } @@ -77,7 +77,7 @@ public final class ResultSets { if (result == null || result.isEmpty()) { toReturn = emptyResultSet(); } else { - toReturn = new ResultSetTransform<K, F, T>(result, factory); + toReturn = new ResultSetTransform<>(result, factory); } return toReturn; } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/TreeParent.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/TreeParent.java index 4db99c01bec..0144028ac76 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/TreeParent.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/TreeParent.java @@ -20,7 +20,7 @@ public class TreeParent extends TreeObject { public TreeParent(String name) { super(name); - children = new ArrayList<TreeObject>(); + children = new ArrayList<>(); } public TreeParent() { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/VariantData.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/VariantData.java index 88a278ad423..a412e1299b9 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/VariantData.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/VariantData.java @@ -33,7 +33,7 @@ public class VariantData implements IVariantData { private final Map<String, byte[]> byteArrayData; public VariantData() { - this.byteArrayData = new HashMap<String, byte[]>(); + this.byteArrayData = new HashMap<>(); this.storageData = new Properties(); this.storageArrays = new Properties(); } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ViewModel.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ViewModel.java index 95ac987962f..0d10a58fa25 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ViewModel.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/ViewModel.java @@ -19,7 +19,7 @@ import java.util.Map; public class ViewModel { private final String viewId; - private final Map<String, Object> model = new LinkedHashMap<String, Object>(); + private final Map<String, Object> model = new LinkedHashMap<>(); public ViewModel(String viewId) { this.viewId = viewId; diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/AXml.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/AXml.java index 808c963dc9f..17850b7ee51 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/AXml.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/AXml.java @@ -78,7 +78,7 @@ public class AXml { } public static String[] getTagDataArray(String xmlStr, String xmlRoot) { - Vector<String> v = new Vector<String>(); + Vector<String> v = new Vector<>(); Matcher m; m = Pattern.compile("<" + xmlRoot + ">(.*?)</" + xmlRoot + ">", Pattern.MULTILINE | Pattern.DOTALL).matcher(xmlStr); @@ -89,7 +89,7 @@ public class AXml { } public static List<Integer> getTagIntegerDataArray(String xmlStr, String xmlRoot, String separator) { - List<Integer> results = new ArrayList<Integer>(); + List<Integer> results = new ArrayList<>(); Matcher m; m = Pattern.compile("<" + xmlRoot + ">(.*?)</" + xmlRoot + ">", Pattern.MULTILINE | Pattern.DOTALL).matcher(xmlStr); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/CmdLineArgs.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/CmdLineArgs.java index 8cba46567df..915dac5f48b 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/CmdLineArgs.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/CmdLineArgs.java @@ -17,7 +17,7 @@ public class CmdLineArgs { private final HashMap<String, String> cmdArgs; public CmdLineArgs(String[] args) { - cmdArgs = new HashMap<String, String>(); + cmdArgs = new HashMap<>(); for (int i = 0; i < args.length; i++) { if (args[i].matches("-\\w.*")) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Collections.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Collections.java index 44b1967dcb8..b92d53567f6 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Collections.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Collections.java @@ -82,7 +82,7 @@ public class Collections { } public static <A> List<Collection<A>> subDivide(List<A> collection, int size) { - List<Collection<A>> result = new ArrayList<Collection<A>>(); + List<Collection<A>> result = new ArrayList<>(); for (int i = 0; i < collection.size() / size + 1; i++) { int maxLength; if (i * size + size > collection.size()) { @@ -90,7 +90,7 @@ public class Collections { } else { maxLength = i * size + size; } - List<A> sublist = new ArrayList<A>(); + List<A> sublist = new ArrayList<>(); for (int j = i * size; j < maxLength; j++) { sublist.add(collection.get(j)); } @@ -100,7 +100,7 @@ public class Collections { } public static <A> Collection<A> unique(Collection<A> collection) { - Set<A> result = new HashSet<A>(); + Set<A> result = new HashSet<>(); result.addAll(collection); return result; } @@ -129,7 +129,7 @@ public class Collections { * @return relative set complement of B in A. */ public static <T> List<T> setComplement(Collection<T> set_A, Collection<T> set_B) { - ArrayList<T> complement = new ArrayList<T>(set_A.size()); + ArrayList<T> complement = new ArrayList<>(set_A.size()); for (T obj : set_A) { if (!set_B.contains(obj)) { complement.add(obj); @@ -142,7 +142,7 @@ public class Collections { * @return The intersection of two sets A and B is the set of elements common to A and B */ public static <T> ArrayList<T> setIntersection(Collection<T> listA, Collection<T> listB) { - ArrayList<T> intersection = new ArrayList<T>(listA.size()); + ArrayList<T> intersection = new ArrayList<>(listA.size()); for (T obj : listA) { if (listB.contains(obj)) { @@ -156,7 +156,7 @@ public class Collections { * @return union of unique elements from the given lists */ public static <T> Set<T> setUnion(Collection<T>... lists) { - Set<T> union = new HashSet<T>(lists[0].size() * 2); + Set<T> union = new HashSet<>(lists[0].size() * 2); for (int x = 0; x < lists.length; x++) { union.addAll(lists[x]); @@ -179,7 +179,7 @@ public class Collections { if (collection instanceof Set) { set = (Set<T>) collection; } else { - set = new LinkedHashSet<T>(); + set = new LinkedHashSet<>(); set.addAll(collection); } return set; @@ -189,7 +189,7 @@ public class Collections { * Convert an aggregate list of objects into a List */ public static <T> List<T> getAggregate(T... objects) { - List<T> objs = new ArrayList<T>(); + List<T> objs = new ArrayList<>(); if (objects != null) { for (T obj : objects) { objs.add(obj); @@ -202,7 +202,7 @@ public class Collections { * Convert objects to HashSet */ public static <T> Set<T> asHashSet(T... objects) { - Set<T> objs = new HashSet<T>(); + Set<T> objs = new HashSet<>(); if (objects != null) { for (T obj : objects) { objs.add(obj); @@ -228,12 +228,12 @@ public class Collections { private static ArrayList<Object> recursiveAggregateTree(List<Object> items, int maxPerList) { if (items.size() > maxPerList) { - ArrayList<Object> aggregateList = new ArrayList<Object>(maxPerList); + ArrayList<Object> aggregateList = new ArrayList<>(maxPerList); ArrayList<Object> childList = null; for (Object item : items) { if (childList == null || childList.size() == maxPerList) { - childList = new ArrayList<Object>(maxPerList); + childList = new ArrayList<>(maxPerList); aggregateList.add(childList); } childList.add(item); @@ -264,7 +264,7 @@ public class Collections { */ @SuppressWarnings("unchecked") private static <A extends Object> List<A> cast(Class<A> clazz, Collection<? extends Object> objects, CastOption castOption) { - List<A> results = new ArrayList<A>(objects.size()); + List<A> results = new ArrayList<>(objects.size()); for (Object object : objects) { if (castOption == CastOption.ALL || castOption == CastOption.MATCHING && clazz.isAssignableFrom(object.getClass())) { results.add((A) object); @@ -278,7 +278,7 @@ public class Collections { */ @SuppressWarnings("unchecked") public static <A> List<A> castAll(Collection<?> objects) { - List<A> results = new ArrayList<A>(objects.size()); + List<A> results = new ArrayList<>(objects.size()); for (Object object : objects) { results.add((A) object); } @@ -351,7 +351,7 @@ public class Collections { } public static <T> Set<T> hashSet(T... items) { - Set<T> result = new HashSet<T>(); + Set<T> result = new HashSet<>(); for (T item : items) { result.add(item); } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Compare.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Compare.java index ff848c1157f..84e849ea12e 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Compare.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Compare.java @@ -76,7 +76,7 @@ public final class Compare { } private static Map<Object, Object> toMap(Dictionary<Object, Object> source) { - Map<Object, Object> sink = new HashMap<Object, Object>(source.size()); + Map<Object, Object> sink = new HashMap<>(source.size()); for (Enumeration<Object> keys = source.keys(); keys.hasMoreElements();) { Object key = keys.nextElement(); sink.put(key, source.get(key)); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/DateIterator.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/DateIterator.java index bde44448383..b9351fbfead 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/DateIterator.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/DateIterator.java @@ -206,7 +206,7 @@ public class DateIterator implements Iterator<Calendar>, Cloneable { } public List<Date> getAllDates() { - List<Date> allDates = new ArrayList<Date>(); + List<Date> allDates = new ArrayList<>(); DateIterator di = (DateIterator) this.clone(); while (di.hasNext()) { Calendar calendar = di.next(); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/DateUtil.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/DateUtil.java index 75805fc79e9..481fc22c7b5 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/DateUtil.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/DateUtil.java @@ -31,7 +31,7 @@ public class DateUtil { public final static String HHMMSS = "hh:mm:ss"; public final static String HHMMSSSS = "hh:mm:ss:SS"; public final static String HHMM = "hh:mm"; - public static final HashMap<String, DateFormat> dateFormats = new HashMap<String, DateFormat>(); + public static final HashMap<String, DateFormat> dateFormats = new HashMap<>(); public static Calendar getCalendar(Date date) { Calendar calendar = Calendar.getInstance(); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/EmailGroup.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/EmailGroup.java index 9d213253ae5..55f7bbaac25 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/EmailGroup.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/EmailGroup.java @@ -19,7 +19,7 @@ import java.util.Collection; public class EmailGroup { private final String groupName; - private final ArrayList<String> emails = new ArrayList<String>(); + private final ArrayList<String> emails = new ArrayList<>(); public EmailGroup(String groupName, Collection<String> emails) { setEmails(emails); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/EnhancedProperties.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/EnhancedProperties.java index 157cef2e431..5820917d588 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/EnhancedProperties.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/EnhancedProperties.java @@ -27,11 +27,11 @@ public class EnhancedProperties implements Serializable { private final HashMap<String, Serializable> map; public EnhancedProperties() { - map = new HashMap<String, Serializable>(); + map = new HashMap<>(); } public EnhancedProperties(int initialCapacity) { - map = new HashMap<String, Serializable>(initialCapacity); + map = new HashMap<>(initialCapacity); } public EnhancedProperties(EnhancedProperties props) { @@ -69,7 +69,7 @@ public class EnhancedProperties implements Serializable { } public Collection<String> differences(EnhancedProperties otherProps) { - LinkedList<String> differences = new LinkedList<String>(); + LinkedList<String> differences = new LinkedList<>(); for (Entry<String, Serializable> entry : map.entrySet()) { Serializable value = otherProps.getProperty(entry.getKey()); if (value == null) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Lib.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Lib.java index 9ad598622cc..185f5159bd3 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Lib.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Lib.java @@ -488,7 +488,7 @@ public final class Lib { public static final Pattern numberListPattern = Pattern.compile("\\d+"); public static List<Integer> stringToIntegerList(String numberList) { - ArrayList<Integer> ints = new ArrayList<Integer>(); + ArrayList<Integer> ints = new ArrayList<>(); Matcher transactionIdMatcher = numberListPattern.matcher(numberList); while (transactionIdMatcher.find()) { ints.add(Integer.parseInt(transactionIdMatcher.group())); @@ -741,7 +741,7 @@ public final class Lib { } public static ArrayList<String> readListFromDir(File directory, FilenameFilter filter, boolean keepExtension) { - ArrayList<String> list = new ArrayList<String>(400); + ArrayList<String> list = new ArrayList<>(400); if (directory == null) { System.out.println("Invalid path: " + directory); @@ -775,7 +775,7 @@ public final class Lib { } public static ArrayList<String> readListFromFile(File file, boolean keepExtension) throws IOException { - ArrayList<String> list = new ArrayList<String>(120); + ArrayList<String> list = new ArrayList<>(120); BufferedReader in = null; try { @@ -812,7 +812,7 @@ public final class Lib { } public static List<File> recursivelyListFilesAndDirectories(ArrayList<File> fileList, File rootPath, Pattern filePathP, boolean includeDirectories) { - LinkedList<File> dirList = new LinkedList<File>(); + LinkedList<File> dirList = new LinkedList<>(); dirList.add(rootPath); Matcher fileNameM = null; @@ -1140,7 +1140,7 @@ public final class Lib { * matches till it finds the matching ')'. */ public static String[] getArguments(String source) { - ArrayList<String> theResults = new ArrayList<String>(); + ArrayList<String> theResults = new ArrayList<>(); try { if (source.charAt(0) != '(') { System.err.println("In getArguments, first char must be \'(\'."); @@ -1225,7 +1225,7 @@ public final class Lib { * () or {}. */ public static String[] getCommaSeparatedItems(String source) { - ArrayList<String> theResults = new ArrayList<String>(); + ArrayList<String> theResults = new ArrayList<>(); int startPos = 0; int parensCount = 0; diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/OseeProperties.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/OseeProperties.java index e12c767c230..ed666972d78 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/OseeProperties.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/OseeProperties.java @@ -58,7 +58,7 @@ public class OseeProperties { String serverAddress = System.getProperty(OSEE_EMBEDDED_DB_SERVER, ""); if (Strings.isValid(serverAddress)) { String[] hostPort = serverAddress.split(":"); - addressAndPort = new Pair<String, Integer>(hostPort[0], Integer.parseInt(hostPort[1])); + addressAndPort = new Pair<>(hostPort[0], Integer.parseInt(hostPort[1])); } return addressAndPort; } @@ -212,7 +212,7 @@ public class OseeProperties { @Override public String toString() { - List<String> list = new ArrayList<String>(); + List<String> list = new ArrayList<>(); toStringHelper(list, getClass()); Collections.sort(list); return org.eclipse.osee.framework.jdk.core.util.Collections.toString("\n", list); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/ReservedCharacters.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/ReservedCharacters.java index 702504cbc4f..a04b35920d6 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/ReservedCharacters.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/ReservedCharacters.java @@ -71,9 +71,9 @@ import java.util.Map.Entry; */ public final class ReservedCharacters { - private static Map<String, Character> reservedCharacters = new HashMap<String, Character>(); - private static Map<Character, String> charsToEncoding = new HashMap<Character, String>(); - private static Map<Character, String> xmlEntitiesMap = new HashMap<Character, String>(); + private static Map<String, Character> reservedCharacters = new HashMap<>(); + private static Map<Character, String> charsToEncoding = new HashMap<>(); + private static Map<Character, String> xmlEntitiesMap = new HashMap<>(); static { try { loadReservedChars(); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Sets.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Sets.java index 775a14b3679..a55ad531db5 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Sets.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Sets.java @@ -33,7 +33,7 @@ public class Sets { throw new IllegalArgumentException("set2 can not be null."); } - Set<A> intersection = new HashSet<A>(); + Set<A> intersection = new HashSet<>(); // Pick the smaller of the two sets as this will be the largest // possible intersection. diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/UrlQuery.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/UrlQuery.java index 195196d1661..03a7885af9b 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/UrlQuery.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/UrlQuery.java @@ -31,7 +31,7 @@ public class UrlQuery { private final Map<String, List<String>> parameters; public UrlQuery() { - this.parameters = new TreeMap<String, List<String>>(); + this.parameters = new TreeMap<>(); } public UrlQuery clear() { @@ -84,7 +84,7 @@ public class UrlQuery { private void innerPut(String name, String value, boolean overrite) { List<String> list = parameters.get(name); if (list == null) { - list = new ArrayList<String>(); + list = new ArrayList<>(); parameters.put(name, list); } if (overrite) { @@ -160,7 +160,7 @@ public class UrlQuery { } public Map<String, String[]> getParameterMap() { - Map<String, String[]> map = new TreeMap<String, String[]>(); + Map<String, String[]> map = new TreeMap<>(); for (Map.Entry<String, List<String>> entry : parameters.entrySet()) { List<String> list = entry.getValue(); String[] values = list != null ? list.toArray(new String[list.size()]) : null; diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/benchmark/Benchmark.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/benchmark/Benchmark.java index 0ac21f38e3e..e98e97c8024 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/benchmark/Benchmark.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/benchmark/Benchmark.java @@ -38,8 +38,8 @@ public class Benchmark { private long longestSample; private long shortestSample; private long totalExceedAmount; - private static final Vector<Benchmark> list = new Vector<Benchmark>(16); - private final HashMap<String, Integer> exceeders = new HashMap<String, Integer>(100); + private static final Vector<Benchmark> list = new Vector<>(16); + private final HashMap<String, Integer> exceeders = new HashMap<>(100); private final String name; public Benchmark(String name) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/CharBackedInputStream.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/CharBackedInputStream.java index 6a79e7f58ac..758b0274fad 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/CharBackedInputStream.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/CharBackedInputStream.java @@ -71,7 +71,7 @@ public class CharBackedInputStream extends InputStream implements Appendable { public CharBackedInputStream(CharBuffer source, String encodingName) throws CharacterCodingException { super(); this.encoder = Charset.forName(encodingName).newEncoder(); - this.backers = new LinkedList<ByteBuffer>(); + this.backers = new LinkedList<>(); if (source != null) { addBackingSource(source); } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/FileWatcher.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/FileWatcher.java index faf8a2df355..34245bf7a1a 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/FileWatcher.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/FileWatcher.java @@ -23,8 +23,8 @@ import java.util.concurrent.TimeUnit; */ public final class FileWatcher { private final Timer timer = new Timer(); - private final Map<File, Long> filesToWatch = new ConcurrentHashMap<File, Long>(128); - private final Set<IFileWatcherListener> listeners = new CopyOnWriteArraySet<IFileWatcherListener>(); + private final Map<File, Long> filesToWatch = new ConcurrentHashMap<>(128); + private final Set<IFileWatcherListener> listeners = new CopyOnWriteArraySet<>(); private final long interval; public FileWatcher(long time, TimeUnit unit) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/FileWatcherTimerTask.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/FileWatcherTimerTask.java index 8f855db10cf..cc9633b4c9f 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/FileWatcherTimerTask.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/FileWatcherTimerTask.java @@ -33,7 +33,7 @@ final class FileWatcherTimerTask extends TimerTask { @Override public void run() { try { - LinkedList<FileChangeEvent> fileChangeEvents = new LinkedList<FileChangeEvent>(); + LinkedList<FileChangeEvent> fileChangeEvents = new LinkedList<>(); for (Map.Entry<File, Long> entry : filesToWatch.entrySet()) { Long latestLastModified = entry.getKey().lastModified(); Long storedLastModified = entry.getValue(); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/JavaFileBuilder.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/JavaFileBuilder.java index bc09c574f29..3e843dbb66b 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/JavaFileBuilder.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/JavaFileBuilder.java @@ -54,11 +54,11 @@ public class JavaFileBuilder { this.className = className; this.classJavaDoc = classJavaDoc; this.extendsClass = extendsClass; - interfaces = new ArrayList<String>(); - fields = new LinkedList<Field>(); - imports = new LinkedList<String>(); - methods = new LinkedList<String>(); - enumFields = new LinkedList<EnumRecord>(); + interfaces = new ArrayList<>(); + fields = new LinkedList<>(); + imports = new LinkedList<>(); + methods = new LinkedList<>(); + enumFields = new LinkedList<>(); } public void addInterface(String interfaceName) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/Streams.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/Streams.java index e4f3ab78e11..e1c4c2fdf98 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/Streams.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/Streams.java @@ -43,7 +43,7 @@ public class Streams { int length = -1; long read = 0; byte[] data = new byte[ORACLE_BUFF_LENGTH]; - LinkedList<byte[]> linkedByteArrays = new LinkedList<byte[]>(); + LinkedList<byte[]> linkedByteArrays = new LinkedList<>(); try { while ((length = stream.read(data)) != -1) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/UriWatcher.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/UriWatcher.java index 6ecbdc8fda9..5924fff9229 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/UriWatcher.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/UriWatcher.java @@ -33,8 +33,8 @@ public class UriWatcher { } private final Timer timer = new Timer(); - private final Map<URI, Long> urisToWatch = new ConcurrentHashMap<URI, Long>(128); - private final Set<UriWatcherListener> listeners = new CopyOnWriteArraySet<UriWatcherListener>(); + private final Map<URI, Long> urisToWatch = new ConcurrentHashMap<>(128); + private final Set<UriWatcherListener> listeners = new CopyOnWriteArraySet<>(); private final long interval; public UriWatcher(long time, TimeUnit unit) { @@ -94,7 +94,7 @@ public class UriWatcher { @Override public void run() { try { - LinkedList<URI> uris = new LinkedList<URI>(); + LinkedList<URI> uris = new LinkedList<>(); for (Map.Entry<URI, Long> entry : urisToWatch.entrySet()) { URLConnection connection = entry.getKey().toURL().openConnection(); try { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/ExcelXmlWriter.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/ExcelXmlWriter.java index 154e536a1e9..9aade31b894 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/ExcelXmlWriter.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/ExcelXmlWriter.java @@ -80,7 +80,7 @@ public final class ExcelXmlWriter extends AbstractSheetWriter { private boolean applyStyle = false; private final Map<Integer, String> mStyleMap; - private final Map<Integer, Integer> mColSpanMap = new HashMap<Integer, Integer>(); + private final Map<Integer, Integer> mColSpanMap = new HashMap<>(); private String[] rowBuffer; private int numColumns = -1; @@ -116,7 +116,7 @@ public final class ExcelXmlWriter extends AbstractSheetWriter { public ExcelXmlWriter(Writer writer, String style, String emptyStringRepresentation, int defaultFontSize) throws IOException { out = new BufferedWriter(writer); - mStyleMap = new HashMap<Integer, String>(); + mStyleMap = new HashMap<>(); this.emptyStringRepresentation = emptyStringRepresentation; out.write(XML_HEADER); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/Jaxp.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/Jaxp.java index c4499da0122..91659fa528b 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/Jaxp.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/Jaxp.java @@ -73,7 +73,7 @@ public class Jaxp { */ public static List<Element> getChildDirects(Element element) { NodeList nl = element.getChildNodes(); - List<Element> elementList = new ArrayList<Element>(nl.getLength()); // this may be oversized + List<Element> elementList = new ArrayList<>(nl.getLength()); // this may be oversized for (int i = 0; i < nl.getLength(); i++) { Node n = nl.item(i); if (n.getNodeType() == Node.ELEMENT_NODE) { @@ -92,7 +92,7 @@ public class Jaxp { * children exist, an empty list is returned. */ public static List<Element> getChildDirects(Element element, String childTagName) { - List<Element> elementList = new ArrayList<Element>(); + List<Element> elementList = new ArrayList<>(); NodeList nl = element.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Node n = nl.item(i); @@ -192,7 +192,7 @@ public class Jaxp { * corresponding to the character data for one of the elements in the collection. */ public static List<String> getElementsCharacterData(Collection<Element> elements) { - List<String> result = new ArrayList<String>(elements.size()); + List<String> result = new ArrayList<>(elements.size()); for (Element e : elements) { result.add(Jaxp.getElementCharacterData(e)); } @@ -204,7 +204,7 @@ public class Jaxp { * @return An ArrayList<String> of the text for all nodes */ public static ArrayList<String> getChildrenTexts(NodeList nodes) { - ArrayList<String> retVal = new ArrayList<String>(nodes.getLength()); + ArrayList<String> retVal = new ArrayList<>(nodes.getLength()); for (int i = 0; i < nodes.getLength(); i++) { Element element = (Element) nodes.item(i); @@ -253,7 +253,7 @@ public class Jaxp { private static void findElementsInternal(List<Element> source, LinkedList<String> path, List<Element> list) { String tag = path.poll(); - LinkedList<String> childPath = new LinkedList<String>(path); + LinkedList<String> childPath = new LinkedList<>(path); for (Element e : source) { List<Element> children = getChildDirects(e, tag); @@ -278,15 +278,15 @@ public class Jaxp { * @return All elements that match the specified path. */ public static List<Element> findElements(Element element, List<String> elementPath, boolean firstIsRoot) { - List<Element> result = new LinkedList<Element>(); - List<Element> source = new ArrayList<Element>(1); + List<Element> result = new LinkedList<>(); + List<Element> source = new ArrayList<>(1); source.add(element); LinkedList<String> path; if (elementPath instanceof LinkedList<?>) { path = (LinkedList<String>) elementPath; } else { - path = new LinkedList<String>(elementPath); + path = new LinkedList<>(elementPath); } // Strip off the first item of elementPath and make sure it matches 'element' @@ -306,7 +306,7 @@ public class Jaxp { } private static List<Element> findElements(Element e, String elementPath, boolean firstIsRoot) { - List<Element> result = new LinkedList<Element>(); + List<Element> result = new LinkedList<>(); String[] paths = elementPath.split("\\|"); for (String path : paths) { @@ -572,7 +572,7 @@ public class Jaxp { } public static final Collection<Node> selectNodesViaXPath(XPath xPath, Node startingNode, String xPathExpression) throws XPathExpressionException { - Collection<Node> data = new ArrayList<Node>(); + Collection<Node> data = new ArrayList<>(); XPathExpression expression = xPath.compile(xPathExpression); Object result = expression.evaluate(startingNode, XPathConstants.NODESET); NodeList nodeList = (NodeList) result; diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/SimpleNamespaceContext.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/SimpleNamespaceContext.java index c1c4d14d56d..c91ae3f2d2a 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/SimpleNamespaceContext.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/SimpleNamespaceContext.java @@ -26,9 +26,9 @@ import javax.xml.namespace.NamespaceContext; public class SimpleNamespaceContext implements NamespaceContext { - private final Map<String, String> urisByPrefix = new HashMap<String, String>(); + private final Map<String, String> urisByPrefix = new HashMap<>(); - private final Map<String, Set<String>> prefixesByURI = new HashMap<String, Set<String>>(); + private final Map<String, Set<String>> prefixesByURI = new HashMap<>(); public SimpleNamespaceContext() { // prepopulate with xml and xmlns prefixes @@ -42,7 +42,7 @@ public class SimpleNamespaceContext implements NamespaceContext { if (prefixesByURI.containsKey(namespaceURI)) { prefixesByURI.get(namespaceURI).add(prefix); } else { - Set<String> set = new HashSet<String>(); + Set<String> set = new HashSet<>(); set.add(prefix); prefixesByURI.put(namespaceURI, set); } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/XmlTransformAsProcess.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/XmlTransformAsProcess.java index 89a96fde846..7682e87f88b 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/XmlTransformAsProcess.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/XmlTransformAsProcess.java @@ -101,7 +101,7 @@ public class XmlTransformAsProcess { } private void launchServer(int port) throws Exception { - List<String> commands = new ArrayList<String>(); + List<String> commands = new ArrayList<>(); try { URL url = getClassLocation(XmlTransformServer.class); String path = new File(url.toURI()).getAbsolutePath(); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/GenericParser.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/GenericParser.java index f70b1c2deb3..8e7cda429cc 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/GenericParser.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/GenericParser.java @@ -42,8 +42,8 @@ public class GenericParser extends AbstractSaxHandler { public GenericParser(String startTag) { this.toFind = startTag; - this.listeners = new HashSet<IXmlNodeListener>(); - this.instructionListeners = new HashSet<IProcessingInstructionsListener>(); + this.listeners = new HashSet<>(); + this.instructionListeners = new HashSet<>(); } public void reset() { @@ -56,7 +56,7 @@ public class GenericParser extends AbstractSaxHandler { public void startElementFound(String uri, String localName, String qName, Attributes attributes) { if (localName.equalsIgnoreCase(toFind)) { startCollecting = true; - collectedTree = new Tree<XmlNode>(new XmlNode(localName, attributes)); + collectedTree = new Tree<>(new XmlNode(localName, attributes)); currentNode = null; } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/XmlNode.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/XmlNode.java index 522aac23486..45cbe34faca 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/XmlNode.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/XmlNode.java @@ -25,7 +25,7 @@ public class XmlNode { public XmlNode(String name, Attributes attributes) { this.name = name; - this.attributes = new HashMap<String, String>(attributes.getLength()); + this.attributes = new HashMap<>(attributes.getLength()); for (int i = 0; i < attributes.getLength(); i++) { this.attributes.put(attributes.getQName(i), attributes.getValue(i)); } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/XmlTreeUtilities.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/XmlTreeUtilities.java index 0ef3310a66a..40af7671935 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/XmlTreeUtilities.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/XmlTreeUtilities.java @@ -33,7 +33,7 @@ public class XmlTreeUtilities { } private Stack<String> processPath(String pattern) { - Stack<String> elementPath = new Stack<String>(); + Stack<String> elementPath = new Stack<>(); String[] path = pattern.split("/"); for (int index = path.length - 1; index >= 0; index--) { String entry = path[index]; @@ -47,7 +47,7 @@ public class XmlTreeUtilities { public List<TreeNode<XmlNode>> getXmlNodesAt(String path, TreeNode<XmlNode> root) { Stack<String> elementPath = processPath(path); - List<TreeNode<XmlNode>> toReturn = new ArrayList<TreeNode<XmlNode>>(); + List<TreeNode<XmlNode>> toReturn = new ArrayList<>(); List<TreeNode<XmlNode>> nodes = root.getChildren(); while (!elementPath.empty()) { String token = elementPath.pop(); @@ -61,7 +61,7 @@ public class XmlTreeUtilities { } private List<TreeNode<XmlNode>> collectNodesMatchingToken(String token, List<TreeNode<XmlNode>> nodes) { - List<TreeNode<XmlNode>> toReturn = new ArrayList<TreeNode<XmlNode>>(); + List<TreeNode<XmlNode>> toReturn = new ArrayList<>(); for (TreeNode<XmlNode> node : nodes) { if (token.equalsIgnoreCase("*")) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/validate/FieldValidator.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/validate/FieldValidator.java index a03a90a04f9..4b1dac70b95 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/validate/FieldValidator.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/validate/FieldValidator.java @@ -22,7 +22,7 @@ public abstract class FieldValidator implements IValidator { FieldValidator(String fieldName) { this.fieldName = fieldName; this.message = ""; - this.paramMap = new HashMap<String, Object>(); + this.paramMap = new HashMap<>(); } @Override diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/validate/Validator.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/validate/Validator.java index cbae198b298..acb48f9bd73 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/validate/Validator.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/validate/Validator.java @@ -61,14 +61,14 @@ public class Validator { public Validator(InputStream fileToRead) throws Exception { this.fileToRead = fileToRead; - this.validatorMap = new HashMap<String, List<IValidator>>(); + this.validatorMap = new HashMap<>(); parseFile(); } private void storeValidator(String fieldName, IValidator validator) { List<IValidator> list = null; if (!validatorMap.containsKey(fieldName)) { - list = new ArrayList<IValidator>(); + list = new ArrayList<>(); validatorMap.put(fieldName, list); } else { list = validatorMap.get(fieldName); diff --git a/plugins/org.eclipse.osee.framework.lifecycle.test/src/org/eclipse/osee/framework/lifecycle/test/mock/AnotherMockLifecycePoint.java b/plugins/org.eclipse.osee.framework.lifecycle.test/src/org/eclipse/osee/framework/lifecycle/test/mock/AnotherMockLifecycePoint.java index a266ef10767..ef84ea9893d 100644 --- a/plugins/org.eclipse.osee.framework.lifecycle.test/src/org/eclipse/osee/framework/lifecycle/test/mock/AnotherMockLifecycePoint.java +++ b/plugins/org.eclipse.osee.framework.lifecycle.test/src/org/eclipse/osee/framework/lifecycle/test/mock/AnotherMockLifecycePoint.java @@ -20,7 +20,7 @@ import org.eclipse.osee.framework.lifecycle.AbstractLifecycleVisitor; */ public class AnotherMockLifecycePoint extends AbstractLifecycleVisitor<NonRunHandler> { - public static final Type<NonRunHandler> TYPE = new Type<NonRunHandler>(); + public static final Type<NonRunHandler> TYPE = new Type<>(); @Override public Type<NonRunHandler> getAssociatedType() { diff --git a/plugins/org.eclipse.osee.framework.lifecycle.test/src/org/eclipse/osee/framework/lifecycle/test/mock/MockLifecycePoint.java b/plugins/org.eclipse.osee.framework.lifecycle.test/src/org/eclipse/osee/framework/lifecycle/test/mock/MockLifecycePoint.java index 540547cfd7c..e66d3e3647d 100644 --- a/plugins/org.eclipse.osee.framework.lifecycle.test/src/org/eclipse/osee/framework/lifecycle/test/mock/MockLifecycePoint.java +++ b/plugins/org.eclipse.osee.framework.lifecycle.test/src/org/eclipse/osee/framework/lifecycle/test/mock/MockLifecycePoint.java @@ -20,7 +20,7 @@ import org.eclipse.osee.framework.lifecycle.AbstractLifecycleVisitor; */ public class MockLifecycePoint extends AbstractLifecycleVisitor<MockHandler> { - public static final Type<MockHandler> TYPE = new Type<MockHandler>(); + public static final Type<MockHandler> TYPE = new Type<>(); private final String a; private final String b; diff --git a/plugins/org.eclipse.osee.framework.lifecycle.test/src/org/eclipse/osee/framework/lifecycle/test/mock/StrictMockLifecycePoint.java b/plugins/org.eclipse.osee.framework.lifecycle.test/src/org/eclipse/osee/framework/lifecycle/test/mock/StrictMockLifecycePoint.java index e3a6333147f..8320cc61f7b 100644 --- a/plugins/org.eclipse.osee.framework.lifecycle.test/src/org/eclipse/osee/framework/lifecycle/test/mock/StrictMockLifecycePoint.java +++ b/plugins/org.eclipse.osee.framework.lifecycle.test/src/org/eclipse/osee/framework/lifecycle/test/mock/StrictMockLifecycePoint.java @@ -18,7 +18,7 @@ import org.eclipse.osee.framework.lifecycle.AbstractLifecyclePoint; */ public class StrictMockLifecycePoint extends AbstractLifecyclePoint<MockHandler> { - public static final Type<MockHandler> TYPE = new Type<MockHandler>(); + public static final Type<MockHandler> TYPE = new Type<>(); private final String a; private final String b; diff --git a/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/ConsoleLogger.java b/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/ConsoleLogger.java index 61ae4d15eec..37e71047c00 100644 --- a/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/ConsoleLogger.java +++ b/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/ConsoleLogger.java @@ -23,7 +23,7 @@ public class ConsoleLogger implements ILoggerListener { public Set<Logger> initializedLoggers; public ConsoleLogger() { - initializedLoggers = new HashSet<Logger>(64); + initializedLoggers = new HashSet<>(64); } @Override diff --git a/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/OseeLogger.java b/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/OseeLogger.java index b9b88690393..7f9d3b6afdc 100644 --- a/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/OseeLogger.java +++ b/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/OseeLogger.java @@ -28,8 +28,8 @@ public class OseeLogger { private final Level defaultLevel; public OseeLogger() { - levelMap = new ConcurrentHashMap<String, Level>(); - listeners = new CopyOnWriteArrayList<ILoggerListener>(); + levelMap = new ConcurrentHashMap<>(); + listeners = new CopyOnWriteArrayList<>(); listeners.add(new ConsoleLogger()); defaultLevel = OseeProperties.getOseeLogDefault(); diff --git a/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/SevereLoggingMonitor.java b/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/SevereLoggingMonitor.java index 197c484527d..24636a65095 100644 --- a/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/SevereLoggingMonitor.java +++ b/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/SevereLoggingMonitor.java @@ -18,7 +18,7 @@ import java.util.logging.Level; public class SevereLoggingMonitor implements ILoggerListener { private boolean ignore; - private final List<IHealthStatus> status = new CopyOnWriteArrayList<IHealthStatus>(); + private final List<IHealthStatus> status = new CopyOnWriteArrayList<>(); @Override public void log(String loggerName, Level level, String message, Throwable th) { @@ -40,7 +40,7 @@ public class SevereLoggingMonitor implements ILoggerListener { } public List<IHealthStatus> getSevereLogs() { - List<IHealthStatus> severeStatus = new ArrayList<IHealthStatus>(status.size()); + List<IHealthStatus> severeStatus = new ArrayList<>(status.size()); //Remove all none severe levels for (IHealthStatus healthStatus : status) { @@ -52,7 +52,7 @@ public class SevereLoggingMonitor implements ILoggerListener { } public List<IHealthStatus> getLogsAtLevel(Level level) { - List<IHealthStatus> warningStatus = new ArrayList<IHealthStatus>(status.size()); + List<IHealthStatus> warningStatus = new ArrayList<>(status.size()); //Remove all none severe levels for (IHealthStatus healthStatus : status) { diff --git a/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/StatusManager.java b/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/StatusManager.java index e0e7252a5a9..1cc5782d3b7 100644 --- a/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/StatusManager.java +++ b/plugins/org.eclipse.osee.framework.logging/src/org/eclipse/osee/framework/logging/StatusManager.java @@ -28,8 +28,8 @@ class StatusManager { public StatusManager() { this.services = Collections.synchronizedMap(new TreeMap<String, IHealthStatus>()); - this.listeners = new CopyOnWriteArrayList<IStatusListener>(); - this.filters = new ConcurrentHashMap<IStatusListener, IStatusListenerFilter>(); + this.listeners = new CopyOnWriteArrayList<>(); + this.filters = new ConcurrentHashMap<>(); } public void report(IHealthStatus status) { diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/AdminServlet.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/AdminServlet.java index a1f3a1f26e8..aa942c09e17 100644 --- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/AdminServlet.java +++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/AdminServlet.java @@ -101,7 +101,7 @@ public class AdminServlet extends UnsecuredOseeHttpServlet { } private static Map<String, CommandProvider> getCommands(BundleContext context) { - Map<String, CommandProvider> data = new HashMap<String, CommandProvider>(); + Map<String, CommandProvider> data = new HashMap<>(); ServiceTracker<CommandProvider, CommandProvider> tracker = new ServiceTracker<CommandProvider, CommandProvider>(context, CommandProvider.class, null); tracker.open(true); diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/DataServlet.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/DataServlet.java index ce235de0d55..9d9abd82c95 100644 --- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/DataServlet.java +++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/DataServlet.java @@ -77,7 +77,7 @@ public class DataServlet extends UnsecuredOseeHttpServlet { private final List<String> contexts; public UrlParser() { - this.contexts = new ArrayList<String>(); + this.contexts = new ArrayList<>(); } public void parse(String urlPath) { diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/internal/ServletRegistrationHandler.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/internal/ServletRegistrationHandler.java index f17cd705659..f3ba1809c31 100644 --- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/internal/ServletRegistrationHandler.java +++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/internal/ServletRegistrationHandler.java @@ -46,7 +46,7 @@ public class ServletRegistrationHandler { private JdbcService jdbcService; private ActivityLog activityLog; - private final Set<String> contexts = new HashSet<String>(); + private final Set<String> contexts = new HashSet<>(); public void setSessionManager(ISessionManager sessionManager) { this.sessionManager = sessionManager; diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAccessControlEvent1.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAccessControlEvent1.java index 6884840f2e2..801dfbcd29a 100644 --- a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAccessControlEvent1.java +++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAccessControlEvent1.java @@ -81,7 +81,7 @@ public class RemoteAccessControlEvent1 extends RemoteEvent { */ public List<RemoteBasicGuidArtifact1> getArtifacts() { if (artifacts == null) { - artifacts = new ArrayList<RemoteBasicGuidArtifact1>(); + artifacts = new ArrayList<>(); } return this.artifacts; } diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAttributeChange1.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAttributeChange1.java index 033e8600bb4..782d86026f3 100644 --- a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAttributeChange1.java +++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteAttributeChange1.java @@ -126,7 +126,7 @@ public class RemoteAttributeChange1 extends RemoteEvent { */ public List<String> getData() { if (data == null) { - data = new ArrayList<String>(); + data = new ArrayList<>(); } return this.data; } diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBasicGuidArtifact1.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBasicGuidArtifact1.java index ba0be723cd6..2502d2d836f 100644 --- a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBasicGuidArtifact1.java +++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBasicGuidArtifact1.java @@ -144,7 +144,7 @@ public class RemoteBasicGuidArtifact1 extends RemoteEvent { */ public List<RemoteAttributeChange1> getAttributes() { if (attributes == null) { - attributes = new ArrayList<RemoteAttributeChange1>(); + attributes = new ArrayList<>(); } return this.attributes; } diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBroadcastEvent1.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBroadcastEvent1.java index fcb5ec9a06e..62ec803a710 100644 --- a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBroadcastEvent1.java +++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteBroadcastEvent1.java @@ -84,7 +84,7 @@ public class RemoteBroadcastEvent1 extends RemoteEvent { */ public List<String> getUserIds() { if (userIds == null) { - userIds = new ArrayList<String>(); + userIds = new ArrayList<>(); } return this.userIds; } diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemotePersistEvent1.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemotePersistEvent1.java index be03ce287ed..ab131936d84 100644 --- a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemotePersistEvent1.java +++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemotePersistEvent1.java @@ -109,7 +109,7 @@ public class RemotePersistEvent1 extends RemoteEvent { */ public List<RemoteBasicGuidArtifact1> getArtifacts() { if (artifacts == null) { - artifacts = new ArrayList<RemoteBasicGuidArtifact1>(); + artifacts = new ArrayList<>(); } return this.artifacts; } @@ -131,7 +131,7 @@ public class RemotePersistEvent1 extends RemoteEvent { */ public List<RemoteBasicGuidRelation1> getRelations() { if (relations == null) { - relations = new ArrayList<RemoteBasicGuidRelation1>(); + relations = new ArrayList<>(); } return this.relations; } @@ -153,7 +153,7 @@ public class RemotePersistEvent1 extends RemoteEvent { */ public List<RemoteBasicGuidRelationReorder1> getRelationReorders() { if (relationReorders == null) { - relationReorders = new ArrayList<RemoteBasicGuidRelationReorder1>(); + relationReorders = new ArrayList<>(); } return this.relationReorders; } diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteTransactionChange1.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteTransactionChange1.java index 7962cdb14cd..5388766017a 100644 --- a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteTransactionChange1.java +++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteTransactionChange1.java @@ -94,7 +94,7 @@ public class RemoteTransactionChange1 extends RemoteEvent { */ public List<RemoteBasicGuidArtifact1> getArtifacts() { if (artifacts == null) { - artifacts = new ArrayList<RemoteBasicGuidArtifact1>(); + artifacts = new ArrayList<>(); } return this.artifacts; } diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteTransactionEvent1.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteTransactionEvent1.java index e9430bc779d..b28d2a34dbe 100644 --- a/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteTransactionEvent1.java +++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src-gen/org/eclipse/osee/framework/messaging/event/res/msgs/RemoteTransactionEvent1.java @@ -81,7 +81,7 @@ public class RemoteTransactionEvent1 extends RemoteEvent { */ public List<RemoteTransactionChange1> getTransactions() { if (transactions == null) { - transactions = new ArrayList<RemoteTransactionChange1>(); + transactions = new ArrayList<>(); } return this.transactions; } diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java index c5b8a2adb05..f6a68675718 100644 --- a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java +++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java @@ -136,11 +136,11 @@ public class OseeCoreModelEventServiceImpl implements OseeMessagingStatusCallbac } private <T extends RemoteEvent> void subscribe(ResMessages messageId, Class<T> clazz, boolean isVerbose, IFrameworkEventListener frameworkEventListener) { - OseeMessagingListener listener = new FrameworkRelayMessagingListener<T>(clazz, frameworkEventListener, isVerbose); + OseeMessagingListener listener = new FrameworkRelayMessagingListener<>(clazz, frameworkEventListener, isVerbose); getConnectionNode().subscribe(messageId, listener, this); HashCollection<ResMessages, OseeMessagingListener> listeners = subscriptions.get(frameworkEventListener); if (listeners == null) { - listeners = new HashCollection<ResMessages, OseeMessagingListener>(true, HashSet.class); + listeners = new HashCollection<>(true, HashSet.class); subscriptions.put(frameworkEventListener, listeners); } listeners.put(messageId, listener); diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceProxy.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceProxy.java index ca36e52aa1b..39ef8a1933d 100644 --- a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceProxy.java +++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceProxy.java @@ -37,7 +37,7 @@ public class OseeCoreModelEventServiceProxy implements IOseeCoreModelEventServic } public void start() { - Map<ResMessages, Boolean> eventMessageConfig = new HashMap<ResMessages, Boolean>(); + Map<ResMessages, Boolean> eventMessageConfig = new HashMap<>(); eventMessageConfig.put(ResMessages.RemoteAccessControlEvent1, Boolean.TRUE); eventMessageConfig.put(ResMessages.RemoteBranchEvent1, Boolean.TRUE); diff --git a/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/data/TestMessageListener.java b/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/data/TestMessageListener.java index d97e41b7ec1..717a105f4d0 100644 --- a/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/data/TestMessageListener.java +++ b/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/data/TestMessageListener.java @@ -22,7 +22,7 @@ import org.eclipse.osee.framework.messaging.ReplyConnection; public class TestMessageListener extends OseeMessagingListener { private final int expectedCount; - private final List<Data> data = new ArrayList<Data>(); + private final List<Data> data = new ArrayList<>(); private volatile int currentCount; private volatile boolean wasUpdateReceived; diff --git a/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/integration/TestEmbeddedBrokerSendReceive.java b/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/integration/TestEmbeddedBrokerSendReceive.java index 165c527207b..6c818302930 100644 --- a/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/integration/TestEmbeddedBrokerSendReceive.java +++ b/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/integration/TestEmbeddedBrokerSendReceive.java @@ -79,7 +79,7 @@ public class TestEmbeddedBrokerSendReceive { @Ignore("Intermittent failures") @Test public void testMultipleConsumers() throws Exception { - List<TestMessageListener> listeners = new ArrayList<TestMessageListener>(); + List<TestMessageListener> listeners = new ArrayList<>(); for (int index = 0; index < TOTAL_SUBSCRIBERS; index++) { TestMessageListener messageListener = new TestMessageListener(1); listeners.add(messageListener); @@ -121,7 +121,7 @@ public class TestEmbeddedBrokerSendReceive { @Ignore("Intermittent failures") @Test public void testMultipleConsumersWithSelector() throws Exception { - List<TestMessageListener> listeners = new ArrayList<TestMessageListener>(); + List<TestMessageListener> listeners = new ArrayList<>(); for (int index = 0; index < TOTAL_SUBSCRIBERS; index++) { TestMessageListener messageListener = new TestMessageListener(1); listeners.add(messageListener); diff --git a/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/integration/experimental/BaseBrokerTesting.java b/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/integration/experimental/BaseBrokerTesting.java index 784e435c836..0f447efbd08 100644 --- a/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/integration/experimental/BaseBrokerTesting.java +++ b/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/integration/experimental/BaseBrokerTesting.java @@ -41,7 +41,7 @@ public class BaseBrokerTesting { @org.junit.Before public void beforeTest() { messageServiceProviderImpl = new MessageServiceProxy(); - brokers = new ConcurrentHashMap<String, BrokerService>(); + brokers = new ConcurrentHashMap<>(); try { messageServiceProviderImpl.start(); } catch (Exception ex) { diff --git a/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/internal/MessageServiceController.java b/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/internal/MessageServiceController.java index 690f6bd6ef7..226c32b9181 100644 --- a/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/internal/MessageServiceController.java +++ b/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/internal/MessageServiceController.java @@ -39,7 +39,7 @@ public class MessageServiceController implements HasMessageService { } public void start() throws Exception { - brokers = new ConcurrentHashMap<String, BrokerService>(); + brokers = new ConcurrentHashMap<>(); messageServiceProviderImpl = new MessageServiceProxy(); messageServiceProviderImpl.start(); diff --git a/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealth.java b/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealth.java index c6cff5b57b6..8c75233dca0 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealth.java +++ b/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealth.java @@ -179,7 +179,7 @@ public class ServiceHealth { */ public List<ServiceDescriptionPair> getServiceDescription() { if (serviceDescription == null) { - serviceDescription = new ArrayList<ServiceDescriptionPair>(); + serviceDescription = new ArrayList<>(); } return this.serviceDescription; } diff --git a/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealthRequest.java b/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealthRequest.java index 8ae8388a895..64e78bf97a9 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealthRequest.java +++ b/plugins/org.eclipse.osee.framework.messaging/src-gen/org/eclipse/osee/framework/messaging/services/messages/ServiceHealthRequest.java @@ -98,7 +98,7 @@ public class ServiceHealthRequest { */ public List<ServiceDescriptionPair> getServiceDescription() { if (serviceDescription == null) { - serviceDescription = new ArrayList<ServiceDescriptionPair>(); + serviceDescription = new ArrayList<>(); } return this.serviceDescription; } diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/ConsoleDebugSupport.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/ConsoleDebugSupport.java index a442ecaf63d..93d7ea2f919 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/ConsoleDebugSupport.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/ConsoleDebugSupport.java @@ -28,8 +28,8 @@ public class ConsoleDebugSupport { private Map<String, Stats> receives; public ConsoleDebugSupport(){ - sends = new ConcurrentHashMap<MessageID, Stats>(); - receives = new ConcurrentHashMap<String, Stats>(); + sends = new ConcurrentHashMap<>(); + receives = new ConcurrentHashMap<>(); } protected void setPrintSends(boolean printSends){ diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/FailoverConnectionNode.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/FailoverConnectionNode.java index c00b8bd9b03..72ef075eb73 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/FailoverConnectionNode.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/FailoverConnectionNode.java @@ -49,8 +49,8 @@ public class FailoverConnectionNode implements ConnectionNode, Runnable { this.connectionNode = connectionNode; this.exceptionListener = exceptionListener; exceptionListener.setListener(this); - savedSubscribes = new CopyOnWriteArrayList<SavedSubscribe>(); - connectionListeners = new CopyOnWriteArrayList<ConnectionListener>(); + savedSubscribes = new CopyOnWriteArrayList<>(); + connectionListeners = new CopyOnWriteArrayList<>(); this.scheduledExecutor = scheduledExecutor; itemToCancel = this.scheduledExecutor.scheduleAtFixedRate(this, 60, 15, TimeUnit.SECONDS); } diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java index 9ad9cf89cf0..243a8028fd0 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java @@ -36,7 +36,7 @@ public class MessageServiceImpl implements MessageService { private final ConnectionNodeFactory factory; public MessageServiceImpl(ConnectionNodeFactory factory) { - this.connectionNodes = new ConcurrentHashMap<NodeInfo, ConnectionNode>(); + this.connectionNodes = new ConcurrentHashMap<>(); this.factory = factory; defaultNode = new NodeInfo("osee-jms", getDefaultURI()); } diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqMessageListenerWrapper.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqMessageListenerWrapper.java index 88ef7c8bd24..649dc7dfdcf 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqMessageListenerWrapper.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ActiveMqMessageListenerWrapper.java @@ -105,7 +105,7 @@ class ActiveMqMessageListenerWrapper implements MessageListener { @Override public void run() { try { - Map<String, Object> headers = new HashMap<String, Object>(); + Map<String, Object> headers = new HashMap<>(); Enumeration<?> propertyNames = message.getPropertyNames(); while( propertyNames.hasMoreElements() ) { diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java index bea83d51e5b..fc60894b10e 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMq.java @@ -73,10 +73,10 @@ class ConnectionNodeActiveMq implements ConnectionNodeFailoverSupport, MessageLi this.nodeInfo = nodeInfo; this.exceptionListener = exceptionListener; activeMqUtil = new ActiveMqUtil(); - topicCache = new ConcurrentHashMap<String, Topic>(); - messageProducerCache = new ConcurrentHashMap<Topic, MessageProducer>(); - regularListeners = new CompositeKeyHashMap<String, MessageConsumer, OseeMessagingListener>(64, true); - replyListeners = new ConcurrentHashMap<String, OseeMessagingListener>(); + topicCache = new ConcurrentHashMap<>(); + messageProducerCache = new ConcurrentHashMap<>(); + regularListeners = new CompositeKeyHashMap<>(64, true); + replyListeners = new ConcurrentHashMap<>(); } @Override @@ -283,7 +283,7 @@ class ConnectionNodeActiveMq implements ConnectionNodeFailoverSupport, MessageLi @Override public void unsubscribe(MessageID messageId, OseeMessagingListener listener, OseeMessagingStatusCallback statusCallback) { Map<MessageConsumer, OseeMessagingListener> listeners = regularListeners.getKeyedValues(messageId.getId()); - List<MessageConsumer> consumersToRemove = new ArrayList<MessageConsumer>(); + List<MessageConsumer> consumersToRemove = new ArrayList<>(); if (listeners != null) { try { for (Entry<MessageConsumer, OseeMessagingListener> entry : listeners.entrySet()) { diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMqNoWait.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMqNoWait.java index 5797d3e10a8..0a28c543b77 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMqNoWait.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/activemq/ConnectionNodeActiveMqNoWait.java @@ -82,10 +82,10 @@ class ConnectionNodeActiveMqNoWait implements ConnectionNodeFailoverSupport, Mes this.nodeInfo = nodeInfo; this.exceptionListener = exceptionListener; activeMqUtil = new ActiveMqUtil(); - topicCache = new ConcurrentHashMap<String, Topic>(); - messageProducerCache = new ConcurrentHashMap<Topic, MessageProducer>(); - regularListeners = new CompositeKeyHashMap<String, MessageConsumer, OseeMessagingListener>(64, true); - replyListeners = new ConcurrentHashMap<String, OseeMessagingListener>(); + topicCache = new ConcurrentHashMap<>(); + messageProducerCache = new ConcurrentHashMap<>(); + regularListeners = new CompositeKeyHashMap<>(64, true); + replyListeners = new ConcurrentHashMap<>(); } @Override @@ -360,7 +360,7 @@ class ConnectionNodeActiveMqNoWait implements ConnectionNodeFailoverSupport, Mes @Override public void run() { Map<MessageConsumer, OseeMessagingListener> listeners = regularListeners.getKeyedValues(messageId.getId()); - List<MessageConsumer> consumersToRemove = new ArrayList<MessageConsumer>(); + List<MessageConsumer> consumersToRemove = new ArrayList<>(); if (listeners != null) { try { for (Entry<MessageConsumer, OseeMessagingListener> entry : listeners.entrySet()) { diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/ConcurrentListMap.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/ConcurrentListMap.java index b23bb87c40f..5aa11640280 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/ConcurrentListMap.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/ConcurrentListMap.java @@ -22,16 +22,16 @@ import java.util.concurrent.CopyOnWriteArrayList; public class ConcurrentListMap<MAP_TYPE, LIST_TYPE> { private final Map<MAP_TYPE, List<LIST_TYPE>> data; - private final List<LIST_TYPE> EMPTY_LIST = new ArrayList<LIST_TYPE>(); + private final List<LIST_TYPE> EMPTY_LIST = new ArrayList<>(); public ConcurrentListMap() { - data = new HashMap<MAP_TYPE, List<LIST_TYPE>>(); + data = new HashMap<>(); } public synchronized boolean add(MAP_TYPE key, LIST_TYPE value) { List<LIST_TYPE> values = data.get(key); if (values == null) { - values = new CopyOnWriteArrayList<LIST_TYPE>(); + values = new CopyOnWriteArrayList<>(); data.put(key, values); } if (values.contains(value)) { diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointReceiveCollection.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointReceiveCollection.java index d61c763ddbf..77b26d9897d 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointReceiveCollection.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointReceiveCollection.java @@ -23,7 +23,7 @@ public class EndpointReceiveCollection { private final List<EndpointReceive> receivers; public EndpointReceiveCollection() { - receivers = new CopyOnWriteArrayList<EndpointReceive>(); + receivers = new CopyOnWriteArrayList<>(); } public synchronized boolean add(EndpointReceive endpoint) { diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointSendCollection.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointSendCollection.java index 6366dbe9e47..ff705c62f8d 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointSendCollection.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/EndpointSendCollection.java @@ -31,9 +31,9 @@ public class EndpointSendCollection { private final Map<MessageId, ProtocolId> messageIdMapping; public EndpointSendCollection() { - endpoints = new CopyOnWriteArrayList<EndpointSend>(); - protocolMapping = new ConcurrentHashMap<ProtocolId, EndpointSend>(); - messageIdMapping = new ConcurrentHashMap<MessageId, ProtocolId>(); + endpoints = new CopyOnWriteArrayList<>(); + protocolMapping = new ConcurrentHashMap<>(); + messageIdMapping = new ConcurrentHashMap<>(); } public synchronized boolean add(EndpointSend endpoint) { @@ -46,7 +46,7 @@ public class EndpointSendCollection { public synchronized boolean remove(EndpointSend endpoint) { if (endpoints.remove(endpoint)) { - List<ProtocolId> protocolIdsToRemove = new ArrayList<ProtocolId>(); + List<ProtocolId> protocolIdsToRemove = new ArrayList<>(); Iterator<ProtocolId> it = protocolMapping.keySet().iterator(); while (it.hasNext()) { ProtocolId id = it.next(); diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/MessageListenerCollection.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/MessageListenerCollection.java index fcd5d447a4f..9fc98f6c512 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/MessageListenerCollection.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/old/MessageListenerCollection.java @@ -24,8 +24,8 @@ public class MessageListenerCollection { private final ConcurrentListMap<MessageId, SendListener> sendListeners; public MessageListenerCollection() { - receiveListeners = new ConcurrentListMap<MessageId, ReceiveListener>(); - sendListeners = new ConcurrentListMap<MessageId, SendListener>(); + receiveListeners = new ConcurrentListMap<>(); + sendListeners = new ConcurrentListMap<>(); } public boolean addReceiveListener(MessageId messageId, ReceiveListener receiveListener) { diff --git a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/PluginUtil.java b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/PluginUtil.java index 0424c211236..cb6ad0c4d4e 100644 --- a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/PluginUtil.java +++ b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/PluginUtil.java @@ -78,7 +78,7 @@ public class PluginUtil { public List<URL> getInputStreams(String directory, String pattern, boolean recurse) { Bundle bundle = Platform.getBundle(pluginId); Enumeration<?> enumeration = bundle.findEntries(directory, pattern, recurse); - List<URL> inputs = new ArrayList<URL>(); + List<URL> inputs = new ArrayList<>(); while (enumeration.hasMoreElements()) { inputs.add(((URL) enumeration.nextElement())); } diff --git a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/BundleResourceFinder.java b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/BundleResourceFinder.java index cab5a412daa..35419667867 100644 --- a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/BundleResourceFinder.java +++ b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/BundleResourceFinder.java @@ -23,7 +23,7 @@ public class BundleResourceFinder extends ResourceFinder { private final ArrayList<Bundle> bundles; public BundleResourceFinder(String[] bundlenames) { - bundles = new ArrayList<Bundle>(); + bundles = new ArrayList<>(); for (int i = 0; i < bundlenames.length; i++) { Bundle bundle = Platform.getBundle(bundlenames[i]); if (bundle != null) { diff --git a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/ClassServer.java b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/ClassServer.java index bdf3cf5541d..6a1ba269553 100644 --- a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/ClassServer.java +++ b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/ClassServer.java @@ -60,7 +60,7 @@ public class ClassServer extends Thread { hostName = new URL("http://" + address.getHostAddress() + ":" + server.getLocalPort() + "/"); } this.setName("OSEE ClassServer"); - this.resourceFinders = new ArrayList<ResourceFinder>(); + this.resourceFinders = new ArrayList<>(); } public void addResourceFinder(ResourceFinder finder) { diff --git a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/ClassServerPermissions.java b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/ClassServerPermissions.java index 5fa59ac02a5..beac93474bf 100644 --- a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/ClassServerPermissions.java +++ b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/ClassServerPermissions.java @@ -24,7 +24,7 @@ public class ClassServerPermissions extends PermissionCollection { private final ArrayList<Permission> list; public ClassServerPermissions() { - list = new ArrayList<Permission>(); + list = new ArrayList<>(); } @Override diff --git a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/PathResourceFinder.java b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/PathResourceFinder.java index 8c3c5b05ad1..55aeb9910a6 100644 --- a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/PathResourceFinder.java +++ b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/PathResourceFinder.java @@ -32,9 +32,9 @@ import org.eclipse.osee.framework.plugin.core.internal.PluginCoreActivator; public class PathResourceFinder extends ResourceFinder { - private final HashSet<JarFile> jars = new HashSet<JarFile>(128); - private final HashSet<String> dirs = new HashSet<String>(128); - private final HashMap<String, JarFile[]> map = new HashMap<String, JarFile[]>(128); + private final HashSet<JarFile> jars = new HashSet<>(128); + private final HashSet<String> dirs = new HashSet<>(128); + private final HashMap<String, JarFile[]> map = new HashMap<>(128); private final boolean trees; private final ClassServerPermissions perm; private static final int NUMBER_OF_FILE_READ_ATTEMPTS = 20; @@ -145,7 +145,7 @@ public class PathResourceFinder extends ResourceFinder { for (int j = 0; j < files.length; j++) { String jar = files[j]; if (jar.endsWith(".jar") || jar.endsWith(".zip")) { - ArrayList<JarFile> jfs = new ArrayList<JarFile>(10); + ArrayList<JarFile> jfs = new ArrayList<>(10); try { addJar(jar, jfs, base); map.put(jar.substring(0, jar.length() - 4), jfs.toArray(new JarFile[jfs.size()])); diff --git a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/task/NativeCommand.java b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/task/NativeCommand.java index 9a4ce7865d1..254cce155b3 100644 --- a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/task/NativeCommand.java +++ b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/task/NativeCommand.java @@ -41,7 +41,7 @@ public class NativeCommand extends Command { BufferedReader inError = new BufferedReader(new InputStreamReader(process.getErrorStream())); BufferedReader inOutput = new BufferedReader(new InputStreamReader(process.getInputStream())); - ArrayList<String> lines = new ArrayList<String>(); + ArrayList<String> lines = new ArrayList<>(); String line = null; while ((line = inOutput.readLine()) != null) { lines.add(line); diff --git a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/task/TaskServerThread.java b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/task/TaskServerThread.java index 1fe69d013ee..47e19933262 100644 --- a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/task/TaskServerThread.java +++ b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/server/task/TaskServerThread.java @@ -40,7 +40,7 @@ public class TaskServerThread implements Runnable { public TaskServerThread(int magicNumber, Socket socket) { this.socket = socket; this.magicNumber = magicNumber; - this.commands = new HashMap<Integer, Command>(); + this.commands = new HashMap<>(); running = true; } diff --git a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/util/ExtensionDefinedObjects.java b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/util/ExtensionDefinedObjects.java index b8a2de3ecfc..8cc292532b8 100644 --- a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/util/ExtensionDefinedObjects.java +++ b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/util/ExtensionDefinedObjects.java @@ -87,8 +87,8 @@ public class ExtensionDefinedObjects<T> { @SuppressWarnings("unchecked") private void initialize(String extensionPointId, String elementName, String classNameAttribute) { - loadedObjects = new ArrayList<T>(); - objectsByID = new HashMap<String, T>(); + loadedObjects = new ArrayList<>(); + objectsByID = new HashMap<>(); List<IConfigurationElement> elements = ExtensionPoints.getExtensionElements(extensionPointId, elementName); for (IConfigurationElement element : elements) { IExtension extension = (IExtension) element.getParent(); diff --git a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/util/ExtensionPoints.java b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/util/ExtensionPoints.java index 8b0986e638f..544bc3bb765 100644 --- a/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/util/ExtensionPoints.java +++ b/plugins/org.eclipse.osee.framework.plugin.core/src/org/eclipse/osee/framework/plugin/core/util/ExtensionPoints.java @@ -48,7 +48,7 @@ public class ExtensionPoints { } IExtension[] extensions = point.getExtensions(); - ArrayList<IConfigurationElement> elementsList = new ArrayList<IConfigurationElement>(extensions.length * 3); + ArrayList<IConfigurationElement> elementsList = new ArrayList<>(extensions.length * 3); for (IExtension extension : extensions) { IConfigurationElement[] elements = extension.getConfigurationElements(); @@ -68,7 +68,7 @@ public class ExtensionPoints { * @param extensionPointUniqueIds array of unique ids */ public static List<IExtension> getExtensionsByUniqueId(String extensionPointId, Collection<String> extensionPointUniqueIds) { - List<IExtension> extensions = new ArrayList<IExtension>(); + List<IExtension> extensions = new ArrayList<>(); for (String entensionPointUniqueId : extensionPointUniqueIds) { IExtension extension = Platform.getExtensionRegistry().getExtension(entensionPointUniqueId); if (extension == null) { @@ -88,7 +88,7 @@ public class ExtensionPoints { } public static List<String> getExtensionsPointUniqueIds(String extensionPointId) { - List<String> extensionPointIds = new ArrayList<String>(); + List<String> extensionPointIds = new ArrayList<>(); IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(extensionPointId); if (point == null) { throw new IllegalArgumentException("The extension point " + extensionPointId + " does not exist"); diff --git a/plugins/org.eclipse.osee.framework.resource.management.test/src/org/eclipse/osee/framework/resource/management/test/ResourceManagerTest.java b/plugins/org.eclipse.osee.framework.resource.management.test/src/org/eclipse/osee/framework/resource/management/test/ResourceManagerTest.java index ac5909fe426..db90ee8aaa3 100644 --- a/plugins/org.eclipse.osee.framework.resource.management.test/src/org/eclipse/osee/framework/resource/management/test/ResourceManagerTest.java +++ b/plugins/org.eclipse.osee.framework.resource.management.test/src/org/eclipse/osee/framework/resource/management/test/ResourceManagerTest.java @@ -134,7 +134,7 @@ public class ResourceManagerTest { @Test public void testGetProtocols() { - List<String> actual = new ArrayList<String>(manager.getProtocols()); + List<String> actual = new ArrayList<>(manager.getProtocols()); Assert.assertEquals(3, actual.size()); Collections.sort(actual); diff --git a/plugins/org.eclipse.osee.framework.resource.management.test/src/org/eclipse/osee/framework/resource/management/test/util/ResourceTest.java b/plugins/org.eclipse.osee.framework.resource.management.test/src/org/eclipse/osee/framework/resource/management/test/util/ResourceTest.java index 14ea5f01cec..64134800fb8 100644 --- a/plugins/org.eclipse.osee.framework.resource.management.test/src/org/eclipse/osee/framework/resource/management/test/util/ResourceTest.java +++ b/plugins/org.eclipse.osee.framework.resource.management.test/src/org/eclipse/osee/framework/resource/management/test/util/ResourceTest.java @@ -68,7 +68,7 @@ public class ResourceTest { @Parameters public static Collection<Object[]> data() { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); data.add(new Object[] {"file://1/sample.file", "sample.file", true}); data.add(new Object[] {"http://www.url.com", "www.url.com", false,}); data.add(new Object[] {"http://www.url.com/hello", "hello", false,}); diff --git a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/internal/ResourceManager.java b/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/internal/ResourceManager.java index b54f5127f51..79633e1fb3f 100644 --- a/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/internal/ResourceManager.java +++ b/plugins/org.eclipse.osee.framework.resource.management/src/org/eclipse/osee/framework/resource/management/internal/ResourceManager.java @@ -33,8 +33,8 @@ public class ResourceManager implements IResourceManager { private final Collection<IResourceLocatorProvider> resourceLocatorProviders; public ResourceManager() { - this.resourceProviders = new CopyOnWriteArraySet<IResourceProvider>(); - this.resourceLocatorProviders = new CopyOnWriteArraySet<IResourceLocatorProvider>(); + this.resourceProviders = new CopyOnWriteArraySet<>(); + this.resourceLocatorProviders = new CopyOnWriteArraySet<>(); } private IResourceProvider getProvider(IResourceLocator locator) throws OseeCoreException { @@ -86,7 +86,7 @@ public class ResourceManager implements IResourceManager { @Override public Collection<String> getProtocols() { - Set<String> protocols = new HashSet<String>(); + Set<String> protocols = new HashSet<>(); for (IResourceLocatorProvider provider : resourceLocatorProviders) { protocols.add(provider.getSupportedProtocol()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidArtifactTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidArtifactTest.java index c3835011900..366ebd41bf6 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidArtifactTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidArtifactTest.java @@ -59,7 +59,7 @@ public class EventBasicGuidArtifactTest { Assert.assertNotSame(eventArt1, eventArt2); - Set<EventBasicGuidArtifact> toAdd = new HashSet<EventBasicGuidArtifact>(); + Set<EventBasicGuidArtifact> toAdd = new HashSet<>(); toAdd.add(eventArt2); toAdd.add(eventArt1); Assert.assertEquals(2, toAdd.size()); @@ -67,7 +67,7 @@ public class EventBasicGuidArtifactTest { toAdd.add(eventArt1); Assert.assertEquals(2, toAdd.size()); - Set<EventBasicGuidArtifact> eventArts = new HashSet<EventBasicGuidArtifact>(); + Set<EventBasicGuidArtifact> eventArts = new HashSet<>(); eventArts.add(eventArt2); eventArts.addAll(toAdd); Assert.assertEquals(2, toAdd.size()); @@ -106,7 +106,7 @@ public class EventBasicGuidArtifactTest { Assert.assertNotSame(eventArt1, eventArt2); - Set<IBasicGuidArtifact> toAdd = new HashSet<IBasicGuidArtifact>(); + Set<IBasicGuidArtifact> toAdd = new HashSet<>(); toAdd.add(eventArt2); toAdd.add(eventArt1); Assert.assertEquals(2, toAdd.size()); @@ -114,7 +114,7 @@ public class EventBasicGuidArtifactTest { toAdd.add(eventArt1); Assert.assertEquals(2, toAdd.size()); - Set<IBasicGuidArtifact> eventArts = new HashSet<IBasicGuidArtifact>(); + Set<IBasicGuidArtifact> eventArts = new HashSet<>(); eventArts.add(eventArt2); eventArts.addAll(toAdd); Assert.assertEquals(2, toAdd.size()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidRelationTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidRelationTest.java index b500967f05a..c71d2deba0e 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidRelationTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventBasicGuidRelationTest.java @@ -84,7 +84,7 @@ public class EventBasicGuidRelationTest { Assert.assertNotSame(eventRel1, eventRel2); - Set<EventBasicGuidRelation> toAdd = new HashSet<EventBasicGuidRelation>(); + Set<EventBasicGuidRelation> toAdd = new HashSet<>(); toAdd.add(eventRel2); toAdd.add(eventRel1); Assert.assertEquals(2, toAdd.size()); @@ -92,7 +92,7 @@ public class EventBasicGuidRelationTest { toAdd.add(eventRel1); Assert.assertEquals(2, toAdd.size()); - Set<EventBasicGuidRelation> eventArts = new HashSet<EventBasicGuidRelation>(); + Set<EventBasicGuidRelation> eventArts = new HashSet<>(); eventArts.add(eventRel2); eventArts.addAll(toAdd); Assert.assertEquals(2, toAdd.size()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventChangeTypeBasicGuidArtifactTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventChangeTypeBasicGuidArtifactTest.java index 527051cd273..f7cda9c026a 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventChangeTypeBasicGuidArtifactTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/EventChangeTypeBasicGuidArtifactTest.java @@ -59,7 +59,7 @@ public class EventChangeTypeBasicGuidArtifactTest { Assert.assertNotSame(eventArt1, eventArt2); - Set<EventBasicGuidArtifact> toAdd = new HashSet<EventBasicGuidArtifact>(); + Set<EventBasicGuidArtifact> toAdd = new HashSet<>(); toAdd.add(eventArt2); toAdd.add(eventArt1); Assert.assertEquals(2, toAdd.size()); @@ -67,7 +67,7 @@ public class EventChangeTypeBasicGuidArtifactTest { toAdd.add(eventArt1); Assert.assertEquals(2, toAdd.size()); - Set<EventBasicGuidArtifact> eventArts = new HashSet<EventBasicGuidArtifact>(); + Set<EventBasicGuidArtifact> eventArts = new HashSet<>(); eventArts.add(eventArt2); eventArts.addAll(toAdd); Assert.assertEquals(2, toAdd.size()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilterTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilterTest.java index 904deac56bf..0796da406a6 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilterTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/ArtifactTypeEventFilterTest.java @@ -82,7 +82,7 @@ public class ArtifactTypeEventFilterTest { new EventBasicGuidArtifact(EventModType.Added, Lib.generateUuid(), CoreArtifactTypes.SoftwareRequirement.getGuid(), GUID.create()); - List<IBasicGuidRelation> relations = new ArrayList<IBasicGuidRelation>(); + List<IBasicGuidRelation> relations = new ArrayList<>(); EventBasicGuidRelation relation = new EventBasicGuidRelation(RelationEventType.Added, Lib.generateUuid(), CoreRelationTypes.SupportingInfo_SupportedBy.getGuid(), 234, 123, 55, guidArtA, 66, guidArtB); diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilterTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilterTest.java index bbfb2da88f9..a0824ebd21f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilterTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/event/filter/BranchUuidEventFilterTest.java @@ -50,7 +50,7 @@ public class BranchUuidEventFilterTest { EventBasicGuidArtifact guidArtB = new EventBasicGuidArtifact(EventModType.Added, Lib.generateUuid(), CoreArtifactTypes.SoftwareRequirement.getGuid(), GUID.create()); - List<IBasicGuidArtifact> arts = new ArrayList<IBasicGuidArtifact>(); + List<IBasicGuidArtifact> arts = new ArrayList<>(); arts.add(guidArtB); arts.add(guidArtA); @@ -77,7 +77,7 @@ public class BranchUuidEventFilterTest { new EventBasicGuidArtifact(EventModType.Added, Lib.generateUuid(), CoreArtifactTypes.SoftwareRequirement.getGuid(), GUID.create()); - List<IBasicGuidRelation> relations = new ArrayList<IBasicGuidRelation>(); + List<IBasicGuidRelation> relations = new ArrayList<>(); EventBasicGuidRelation relation = new EventBasicGuidRelation(RelationEventType.Added, Lib.generateUuid(), CoreRelationTypes.SupportingInfo_SupportedBy.getGuid(), 234, 123, 55, guidArtA, 66, guidArtB); diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/ArtifactExtractorTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/ArtifactExtractorTest.java index e57e6d8a6c2..e347d14d7d0 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/ArtifactExtractorTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/ArtifactExtractorTest.java @@ -74,7 +74,7 @@ public class ArtifactExtractorTest { } private List<TestData> getFileTestData() { - List<TestData> testDatas = new ArrayList<TestData>(); + List<TestData> testDatas = new ArrayList<>(); String separator = propertyStore.get("list.entry.separator"); String[] tests = propertyStore.getArray("fileTestData"); Assert.assertNotNull(tests); @@ -136,7 +136,7 @@ public class ArtifactExtractorTest { } private List<ParseTestData> getParseTestData() { - List<ParseTestData> testDatas = new ArrayList<ParseTestData>(); + List<ParseTestData> testDatas = new ArrayList<>(); String separator = propertyStore.get("list.entry.separator"); String[] tests = propertyStore.getArray("parseTestData"); Assert.assertNotNull(tests); @@ -173,7 +173,7 @@ public class ArtifactExtractorTest { @Parameters public static Collection<Object[]> data() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); data.add(new Object[] {new ExcelArtifactExtractor(), "ExcelArtifactExtractorTest.xml"}); data.add(new Object[] {new NativeDocumentExtractor(), "NativeDocumentExtractorTest.xml"}); diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolutionAndNumberTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolutionAndNumberTest.java index ab5b51ffdab..5b889189fc7 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolutionAndNumberTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolutionAndNumberTest.java @@ -97,7 +97,7 @@ public final class OutlineResolutionAndNumberTest { @Test public void testNextSetGeneration_NonZeroBased() { Set<String> nextPossibleSet = outlineResolution.generateNextSet(new ReqNumbering("1.")); - Set<String> expected = new HashSet<String>(Arrays.asList("2.0", "1.1", "1.0.1")); + Set<String> expected = new HashSet<>(Arrays.asList("2.0", "1.1", "1.0.1")); addDotEndingSet(expected); expected.removeAll(nextPossibleSet); Assert.assertTrue(expected.isEmpty()); @@ -106,7 +106,7 @@ public final class OutlineResolutionAndNumberTest { @Test public void testNextSetGeneration_ZeroBased() { Set<String> nextPossibleSet = outlineResolution.generateNextSet(new ReqNumbering("1.0")); - Set<String> expected = new HashSet<String>(Arrays.asList("2.0", "1.1", "1.0.1")); + Set<String> expected = new HashSet<>(Arrays.asList("2.0", "1.1", "1.0.1")); addDotEndingSet(expected); expected.removeAll(nextPossibleSet); Assert.assertTrue(expected.isEmpty()); @@ -115,7 +115,7 @@ public final class OutlineResolutionAndNumberTest { @Test public void testNextSetGeneration_ZeroExtendedBased() { Set<String> nextPossibleSet = outlineResolution.generateNextSet(new ReqNumbering("1.0.1")); - Set<String> expected = new HashSet<String>(Arrays.asList("2.0", "1.1", "1.0.2")); + Set<String> expected = new HashSet<>(Arrays.asList("2.0", "1.1", "1.0.2")); addDotEndingSet(expected); expected.removeAll(nextPossibleSet); Assert.assertTrue(expected.isEmpty()); @@ -124,7 +124,7 @@ public final class OutlineResolutionAndNumberTest { @Test public void testNextSetGeneration_DoubleDigitZeroBased() { Set<String> nextPossibleSet = outlineResolution.generateNextSet(new ReqNumbering("1.0.10")); - Set<String> expected = new HashSet<String>(Arrays.asList("2.0", "1.1", "1.0.11", "1.0.10.1", "1.0.10.0.1")); + Set<String> expected = new HashSet<>(Arrays.asList("2.0", "1.1", "1.0.11", "1.0.10.1", "1.0.10.0.1")); addDotEndingSet(expected); expected.removeAll(nextPossibleSet); Assert.assertTrue(expected.isEmpty()); @@ -133,7 +133,7 @@ public final class OutlineResolutionAndNumberTest { @Test public void testNextSetGeneration_DoubleDigitHigherBased() { Set<String> nextPossibleSet = outlineResolution.generateNextSet(new ReqNumbering("1.23")); - Set<String> expected = new HashSet<String>(Arrays.asList("2.0", "1.24", "1.23.1", "1.23.0.1")); + Set<String> expected = new HashSet<>(Arrays.asList("2.0", "1.24", "1.23.1", "1.23.0.1")); addDotEndingSet(expected); expected.removeAll(nextPossibleSet); Assert.assertTrue(expected.isEmpty()); @@ -156,7 +156,7 @@ public final class OutlineResolutionAndNumberTest { } private void addDotEndingSet(Set<String> inputSet) { - Set<String> dotEnding = new HashSet<String>(inputSet.size()); + Set<String> dotEnding = new HashSet<>(inputSet.size()); for (String item : inputSet) { dotEnding.add(item + "."); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeSideSorterTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeSideSorterTest.java index 4b7eaabce79..e8a9cc2bea2 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeSideSorterTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeSideSorterTest.java @@ -164,7 +164,7 @@ public class RelationTypeSideSorterTest { public void test10AddItem() throws OseeCoreException { IArtifact itemToAdd = createArtifact("Item to Add", GUID.create()); - List<IArtifact> startingArtifacts = new ArrayList<IArtifact>(); + List<IArtifact> startingArtifacts = new ArrayList<>(); List<String> startingOrder = orderData.getOrderList(sorter.getRelationType(), sorter.getSide()); for (int index = 0; index < startingOrder.size(); index++) { String artifactGuid = startingOrder.get(index); @@ -177,7 +177,7 @@ public class RelationTypeSideSorterTest { for (IRelationSorterId sorterId : sorterProvider.getAllRelationOrderIds()) { IRelationSorter relationSorter = sorterProvider.getRelationOrder(sorterId.getGuid()); - List<IArtifact> itemsToOrder = new ArrayList<IArtifact>(startingArtifacts); + List<IArtifact> itemsToOrder = new ArrayList<>(startingArtifacts); itemsToOrder.add(itemToAdd); if (RelationOrderBaseTypes.USER_DEFINED != sorterId) { relationSorter.sort(itemsToOrder, null); @@ -225,13 +225,13 @@ public class RelationTypeSideSorterTest { RelationOrderData data1 = new RelationOrderData(accessor, art1); RelationOrderData data2 = new RelationOrderData(accessor, art2); - List<Object[]> expected1 = new ArrayList<Object[]>(); - List<Object[]> expected2 = new ArrayList<Object[]>(); + List<Object[]> expected1 = new ArrayList<>(); + List<Object[]> expected2 = new ArrayList<>(); addData(cache, data1, expected1); addData(cache, data2, expected2); - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); data.add(new Object[] {provider, relationType1, RelationSide.SIDE_A, data1, expected1}); data.add(new Object[] {provider, relationType2, RelationSide.SIDE_B, data2, expected2}); return data; @@ -283,7 +283,7 @@ public class RelationTypeSideSorterTest { } private static void addData(RelationOrderData orderData, List<Object[]> expectedData, RelationType relationType, RelationSide side, String relationOrderIdGuid, String... guids) { - List<String> artGuids = new ArrayList<String>(); + List<String> artGuids = new ArrayList<>(); if (guids != null && guids.length > 0) { artGuids.addAll(Arrays.asList(guids)); } @@ -296,7 +296,7 @@ public class RelationTypeSideSorterTest { public MockArtifactWithRelations(int uniqueId, String name, String guid, Branch branch, IArtifactType artifactType) { super(uniqueId, name, guid, branch, DataFactory.fromToken(artifactType)); - this.relatedItemsMap = new HashMap<IRelationType, List<? extends IArtifact>>(); + this.relatedItemsMap = new HashMap<>(); } @Override diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderDataTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderDataTest.java index c6338ca4c7e..6e3b393bde3 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderDataTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderDataTest.java @@ -87,7 +87,7 @@ public class RelationOrderDataTest { data.load(); Assert.assertTrue(accessor.wasLoadCalled()); - List<Object[]> expected = new ArrayList<Object[]>(); + List<Object[]> expected = new ArrayList<>(); addData(data, expected, relationType1, RelationSide.SIDE_A, // RelationOrderBaseTypes.LEXICOGRAPHICAL_ASC.getGuid(), "1", "2", "3"); checkData(data, expected); @@ -103,7 +103,7 @@ public class RelationOrderDataTest { @Test public void testAddOrderList() { - List<Object[]> expected = new ArrayList<Object[]>(); + List<Object[]> expected = new ArrayList<>(); addData(expected); data.clear(); Assert.assertFalse(data.hasEntries()); @@ -113,7 +113,7 @@ public class RelationOrderDataTest { @Test public void testGetCurrentSorterGuid() throws OseeCoreException { - List<Object[]> expected = new ArrayList<Object[]>(); + List<Object[]> expected = new ArrayList<>(); addData(expected); try { data.getCurrentSorterGuid(relationType1, null); @@ -146,7 +146,7 @@ public class RelationOrderDataTest { @Test public void testGetOrderList() throws OseeCoreException { - List<Object[]> expected = new ArrayList<Object[]>(); + List<Object[]> expected = new ArrayList<>(); addData(expected); try { @@ -182,7 +182,7 @@ public class RelationOrderDataTest { @Test public void testRemoveFromList() throws OseeCoreException { - List<Object[]> expected = new ArrayList<Object[]>(); + List<Object[]> expected = new ArrayList<>(); addData(expected); // Remove item that does not exist @@ -204,7 +204,7 @@ public class RelationOrderDataTest { @Test public void testStore() throws OseeCoreException { - List<Object[]> expected = new ArrayList<Object[]>(); + List<Object[]> expected = new ArrayList<>(); addData(expected); accessor.clearStoreCalled(); @@ -260,7 +260,7 @@ public class RelationOrderDataTest { } private void addData(RelationOrderData orderData, List<Object[]> expectedData, RelationType relationType, RelationSide side, String relationOrderIdGuid, String... guids) { - List<String> artGuids = new ArrayList<String>(); + List<String> artGuids = new ArrayList<>(); if (guids != null && guids.length > 0) { artGuids.addAll(Arrays.asList(guids)); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergerTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergerTest.java index 8bc87e57de9..fa159f8cb91 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergerTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergerTest.java @@ -25,11 +25,11 @@ import org.junit.Test; public class RelationOrderMergerTest { @Test public void testCursorAlgorithmSuccess() { - RelationOrderMerger<String> merger = new RelationOrderMerger<String>(); - Collection<String> mergedSet = new HashSet<String>(); + RelationOrderMerger<String> merger = new RelationOrderMerger<>(); + Collection<String> mergedSet = new HashSet<>(); Collections.addAll(mergedSet, new String[] {"Red", "Yellow", "Blue", "Purple", "Green", "Brown", "Black"}); - List<String> leftOrder = new ArrayList<String>(); + List<String> leftOrder = new ArrayList<>(); leftOrder.add("Orange"); leftOrder.add("Red"); leftOrder.add("Yellow"); @@ -37,7 +37,7 @@ public class RelationOrderMergerTest { leftOrder.add("Black"); leftOrder.add("Green"); - List<String> rightOrder = new ArrayList<String>(); + List<String> rightOrder = new ArrayList<>(); rightOrder.add("Red"); rightOrder.add("Yellow"); rightOrder.add("Purple"); @@ -58,17 +58,17 @@ public class RelationOrderMergerTest { @Test public void testCursorAlgorithmFailure() { - RelationOrderMerger<String> merger = new RelationOrderMerger<String>(); - Collection<String> mergedSet = new HashSet<String>(); + RelationOrderMerger<String> merger = new RelationOrderMerger<>(); + Collection<String> mergedSet = new HashSet<>(); Collections.addAll(mergedSet, new String[] {"Red", "Yellow", "Green"}); - List<String> leftOrder = new ArrayList<String>(); + List<String> leftOrder = new ArrayList<>(); leftOrder.add("Orange"); leftOrder.add("Yellow"); leftOrder.add("Red"); leftOrder.add("Green"); - List<String> rightOrder = new ArrayList<String>(); + List<String> rightOrder = new ArrayList<>(); rightOrder.add("Red"); rightOrder.add("Yellow"); rightOrder.add("Purple"); diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderParserTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderParserTest.java index 32dc1f405ab..60c138d8a9e 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderParserTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderParserTest.java @@ -72,7 +72,7 @@ public class RelationOrderParserTest { Assert.assertTrue(data.hasEntries()); Assert.assertEquals(1, data.size()); - List<Object[]> expectedData = new ArrayList<Object[]>(); + List<Object[]> expectedData = new ArrayList<>(); addData(expectedData, "Default Hierarchical", RelationSide.SIDE_B, "AAT0xogoMjMBhARkBZQA", "AAABDEJ_mIQBf8VXVtGqvA", "AAABDEJ_nMkBf8VXVXptpg", "AAABDEJ_oQ8Bf8VXLX7U_g"); @@ -102,7 +102,7 @@ public class RelationOrderParserTest { Assert.assertTrue(data.hasEntries()); Assert.assertEquals(2, data.size()); - List<Object[]> expectedData = new ArrayList<Object[]>(); + List<Object[]> expectedData = new ArrayList<>(); addData(expectedData, "Default Hierarchical", RelationSide.SIDE_B, "AAT0xogoMjMBhARkBZQA", "AAABDEJ_mIQBf8VXVtGqvA", "AAABDEJ_oQ8Bf8VXLX7U_g"); addData(expectedData, "Some Type", RelationSide.SIDE_A, "AAABDEJ_mIQBf8VXVtGqvA", "AAABDEJ_mIQXf8VXVtGqvA", @@ -123,7 +123,7 @@ public class RelationOrderParserTest { Assert.assertTrue(data.hasEntries()); Assert.assertEquals(1, data.size()); - List<Object[]> expectedData = new ArrayList<Object[]>(); + List<Object[]> expectedData = new ArrayList<>(); addData(expectedData, "X", RelationSide.SIDE_B, "AAT0xogoMjMBhARkBZQA"); checkData(data, expectedData); Assert.assertEquals(oneEntryEmptyList, parser.toXml(data)); @@ -177,7 +177,7 @@ public class RelationOrderParserTest { } private void addData(List<Object[]> expectedData, String relationType, RelationSide side, String relationOrderIdGuid, String... guids) { - List<String> artGuids = new ArrayList<String>(); + List<String> artGuids = new ArrayList<>(); if (guids != null && guids.length > 0) { artGuids.addAll(Arrays.asList(guids)); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/sorters/RelationSorterTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/sorters/RelationSorterTest.java index b7297488cac..e467fd90ced 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/sorters/RelationSorterTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/relation/sorters/RelationSorterTest.java @@ -60,7 +60,7 @@ public class RelationSorterTest { @Test public void testSort() { - List<IArtifact> actualToOrder = new ArrayList<IArtifact>(); + List<IArtifact> actualToOrder = new ArrayList<>(); actualToOrder.addAll(itemsToOrder); sorter.sort(actualToOrder, currentItems); @@ -73,7 +73,7 @@ public class RelationSorterTest { @Parameters public static Collection<Object[]> data() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); data.add(createUnorderedSortTest("4", "2", "1", "5")); data.add(createUnorderedSortTest("$", "a", "!", "2")); data.add(createLexicographicalTest(SortMode.ASCENDING, "1", "2", "3", "4")); diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorCacheTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorCacheTest.java index 40642d17f02..6b6dbea6f11 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorCacheTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorCacheTest.java @@ -28,7 +28,7 @@ public class TxMonitorCacheTest { Object key1 = new Object(); Object key2 = new Object(); - TxMonitorCache<Object> cache = new TxMonitorCache<Object>(); + TxMonitorCache<Object> cache = new TxMonitorCache<>(); MonitoredTx tx1 = createTx(); MonitoredTx tx2 = createTx(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorImplTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorImplTest.java index 140fb461a1b..81584d126ff 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorImplTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorImplTest.java @@ -45,8 +45,8 @@ public class TxMonitorImplTest { tx1 = createTx(); tx2 = createTx(); - txCache = new TxMonitorCache<Object>(); - txMonitor = new TxMonitorImpl<Object>(txCache); + txCache = new TxMonitorCache<>(); + txMonitor = new TxMonitorImpl<>(txCache); } @Test(expected = OseeStateException.class) @@ -185,7 +185,7 @@ public class TxMonitorImplTest { private final String uuid; private TxState txState; private boolean rolledBack; - private final Set<Object> data = new HashSet<Object>(); + private final Set<Object> data = new HashSet<>(); public MockMonitoredTx(String uuid, TxState txState) { this.uuid = uuid; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java index a8e60924766..e8d188afe7f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java @@ -31,7 +31,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; public class OseeGroup { private Artifact groupArtifact; - private final Map<IArtifactToken, Boolean> temporaryOverride = new HashMap<IArtifactToken, Boolean>(); + private final Map<IArtifactToken, Boolean> temporaryOverride = new HashMap<>(); private final IArtifactToken token; public OseeGroup(IArtifactToken token) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java index 06ffa1b95eb..5566179a4e4 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java @@ -92,7 +92,7 @@ public class User extends Artifact { public void toggleFavoriteBranch(Branch favoriteBranch) throws OseeCoreException { Conditions.checkNotNull(favoriteBranch, "Branch"); - HashSet<Long> branchUuids = new HashSet<Long>(); + HashSet<Long> branchUuids = new HashSet<>(); for (Branch branch : BranchManager.getBranches(BranchArchivedState.UNARCHIVED, BranchType.WORKING, BranchType.BASELINE)) { branchUuids.add(branch.getUuid()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java index ffd2d491cbf..679f486c235 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java @@ -83,7 +83,7 @@ public final class UserManager { } public static List<User> getUsersByUserId(Collection<String> userIds) throws OseeCoreException { - List<User> users = new ArrayList<User>(); + List<User> users = new ArrayList<>(); for (String userId : userIds) { try { User user = getUserAdmin().getUserByUserId(userId); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java index d6b42b1b786..0c3df05f4d0 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java @@ -214,7 +214,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA @SuppressWarnings("unchecked") public final <A extends Artifact> List<A> getRelatedArtifactsOfType(IRelationTypeSide side, Class<A> clazz) throws OseeCoreException { - List<A> objs = new ArrayList<A>(); + List<A> objs = new ArrayList<>(); for (Artifact art : getRelatedArtifacts(side)) { if (clazz.isInstance(art)) { objs.add((A) art); @@ -286,7 +286,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA * from getArtifactRoot(). */ public final List<Artifact> getAncestors() throws OseeCoreException { - List<Artifact> ancestors = new ArrayList<Artifact>(); + List<Artifact> ancestors = new ArrayList<>(); for (Artifact parent = getParent(); parent != null; parent = parent.getParent()) { ancestors.add(parent); @@ -304,7 +304,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA } public final List<Integer> getAttributeIds(IAttributeType attributeType) throws OseeCoreException { - List<Integer> items = new ArrayList<Integer>(); + List<Integer> items = new ArrayList<>(); List<Attribute<Object>> data = getAttributes(attributeType); for (Attribute<Object> attribute : data) { Integer value = new Integer(attribute.getId()); @@ -344,7 +344,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA if (this.equals(OseeSystemArtifacts.getDefaultHierarchyRootArtifact(getBranch()))) { root = this; } else { - Set<Artifact> set = new HashSet<Artifact>(); + Set<Artifact> set = new HashSet<>(); set.add(this); for (Artifact parent = getParent(); parent != null; parent = parent.getParent()) { if (set.add(parent)) { @@ -392,7 +392,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA } public final List<Artifact> getDescendants(DeletionFlag includeDeleted) throws OseeCoreException { - List<Artifact> descendants = new LinkedList<Artifact>(); + List<Artifact> descendants = new LinkedList<>(); getDescendants(descendants, includeDeleted); return descendants; } @@ -401,7 +401,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA * @return a list of artifacts ordered by a depth first traversal of this artifact's descendants */ public final List<Artifact> getDescendants() throws OseeCoreException { - List<Artifact> descendants = new LinkedList<Artifact>(); + List<Artifact> descendants = new LinkedList<>(); getDescendants(descendants, DeletionFlag.EXCLUDE_DELETED); return descendants; } @@ -414,7 +414,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA } public List<Artifact> getDescendantsWithArtTypes(Collection<ArtifactType> descendantTypes) throws OseeCoreException { - List<Artifact> descendants = new LinkedList<Artifact>(); + List<Artifact> descendants = new LinkedList<>(); for (Artifact child : getChildren()) { ArtifactType childArtType = child.getArtifactType(); if (descendantTypes.contains(childArtType)) { @@ -489,7 +489,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA * The use of this method is discouraged since it directly returns Attributes. */ public final <T> List<Attribute<T>> getAttributes(IAttributeType attributeType, Object value) throws OseeCoreException { - List<Attribute<?>> filteredList = new ArrayList<Attribute<?>>(); + List<Attribute<?>> filteredList = new ArrayList<>(); for (Attribute<?> attribute : getAttributes(attributeType)) { if (attribute.getValue().equals(value)) { filteredList.add(attribute); @@ -544,7 +544,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA } private List<Attribute<?>> filterByModificationType(Collection<Attribute<?>> attributes, Set<ModificationType> allowedModTypes) { - List<Attribute<?>> filteredList = new ArrayList<Attribute<?>>(); + List<Attribute<?>> filteredList = new ArrayList<>(); if (allowedModTypes != null && !allowedModTypes.isEmpty() && attributes != null && !attributes.isEmpty()) { for (Attribute<?> attribute : attributes) { if (allowedModTypes.contains(attribute.getModificationType())) { @@ -775,7 +775,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA * @return comma delimited representation of all the attributes of the type attributeName */ public final String getAttributesToString(IAttributeType attributeType, boolean sorted) throws OseeCoreException { - List<String> strs = new ArrayList<String>(); + List<String> strs = new ArrayList<>(); List<Attribute<Object>> attributes = getAttributes(attributeType); if (sorted) { java.util.Collections.sort(attributes); @@ -791,7 +791,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA * @return comma separator representation unique values of the attributes of the type attributeName */ public final String getAttributesToStringUnique(IAttributeType attributeType, String separator) throws OseeCoreException { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (Attribute<?> attr : getAttributes(attributeType)) { strs.add(String.valueOf(attr)); } @@ -832,10 +832,10 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA public final void setAttributeValues(IAttributeType attributeType, Collection<String> newValues) throws OseeCoreException { ensureAttributesLoaded(); // ensure new values are unique - HashSet<String> uniqueNewValues = new HashSet<String>(newValues); + HashSet<String> uniqueNewValues = new HashSet<>(newValues); List<Attribute<Object>> remainingAttributes = getAttributes(attributeType); - List<String> remainingNewValues = new ArrayList<String>(uniqueNewValues.size()); + List<String> remainingNewValues = new ArrayList<>(uniqueNewValues.size()); // all existing attributes matching a new value will be left untouched for (String newValue : uniqueNewValues) { @@ -873,7 +873,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA Set<T> uniqueItems = Collections.toSet(values); List<Attribute<T>> remainingAttributes = getAttributes(attributeType); - List<T> remainingNewValues = new ArrayList<T>(uniqueItems.size()); + List<T> remainingNewValues = new ArrayList<>(uniqueItems.size()); // all existing attributes matching a new value will be left untouched for (T newValue : uniqueItems) { @@ -975,7 +975,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA public final List<String> getAttributesToStringList(IAttributeType attributeType) throws OseeCoreException { ensureAttributesLoaded(); - List<String> items = new ArrayList<String>(); + List<String> items = new ArrayList<>(); for (Attribute<?> attribute : getAttributes(attributeType)) { items.add(attribute.getDisplayableString()); } @@ -985,7 +985,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA public final <T> List<T> getAttributeValues(IAttributeType attributeType) throws OseeCoreException { ensureAttributesLoaded(); - List<T> items = new ArrayList<T>(); + List<T> items = new ArrayList<>(); List<Attribute<T>> data = getAttributes(attributeType); for (Attribute<T> attribute : data) { T value = attribute.getValue(); @@ -1232,7 +1232,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA * Remove artifact from a specific branch in the database */ public final void purgeFromBranch(boolean purgeChildren) throws OseeCoreException { - Collection<Artifact> artifacts = new LinkedHashSet<Artifact>(); + Collection<Artifact> artifacts = new LinkedHashSet<>(); artifacts.add(this); if (purgeChildren) { artifacts.addAll(getDescendants()); @@ -1490,7 +1490,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA } public final Collection<AttributeChange> getDirtyFrameworkAttributeChanges() throws OseeDataStoreException { - List<AttributeChange> dirtyAttributes = new LinkedList<AttributeChange>(); + List<AttributeChange> dirtyAttributes = new LinkedList<>(); for (Attribute<?> attribute : internalGetAttributes()) { if (attribute.isDirty()) { @@ -1614,7 +1614,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA * Return relations that exist between artifacts */ public final ArrayList<RelationLink> internalGetRelations(Artifact artifact) throws OseeCoreException { - ArrayList<RelationLink> relations = new ArrayList<RelationLink>(); + ArrayList<RelationLink> relations = new ArrayList<>(); for (RelationLink relation : getRelationsAll(DeletionFlag.EXCLUDE_DELETED)) { try { if (relation.getArtifactOnOtherSide(this).equals(artifact)) { @@ -1636,7 +1636,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA */ @Deprecated public final ArrayList<RelationLink> getRelations(IRelationTypeSide side, Artifact artifact) throws OseeCoreException { - ArrayList<RelationLink> relations = new ArrayList<RelationLink>(); + ArrayList<RelationLink> relations = new ArrayList<>(); for (RelationLink relation : getRelations(side)) { try { if (relation.getArtifactOnOtherSide(this).equals(artifact)) { @@ -1726,7 +1726,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA } public Set<AttributeType> getAttributeTypesUsed() throws OseeCoreException { - Set<AttributeType> types = new HashSet<AttributeType>(); + Set<AttributeType> types = new HashSet<>(); for (Attribute<?> attr : getAttributes()) { types.add(attr.getAttributeType()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java index d95d203ed08..0a7d69b83b2 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java @@ -69,7 +69,7 @@ public final class ArtifactCache { } public static List<Artifact> getArtifactsByName(IArtifactType artifactType, String name) { - List<Artifact> arts = new ArrayList<Artifact>(); + List<Artifact> arts = new ArrayList<>(); for (Artifact artifact : getArtifactsByType(artifactType)) { if (artifact.getName().equals(name)) { arts.add(artifact); @@ -117,7 +117,7 @@ public final class ArtifactCache { } public static Collection<Artifact> getActive(Collection<? extends IBasicGuidArtifact> basicGuidArtifacts) throws OseeCoreException { - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); for (IBasicGuidArtifact guidArt : basicGuidArtifacts) { Artifact art = getActive(guidArt); if (art != null) { @@ -151,7 +151,7 @@ public final class ArtifactCache { */ @SuppressWarnings("unchecked") public static <A extends Artifact> Collection<A> getActive(IBasicGuidRelation guidRel, Class<A> clazz) throws OseeCoreException { - List<A> arts = new ArrayList<A>(); + List<A> arts = new ArrayList<>(); Artifact artA = getActiveA(guidRel); if (artA != null) { if (clazz == null || clazz.isInstance(artA)) { @@ -208,7 +208,7 @@ public final class ArtifactCache { } public static Collection<Artifact> getListByTextId(String key, IOseeBranch branch) throws OseeCoreException { - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); Collection<Artifact> cached = ACTIVE_CACHE.getListByText(key, BranchManager.getBranch(branch)); // decache any deleted artifacts for (Artifact artifact : cached) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java index 443ed37a3cc..2156ccde531 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java @@ -34,7 +34,7 @@ public class ArtifactCacheQuery { * before returning. */ public static Set<Artifact> getArtifactsFromArtifactByText(IArtifactType artifactType, IAttributeType attributeType, String text, IOseeBranch branch, boolean queryIfNotFound) throws OseeCoreException { - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); // Retrieve cached artifacts first for (Artifact artifact : ArtifactCache.getListByTextId(text, branch)) { if (artifact.isOfType(artifactType) && !artifact.isDeleted()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactChecks.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactChecks.java index 70c3b153a0c..ed4e51197ff 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactChecks.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactChecks.java @@ -30,7 +30,7 @@ public class ArtifactChecks { public static List<IArtifactCheck> getArtifactChecks() { if (checks == null) { - checks = new ArrayList<IArtifactCheck>(); + checks = new ArrayList<>(); checks.addAll(artifactCheckObjects.getObjects()); checks.add(new UserArtifactCheck()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java index 3e42ef106a9..76735c3b0de 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java @@ -31,7 +31,7 @@ import org.eclipse.osee.framework.jdk.core.util.Strings; */ public abstract class ArtifactFactory { public static final String ART_ID_SEQ = "SKYNET_ART_ID_SEQ"; - private final Set<IArtifactType> artifactTypeNames = new HashSet<IArtifactType>(5); + private final Set<IArtifactType> artifactTypeNames = new HashSet<>(5); protected ArtifactFactory(IArtifactType... artifactTypes) { for (IArtifactType artifactType : artifactTypes) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java index 788e23b4e2d..b472123d19b 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java @@ -64,7 +64,7 @@ public final class ArtifactLoader { } public static List<Artifact> loadArtifacts(Collection<Integer> artIds, IOseeBranch branch, LoadLevel loadLevel, LoadType reload, DeletionFlag allowDeleted, TransactionRecord transactionId) throws OseeCoreException { - List<Pair<Integer, Long>> toLoad = new LinkedList<Pair<Integer, Long>>(); + List<Pair<Integer, Long>> toLoad = new LinkedList<>(); Long branchUuid = branch.getUuid(); for (Integer artId : new HashSet<Integer>(artIds)) { toLoad.add(new Pair<Integer, Long>(artId, branchUuid)); @@ -78,7 +78,7 @@ public final class ArtifactLoader { } private static List<Artifact> loadSelectedArtifacts(List<Pair<Integer, Long>> toLoad, LoadLevel loadLevel, LoadType reload, DeletionFlag allowDeleted, TransactionRecord transactionId) throws OseeCoreException { - Set<Artifact> artifacts = new LinkedHashSet<Artifact>(); + Set<Artifact> artifacts = new LinkedHashSet<>(); if (transactionId == null) { loadActiveArtifacts(toLoad, artifacts, loadLevel, reload, allowDeleted); } else { @@ -254,7 +254,7 @@ public final class ArtifactLoader { data = loadedItems; } else { // Use a new list if loaded items already contains data to prevent artifact overwrites during loading - data = new ArrayList<Artifact>(joinQuery.size()); + data = new ArrayList<>(joinQuery.size()); } long time = System.currentTimeMillis(); try { @@ -282,7 +282,7 @@ public final class ArtifactLoader { JdbcStatement chStmt = ConnectionHandler.getStatement(); long time = System.currentTimeMillis(); - List<Pair<Integer, Long>> toLoad = new LinkedList<Pair<Integer, Long>>(); + List<Pair<Integer, Long>> toLoad = new LinkedList<>(); try { chStmt.runPreparedQuery(artifactCountEstimate, sql, queryParameters); @@ -336,7 +336,7 @@ public final class ArtifactLoader { joinQuery.add(artifact.getArtId(), artifact.getFullBranch().getUuid()); joinQuery.store(); - List<Artifact> artifacts = new ArrayList<Artifact>(1); + List<Artifact> artifacts = new ArrayList<>(1); artifacts.add(artifact); loadArtifactsData(joinQuery.getQueryId(), artifacts, loadLevel, LoadType.INCLUDE_CACHE, null, artifact.isDeleted() ? DeletionFlag.INCLUDE_DELETED : DeletionFlag.EXCLUDE_DELETED); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPersistenceManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPersistenceManager.java index a147186d53a..d76821916f6 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPersistenceManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPersistenceManager.java @@ -76,7 +76,7 @@ public class ArtifactPersistenceManager { } private static void bulkLoadRelatives(Collection<Artifact> artifacts) throws OseeCoreException { - Collection<Integer> artIds = new HashSet<Integer>(); + Collection<Integer> artIds = new HashSet<>(); for (Artifact artifact : artifacts) { for (RelationLink link : artifact.getRelationsAll(DeletionFlag.EXCLUDE_DELETED)) { artIds.add(link.getAArtifactId()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java index ac863ad7135..7a2f40d09bf 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java @@ -67,7 +67,7 @@ public class ArtifactTypeManager { public static Collection<ArtifactType> getArtifactTypesFromAttributeType(IAttributeType attributeType, IOseeBranch branchToken) throws OseeCoreException { Branch branch = getCacheService().getBranchCache().get(branchToken); - List<ArtifactType> artifactTypes = new ArrayList<ArtifactType>(); + List<ArtifactType> artifactTypes = new ArrayList<>(); for (ArtifactType artifactType : getAllTypes()) { if (artifactType.isValidAttributeType(attributeType, branch)) { artifactTypes.add(artifactType); @@ -196,18 +196,18 @@ public class ArtifactTypeManager { public static void purgeArtifactTypesWithCheck(Collection<? extends IArtifactType> purgeArtifactTypes, IArtifactType newArtifactType) throws OseeCoreException { for (IArtifactType purgeArtifactType : purgeArtifactTypes) { // find all artifact of this type on all branches and make a unique list for type change (since it is not by branch) - Set<Artifact> artifacts = new LinkedHashSet<Artifact>(); + Set<Artifact> artifacts = new LinkedHashSet<>(); for (IOseeBranch branch : BranchManager.getBranches(new BranchFilter())) { artifacts.addAll(ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.SoftwareRequirement, branch, DeletionFlag.INCLUDE_DELETED)); } if (artifacts.size() > 0) { - HashMap<Integer, Artifact> artifactMap = new HashMap<Integer, Artifact>(); + HashMap<Integer, Artifact> artifactMap = new HashMap<>(); for (Artifact artifact : artifacts) { artifactMap.put(artifact.getArtId(), artifact); } if (newArtifactType == null) { - HashSet<IOseeBranch> branches = new HashSet<IOseeBranch>(); + HashSet<IOseeBranch> branches = new HashSet<>(); for (Artifact artifact : artifacts) { branches.add(artifact.getBranch()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactURL.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactURL.java index f5ca650666b..8db964af31c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactURL.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactURL.java @@ -32,7 +32,7 @@ import org.eclipse.osee.framework.skynet.core.utility.OseeInfo; public class ArtifactURL { public static URL getExternalArtifactLink(final Artifact artifact) throws OseeCoreException { - Map<String, String> parameters = new HashMap<String, String>(); + Map<String, String> parameters = new HashMap<>(); parameters.put("guid", artifact.getGuid()); parameters.put("branchUuid", String.valueOf(artifact.getBranch().getUuid())); String urlString = getPermanentLinkBaseUrl(OseeServerContext.ARTIFACT_CONTEXT, parameters); @@ -46,7 +46,7 @@ public class ArtifactURL { } public static URL getOpenInOseeLink(final Artifact artifact, String cmd) throws OseeCoreException { - Map<String, String> parameters = new HashMap<String, String>(); + Map<String, String> parameters = new HashMap<>(); parameters.put("sessionId", ClientSessionManager.getSessionId()); parameters.put("context", "osee/loopback"); parameters.put("guid", artifact.getGuid()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java index df634b316f3..58a06feae73 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java @@ -48,7 +48,7 @@ public abstract class Attribute<T> implements Comparable<Attribute<T>> { void internalInitialize(IAttributeType attributeType, Artifact artifact, ModificationType modificationType, boolean markDirty, boolean setDefaultValue) throws OseeCoreException { this.attributeTypeToken = attributeType; - this.artifactRef = new WeakReference<Artifact>(artifact); + this.artifactRef = new WeakReference<>(artifact); internalSetModType(modificationType, false, markDirty); try { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java index 80832ec2156..ab3115b0e54 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java @@ -49,7 +49,7 @@ public class AttributeLoader { Artifact currentArtifact = null; AttrData previousAttr = new AttrData(); - List<AttrData> currentAttributes = new ArrayList<AttrData>(); + List<AttrData> currentAttributes = new ArrayList<>(); while (chStmt.next()) { AttrData nextAttr = new AttrData(chStmt, historical); @@ -130,7 +130,7 @@ public class AttributeLoader { if (artifact == null) { return; // If the artifact is null, it means the attributes are orphaned. } - List<Integer> transactionNumbers = new ArrayList<Integer>(); + List<Integer> transactionNumbers = new ArrayList<>(); AttrData previous = new AttrData(); synchronized (artifact) { if (!artifact.isAttributesLoaded()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java index dd2cb8f8d86..599a88c7d25 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java @@ -339,7 +339,7 @@ public class BranchManager { * @throws OseeCoreException */ public static Job deleteBranch(final List<? extends IOseeBranch> branches) { - List<IOperation> ops = new ArrayList<IOperation>(); + List<IOperation> ops = new ArrayList<>(); for (IOseeBranch branch : branches) { ops.add(new DeleteBranchOperation(branch)); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java index e3484b4abd9..891fdc28c09 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java @@ -60,13 +60,13 @@ import org.eclipse.osee.jdbc.JdbcStatement; * @author Jeff C. Phillips */ public class ChangeArtifactType { - private final HashSet<IAttributeType> attributeTypes = new HashSet<IAttributeType>(); - private final HashSet<IRelationType> relationTypes = new HashSet<IRelationType>(); - private final HashMap<IOseeBranch, SkynetTransaction> txMap = new HashMap<IOseeBranch, SkynetTransaction>(); - private final Set<EventBasicGuidArtifact> artifactChanges = new HashSet<EventBasicGuidArtifact>(); - private final List<Artifact> modifiedArtifacts = new ArrayList<Artifact>(); + private final HashSet<IAttributeType> attributeTypes = new HashSet<>(); + private final HashSet<IRelationType> relationTypes = new HashSet<>(); + private final HashMap<IOseeBranch, SkynetTransaction> txMap = new HashMap<>(); + private final Set<EventBasicGuidArtifact> artifactChanges = new HashSet<>(); + private final List<Artifact> modifiedArtifacts = new ArrayList<>(); private static final IStatus promptStatus = new Status(IStatus.WARNING, Activator.PLUGIN_ID, 257, "", null); - private final Map<Integer, Integer> gammaToArtId = new HashMap<Integer, Integer>(); + private final Map<Integer, Integer> gammaToArtId = new HashMap<>(); public static void changeArtifactType(Collection<? extends Artifact> inputArtifacts, IArtifactType newArtifactTypeToken, boolean prompt) throws OseeCoreException { @@ -241,7 +241,7 @@ public class ChangeArtifactType { } private void changeArtifactTypeOutsideofHistory(Collection<? extends Artifact> inputArtifacts, ArtifactType newArtifactType) throws OseeCoreException { - List<Object[]> insertData = new ArrayList<Object[]>(); + List<Object[]> insertData = new ArrayList<>(); String UPDATE = "UPDATE osee_artifact SET art_type_id = ? WHERE art_id = ?"; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java index 22135632399..5934827c461 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java @@ -59,7 +59,7 @@ public class IntroduceArtifactOperation { public List<Artifact> introduce(Collection<Artifact> sourceArtifacts) throws OseeCoreException { this.sourceArtifacts = sourceArtifacts; - destinationArtifacts = new ArrayList<Artifact>(sourceArtifacts.size()); + destinationArtifacts = new ArrayList<>(sourceArtifacts.size()); for (Artifact sourceArtifact : sourceArtifacts) { introduceArtifact(sourceArtifact); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/KeyValueArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/KeyValueArtifact.java index 85e669ad692..828a9400b2a 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/KeyValueArtifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/KeyValueArtifact.java @@ -36,7 +36,7 @@ public class KeyValueArtifact { this.keyValueAttributeType = keyValueAttributeType; load(); } - protected HashCollection<String, String> keyValueMap = new HashCollection<String, String>(20); + protected HashCollection<String, String> keyValueMap = new HashCollection<>(20); private final Pattern keyValuePattern = Pattern.compile("^(.*?)=(.*)$", Pattern.MULTILINE | Pattern.DOTALL); public HashCollection<String, String> getHashCollection() { @@ -49,7 +49,7 @@ public class KeyValueArtifact { public void save() throws OseeCoreException { if (keyValueMap.size() > 0) { - Set<String> keyValues = new HashSet<String>(); + Set<String> keyValues = new HashSet<>(); for (String key : keyValueMap.keySet()) { for (String value : keyValueMap.getValues(key)) { keyValues.add(key + "=" + value); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java index af5f4667307..b3ff9d37160 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java @@ -62,7 +62,7 @@ public class PurgeArtifacts extends AbstractDbTxOperation { public PurgeArtifacts(Collection<? extends Artifact> artifactsToPurge, boolean recurseChildrenBranches) throws OseeCoreException { super(ConnectionHandler.getJdbcClient(), "Purge Artifact", Activator.PLUGIN_ID); - this.artifactsToPurge = new LinkedList<Artifact>(artifactsToPurge); + this.artifactsToPurge = new LinkedList<>(artifactsToPurge); this.success = false; this.recurseChildrenBranches = recurseChildrenBranches; } @@ -76,7 +76,7 @@ public class PurgeArtifacts extends AbstractDbTxOperation { checkPurgeValid(connection); // now load the artifacts to be purged - Set<Artifact> childreArtifactsToPurge = new HashSet<Artifact>(); + Set<Artifact> childreArtifactsToPurge = new HashSet<>(); for (Artifact art : artifactsToPurge) { childreArtifactsToPurge.addAll(art.getDescendants(DeletionFlag.INCLUDE_DELETED)); } @@ -127,7 +127,7 @@ public class PurgeArtifacts extends AbstractDbTxOperation { @Override protected void handleTxFinally(IProgressMonitor monitor) throws OseeCoreException { if (success) { - Set<EventBasicGuidArtifact> artifactChanges = new HashSet<EventBasicGuidArtifact>(); + Set<EventBasicGuidArtifact> artifactChanges = new HashSet<>(); for (Artifact artifact : artifactsToPurge) { artifactChanges.add(new EventBasicGuidArtifact(EventModType.Purged, artifact)); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeAttributes.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeAttributes.java index 896bccaf0e5..4c0022727a7 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeAttributes.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeAttributes.java @@ -99,7 +99,7 @@ public class PurgeAttributes extends AbstractDbTxOperation { protected void handleTxFinally(IProgressMonitor monitor) throws OseeCoreException { super.handleTxFinally(monitor); if (success) { - Set<EventBasicGuidArtifact> artifactChanges = new HashSet<EventBasicGuidArtifact>(); + Set<EventBasicGuidArtifact> artifactChanges = new HashSet<>(); for (Attribute<?> attribute : attributesToPurge) { artifactChanges.add(new EventBasicGuidArtifact(EventModType.Purged, attribute.getArtifact())); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java index 67b65602488..a127146233b 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java @@ -37,13 +37,13 @@ public class UniversalGroup { artifacts = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.UniversalGroup, branch); } catch (OseeCoreException ex) { OseeLog.log(Activator.class, Level.SEVERE, ex); - artifacts = new LinkedList<Artifact>(); + artifacts = new LinkedList<>(); } return artifacts; } public static Collection<Artifact> getGroupsNotRoot(IOseeBranch branch) { - Collection<Artifact> groups = new HashSet<Artifact>(); + Collection<Artifact> groups = new HashSet<>(); for (Artifact group : UniversalGroup.getGroups(branch)) { if (!group.getName().equals("Root Artifact")) { groups.add(group); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java index c2cb146bfbb..ff8152d57ec 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java @@ -75,7 +75,7 @@ public class UpdateMergeBranch extends AbstractDbTxOperation { protected void doTxWork(IProgressMonitor monitor, JdbcConnection connection) throws OseeCoreException { Collection<Integer> allMergeBranchArtifacts = getAllMergeArtifacts(mergeBranch); long time = System.currentTimeMillis(); - Collection<Integer> allMergeBranchArtifactsCopy = new HashSet<Integer>(allMergeBranchArtifacts); + Collection<Integer> allMergeBranchArtifactsCopy = new HashSet<>(allMergeBranchArtifacts); Collection<Artifact> goodMergeBranchArtifacts = ArtifactQuery.getArtifactListFromBranch(mergeBranch, INCLUDE_DELETED); @@ -188,7 +188,7 @@ public class UpdateMergeBranch extends AbstractDbTxOperation { } private Collection<Integer> getAllMergeArtifacts(Branch branch) throws OseeCoreException { - Collection<Integer> artSet = new HashSet<Integer>(); + Collection<Integer> artSet = new HashSet<>(); long time = System.currentTimeMillis(); JdbcStatement chStmt = getJdbcClient().getStatement(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/AbstractArtifactCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/AbstractArtifactCache.java index 7d8fe3fead7..abe41dc22c5 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/AbstractArtifactCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/AbstractArtifactCache.java @@ -32,8 +32,8 @@ public abstract class AbstractArtifactCache { } protected AbstractArtifactCache(int initialCapacity) { - idCache = new CompositeKeyHashMap<Integer, Long, Object>(initialCapacity, true); - guidCache = new CompositeKeyHashMap<String, Long, Object>(initialCapacity, true); + idCache = new CompositeKeyHashMap<>(initialCapacity, true); + guidCache = new CompositeKeyHashMap<>(initialCapacity, true); } public Object cache(Artifact artifact) { @@ -69,7 +69,7 @@ public abstract class AbstractArtifactCache { } private Collection<Artifact> getItems(FilterType filterType) { - Collection<Artifact> artifacts = new HashSet<Artifact>(); + Collection<Artifact> artifacts = new HashSet<>(); for (Entry<Pair<String, Long>, Object> entry : guidCache.entrySet()) { Artifact art = asArtifact(entry.getValue()); if (!isFiltered(art, filterType)) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ActiveArtifactCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ActiveArtifactCache.java index 155d3ea4da7..d485ccaa05e 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ActiveArtifactCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ActiveArtifactCache.java @@ -34,9 +34,9 @@ public class ActiveArtifactCache extends AbstractArtifactCache { public ActiveArtifactCache(int initialCapacity) { super(initialCapacity); - byArtifactTypeCache = new CompositeKeyHashMap<IArtifactType, ArtifactKey, Object>(initialCapacity, true); + byArtifactTypeCache = new CompositeKeyHashMap<>(initialCapacity, true); - keyedArtifactCache = new CompositeKeyHashMap<String, IOseeBranch, Set<Object>>(200, true); + keyedArtifactCache = new CompositeKeyHashMap<>(200, true); } @Override @@ -70,7 +70,7 @@ public class ActiveArtifactCache extends AbstractArtifactCache { } public List<Artifact> getByType(IArtifactType artifactType) { - List<Artifact> items = new ArrayList<Artifact>(); + List<Artifact> items = new ArrayList<>(); Collection<Object> cachedItems = byArtifactTypeCache.getValues(artifactType); if (cachedItems != null) { for (Object obj : cachedItems) { @@ -123,7 +123,7 @@ public class ActiveArtifactCache extends AbstractArtifactCache { cache(artifact); Set<Object> objects = keyedArtifactCache.get(key, artifact.getBranch()); if (objects == null) { - objects = new HashSet<Object>(); + objects = new HashSet<>(); keyedArtifactCache.put(key, artifact.getBranch(), objects); } if (objects.contains(artifact)) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/checks/AssociatedArtifactCheck.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/checks/AssociatedArtifactCheck.java index b7813df3dc7..5be3967481c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/checks/AssociatedArtifactCheck.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/checks/AssociatedArtifactCheck.java @@ -31,7 +31,7 @@ public class AssociatedArtifactCheck extends ArtifactCheck { @Override public IStatus isDeleteable(Collection<Artifact> artifacts) throws OseeCoreException { - List<Integer> artIdsToCheck = new LinkedList<Integer>(); + List<Integer> artIdsToCheck = new LinkedList<>(); for (Artifact art : artifacts) { if (art.getBranch().equals(CoreBranches.COMMON)) { artIdsToCheck.add(art.getArtId()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/ArtifactFactoryManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/ArtifactFactoryManager.java index 0858ad6f76d..f4b998ca835 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/ArtifactFactoryManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/ArtifactFactoryManager.java @@ -61,7 +61,7 @@ public final class ArtifactFactoryManager { public static synchronized Collection<IArtifactType> getEternalArtifactTypes() { if (eternalArtifactTypes == null) { - eternalArtifactTypes = new HashSet<IArtifactType>(); + eternalArtifactTypes = new HashSet<>(); for (ArtifactFactory factory : getFactories()) { eternalArtifactTypes.addAll(factory.getEternalArtifactTypes()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactMatch.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactMatch.java index 5969c38f010..6f97619d6cc 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactMatch.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactMatch.java @@ -21,7 +21,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact; */ public class ArtifactMatch { private final Artifact artifact; - private final HashCollection<Integer, MatchLocation> matchData = new HashCollection<Integer, MatchLocation>(); + private final HashCollection<Integer, MatchLocation> matchData = new HashCollection<>(); public ArtifactMatch(Artifact artifact) { this.artifact = artifact; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java index b1ac3c99ee9..fb311ed7647 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java @@ -526,7 +526,7 @@ public class ArtifactQuery { Collection<IAttributeType> typesToSearch = attributeTypes.length == 0 ? Collections.singleton( QueryBuilder.ANY_ATTRIBUTE_TYPE) : Arrays.asList(attributeTypes); queryBuilder.and(typesToSearch, queryString, matchCase, matchWordOrder); - List<Artifact> toReturn = new LinkedList<Artifact>(); + List<Artifact> toReturn = new LinkedList<>(); for (Artifact art : queryBuilder.getResults()) { toReturn.add(art); } @@ -578,8 +578,8 @@ public class ArtifactQuery { } public static Collection<? extends Artifact> reloadArtifacts(Collection<? extends Artifact> artifacts, boolean sendRemoteEvent) throws OseeCoreException { - Collection<Artifact> reloadedArts = new ArrayList<Artifact>(artifacts.size()); - HashCollection<IOseeBranch, Artifact> branchMap = new HashCollection<IOseeBranch, Artifact>(); + Collection<Artifact> reloadedArts = new ArrayList<>(artifacts.size()); + HashCollection<IOseeBranch, Artifact> branchMap = new HashCollection<>(); if (artifacts.isEmpty()) { return artifacts; } @@ -587,7 +587,7 @@ public class ArtifactQuery { // separate/group artifacts by branch since ArtifactQueryBuilder only supports a single branch branchMap.put(artifact.getBranch(), artifact); } - Set<Integer> artIds = new HashSet<Integer>(); + Set<Integer> artIds = new HashSet<>(); for (Entry<IOseeBranch, Collection<Artifact>> entrySet : branchMap.entrySet()) { for (Artifact artifact : entrySet.getValue()) { @@ -716,7 +716,7 @@ public class ArtifactQuery { DeletionFlag deletionFlag = searchParameters.isIncludeDeleted() ? DeletionFlag.INCLUDE_DELETED : DeletionFlag.EXCLUDE_DELETED; - Map<Integer, Artifact> artIdToArtifact = new HashMap<Integer, Artifact>(); + Map<Integer, Artifact> artIdToArtifact = new HashMap<>(); List<Artifact> loadedArtifacts = ArtifactLoader.loadArtifacts(result.getIds(), branch, LoadLevel.ALL, INCLUDE_CACHE, deletionFlag, tx); @@ -725,7 +725,7 @@ public class ArtifactQuery { artIdToArtifact.put(art.getArtId(), art); } - Map<Artifact, ArtifactMatch> matches = new HashMap<Artifact, ArtifactMatch>(); + Map<Artifact, ArtifactMatch> matches = new HashMap<>(); for (SearchMatch match : result.getSearchMatches()) { int artId = match.getArtId(); int attrId = match.getAttrId(); @@ -746,7 +746,7 @@ public class ArtifactQuery { public static Long getUuidFromGuid(String guid, IOseeBranch branch) { if (guidToUuid == null) { - guidToUuid = new HashMap<String, Long>(200); + guidToUuid = new HashMap<>(200); } Long result = null; if (guidToUuid.containsKey(guid)) { @@ -763,7 +763,7 @@ public class ArtifactQuery { public static String getGuidFromUuid(long uuid, IOseeBranch branch) { if (uuidToGuid == null) { - uuidToGuid = new HashMap<Long, String>(200); + uuidToGuid = new HashMap<>(200); } String result = null; if (uuidToGuid.containsKey(uuid)) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java index 02fcb85cdb2..48ab3f7d7e8 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java @@ -165,7 +165,7 @@ public class ArtifactQueryBuilder { if (guids.size() == 1) { this.guid = guids.get(0); } else { - this.guids = new ArrayList<String>(); + this.guids = new ArrayList<>(); for (String id : guids) { if (GUID.isValid(id)) { this.guids.add(id); @@ -356,7 +356,7 @@ public class ArtifactQueryBuilder { private static final class LocalIdQueryBuilder implements InvocationHandler { - private final Set<Integer> localIds = new LinkedHashSet<Integer>(); + private final Set<Integer> localIds = new LinkedHashSet<>(); private DeletionFlag allowDeleted = EXCLUDE_DELETED; private int txId = -1; private final IOseeBranch branch; @@ -413,7 +413,7 @@ public class ArtifactQueryBuilder { @SuppressWarnings("unused") public SearchResult getSearchResult() throws OseeCoreException { SearchResponse response = new SearchResponse(); - List<Integer> ids = new LinkedList<Integer>(localIds); + List<Integer> ids = new LinkedList<>(localIds); response.setIds(ids); return response; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/SearchOptions.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/SearchOptions.java index 00c50d02b77..9701ceebd0c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/SearchOptions.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/SearchOptions.java @@ -21,8 +21,8 @@ import org.eclipse.osee.framework.core.enums.DeletionFlag; */ public class SearchOptions { - private final Collection<IAttributeType> attributeTypeGuids = new HashSet<IAttributeType>(); - private final Collection<IArtifactType> artifactTypeGuids = new HashSet<IArtifactType>(); + private final Collection<IAttributeType> attributeTypeGuids = new HashSet<>(); + private final Collection<IArtifactType> artifactTypeGuids = new HashSet<>(); private DeletionFlag deletionFlag; private boolean isMatchWordOrder; private boolean isCaseSensive; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeExtensionManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeExtensionManager.java index 567a8bc2cac..4a236951b1d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeExtensionManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeExtensionManager.java @@ -106,7 +106,7 @@ public class AttributeExtensionManager { } private Map<String, Pair<String, String>> loadExtensions(String extensionPointId, String[] elementNames, String classNameAttribute) throws OseeStateException { - Map<String, Pair<String, String>> toReturn = new HashMap<String, Pair<String, String>>(); + Map<String, Pair<String, String>> toReturn = new HashMap<>(); for (String elementName : elementNames) { List<IConfigurationElement> elements = ExtensionPoints.getExtensionElements(extensionPointId, elementName); for (IConfigurationElement element : elements) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java index a8838a6d092..9e02e0828d7 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java @@ -54,7 +54,7 @@ public class AttributeTypeManager { public static Collection<IAttributeType> getValidAttributeTypes(IOseeBranch branchToken) throws OseeCoreException { Branch branch = getBranchCache().get(branchToken); - Set<IAttributeType> attributeTypes = new HashSet<IAttributeType>(100); + Set<IAttributeType> attributeTypes = new HashSet<>(100); for (ArtifactType artifactType : ArtifactTypeManager.getAllTypes()) { attributeTypes.addAll(artifactType.getAttributeTypes(branch)); } @@ -66,7 +66,7 @@ public class AttributeTypeManager { } public static Collection<IAttributeType> getTaggableTypes() throws OseeCoreException { - Collection<IAttributeType> taggableTypes = new ArrayList<IAttributeType>(); + Collection<IAttributeType> taggableTypes = new ArrayList<>(); for (AttributeType type : getAllTypes()) { if (type.isTaggable()) { taggableTypes.add(type); @@ -76,7 +76,7 @@ public class AttributeTypeManager { } public static Collection<IAttributeType> getSingleMultiplicityTypes() throws OseeCoreException { - Collection<IAttributeType> types = new ArrayList<IAttributeType>(); + Collection<IAttributeType> types = new ArrayList<>(); for (AttributeType type : getAllTypes()) { if (type.getMaxOccurrences() == 1) { types.add(type); @@ -132,7 +132,7 @@ public class AttributeTypeManager { } public static Map<String, String> getEnumerationValueDescriptions(IAttributeType attributeType) throws OseeCoreException { - Map<String, String> values = new HashMap<String, String>(); + Map<String, String> values = new HashMap<>(); for (OseeEnumEntry entry : AttributeTypeManager.getType(attributeType).getOseeEnumType().values()) { values.put(entry.getName(), entry.getDescription()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OseeEnumTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OseeEnumTypeManager.java index e74b677899f..88a2cc475d4 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OseeEnumTypeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OseeEnumTypeManager.java @@ -45,7 +45,7 @@ public class OseeEnumTypeManager { } public static Collection<String> getAllTypeNames() throws OseeCoreException { - List<String> items = new ArrayList<String>(); + List<String> items = new ArrayList<>(); for (OseeEnumType types : getAllTypes()) { items.add(types.getName()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/AttributeAdapterServiceImpl.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/AttributeAdapterServiceImpl.java index 064e75be7ae..b8977aac990 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/AttributeAdapterServiceImpl.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/AttributeAdapterServiceImpl.java @@ -37,10 +37,10 @@ public class AttributeAdapterServiceImpl implements AttributeAdapterService { private Thread thread; public AttributeAdapterServiceImpl() { - registered = new ConcurrentHashMap<String, AttributeAdapter<?>>(); - pending = new CopyOnWriteArrayList<ServiceReference<AttributeAdapter<?>>>(); + registered = new ConcurrentHashMap<>(); + pending = new CopyOnWriteArrayList<>(); - adapterByType = new ConcurrentHashMap<IAttributeType, AttributeAdapter<?>>(); + adapterByType = new ConcurrentHashMap<>(); } public void start() { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeWorker.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeWorker.java index df18062a51e..1a77dea2c93 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeWorker.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeWorker.java @@ -92,7 +92,7 @@ public class RelationChangeWorker implements IChangeWorker { RelationOrderData relationOrderData = new RelationOrderFactory().createRelationOrderData(otherSideCurrent); - List<String> guids = new ArrayList<String>(); + List<String> guids = new ArrayList<>(); for (Entry<Pair<String, String>, Pair<String, List<String>>> relationOrderGuidData : relationOrderData.entrySet()) { guids.addAll(relationOrderGuidData.getValue().getSecond()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchTrackedChanges.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchTrackedChanges.java index e1ec1dbed4f..3045f9df072 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchTrackedChanges.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchTrackedChanges.java @@ -42,8 +42,8 @@ public class CatchTrackedChanges implements CommitAction { @Override public void runCommitAction(IOseeBranch sourceBranch, IOseeBranch destinationBranch) throws OseeCoreException { - Set<Artifact> changedArtifacts = new HashSet<Artifact>(); - Collection<Change> changes = new ArrayList<Change>(); + Set<Artifact> changedArtifacts = new HashSet<>(); + Collection<Change> changes = new ArrayList<>(); IOperation operation = ChangeManager.compareTwoBranchesHead(sourceBranch, destinationBranch, changes); Operations.executeWorkAndCheckStatus(operation); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictManagerExternal.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictManagerExternal.java index 18e1220d57c..b86d1c68e6d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictManagerExternal.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictManagerExternal.java @@ -51,7 +51,7 @@ public class ConflictManagerExternal { } public List<Conflict> getRemainingConflicts() throws OseeCoreException { - List<Conflict> remainingConflicts = new ArrayList<Conflict>(); + List<Conflict> remainingConflicts = new ArrayList<>(); for (Conflict conflict : getOriginalConflicts()) { ConflictStatus status = conflict.getStatus(); if (!status.isResolved() && !status.isCommitted() && !status.isInformational()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java index 5863882c080..addf8134422 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java @@ -295,7 +295,7 @@ public final class FrameworkEventUtil { } public static EventModifiedBasicGuidArtifact getEventModifiedBasicGuidArtifact(EventModType modType, RemoteBasicGuidArtifact1 remGuidArt) { - List<AttributeChange> attributeChanges = new ArrayList<AttributeChange>(); + List<AttributeChange> attributeChanges = new ArrayList<>(); for (RemoteAttributeChange1 remAttrChg : remGuidArt.getAttributes()) { attributeChanges.add(getAttributeChange(remAttrChg)); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java index d0861c33f94..c677e42de7f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java @@ -161,7 +161,7 @@ public final class OseeEventManager { public static List<IEventFilter> getEventFiltersForBranch(final IOseeBranch branch) { try { - List<IEventFilter> eventFilters = new ArrayList<IEventFilter>(2); + List<IEventFilter> eventFilters = new ArrayList<>(2); eventFilters.add(new BranchUuidEventFilter(branch)); return eventFilters; } catch (Exception ex) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/PurgeTransactionEventUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/PurgeTransactionEventUtil.java index 22ef9ac601a..b0437568a99 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/PurgeTransactionEventUtil.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/PurgeTransactionEventUtil.java @@ -46,7 +46,7 @@ public final class PurgeTransactionEventUtil { public static void handleRemotePurgeTransactionEvent(TransactionEvent transEvent) { if (transEvent.getEventType() == TransactionEventType.Purged) { - Set<Artifact> artifactsInCache = new HashSet<Artifact>(); + Set<Artifact> artifactsInCache = new HashSet<>(); for (TransactionChange transChange : transEvent.getTransactionChanges()) { try { TransactionManager.deCache(transChange.getTransactionId()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java index 35755504313..7cc9c561110 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java @@ -38,7 +38,7 @@ public class AccessControlEvent implements FrameworkEvent, HasNetworkSender, Has */ public List<DefaultBasicGuidArtifact> getArtifacts() { if (artifacts == null) { - artifacts = new ArrayList<DefaultBasicGuidArtifact>(); + artifacts = new ArrayList<>(); } return this.artifacts; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java index f81d48b70db..46db24ea1bd 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java @@ -38,8 +38,8 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender { private final Long branchUuid; private int transactionId; private NetworkSender networkSender; - private final List<EventBasicGuidArtifact> artifacts = new ArrayList<EventBasicGuidArtifact>(); - private final List<EventBasicGuidRelation> relations = new ArrayList<EventBasicGuidRelation>(); + private final List<EventBasicGuidArtifact> artifacts = new ArrayList<>(); + private final List<EventBasicGuidRelation> relations = new ArrayList<>(); private final Set<DefaultBasicUuidRelationReorder> relationReorderRecords = new HashSet<DefaultBasicUuidRelationReorder>(); private final ArtifactEventType reloadEvent; @@ -152,7 +152,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender { } private Collection<DefaultBasicGuidArtifact> getRelOrderChangedArtifacts(IRelationType... relationTypes) { - Set<DefaultBasicGuidArtifact> guidArts = new HashSet<DefaultBasicGuidArtifact>(); + Set<DefaultBasicGuidArtifact> guidArts = new HashSet<>(); for (DefaultBasicUuidRelationReorder record : relationReorderRecords) { if (relationTypes == null) { guidArts.add(record.getParentArt()); @@ -168,7 +168,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender { } public Collection<EventBasicGuidArtifact> get(EventModType... eventModTypes) { - Set<EventBasicGuidArtifact> guidArts = new HashSet<EventBasicGuidArtifact>(); + Set<EventBasicGuidArtifact> guidArts = new HashSet<>(); for (EventBasicGuidArtifact guidArt : artifacts) { for (EventModType modType : eventModTypes) { if (guidArt.getModType() == modType) { @@ -180,7 +180,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender { } private Collection<IBasicGuidArtifact> getRelationsArts(RelationEventType... eventModTypes) { - Set<IBasicGuidArtifact> guidArts = new HashSet<IBasicGuidArtifact>(); + Set<IBasicGuidArtifact> guidArts = new HashSet<>(); for (EventBasicGuidRelation guidRel : getRelations(eventModTypes)) { guidArts.add(guidRel.getArtA()); guidArts.add(guidRel.getArtB()); @@ -189,7 +189,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender { } private Collection<EventBasicGuidRelation> getRelations(RelationEventType... eventModTypes) { - Set<EventBasicGuidRelation> guidRels = new HashSet<EventBasicGuidRelation>(); + Set<EventBasicGuidRelation> guidRels = new HashSet<>(); for (EventBasicGuidRelation guidRel : relations) { for (RelationEventType modType : eventModTypes) { if (guidRel.getModType() == modType) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AttributeChange.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AttributeChange.java index 0a3f435a37e..8a53af2368b 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AttributeChange.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AttributeChange.java @@ -133,7 +133,7 @@ public class AttributeChange implements FrameworkEvent { */ public List<String> getData() { if (data == null) { - data = new ArrayList<String>(); + data = new ArrayList<>(); } return this.data; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventBasicGuidArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventBasicGuidArtifact.java index c47742719b4..012aa1481c1 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventBasicGuidArtifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventBasicGuidArtifact.java @@ -54,7 +54,7 @@ public class EventBasicGuidArtifact extends DefaultBasicGuidArtifact { if (eventModType == EventModType.ChangeType) { throw new OseeArgumentException("Can't be used for ChangeType"); } - Set<EventBasicGuidArtifact> eventArts = new HashSet<EventBasicGuidArtifact>(); + Set<EventBasicGuidArtifact> eventArts = new HashSet<>(); for (IBasicGuidArtifact guidArt : basicGuidArtifacts) { eventArts.add(new EventBasicGuidArtifact(eventModType, guidArt)); } @@ -65,7 +65,7 @@ public class EventBasicGuidArtifact extends DefaultBasicGuidArtifact { if (eventModType == EventModType.ChangeType) { throw new OseeArgumentException("Can't be used for ChangeType"); } - Set<EventBasicGuidArtifact> eventArts = new HashSet<EventBasicGuidArtifact>(); + Set<EventBasicGuidArtifact> eventArts = new HashSet<>(); for (RemoteBasicGuidArtifact1 guidArt : basicGuidArtifacts) { eventArts.add(new EventBasicGuidArtifact(eventModType, FrameworkEventUtil.getBranchUuidFromRemoteEvent(guidArt.getBranchGuid()), guidArt.getArtTypeGuid(), diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionChange.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionChange.java index a25e914f787..6f2c7d71e7c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionChange.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionChange.java @@ -19,7 +19,7 @@ public class TransactionChange implements FrameworkEvent { private long branchUuid; private int transactionId; - private final Set<DefaultBasicGuidArtifact> artifacts = new HashSet<DefaultBasicGuidArtifact>(); + private final Set<DefaultBasicGuidArtifact> artifacts = new HashSet<>(); /** * Gets the value of the branchUuid property. diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionEvent.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionEvent.java index 49dd84a0ab3..dd39ff520e7 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionEvent.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionEvent.java @@ -18,7 +18,7 @@ public class TransactionEvent implements FrameworkEvent, HasNetworkSender { private TransactionEventType eventType; private NetworkSender networkSender; - private final List<TransactionChange> transactions = new ArrayList<TransactionChange>(); + private final List<TransactionChange> transactions = new ArrayList<>(); /** * Gets the value of the artifacts property. diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/exportImport/HttpBranchExchange.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/exportImport/HttpBranchExchange.java index 1f0a74c001c..a288d21011f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/exportImport/HttpBranchExchange.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/exportImport/HttpBranchExchange.java @@ -34,7 +34,7 @@ public class HttpBranchExchange { options.setAllAsRootBranches(allAsRootBranches); if (branchUuids != null && branchUuids.length > 0) { - List<Long> ids = new ArrayList<Long>(); + List<Long> ids = new ArrayList<>(); for (Long entry : branchUuids) { ids.add(entry); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/ClientDashboardRequestHandler.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/ClientDashboardRequestHandler.java index f1247a741bc..424ffd03417 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/ClientDashboardRequestHandler.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/ClientDashboardRequestHandler.java @@ -98,7 +98,7 @@ public class ClientDashboardRequestHandler implements IHttpServerRequest { } private List<File> getLogFiles() { - List<File> files = new ArrayList<File>(); + List<File> files = new ArrayList<>(); File file = Platform.getLogFileLocation().removeFileExtension().toFile(); file = new File(file, ".bak_0.log"); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java index d95ee3a5556..7827984ee0c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java @@ -144,7 +144,7 @@ public final class CommitBranchHttpRequestOperation extends AbstractOperation { BranchManager.reloadBranch(sourceBranch.getUuid()); if (!skipChecksAndEvents) { - Collection<Change> changes = new ArrayList<Change>(); + Collection<Change> changes = new ArrayList<>(); IOperation operation = ChangeManager.comparedToPreviousTx(newTransaction, changes); doSubWork(operation, monitor, 1.0); handleArtifactEvents(newTransaction, changes); @@ -158,8 +158,8 @@ public final class CommitBranchHttpRequestOperation extends AbstractOperation { ArtifactEvent artifactEvent = new ArtifactEvent(newTransaction.getBranch()); artifactEvent.setTransactionId(newTransaction.getId()); - Map<Integer, EventModifiedBasicGuidArtifact> artEventMap = new HashMap<Integer, EventModifiedBasicGuidArtifact>(); - Set<Artifact> artifacts = new HashSet<Artifact>(); + Map<Integer, EventModifiedBasicGuidArtifact> artEventMap = new HashMap<>(); + Set<Artifact> artifacts = new HashSet<>(); for (Change change : changes) { LoadChangeType changeType = change.getChangeType(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/ArtifactExtractorContributionManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/ArtifactExtractorContributionManager.java index 80ba9ca386a..95331a2b1d8 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/ArtifactExtractorContributionManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/ArtifactExtractorContributionManager.java @@ -40,7 +40,7 @@ public class ArtifactExtractorContributionManager { } public List<IArtifactExtractorDelegate> getAllDelegates() { - List<IArtifactExtractorDelegate> contentHandlers = new ArrayList<IArtifactExtractorDelegate>(); + List<IArtifactExtractorDelegate> contentHandlers = new ArrayList<>(); ExtensionDefinedObjects<IArtifactExtractorDelegate> contributions = new ExtensionDefinedObjects<IArtifactExtractorDelegate>(PARSER_DELEGATE_EXTENSION, PARSER_DELEGATE_ELEMENT, CLASS_NAME_ATTRIBUTE, true); @@ -51,7 +51,7 @@ public class ArtifactExtractorContributionManager { } public List<IArtifactExtractorDelegate> getDelegates(IArtifactExtractor parser) { - List<IArtifactExtractorDelegate> contentHandlers = new ArrayList<IArtifactExtractorDelegate>(); + List<IArtifactExtractorDelegate> contentHandlers = new ArrayList<>(); if (parser != null) { for (IArtifactExtractorDelegate delegate : getAllDelegates()) { if (delegate.isApplicable(parser)) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java index 95971600c5b..6ee81915cc8 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java @@ -40,7 +40,7 @@ public class RoughArtifact { public RoughArtifact(RoughArtifactKind roughArtifactKind, String name) { this.attributes = new RoughAttributeSet(); - this.children = new ArrayList<RoughArtifact>(); + this.children = new ArrayList<>(); this.roughArtifactKind = roughArtifactKind; setName(name); } @@ -172,7 +172,7 @@ public class RoughArtifact { } public Collection<RoughArtifact> getDescendants() { - Collection<RoughArtifact> decendants = new ArrayList<RoughArtifact>(); + Collection<RoughArtifact> decendants = new ArrayList<>(); for (RoughArtifact child : getChildren()) { if (equals(child.roughParent)) { decendants.add(child); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughAttributeSet.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughAttributeSet.java index ab1aa3cc83b..73438cf543d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughAttributeSet.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughAttributeSet.java @@ -57,14 +57,14 @@ public final class RoughAttributeSet implements Iterable<Entry<CaseInsensitiveSt CaseInsensitiveString key = new CaseInsensitiveString(name); Collection<RoughAttribute> collection = attributes.get(key); if (collection == null) { - collection = new LinkedList<RoughAttribute>(); + collection = new LinkedList<>(); attributes.put(key, collection); } collection.add(attr); } public Set<String> getAttributeTypeNames() { - Set<String> typeNames = new LinkedHashSet<String>(); + Set<String> typeNames = new LinkedHashSet<>(); for (CharSequence attrTypeName : attributes.keySet()) { typeNames.add(attrTypeName.toString()); } @@ -93,7 +93,7 @@ public final class RoughAttributeSet implements Iterable<Entry<CaseInsensitiveSt if (roughAttributes == null) { return null; } - Collection<String> values = new ArrayList<String>(); + Collection<String> values = new ArrayList<>(); for (RoughAttribute attribute : roughAttributes) { if (!attribute.hasURI()) { values.add(attribute.getValue()); @@ -103,7 +103,7 @@ public final class RoughAttributeSet implements Iterable<Entry<CaseInsensitiveSt } public Collection<URI> getURIAttributes() { - Collection<URI> values = new ArrayList<URI>(); + Collection<URI> values = new ArrayList<>(); for (Collection<RoughAttribute> attributeSets : attributes.values()) { for (RoughAttribute attribute : attributeSets) { if (attribute.hasURI()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java index 3961b721894..95899d47b97 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java @@ -54,12 +54,12 @@ public class FilterArtifactTypesByAttributeTypes extends AbstractOperation { @Override protected void doWork(IProgressMonitor monitor) throws Exception { - Set<String> names = new HashSet<String>(); + Set<String> names = new HashSet<>(); for (RoughArtifact artifact : collector.getRoughArtifacts()) { names.addAll(artifact.getAttributeTypeNames()); } selectedArtifactTypes.clear(); - Set<IAttributeType> requiredTypes = new HashSet<IAttributeType>(); + Set<IAttributeType> requiredTypes = new HashSet<>(); for (String name : names) { requiredTypes.add(AttributeTypeManager.getType(name)); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughArtifactCollector.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughArtifactCollector.java index 06a276ca5af..7caab43e8f2 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughArtifactCollector.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughArtifactCollector.java @@ -27,8 +27,8 @@ public class RoughArtifactCollector { public RoughArtifactCollector(RoughArtifact parentRoughArtifact) { this.parentRoughArtifact = parentRoughArtifact; - roughArtifacts = new ArrayList<RoughArtifact>(); - roughRelations = new ArrayList<RoughRelation>(); + roughArtifacts = new ArrayList<>(); + roughRelations = new ArrayList<>(); } public void reset() { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughToRealArtifactOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughToRealArtifactOperation.java index 24ddfd87d2b..d5612078d20 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughToRealArtifactOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughToRealArtifactOperation.java @@ -54,7 +54,7 @@ public class RoughToRealArtifactOperation extends AbstractOperation { this.artifactResolver = artifactResolver; this.destinationArtifact = destinationArtifact; this.importArtifactOrder = RelationOrderBaseTypes.USER_DEFINED; - this.roughToRealArtifact = new HashMap<RoughArtifact, Artifact>(); + this.roughToRealArtifact = new HashMap<>(); this.deleteUnmatchedArtifacts = deleteUnmatchedArtifacts; this.extractor = extractor; roughToRealArtifact.put(rawData.getParentRoughArtifact(), this.destinationArtifact); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsArtifactExtractor.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsArtifactExtractor.java index 819401c6af0..428dd355ba3 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsArtifactExtractor.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsArtifactExtractor.java @@ -44,7 +44,7 @@ import org.jsoup.nodes.Node; */ public class DoorsArtifactExtractor extends AbstractArtifactExtractor { - private final Vector<String> postProcessGuids = new Vector<String>(); + private final Vector<String> postProcessGuids = new Vector<>(); private String uriDirectoryName = ""; private OperationLogger logger; private final static String NAME_TAG = "<a name="; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsColumnType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsColumnType.java index 54c37847dbf..b89b1fafe3d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsColumnType.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsColumnType.java @@ -37,7 +37,7 @@ public enum DoorsColumnType { OTHER(""); private final String columnType; - private final static Map<String, DoorsColumnType> rawStringToDataType = new HashMap<String, DoorsColumnType>(); + private final static Map<String, DoorsColumnType> rawStringToDataType = new HashMap<>(); static { for (DoorsColumnType enumStatus : DoorsColumnType.values()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsDataType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsDataType.java index f4c9266fd6e..d91176af2e6 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsDataType.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsDataType.java @@ -36,7 +36,7 @@ public enum DoorsDataType { private final String _dataType; private final Boolean isSingle; // marks the type as single, that is, not to be combined during processing - private final static Map<String, DoorsDataType> rawStringToDataType = new HashMap<String, DoorsDataType>(); + private final static Map<String, DoorsDataType> rawStringToDataType = new HashMap<>(); static { for (DoorsDataType enumStatus : DoorsDataType.values()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsTableRowCollector.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsTableRowCollector.java index 3ec80737583..d8c99612d3d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsTableRowCollector.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsTableRowCollector.java @@ -37,7 +37,7 @@ public class DoorsTableRowCollector { private final DoorsArtifactExtractor extractor; private final ArrayList<DoorsTableRow> rawRows = Lists.newArrayList(); private final HashMap<DoorsColumnType, Integer> columns = Maps.newHashMap(); - private final Stack<DoorsTableRow> stack = new Stack<DoorsTableRow>(); + private final Stack<DoorsTableRow> stack = new Stack<>(); private final static String UNKNOWN_STRING = "unknown"; public DoorsTableRowCollector(DoorsArtifactExtractor extractor) { @@ -77,7 +77,7 @@ public class DoorsTableRowCollector { public void createArtifacts(RoughArtifactCollector collector) { analyzeRows(); - Queue<DoorsTableRow> queue = new LinkedList<DoorsTableRow>(); + Queue<DoorsTableRow> queue = new LinkedList<>(); DoorsArtifactBuilder dab = new DoorsArtifactBuilder(extractor, this); for (DoorsTableRow dr : getTableRows()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/ExcelArtifactExtractor.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/ExcelArtifactExtractor.java index 839302a8361..0661274555f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/ExcelArtifactExtractor.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/ExcelArtifactExtractor.java @@ -90,7 +90,7 @@ public class ExcelArtifactExtractor extends AbstractArtifactExtractor { GUID("GUID"), OTHER(""); - private final static Map<String, RowTypeEnum> rawStringToRowType = new HashMap<String, RowTypeEnum>(); + private final static Map<String, RowTypeEnum> rawStringToRowType = new HashMap<>(); public String _rowType; @@ -108,7 +108,7 @@ public class ExcelArtifactExtractor extends AbstractArtifactExtractor { return returnVal != null ? returnVal : OTHER; } } - private final Map<Integer, RowTypeEnum> rowIndexToRowTypeMap = new HashMap<Integer, RowTypeEnum>(); + private final Map<Integer, RowTypeEnum> rowIndexToRowTypeMap = new HashMap<>(); private final Matcher guidMatcher; private final RoughArtifactCollector collector; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolution.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolution.java index 0cffa7ba9bc..611ed949cd9 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolution.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolution.java @@ -86,7 +86,7 @@ public final class OutlineResolution { */ public Set<String> generateNextSet(ReqNumbering lastNumberParagrah) { - Set<String> nextParagraphs = new HashSet<String>(); + Set<String> nextParagraphs = new HashSet<>(); String last = lastNumberParagrah.getNumberString(); if (last.endsWith(".0")) { @@ -117,7 +117,7 @@ public final class OutlineResolution { } - Set<String> dotEnding = new HashSet<String>(nextParagraphs.size()); + Set<String> dotEnding = new HashSet<>(nextParagraphs.size()); for (String next : nextParagraphs) { dotEnding.add(next + "."); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractor.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractor.java index 08e76aef651..828d794e50b 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractor.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractor.java @@ -59,10 +59,10 @@ public class WordOutlineExtractor extends AbstractArtifactExtractor { private final Matcher reqNumberMatcher = Pattern.compile("(\\d+\\.)*(\\d+\\.?)\\s*").matcher(""); private final Matcher reqListMatcher = Pattern.compile("\\w+\\)", Pattern.CASE_INSENSITIVE).matcher(""); - private final Stack<String> currentListStack = new Stack<String>(); + private final Stack<String> currentListStack = new Stack<>(); private final int maxExtractionDepth = 0; - private Stack<String> clonedCurrentListStack = new Stack<String>(); + private Stack<String> clonedCurrentListStack = new Stack<>(); private int lastDepthNumber; private String headerNumber = ""; private String listIdentifier = ""; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractorDelegate.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractorDelegate.java index a60a56baa06..da8b4d9890e 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractorDelegate.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractorDelegate.java @@ -79,8 +79,8 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate */ @Override public void initialize() { - duplicateCatcher = new HashMap<String, RoughArtifact>(); - roughArtMeta = new HashMap<String, String>(); + duplicateCatcher = new HashMap<>(); + roughArtMeta = new HashMap<>(); lastHeaderNumber = new StringBuffer(); lastHeaderName = new StringBuffer(); lastContent = new StringBuffer(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/AttributeBasedArtifactResolver.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/AttributeBasedArtifactResolver.java index 05e6f78a977..1d02c6f2223 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/AttributeBasedArtifactResolver.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/AttributeBasedArtifactResolver.java @@ -77,7 +77,7 @@ public class AttributeBasedArtifactResolver extends NewArtifactImportResolver { if (roughParent != null) { List<Artifact> descendants = root.getDescendants(); - Collection<Artifact> candidates = new LinkedList<Artifact>(); + Collection<Artifact> candidates = new LinkedList<>(); System.out.println(String.format("Resolved using: %s", !descendants.isEmpty() ? "root node." : "realParent descendants.")); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/RoughArtifactTranslatorImpl.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/RoughArtifactTranslatorImpl.java index 7e9b27724e8..bd89a266d93 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/RoughArtifactTranslatorImpl.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/RoughArtifactTranslatorImpl.java @@ -43,7 +43,7 @@ public class RoughArtifactTranslatorImpl implements IRoughArtifactTranslator { if (attributeType instanceof AttributeType) { AttributeType type = (AttributeType) attributeType; if (type.getBaseAttributeTypeId().contains("Boolean")) { - ArrayList<Boolean> booleanValues = new ArrayList<Boolean>(); + ArrayList<Boolean> booleanValues = new ArrayList<>(); for (String state : values) { Boolean value = new Boolean(state.equalsIgnoreCase("True")); booleanValues.add(value); @@ -57,7 +57,7 @@ public class RoughArtifactTranslatorImpl implements IRoughArtifactTranslator { } } else { Collection<RoughAttribute> roughAttributes = entry.getValue(); - Collection<InputStream> streams = new LinkedList<InputStream>(); + Collection<InputStream> streams = new LinkedList<>(); try { for (RoughAttribute attribute : roughAttributes) { streams.add(attribute.getContent()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java index f140a6a192d..6d401846b48 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java @@ -203,7 +203,7 @@ public class AccessPolicyImpl implements AccessPolicy { java.util.Collections.singleton(relationTypeSide), PermissionEnum.WRITE, level); if (!status.matched()) { - ArrayList<IBasicArtifact<?>> artifacts = new ArrayList<IBasicArtifact<?>>(); + ArrayList<IBasicArtifact<?>> artifacts = new ArrayList<>(); artifacts.add(subject); if (toBeRelated != null) { artifacts.addAll(toBeRelated); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/ClientCachingServiceProxy.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/ClientCachingServiceProxy.java index 2e36842d65a..5d2488251c0 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/ClientCachingServiceProxy.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/ClientCachingServiceProxy.java @@ -82,7 +82,7 @@ public class ClientCachingServiceProxy implements IOseeCachingService { attributeTypeCache = new AttributeTypeCache(); relationTypeCache = new RelationTypeCache(); - caches = new ArrayList<IOseeCache<?, ?>>(); + caches = new ArrayList<>(); caches.add(branchCache); caches.add(txCache); caches.add(artifactTypeCache); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/DslToTypeLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/DslToTypeLoader.java index b7a43271572..dbd35abea08 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/DslToTypeLoader.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/DslToTypeLoader.java @@ -157,7 +157,7 @@ public class DslToTypeLoader implements TypesLoader { } private void translateSuperTypes(TypeBuffer buffer, ArtifactType targetArtifactType, XArtifactType xArtifactType) throws OseeCoreException { - Set<ArtifactType> oseeSuperTypes = new HashSet<ArtifactType>(); + Set<ArtifactType> oseeSuperTypes = new HashSet<>(); for (XArtifactType xSuperType : xArtifactType.getSuperArtifactTypes()) { String superTypeName = xSuperType.getName(); ArtifactType oseeSuperType = buffer.getArtTypes().getUniqueByName(superTypeName); @@ -180,7 +180,7 @@ public class DslToTypeLoader implements TypesLoader { if (oseeAttributeType != null) { Collection<AttributeType> listOfAllowedAttributes = validAttributes.get(branch); if (listOfAllowedAttributes == null) { - listOfAllowedAttributes = new HashSet<AttributeType>(); + listOfAllowedAttributes = new HashSet<>(); validAttributes.put(branch, listOfAllowedAttributes); } listOfAllowedAttributes.add(oseeAttributeType); @@ -225,7 +225,7 @@ public class DslToTypeLoader implements TypesLoader { public Void caseRemoveAttribute(RemoveAttribute removeOption) { XAttributeType attribute = removeOption.getAttribute(); String guidToMatch = attribute.getUuid(); - List<XAttributeTypeRef> toRemove = new LinkedList<XAttributeTypeRef>(); + List<XAttributeTypeRef> toRemove = new LinkedList<>(); for (XAttributeTypeRef xAttributeTypeRef : validAttributeTypes) { String itemGuid = xAttributeTypeRef.getValidAttributeType().getUuid(); if (guidToMatch.equals(itemGuid)) { @@ -240,7 +240,7 @@ public class DslToTypeLoader implements TypesLoader { public Void caseUpdateAttribute(UpdateAttribute updateAttribute) { XAttributeTypeRef refToUpdate = updateAttribute.getAttribute(); String guidToMatch = refToUpdate.getValidAttributeType().getUuid(); - List<XAttributeTypeRef> toRemove = new LinkedList<XAttributeTypeRef>(); + List<XAttributeTypeRef> toRemove = new LinkedList<>(); for (XAttributeTypeRef xAttributeTypeRef : validAttributeTypes) { String itemGuid = xAttributeTypeRef.getValidAttributeType().getUuid(); if (guidToMatch.equals(itemGuid)) { @@ -271,7 +271,7 @@ public class DslToTypeLoader implements TypesLoader { OseeEnumType oseeEnumType = enumTypeFactory.createOrUpdate(buffer.getEnumTypes(), enumUuid, enumTypeName); int lastOrdinal = 0; - List<OseeEnumEntry> oseeEnumEntries = new ArrayList<OseeEnumEntry>(); + List<OseeEnumEntry> oseeEnumEntries = new ArrayList<>(); for (XOseeEnumEntry xEnumEntry : xEnumType.getEnumEntries()) { String entryName = xEnumEntry.getName(); String ordinal = xEnumEntry.getOrdinal(); @@ -310,7 +310,7 @@ public class DslToTypeLoader implements TypesLoader { public Void caseRemoveEnum(RemoveEnum removeEnum) { XOseeEnumEntry enumEntry = removeEnum.getEnumEntry(); String guidToMatch = enumEntry.getEntryGuid(); - List<XOseeEnumEntry> toRemove = new LinkedList<XOseeEnumEntry>(); + List<XOseeEnumEntry> toRemove = new LinkedList<>(); for (XOseeEnumEntry item : enumEntries) { String itemGuid = item.getEntryGuid(); if (guidToMatch.equals(itemGuid)) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseBranchAccessor.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseBranchAccessor.java index f548feca214..ec477f7c025 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseBranchAccessor.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseBranchAccessor.java @@ -59,10 +59,10 @@ public class DatabaseBranchAccessor implements IOseeDataAccessor<Long, Branch> { @Override public void load(IOseeCache<Long, Branch> cache) throws OseeCoreException { - Map<Branch, Long> childToParent = new HashMap<Branch, Long>(); - Map<Branch, Integer> branchToBaseTx = new HashMap<Branch, Integer>(); - Map<Branch, Integer> branchToSourceTx = new HashMap<Branch, Integer>(); - Map<Branch, Integer> associatedArtifact = new HashMap<Branch, Integer>(); + Map<Branch, Long> childToParent = new HashMap<>(); + Map<Branch, Integer> branchToBaseTx = new HashMap<>(); + Map<Branch, Integer> branchToSourceTx = new HashMap<>(); + Map<Branch, Integer> associatedArtifact = new HashMap<>(); BranchCache brCache = (BranchCache) cache; loadBranches(brCache, childToParent, branchToBaseTx, branchToSourceTx, associatedArtifact); @@ -116,7 +116,7 @@ public class DatabaseBranchAccessor implements IOseeDataAccessor<Long, Branch> { } private void loadBranchRelatedTransactions(BranchCache cache, Map<Branch, Integer> branchToBaseTx, Map<Branch, Integer> branchToSourceTx) throws OseeCoreException { - Set<Integer> transactionIds = new HashSet<Integer>(); + Set<Integer> transactionIds = new HashSet<>(); transactionIds.addAll(branchToSourceTx.values()); transactionIds.addAll(branchToBaseTx.values()); txCache.loadTransactions(transactionIds); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/StoreBranchDatabaseCallable.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/StoreBranchDatabaseCallable.java index 9c1bdf3d7f4..ba6f633b46f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/StoreBranchDatabaseCallable.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/StoreBranchDatabaseCallable.java @@ -39,9 +39,9 @@ public class StoreBranchDatabaseCallable { public IStatus handleTxWork() throws OseeCoreException { JdbcConnection connection = jdbcClient.getConnection(); try { - List<Object[]> insertData = new ArrayList<Object[]>(); - List<Object[]> updateData = new ArrayList<Object[]>(); - List<Object[]> deleteData = new ArrayList<Object[]>(); + List<Object[]> insertData = new ArrayList<>(); + List<Object[]> updateData = new ArrayList<>(); + List<Object[]> deleteData = new ArrayList<>(); for (Branch branch : branches) { if (isDataDirty(branch)) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/EventListenerRegistry.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/EventListenerRegistry.java index aa40a090cca..fa98d58e8a4 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/EventListenerRegistry.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/EventListenerRegistry.java @@ -31,7 +31,7 @@ public class EventListenerRegistry { private final Map<EventQosType, EventListeners> qosToListeners = new ConcurrentHashMap<EventQosType, EventListeners>(); - private final Set<IEventListener> listenerSet = new HashSet<IEventListener>(); + private final Set<IEventListener> listenerSet = new HashSet<>(); public void addListener(EventQosType qos, IEventListener listener) { if (listener != null) { @@ -99,7 +99,7 @@ public class EventListenerRegistry { @Override public String toString() { - List<String> values = new ArrayList<String>(); + List<String> values = new ArrayList<>(); for (EventQosType type : EventQosType.values()) { EventListeners registry = qosToListeners.get(type); for (Class<? extends FrameworkEvent> clazz : registry.keySet()) { @@ -130,7 +130,7 @@ public class EventListenerRegistry { private void add(Class<? extends FrameworkEvent> clazz, IEventListener listener) { Set<IEventListener> items = eventClassToListeners.get(clazz); if (items == null) { - items = new HashSet<IEventListener>(); + items = new HashSet<>(); eventClassToListeners.put(clazz, items); } synchronized (items) { @@ -181,7 +181,7 @@ public class EventListenerRegistry { if (items == null) { items = Collections.emptySet(); } else { - Collection<D> copy = new HashSet<D>(); + Collection<D> copy = new HashSet<>(); copy.addAll(items); items = copy; } @@ -190,7 +190,7 @@ public class EventListenerRegistry { @SuppressWarnings("unchecked") private Collection<Class<? extends FrameworkEvent>> getCompatibleEvents(IEventListener listener) { - Collection<Class<? extends FrameworkEvent>> events = new HashSet<Class<? extends FrameworkEvent>>(); + Collection<Class<? extends FrameworkEvent>> events = new HashSet<>(); Method[] methods = listener.getClass().getMethods(); if (methods != null) { for (Method method : methods) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/OseeEventThreadFactory.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/OseeEventThreadFactory.java index cf1704c68f8..0971caecd95 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/OseeEventThreadFactory.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/OseeEventThreadFactory.java @@ -25,7 +25,7 @@ public final class OseeEventThreadFactory implements ThreadFactory { public OseeEventThreadFactory(String threadName, int priority) { this.threadName = threadName; - this.threads = new CopyOnWriteArrayList<WeakReference<Thread>>(); + this.threads = new CopyOnWriteArrayList<>(); this.priority = priority; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserAdminImpl.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserAdminImpl.java index c8bb92d879e..1bb73af52d4 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserAdminImpl.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserAdminImpl.java @@ -150,7 +150,7 @@ public class UserAdminImpl implements UserAdmin { @Override public List<User> getActiveUsers() throws OseeCoreException { Cache<String, User> cache = getCache(); - List<User> activeUsers = new ArrayList<User>(); + List<User> activeUsers = new ArrayList<>(); Iterable<User> all = null; try { all = cache.getAll(); @@ -168,7 +168,7 @@ public class UserAdminImpl implements UserAdmin { @Override public List<User> getUsersAll() throws OseeCoreException { Cache<String, User> cache = getCache(); - List<User> users = new ArrayList<User>(); + List<User> users = new ArrayList<>(); Iterable<User> all = null; try { all = cache.getAll(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserArtifactEventListener.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserArtifactEventListener.java index 1a39758f17b..141786e749d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserArtifactEventListener.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserArtifactEventListener.java @@ -89,7 +89,7 @@ public class UserArtifactEventListener implements IArtifactEventListener { } private Set<String> getKeysToInvalidate(Collection<Artifact> cacheArtifacts) { - Set<String> keys = new HashSet<String>(); + Set<String> keys = new HashSet<>(); for (Artifact artifact : cacheArtifacts) { if (artifact instanceof User) { User user = (User) artifact; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserDataLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserDataLoader.java index 7623a89e05e..f63be7657a8 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserDataLoader.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserDataLoader.java @@ -39,7 +39,7 @@ public class UserDataLoader implements CacheDataLoader<String, User> { @Override public Map<String, User> load(Iterable<? extends String> keys) throws OseeCoreException { List<Artifact> artifacts = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.User, CoreBranches.COMMON); - Map<String, User> result = new HashMap<String, User>(); + Map<String, User> result = new HashMap<>(); for (Artifact artifact : artifacts) { User user = (User) artifact; result.put(user.getUserId(), user); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserKeysProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserKeysProvider.java index 4a87496c9fa..c97fd4f6434 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserKeysProvider.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserKeysProvider.java @@ -40,7 +40,7 @@ public class UserKeysProvider extends LazyObject<Iterable<? extends String>> imp @Override public Iterable<? extends String> call() throws Exception { - Set<String> userIds = new LinkedHashSet<String>(); + Set<String> userIds = new LinkedHashSet<>(); List<Artifact> artifacts = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.User, CoreBranches.COMMON); for (Artifact artifact : artifacts) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/OseeLinkParser.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/OseeLinkParser.java index 659de9c7e47..3fd8529473e 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/OseeLinkParser.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/OseeLinkParser.java @@ -32,7 +32,7 @@ public final class OseeLinkParser { private final Map<String, String> parameterMap; public OseeLinkParser() { - this.parameterMap = new HashMap<String, String>(); + this.parameterMap = new HashMap<>(); } public void parse(String link) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/WordMlLinkHandler.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/WordMlLinkHandler.java index 73ffe2be7c9..76c7691bbaf 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/WordMlLinkHandler.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/WordMlLinkHandler.java @@ -147,7 +147,7 @@ public class WordMlLinkHandler { * @return locations where WordMlLinks were found grouped by GUID */ private static HashCollection<String, MatchRange> parseOseeWordMLLinks(String content) throws OseeCoreException { - HashCollection<String, MatchRange> matchMap = new HashCollection<String, MatchRange>(); + HashCollection<String, MatchRange> matchMap = new HashCollection<>(); OseeLinkParser linkParser = new OseeLinkParser(); WORDML_LINK.reset(content); while (WORDML_LINK.find()) { @@ -190,7 +190,7 @@ public class WordMlLinkHandler { } private static List<String> getGuidsNotFound(List<String> guidsFromLinks, List<Artifact> artifactsFound) { - Set<String> artGuids = new HashSet<String>(); + Set<String> artGuids = new HashSet<>(); for (Artifact artifact : artifactsFound) { artGuids.add(artifact.getGuid()); } @@ -201,7 +201,7 @@ public class WordMlLinkHandler { Branch branch = source.getFullBranch(); ChangeSet changeSet = new ChangeSet(original); List<Artifact> artifactsFromSearch = null; - List<String> guidsFromLinks = new ArrayList<String>(matchMap.keySet()); + List<String> guidsFromLinks = new ArrayList<>(matchMap.keySet()); artifactsFromSearch = findArtifacts(source.getTransactionRecord(), source.getBranch(), source.isHistorical(), guidsFromLinks); @@ -209,7 +209,7 @@ public class WordMlLinkHandler { Branch sourceBranch = branch.getParentBranch(); List<String> unknownGuids = getGuidsNotFound(guidsFromLinks, artifactsFromSearch); - List<Artifact> union = new ArrayList<Artifact>(); + List<Artifact> union = new ArrayList<>(); union.addAll(findArtifacts(branch.getSourceTransaction(), sourceBranch, source.isHistorical(), unknownGuids)); union.addAll(artifactsFromSearch); artifactsFromSearch = union; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java index b29aa6f9138..13f8f352fb4 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java @@ -88,7 +88,7 @@ public class RelationCache { IRelationType relationType = newRelation.getRelationType(); List<RelationLink> selectedRelations = getAllByType(artifact, relationType); if (selectedRelations == null) { - selectedRelations = new CopyOnWriteArrayList<RelationLink>(); + selectedRelations = new CopyOnWriteArrayList<>(); relationsByType.put(new ArtifactKey(artifact), relationType, selectedRelations); } if (selectedRelations.contains(newRelation)) { @@ -110,7 +110,7 @@ public class RelationCache { public List<RelationLink> getRelations(IArtifact artifact, DeletionFlag deletionFlag) { ArtifactKey key = getKey(artifact); - List<RelationLink> linksFound = new ArrayList<RelationLink>(); + List<RelationLink> linksFound = new ArrayList<>(); RelationMatcher matcher = RelationFilterUtil.createMatcher(deletionFlag); findRelations(linksFound, key, matcher); return linksFound; @@ -140,7 +140,7 @@ public class RelationCache { */ public RelationLink getByRelIdOnArtifact(int relLinkId, int aArtifactId, int bArtifactId, IOseeBranch branch) { RelationMatcher relIdMatcher = RelationFilterUtil.createFindFirstRelationLinkIdMatcher(relLinkId); - List<RelationLink> links = new ArrayList<RelationLink>(); + List<RelationLink> links = new ArrayList<>(); findRelations(links, aArtifactId, branch, relIdMatcher); if (links.isEmpty()) { findRelations(links, bArtifactId, branch, relIdMatcher); @@ -149,7 +149,7 @@ public class RelationCache { } public RelationLink getLoadedRelation(IArtifact artifact, int aArtifactId, int bArtifactId, IRelationType relationType, DeletionFlag deletionFlag) { - Set<RelationLink> itemsFound = new HashSet<RelationLink>(); + Set<RelationLink> itemsFound = new HashSet<>(); final int artifactId = artifact.getArtId(); final IOseeBranch branchUuid = artifact.getBranch(); @@ -169,7 +169,7 @@ public class RelationCache { RelationMatcher matcher = RelationFilterUtil.createMatcher(deletionFlag, artIdMatcher); findRelations(itemsFound, artifactId, branchUuid, relationType, matcher); - List<RelationLink> relations = new ArrayList<RelationLink>(); + List<RelationLink> relations = new ArrayList<>(); for (RelationLink relation : itemsFound) { if (relation.getAArtifactId() == aArtifactId && relation.getBArtifactId() == bArtifactId) { relations.add(relation); @@ -187,7 +187,7 @@ public class RelationCache { public RelationLink getLoadedRelation(IRelationType relationType, final int aArtifactId, final int bArtifactId, IOseeBranch branch) { RelationMatcher bArtIdMatcher = RelationFilterUtil.createFindFirstRelatedArtIdMatcher(bArtifactId, RelationSide.SIDE_B); - List<RelationLink> links = new ArrayList<RelationLink>(); + List<RelationLink> links = new ArrayList<>(); findRelations(links, aArtifactId, branch, relationType, bArtIdMatcher); if (links.isEmpty()) { RelationMatcher aArtIdMatcher = diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationFilterUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationFilterUtil.java index c23c6a381e5..baf0d2fc4d9 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationFilterUtil.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationFilterUtil.java @@ -132,7 +132,7 @@ public class RelationFilterUtil { private static final class CompositeMatcher implements RelationMatcher { - private final List<RelationMatcher> matchers = new ArrayList<RelationMatcher>(); + private final List<RelationMatcher> matchers = new ArrayList<>(); public void add(RelationMatcher matcher) { matchers.add(matcher); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java index 26ac02b34eb..5112bc0dc9f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java @@ -76,7 +76,7 @@ public class RelationManager { if (artifact != null) { List<RelationLink> artifactsRelations = relationCache.getAll(artifact); if (artifactsRelations == null) { - artifactsRelations = new CopyOnWriteArrayList<RelationLink>(); + artifactsRelations = new CopyOnWriteArrayList<>(); } // Verify that relation is unique by aArtId, bArtId and relTypeId; Needs to be cleaned up in DB, Only log problem. @@ -130,9 +130,9 @@ public class RelationManager { List<Artifact> relatedArtifacts; if (selectedRelations == null) { - relatedArtifacts = new ArrayList<Artifact>(); + relatedArtifacts = new ArrayList<>(); } else { - relatedArtifacts = new ArrayList<Artifact>(selectedRelations.size()); + relatedArtifacts = new ArrayList<>(selectedRelations.size()); Collection<Artifact> bulkLoadedArtifacts = ArtifactQuery.getArtifactListFromIds( @@ -159,7 +159,7 @@ public class RelationManager { } private static Collection<Integer> getRelatedArtifactIds(List<RelationLink> relations, RelationSide side, DeletionFlag allowDeleted) { - Collection<Integer> ret = new HashSet<Integer>(); + Collection<Integer> ret = new HashSet<>(); if (relations != null) { for (RelationLink rel : relations) { if (allowDeleted == INCLUDE_DELETED || allowDeleted == EXCLUDE_DELETED && !rel.isDeleted()) { @@ -177,10 +177,10 @@ public class RelationManager { public static Set<Artifact> getRelatedArtifacts(Collection<? extends Artifact> artifacts, int depth, DeletionFlag allowDeleted, IRelationTypeSide... relationEnums) throws OseeCoreException { findHistoricalArtifacts(artifacts); - Set<Artifact> relatedArtifacts = new HashSet<Artifact>(artifacts.size() * 8); - Collection<Artifact> newArtifactsToSearch = new ArrayList<Artifact>(artifacts); - Collection<Artifact> newArtifacts = new ArrayList<Artifact>(); - Set<Integer> relatedArtIds = new HashSet<Integer>(); + Set<Artifact> relatedArtifacts = new HashSet<>(artifacts.size() * 8); + Collection<Artifact> newArtifactsToSearch = new ArrayList<>(artifacts); + Collection<Artifact> newArtifacts = new ArrayList<>(); + Set<Integer> relatedArtIds = new HashSet<>(); if (artifacts.isEmpty()) { return relatedArtifacts; } @@ -189,7 +189,7 @@ public class RelationManager { for (int i = 0; i < depth && !newArtifactsToSearch.isEmpty(); i++) { relatedArtIds.clear(); for (Artifact artifact : newArtifactsToSearch) { - List<RelationLink> selectedRelations = new ArrayList<RelationLink>(); + List<RelationLink> selectedRelations = new ArrayList<>(); if (relationEnums.length == 0) { /** * since getting relations by type will return the link between this artifact and it's parent, make sure @@ -243,7 +243,7 @@ public class RelationManager { public static List<Artifact> getRelatedArtifacts(Artifact artifact, IRelationTypeSide relationType, DeletionFlag deletionFlag) throws OseeCoreException { List<Artifact> artifacts = getRelatedArtifacts(artifact, relationType, relationType.getSide()); - Collection<Integer> artIds = new ArrayList<Integer>(); + Collection<Integer> artIds = new ArrayList<>(); if (deletionFlag.areDeletedAllowed()) { Object[] formatArgs = relationType.getSide().isSideA() ? new Object[] {"a", "b"} : new Object[] {"b", "a"}; @@ -381,7 +381,7 @@ public class RelationManager { return Collections.emptyList(); } - List<RelationLink> relations = new ArrayList<RelationLink>(selectedRelations.size()); + List<RelationLink> relations = new ArrayList<>(selectedRelations.size()); for (RelationLink relation : selectedRelations) { if (!relation.isDeleted()) { @@ -461,7 +461,7 @@ public class RelationManager { "Artifact [%s] is historical. Historical relations are only supported on the server.", artifact); } List<RelationLink> selectedRelations = relationCache.getAll(artifact); - Set<Pair<IRelationType, RelationSide>> typesToUpdate = new HashSet<Pair<IRelationType, RelationSide>>(); + Set<Pair<IRelationType, RelationSide>> typesToUpdate = new HashSet<>(); if (selectedRelations != null) { for (RelationLink relation : selectedRelations) { typesToUpdate.add(new Pair<IRelationType, RelationSide>(relation.getRelationType(), @@ -504,7 +504,7 @@ public class RelationManager { } Collection<RelationLink> links = relationCache.getAll(artifact); if (!links.isEmpty()) { - List<Object[]> batchArgs = new ArrayList<Object[]>(links.size()); + List<Object[]> batchArgs = new ArrayList<>(links.size()); String PURGE_RELATION = "delete from osee_relation_link WHERE rel_link_id = ?"; for (RelationLink link : links) { batchArgs.add(new Object[] {link.getId()}); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java index 60d45874d99..57e64c001fe 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java @@ -45,7 +45,7 @@ public class RelationTypeManager { public static List<RelationType> getValidTypes(IArtifactType artifactType, IOseeBranch branch) throws OseeCoreException { Collection<RelationType> relationTypes = getAllTypes(); - List<RelationType> validRelationTypes = new ArrayList<RelationType>(); + List<RelationType> validRelationTypes = new ArrayList<>(); for (RelationType relationType : relationTypes) { int sideAMax = getRelationSideMax(relationType, artifactType, RelationSide.SIDE_A); int sideBMax = getRelationSideMax(relationType, artifactType, RelationSide.SIDE_B); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java index 43c90fcf357..bad7a1c36d2 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java @@ -43,7 +43,7 @@ public class RelationOrderData { private final IArtifact artifact; public RelationOrderData(IRelationOrderAccessor accessor, IArtifact artifact) { - this.lists = new CompositeKeyHashMap<String, String, Pair<String, List<String>>>(); + this.lists = new CompositeKeyHashMap<>(); this.accessor = accessor; this.artifact = artifact; } @@ -174,8 +174,8 @@ public class RelationOrderData { result = o1.getValue().getFirst().compareTo(o2.getValue().getFirst()); } if (result == 0) { - List<String> guids1 = new ArrayList<String>(o1.getValue().getSecond()); - List<String> guids2 = new ArrayList<String>(o2.getValue().getSecond()); + List<String> guids1 = new ArrayList<>(o1.getValue().getSecond()); + List<String> guids2 = new ArrayList<>(o2.getValue().getSecond()); result = guids1.size() - guids2.size(); if (result == 0) { Collections.sort(guids1); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergeUtility.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergeUtility.java index 9d15c8eccc9..11eaf7d70ea 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergeUtility.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergeUtility.java @@ -58,7 +58,7 @@ public class RelationOrderMergeUtility { } private static Collection<Pair<String, String>> getAllTypeSides(RelationOrderData leftData, RelationOrderData rightData) { - Collection<Pair<String, String>> rts = new HashSet<Pair<String, String>>(); + Collection<Pair<String, String>> rts = new HashSet<>(); rts.addAll(leftData.getAvailableTypeSides()); rts.addAll(rightData.getAvailableTypeSides()); @@ -66,7 +66,7 @@ public class RelationOrderMergeUtility { } private static List<String> mergeTypeSideOrder(Artifact left, Artifact right, IRelationTypeSide rts) throws OseeCoreException { - RelationOrderMerger<String> merger = new RelationOrderMerger<String>(); + RelationOrderMerger<String> merger = new RelationOrderMerger<>(); List<String> leftRelatives = getGuidList(left.getRelatedArtifacts(rts, DeletionFlag.EXCLUDE_DELETED)); List<String> rightRelatives = getGuidList(right.getRelatedArtifacts(rts, DeletionFlag.EXCLUDE_DELETED)); Collection<String> mergedSet = getMergedSet(left, right, rts); @@ -75,8 +75,8 @@ public class RelationOrderMergeUtility { } private static Collection<String> getMergedSet(Artifact left, Artifact right, IRelationTypeSide relationTypeSide) throws OseeCoreException { - Collection<String> mergedSet = new HashSet<String>(); - Collection<String> deleted = new HashSet<String>(); + Collection<String> mergedSet = new HashSet<>(); + Collection<String> deleted = new HashSet<>(); List<String> leftRelatives = getGuidList(left.getRelatedArtifacts(relationTypeSide, DeletionFlag.EXCLUDE_DELETED)); List<String> rightRelatives = @@ -92,7 +92,7 @@ public class RelationOrderMergeUtility { } private static List<String> getGuidList(List<Artifact> artifacts) { - List<String> toReturn = new ArrayList<String>(); + List<String> toReturn = new ArrayList<>(); for (Artifact art : artifacts) { toReturn.add(art.getGuid()); } @@ -100,7 +100,7 @@ public class RelationOrderMergeUtility { } private static Collection<String> getDeleted(Artifact art, IRelationTypeSide relationType) throws OseeCoreException { - Collection<String> toReturn = new HashSet<String>(); + Collection<String> toReturn = new HashSet<>(); for (RelationLink link : art.getRelationsAll(DeletionFlag.INCLUDE_DELETED)) { if (link.isOfType(relationType) && link.isDeleted()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMerger.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMerger.java index 2adafdba790..3099f39d276 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMerger.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMerger.java @@ -18,7 +18,7 @@ public class RelationOrderMerger<T> { private final List<T> starredList; public RelationOrderMerger() { - starredList = new ArrayList<T>(); + starredList = new ArrayList<>(); } public List<T> computeMergedOrder(List<T> leftOrder, List<T> rightOrder, Collection<T> mergedSet) { @@ -55,7 +55,7 @@ public class RelationOrderMerger<T> { } private List<T> cursorAlgorithm(List<T> left, List<T> right, Collection<T> mergedSet) { - List<T> mergedOrder = new ArrayList<T>(); + List<T> mergedOrder = new ArrayList<>(); int leftIndex = 0; int rightIndex = 0; while (leftIndex < left.size() && rightIndex < right.size()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderParser.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderParser.java index c47b4dd8125..8084d3b8a02 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderParser.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderParser.java @@ -143,7 +143,7 @@ public class RelationOrderParser { List<String> guidsList = Collections.emptyList(); if (list != null) { String[] guids = list.split(","); - guidsList = new ArrayList<String>(); + guidsList = new ArrayList<>(); Collections.addAll(guidsList, guids); } data.addOrderList(relationType, relationSide, orderType, guidsList); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationSorterProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationSorterProvider.java index 395da6cf073..c4785458605 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationSorterProvider.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationSorterProvider.java @@ -34,7 +34,7 @@ public class RelationSorterProvider { private final Map<String, IRelationSorter> orderMap; public RelationSorterProvider() { - orderMap = new ConcurrentHashMap<String, IRelationSorter>(); + orderMap = new ConcurrentHashMap<>(); registerOrderType(new LexicographicalRelationSorter(SortMode.ASCENDING)); registerOrderType(new LexicographicalRelationSorter(SortMode.DESCENDING)); @@ -66,7 +66,7 @@ public class RelationSorterProvider { public List<IRelationSorterId> getAllRelationOrderIds() { Collection<IRelationSorter> relationOrder = orderMap.values(); - List<IRelationSorterId> ids = new ArrayList<IRelationSorterId>(); + List<IRelationSorterId> ids = new ArrayList<>(); for (IRelationSorter order : relationOrder) { ids.add(order.getSorterId()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/sorters/UserDefinedOrderComparator.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/sorters/UserDefinedOrderComparator.java index 4b1295a6a8c..eafd5557595 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/sorters/UserDefinedOrderComparator.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/sorters/UserDefinedOrderComparator.java @@ -24,7 +24,7 @@ class UserDefinedOrderComparator implements Comparator<IArtifact> { private final Map<String, Integer> value; UserDefinedOrderComparator(List<String> guidOrder) { - value = new HashMap<String, Integer>(guidOrder.size()); + value = new HashMap<>(guidOrder.size()); for (int i = 0; i < guidOrder.size(); i++) { value.put(guidOrder.get(i), i); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeData.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeData.java index 1feb466b9f9..c07e9cec272 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeData.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeData.java @@ -59,7 +59,7 @@ public class ChangeData { } public Collection<Change> getArtifactChangesByName(String name) throws OseeCoreException { - Collection<Change> foundChanges = new HashSet<Change>(); + Collection<Change> foundChanges = new HashSet<>(); try { for (Change change : changes) { if (change instanceof ArtifactChange) { @@ -93,10 +93,10 @@ public class ChangeData { Collection<ModificationType> modTypes = Collections.getAggregate(modificationType); Conditions.checkExpressionFailOnTrue(modTypes.isEmpty(), "ModificationType must be specified"); - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); if (kindType == KindType.Artifact || kindType == KindType.ArtifactOrRelation || kindType == KindType.Relation) { if (!isEmpty()) { - HashMap<Integer, Boolean> excludeArtifact = new HashMap<Integer, Boolean>(); + HashMap<Integer, Boolean> excludeArtifact = new HashMap<>(); for (Change change : changes) { Artifact artifact = change.getChangeArtifact(); @@ -150,7 +150,7 @@ public class ChangeData { } } if ((artifactTypesToIgnore != null) && (!artifactTypesToIgnore.isEmpty())) { - Set<Artifact> excludeList = new HashSet<Artifact>(); + Set<Artifact> excludeList = new HashSet<>(); for (Artifact artifactToCheck : artifacts) { Integer id = artifactToCheck.getArtId(); Boolean remove = excludeArtifact.get(id); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeDataLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeDataLoader.java index 1d633349872..9835ebde277 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeDataLoader.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeDataLoader.java @@ -275,7 +275,7 @@ public class ChangeDataLoader extends AbstractOperation { } private static Set<Integer> asArtIds(Collection<ChangeItem> changeItems) { - Set<Integer> artIds = new HashSet<Integer>(); + Set<Integer> artIds = new HashSet<>(); for (ChangeItem item : changeItems) { artIds.add(item.getArtId()); if (item.getChangeType().isRelationChange()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java index baa357b13d2..673f4c4341c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java @@ -50,7 +50,7 @@ public final class ChangeManager { } public static Collection<ArtifactDelta> getCompareArtifacts(Collection<Change> changes) { - Collection<ArtifactDelta> toReturn = new ArrayList<ArtifactDelta>(changes.size()); + Collection<ArtifactDelta> toReturn = new ArrayList<>(changes.size()); for (Change change : changes) { toReturn.add(change.getDelta()); } @@ -102,7 +102,7 @@ public final class ChangeManager { */ public static HashCollection<Artifact, TransactionRecord> getModifingTransactions(Collection<Artifact> artifacts) throws OseeCoreException { ArtifactJoinQuery joinQuery = JoinUtility.createArtifactJoinQuery(); - CompositeKeyHashMap<Integer, Branch, Artifact> artifactMap = new CompositeKeyHashMap<Integer, Branch, Artifact>(); + CompositeKeyHashMap<Integer, Branch, Artifact> artifactMap = new CompositeKeyHashMap<>(); for (Artifact artifact : artifacts) { Branch branch = artifact.getFullBranch(); artifactMap.put(artifact.getArtId(), branch, artifact); @@ -117,7 +117,7 @@ public final class ChangeManager { } } - HashCollection<Artifact, TransactionRecord> transactionMap = new HashCollection<Artifact, TransactionRecord>(); + HashCollection<Artifact, TransactionRecord> transactionMap = new HashCollection<>(); try { joinQuery.store(); JdbcStatement chStmt = ConnectionHandler.getStatement(); @@ -160,7 +160,7 @@ public final class ChangeManager { } } - HashCollection<Artifact, Branch> branchMap = new HashCollection<Artifact, Branch>(); + HashCollection<Artifact, Branch> branchMap = new HashCollection<>(); try { joinQuery.store(); JdbcStatement chStmt = ConnectionHandler.getStatement(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java index 06c6563b583..2c94ac42baa 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java @@ -89,7 +89,7 @@ public class ConflictManagerInternal { public static List<Conflict> getConflictsPerBranch(TransactionRecord commitTransaction, IProgressMonitor monitor) throws OseeCoreException { monitor.beginTask(String.format("Loading Merge Manager for Transaction %d", commitTransaction.getId()), 100); monitor.subTask("Finding Database stored conflicts"); - ArrayList<Conflict> conflicts = new ArrayList<Conflict>(); + ArrayList<Conflict> conflicts = new ArrayList<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { chStmt.runPreparedQuery(ServiceUtil.getSql(OseeSql.CONFLICT_GET_HISTORICAL_ATTRIBUTES), @@ -118,11 +118,11 @@ public class ConflictManagerInternal { @SuppressWarnings("unused") // This is for bulk loading so we do not lose our references Collection<Artifact> bulkLoadedArtifacts; - List<ConflictBuilder> conflictBuilders = new ArrayList<ConflictBuilder>(); - List<Conflict> conflicts = new ArrayList<Conflict>(); - Set<Integer> artIdSet = new HashSet<Integer>(); - Set<Integer> artIdSetDontShow = new HashSet<Integer>(); - Set<Integer> artIdSetDontAdd = new HashSet<Integer>(); + List<ConflictBuilder> conflictBuilders = new ArrayList<>(); + List<Conflict> conflicts = new ArrayList<>(); + Set<Integer> artIdSet = new HashSet<>(); + Set<Integer> artIdSetDontShow = new HashSet<>(); + Set<Integer> artIdSetDontAdd = new HashSet<>(); // Check to see if the branch has already been committed, then use the // transaction version @@ -208,7 +208,7 @@ public class ConflictManagerInternal { private static void loadMultiplicityConflicts(Collection<IAttributeType> types, Branch source, Branch dest, TransactionRecord baselineTransaction, List<ConflictBuilder> conflictBuilders, Set<Integer> artIdSet) { IdJoinQuery joinQuery = JoinUtility.createIdJoinQuery(); JdbcStatement chStmt = ConnectionHandler.getStatement(); - List<Object[]> batchParams = new LinkedList<Object[]>(); + List<Object[]> batchParams = new LinkedList<>(); try { for (IAttributeType type : types) { joinQuery.add(type.getGuid()); @@ -391,7 +391,7 @@ public class ConflictManagerInternal { } public static Collection<Long> getDestinationBranchesMerged(long sourceBranchId) throws OseeCoreException { - List<Long> destinationBranches = new LinkedList<Long>(); + List<Long> destinationBranches = new LinkedList<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { chStmt.runPreparedQuery(GET_DESTINATION_BRANCHES, sourceBranchId); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java index 14665f3f5fe..dc0463fbc43 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java @@ -70,12 +70,12 @@ public final class RevisionChangeLoader { */ private Collection<Change> getChangesPerArtifact(Artifact artifact, IProgressMonitor monitor, LoadChangeType... loadChangeTypes) throws OseeCoreException { Branch branch = artifact.getFullBranch(); - Set<TransactionRecord> transactionIds = new LinkedHashSet<TransactionRecord>(); + Set<TransactionRecord> transactionIds = new LinkedHashSet<>(); boolean recurseThroughBranchHierarchy = true; loadBranchTransactions(branch, artifact, transactionIds, TransactionManager.getHeadTransaction(branch), recurseThroughBranchHierarchy); - Collection<Change> changes = new ArrayList<Change>(); + Collection<Change> changes = new ArrayList<>(); for (TransactionRecord transactionId : transactionIds) { loadChanges(null, transactionId, monitor, artifact, changes, loadChangeTypes); @@ -125,11 +125,11 @@ public final class RevisionChangeLoader { } monitor.beginTask("Find Changes", 100); - Set<Integer> artIds = new HashSet<Integer>(); - Set<Integer> newAndDeletedArtifactIds = new HashSet<Integer>(); + Set<Integer> artIds = new HashSet<>(); + Set<Integer> newAndDeletedArtifactIds = new HashSet<>(); boolean isHistorical = sourceBranch == null; - ArrayList<ChangeBuilder> changeBuilders = new ArrayList<ChangeBuilder>(); + ArrayList<ChangeBuilder> changeBuilders = new ArrayList<>(); for (LoadChangeType changeType : loadChangeTypes) { switch (changeType) { case artifact: @@ -200,7 +200,7 @@ public final class RevisionChangeLoader { CompositeKeyHashMap<TransactionRecord, Integer, Artifact> loadedMap = getBulkLoadedArtifacts(branch, isHistorical, changeBuilders); - Collection<Change> changes = new ArrayList<Change>(); + Collection<Change> changes = new ArrayList<>(); for (ChangeBuilder builder : changeBuilders) { Change toReturn = null; Artifact changeArtifact = loadedMap.get(builder.getTxDelta().getEndTx(), builder.getArtId()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java index 06b01f93feb..a9783fb5e43 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java @@ -41,7 +41,7 @@ public class ArtifactChangeAcquirer extends ChangeAcquirer { @Override public ArrayList<ChangeBuilder> acquireChanges() throws OseeCoreException { - Map<Integer, ArtifactChangeBuilder> artifactChangeBuilders = new HashMap<Integer, ArtifactChangeBuilder>(); + Map<Integer, ArtifactChangeBuilder> artifactChangeBuilders = new HashMap<>(); boolean hasBranch = getSourceBranch() != null; TransactionRecord fromTransactionId; TransactionRecord toTransactionId; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java index ed88ad59fd4..15233e076ae 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java @@ -50,9 +50,9 @@ public class AttributeChangeAcquirer extends ChangeAcquirer { @Override public ArrayList<ChangeBuilder> acquireChanges() throws OseeCoreException { - Map<Integer, ChangeBuilder> attributesWasValueCache = new HashMap<Integer, ChangeBuilder>(); - Map<Integer, ModificationType> artModTypes = new HashMap<Integer, ModificationType>(); - Set<Integer> modifiedArtifacts = new HashSet<Integer>(); + Map<Integer, ChangeBuilder> attributesWasValueCache = new HashMap<>(); + Map<Integer, ModificationType> artModTypes = new HashMap<>(); + Set<Integer> modifiedArtifacts = new HashSet<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); boolean hasBranch = getSourceBranch() != null; long time = System.currentTimeMillis(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java index 86ff7755294..671bf5ac2be 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java @@ -71,8 +71,8 @@ public final class SkynetTransaction extends TransactionOperation<Branch> { new CompositeKeyHashMap<Class<? extends BaseTransactionData>, Integer, BaseTransactionData>(); // Used to avoid garbage collection of artifacts until the transaction has been committed and determine attribute events; - private final Set<Artifact> modifiedArtifacts = new HashSet<Artifact>(); - private final Set<Artifact> alreadyProcessedArtifacts = new HashSet<Artifact>(); + private final Set<Artifact> modifiedArtifacts = new HashSet<>(); + private final Set<Artifact> alreadyProcessedArtifacts = new HashSet<>(); private String comment; private User user; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java index 0c6e78f7863..5aec56ac35f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java @@ -54,8 +54,8 @@ public final class StoreSkynetTransactionOperation extends AbstractDbTxOperation private static final String UPDATE_TXS_NOT_CURRENT = "UPDATE osee_txs SET tx_current = " + TxChange.NOT_CURRENT.getValue() + " WHERE branch_id = ? AND transaction_id = ? AND gamma_id = ?"; - private final HashCollection<String, Object[]> dataItemInserts = new HashCollection<String, Object[]>(); - private final Map<Integer, String> dataInsertOrder = new HashMap<Integer, String>(); + private final HashCollection<String, Object[]> dataItemInserts = new HashCollection<>(); + private final Map<Integer, String> dataInsertOrder = new HashMap<>(); private final Branch branch; private final TransactionRecord transactionRecord; @@ -122,7 +122,7 @@ public final class StoreSkynetTransactionOperation extends AbstractDbTxOperation } private void tagGammas() throws OseeCoreException { - Set<Long> gammasToTag = new LinkedHashSet<Long>(); + Set<Long> gammasToTag = new LinkedHashSet<>(); for (BaseTransactionData transactionData : txDatas) { if (!transactionData.getModificationType().isExistingVersionUsed() && transactionData instanceof AttributeTransactionData) { AttributeTransactionData attrData = (AttributeTransactionData) transactionData; @@ -141,7 +141,7 @@ public final class StoreSkynetTransactionOperation extends AbstractDbTxOperation } private void executeTransactionDataItems(JdbcConnection connection) throws OseeCoreException { - List<Object[]> txNotCurrentData = new ArrayList<Object[]>(); + List<Object[]> txNotCurrentData = new ArrayList<>(); for (BaseTransactionData transactionData : txDatas) { // Collect inserts for attribute, relation, artifact, and artifact version tables transactionData.addInsertToBatch(this); @@ -152,7 +152,7 @@ public final class StoreSkynetTransactionOperation extends AbstractDbTxOperation } // Insert into data tables - i.e. attribute, relation and artifact version tables - List<Integer> keys = new ArrayList<Integer>(dataInsertOrder.keySet()); + List<Integer> keys = new ArrayList<>(dataInsertOrder.keySet()); Collections.sort(keys); for (int priority : keys) { String sqlKey = dataInsertOrder.get(priority); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java index a5d41da9ddd..3ec397c6cd7 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java @@ -72,7 +72,7 @@ public final class TransactionManager { private static final HashMap<Integer, List<TransactionRecord>> commitArtifactIdMap = new HashMap<Integer, List<TransactionRecord>>(); - private static final TxMonitorImpl<Branch> txMonitor = new TxMonitorImpl<Branch>(new TxMonitorCache<Branch>()); + private static final TxMonitorImpl<Branch> txMonitor = new TxMonitorImpl<>(new TxMonitorCache<>()); public static SkynetTransaction createTransaction(IOseeBranch branch, String comment) throws OseeCoreException { Branch actualBranch = BranchManager.getBranch(branch); @@ -82,7 +82,7 @@ public final class TransactionManager { } public static List<TransactionRecord> getTransaction(String comment) throws OseeCoreException { - ArrayList<TransactionRecord> transactions = new ArrayList<TransactionRecord>(); + ArrayList<TransactionRecord> transactions = new ArrayList<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { chStmt.runPreparedQuery(SELECT_TRANSACTION_COMMENTS, comment); @@ -112,7 +112,7 @@ public final class TransactionManager { } public static List<TransactionRecord> getTransactionsForBranch(Branch branch) throws OseeCoreException { - ArrayList<TransactionRecord> transactions = new ArrayList<TransactionRecord>(); + ArrayList<TransactionRecord> transactions = new ArrayList<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { @@ -132,7 +132,7 @@ public final class TransactionManager { // Cache the transactionIds first time through. Other commits will be added to cache as they // happen in this client or as remote commit events come through if (transactionIds == null) { - transactionIds = new ArrayList<TransactionRecord>(5); + transactionIds = new ArrayList<>(5); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { chStmt.runPreparedQuery(SELECT_COMMIT_TRANSACTIONS, artifact.getArtId()); @@ -172,9 +172,8 @@ public final class TransactionManager { */ public static TransactionRecord getHeadTransaction(IOseeBranch branch) throws OseeCoreException { long branchUuid = branch.getUuid(); - int transactionNumber = - ConnectionHandler.runPreparedQueryFetchInt(-1, ServiceUtil.getSql(OseeSql.TX_GET_MAX_AS_LARGEST_TX), - branchUuid); + int transactionNumber = ConnectionHandler.runPreparedQueryFetchInt(-1, + ServiceUtil.getSql(OseeSql.TX_GET_MAX_AS_LARGEST_TX), branchUuid); if (transactionNumber == -1) { throw new TransactionDoesNotExist("No transactions where found in the database for branch: %d", branchUuid); } @@ -199,9 +198,8 @@ public final class TransactionManager { int authorArtId = userToBlame.getArtId(); TransactionDetailsType txType = TransactionDetailsType.NonBaselined; Date transactionTime = GlobalTime.GreenwichMeanTimestamp(); - TransactionRecord transactionId = - factory.createOrUpdate(getTransactionCache(), transactionNumber, branch.getUuid(), comment, transactionTime, - authorArtId, 0, txType, getBranchCache()); + TransactionRecord transactionId = factory.createOrUpdate(getTransactionCache(), transactionNumber, + branch.getUuid(), comment, transactionTime, authorArtId, 0, txType, getBranchCache()); return transactionId; } @@ -270,10 +268,9 @@ public final class TransactionManager { TransactionDetailsType txType = TransactionDetailsType.toEnum(chStmt.getInt("tx_type")); BranchCache branchCache = getBranchCache(); - transactionRecord = - factory.createOrUpdate(txCache, txId, chStmt.getLong("branch_id"), chStmt.getString("osee_comment"), - chStmt.getTimestamp("time"), chStmt.getInt("author"), chStmt.getInt("commit_art_id"), txType, - branchCache); + transactionRecord = factory.createOrUpdate(txCache, txId, chStmt.getLong("branch_id"), + chStmt.getString("osee_comment"), chStmt.getTimestamp("time"), chStmt.getInt("author"), + chStmt.getInt("commit_art_id"), txType, branchCache); } finally { if (useLocalConnection) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorCache.java index a8fad426f8b..281cbfe3fef 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorCache.java @@ -39,7 +39,7 @@ public final class TxMonitorCache<K> { public void putTx(K key, MonitoredTx tx) { Map<String, WeakReference<MonitoredTx>> data = txMap.get(key); if (data == null) { - data = new ConcurrentHashMap<String, WeakReference<MonitoredTx>>(); + data = new ConcurrentHashMap<>(); txMap.put(key, data); } data.put(tx.getUuid(), new WeakReference<MonitoredTx>(tx)); @@ -55,7 +55,7 @@ public final class TxMonitorCache<K> { } private void manageReferences() { - Set<K> toRemove = new HashSet<K>(); + Set<K> toRemove = new HashSet<>(); for (Entry<K, Map<String, WeakReference<MonitoredTx>>> entry : txMap.entrySet()) { Map<?, WeakReference<MonitoredTx>> data = entry.getValue(); manageReferences(data); @@ -69,7 +69,7 @@ public final class TxMonitorCache<K> { } private void manageReferences(Map<?, WeakReference<MonitoredTx>> data) { - Set<Object> toRemove = new HashSet<Object>(); + Set<Object> toRemove = new HashSet<>(); for (Entry<?, WeakReference<MonitoredTx>> entry : data.entrySet()) { WeakReference<?> reference = entry.getValue(); if (reference == null || reference.get() == null) { @@ -100,10 +100,10 @@ public final class TxMonitorCache<K> { } public List<MonitoredTx> getTxs(K key) { - List<MonitoredTx> txs = new ArrayList<MonitoredTx>(); + List<MonitoredTx> txs = new ArrayList<>(); Map<String, WeakReference<MonitoredTx>> data = txMap.get(key); if (data != null) { - Set<String> toRemove = new HashSet<String>(); + Set<String> toRemove = new HashSet<>(); for (Entry<String, WeakReference<MonitoredTx>> entry : data.entrySet()) { WeakReference<MonitoredTx> reference = entry.getValue(); if (reference != null) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/AbstractJoinQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/AbstractJoinQuery.java index b1aad2a5930..3bb3ea630d5 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/AbstractJoinQuery.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/AbstractJoinQuery.java @@ -36,7 +36,7 @@ public abstract class AbstractJoinQuery { private final Long expiresIn; private final int queryId; - protected final Set<IJoinRow> entries = new HashSet<IJoinRow>(); + protected final Set<IJoinRow> entries = new HashSet<>(); private boolean wasStored; private int storedSize; @@ -72,7 +72,7 @@ public abstract class AbstractJoinQuery { public void store(JdbcConnection connection) throws OseeCoreException { if (!this.wasStored) { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); for (IJoinRow joinArray : entries) { data.add(joinArray.toArray()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java index 8c58cf4ade3..36af7d6d9c5 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java @@ -48,7 +48,7 @@ public final class Artifacts { } public static Collection<Integer> toIds(Collection<? extends IArtifact> artifacts) { - Set<Integer> toReturn = new HashSet<Integer>(artifacts.size()); + Set<Integer> toReturn = new HashSet<>(artifacts.size()); for (IArtifact artifact : artifacts) { toReturn.add(artifact.getArtId()); } @@ -56,7 +56,7 @@ public final class Artifacts { } public static List<String> toGuids(Collection<? extends IArtifact> artifacts) { - List<String> guids = new ArrayList<String>(artifacts.size()); + List<String> guids = new ArrayList<>(artifacts.size()); for (IArtifact artifact : artifacts) { guids.add(artifact.getGuid()); } @@ -104,7 +104,7 @@ public final class Artifacts { } public static Collection<String> getNames(Collection<? extends Named> artifacts) { - ArrayList<String> names = new ArrayList<String>(); + ArrayList<String> names = new ArrayList<>(); for (Named namedArtifact : artifacts) { names.add(namedArtifact.getName()); } @@ -143,7 +143,7 @@ public final class Artifacts { */ @SuppressWarnings("unchecked") public static <A extends Artifact> Set<A> getChildrenAndThisOfTypeSet(Artifact parentArtifact, Class<A> clazz, boolean recurse) throws OseeCoreException { - Set<A> thisAndChildren = new HashSet<A>(); + Set<A> thisAndChildren = new HashSet<>(); if (parentArtifact.getClass().equals(clazz)) { thisAndChildren.add((A) parentArtifact); } @@ -153,7 +153,7 @@ public final class Artifacts { @SuppressWarnings("unchecked") public static <A extends Artifact> Set<A> getChildrenOfTypeSet(Artifact parentArtifact, Class<A> clazz, boolean recurse) throws OseeCoreException { - Set<A> children = new HashSet<A>(); + Set<A> children = new HashSet<>(); for (Artifact child : parentArtifact.getChildren()) { if (child.getClass().equals(clazz)) { children.add((A) child); @@ -166,7 +166,7 @@ public final class Artifacts { } public static Map<String, String> getDetailsKeyValues(Artifact artifact) throws OseeCoreException { - Map<String, String> details = new HashMap<String, String>(); + Map<String, String> details = new HashMap<>(); if (artifact != null) { details.put("UUID", String.valueOf(artifact.getArtId())); details.put("GUID", String.valueOf(Xml.escape(artifact.getGuid()))); @@ -220,7 +220,7 @@ public final class Artifacts { } public static HashCollection<IOseeBranch, Artifact> getBranchArtifactMap(Collection<Artifact> artifacts) { - HashCollection<IOseeBranch, Artifact> branchMap = new HashCollection<IOseeBranch, Artifact>(); + HashCollection<IOseeBranch, Artifact> branchMap = new HashCollection<>(); for (Artifact artifact : artifacts) { branchMap.put(artifact.getBranch(), artifact); } @@ -228,7 +228,7 @@ public final class Artifacts { } public static Collection<Artifact> getOfType(IArtifactType artifactType, Collection<? extends Artifact> artifacts) { - List<Artifact> results = new ArrayList<Artifact>(); + List<Artifact> results = new ArrayList<>(); for (Artifact art : artifacts) { if (art.isOfType(artifactType)) { results.add(art); @@ -260,7 +260,7 @@ public final class Artifacts { } public static Collection<Long> toUuids(Set<Artifact> artifacts) { - List<Long> uuids = new ArrayList<Long>(artifacts.size()); + List<Long> uuids = new ArrayList<>(artifacts.size()); for (IArtifact artifact : artifacts) { uuids.add(artifact.getUuid()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java index 205dacef9e6..168d9d4960a 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java @@ -84,7 +84,7 @@ public class CsvArtifact { } public List<List<String>> getRows(boolean ignoreHeaderRow) throws OseeCoreException { - List<List<String>> rows = new ArrayList<List<String>>(); + List<List<String>> rows = new ArrayList<>(); String csvData = getCsvData(); String[] csvLines = csvData.split("\n"); @@ -92,7 +92,7 @@ public class CsvArtifact { for (String csvLine : csvLines) { if ((ignoreHeaderRow && rowIndex > 0) || !ignoreHeaderRow) { String[] values = csvLine.split(","); - List<String> row = new ArrayList<String>(); + List<String> row = new ArrayList<>(); for (String value : values) { value = value.trim(); row.add(value); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/DatabaseJoinAccessor.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/DatabaseJoinAccessor.java index 1e8785e2301..c54f9cc0000 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/DatabaseJoinAccessor.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/DatabaseJoinAccessor.java @@ -98,7 +98,7 @@ public class DatabaseJoinAccessor implements IJoinAccessor { @Override public Collection<Integer> getAllQueryIds(JdbcConnection connection, JoinItem joinItem) throws OseeCoreException { - Collection<Integer> queryIds = new ArrayList<Integer>(); + Collection<Integer> queryIds = new ArrayList<>(); JdbcStatement chStmt = jdbcClient.getStatement(connection); try { String query = String.format(SELECT_QUERY_IDS, joinItem.getJoinTableName()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/EmailUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/EmailUtil.java index 4129c59ce4a..8a3f2e7a391 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/EmailUtil.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/EmailUtil.java @@ -36,7 +36,7 @@ public class EmailUtil { } public static Collection<User> getValidEmailUsers(Collection<User> users) { - Set<User> validUsers = new HashSet<User>(); + Set<User> validUsers = new HashSet<>(); for (User user : users) { try { if (isEmailValid(user)) { @@ -50,7 +50,7 @@ public class EmailUtil { } public static Collection<User> getActiveEmailUsers(Collection<? extends User> users) { - Set<User> activeUsers = new HashSet<User>(); + Set<User> activeUsers = new HashSet<>(); for (User user : users) { try { if (user.isActive()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ExcelXmlArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ExcelXmlArtifact.java index decc62a1a2c..b70e753ebc1 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ExcelXmlArtifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ExcelXmlArtifact.java @@ -36,7 +36,7 @@ public class ExcelXmlArtifact implements RowProcessor { private final String staticId; private final IOseeBranch branch; private final ExcelSaxHandler excelHandler; - private final List<Worksheet> workbook = new ArrayList<Worksheet>(); + private final List<Worksheet> workbook = new ArrayList<>(); private Worksheet currentWorksheet = null; private boolean initialized = false; @@ -116,7 +116,7 @@ public class ExcelXmlArtifact implements RowProcessor { } public static class Row { - private final List<String> row = new ArrayList<String>(); + private final List<String> row = new ArrayList<>(); public Row() { // @@ -146,7 +146,7 @@ public class ExcelXmlArtifact implements RowProcessor { } public static class Worksheet { - private final List<Row> rows = new ArrayList<Row>(); + private final List<Row> rows = new ArrayList<>(); private Row headerRow = null; private final String name; private int rowCount = 0; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java index 09d47221ae8..d9d1abde8ee 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java @@ -37,10 +37,10 @@ public class InvalidTxCurrentsAndModTypes extends AbstractOperation { private static final String UPDATE_ADDRESS = "update osee_txs%s set tx_current = ? where transaction_id = ? and gamma_id = ? and branch_id = ?"; - private final List<Address> addresses = new ArrayList<Address>(); + private final List<Address> addresses = new ArrayList<>(); - private final List<Object[]> purgeData = new ArrayList<Object[]>(); - private final List<Object[]> currentData = new ArrayList<Object[]>(); + private final List<Object[]> purgeData = new ArrayList<>(); + private final List<Object[]> currentData = new ArrayList<>(); private final String tableName; private final String columnName; private final boolean isFixOperationEnabled; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/NormalizeHtml.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/NormalizeHtml.java index 41abf784771..b4766c619c0 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/NormalizeHtml.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/NormalizeHtml.java @@ -84,7 +84,7 @@ public final class NormalizeHtml { } private static TreeMap<Integer, String> initializeFontMap() { - TreeMap<Integer, String> map = new TreeMap<Integer, String>(); + TreeMap<Integer, String> map = new TreeMap<>(); map.put(new Integer(8), "xx-small;"); map.put(new Integer(11), "small;"); map.put(new Integer(13), "medium;"); @@ -174,7 +174,7 @@ public final class NormalizeHtml { String[] tagsToCheck = {"li", "tr", "td", "table"}; for (String select : tagsToCheck) { Elements theNode = doc.select(select); - ArrayList<Node> remove = new ArrayList<Node>(); + ArrayList<Node> remove = new ArrayList<>(); for (Element item : theNode) { List<Node> kids = item.childNodes(); for (Node n : kids) { @@ -242,7 +242,7 @@ public final class NormalizeHtml { */ if (allowedAttributes == null) { - allowedAttributes = new ArrayList<String>(); + allowedAttributes = new ArrayList<>(); allowedAttributes.add("border"); allowedAttributes.add("frame"); allowedAttributes.add("rules"); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/OseeInfo.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/OseeInfo.java index 8b97ba63124..c58bf5d0a75 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/OseeInfo.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/OseeInfo.java @@ -29,7 +29,7 @@ public class OseeInfo { public static final String DB_ID_KEY = "osee.db.guid"; public static final String DB_TYPE_KEY = "osee.db.type"; - private static Map<String, Pair<Long, String>> cache = new ConcurrentHashMap<String, Pair<Long, String>>(); + private static Map<String, Pair<Long, String>> cache = new ConcurrentHashMap<>(); public static String getValue(String key) throws OseeCoreException { return getValue(key, (long) Integer.MAX_VALUE); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperation.java index 5a940bcb5e7..3ff1d70fca1 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperation.java @@ -39,8 +39,8 @@ public class PurgeTransactionOperation extends AbstractOperation { void onPurgeTransactionSuccess(Collection<TransactionRecord> transactions); } - private final Set<PurgeTransactionListener> listeners = new CopyOnWriteArraySet<PurgeTransactionListener>(); - private final Collection<TransactionRecord> changedTransactions = new ArrayList<TransactionRecord>(); + private final Set<PurgeTransactionListener> listeners = new CopyOnWriteArraySet<>(); + private final Collection<TransactionRecord> changedTransactions = new ArrayList<>(); public PurgeTransactionOperation(List<Integer> txIdsToDelete) { super("Purge transactions " + txIdsToDelete, Activator.PLUGIN_ID, NullOperationLogger.getSingleton()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperationWithListener.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperationWithListener.java index f5ffac0a5db..05936d3dcd1 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperationWithListener.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperationWithListener.java @@ -28,7 +28,7 @@ import org.eclipse.osee.framework.skynet.core.utility.PurgeTransactionOperation. public class PurgeTransactionOperationWithListener { public static IOperation getPurgeTransactionOperation(List<TransactionRecord> transactions) throws OseeCoreException { - List<Integer> txIdsToDelete = new ArrayList<Integer>(); + List<Integer> txIdsToDelete = new ArrayList<>(); for (TransactionRecord record : transactions) { txIdsToDelete.add(record.getId()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeUnusedBackingDataAndTransactions.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeUnusedBackingDataAndTransactions.java index d1f33eb4de8..a1804301b83 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeUnusedBackingDataAndTransactions.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeUnusedBackingDataAndTransactions.java @@ -52,7 +52,7 @@ public class PurgeUnusedBackingDataAndTransactions extends AbstractDbTxOperation } private void processNotAddressedGammas(JdbcConnection connection, String tableName) throws OseeCoreException { - List<Object[]> notAddressedGammas = new LinkedList<Object[]>(); + List<Object[]> notAddressedGammas = new LinkedList<>(); JdbcStatement chStmt = getJdbcClient().getStatement(connection); try { @@ -72,7 +72,7 @@ public class PurgeUnusedBackingDataAndTransactions extends AbstractDbTxOperation } private void processAddressedButNonexistentGammas(JdbcConnection connection, String tableName) throws OseeCoreException { - List<Object[]> nonexistentGammas = new LinkedList<Object[]>(); + List<Object[]> nonexistentGammas = new LinkedList<>(); JdbcStatement chStmt = getJdbcClient().getStatement(connection); try { @@ -93,7 +93,7 @@ public class PurgeUnusedBackingDataAndTransactions extends AbstractDbTxOperation } private void processEmptyTransactions(JdbcConnection connection) throws OseeCoreException { - List<Object[]> emptyTransactions = new LinkedList<Object[]>(); + List<Object[]> emptyTransactions = new LinkedList<>(); JdbcStatement chStmt = getJdbcClient().getStatement(connection); try { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/UsersByIds.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/UsersByIds.java index 1533165a84f..399220b3078 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/UsersByIds.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/UsersByIds.java @@ -39,7 +39,7 @@ public class UsersByIds { } public static List<User> getUsers(String sorageString) { - List<User> users = new ArrayList<User>(); + List<User> users = new ArrayList<>(); Matcher m = userPattern.matcher(sorageString); while (m.find()) { String userId = m.group(1); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeValidator.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeValidator.java index 022db790e4f..16fc9f935ca 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeValidator.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeValidator.java @@ -137,7 +137,7 @@ public class OseeValidator { // TODO Implement dynamic attribute type validation chain definition // public List<IValidator> createValidateChain(String xml) { - // List<IValidator> validators = new ArrayList<IValidator>(); + // List<IValidator> validators = new ArrayList<>(); // return validators; // } } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/UpdateBookmarkIds.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/UpdateBookmarkIds.java index d77552fabb1..dae811fd29a 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/UpdateBookmarkIds.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/UpdateBookmarkIds.java @@ -102,7 +102,7 @@ public class UpdateBookmarkIds { Collection<Node> nodes = Jaxp.selectNodesViaXPath(xPath, element, XPATH_EXPRESSION); //Get a new value for each aml.id (maintaining the order of the start/end Bookmark tags - Map<Integer, Integer> oldToNewAmlIds = new HashMap<Integer, Integer>(); + Map<Integer, Integer> oldToNewAmlIds = new HashMap<>(); for (Node node : nodes) { if (isStartNode(node) || isEndNode(node)) { changesMade = true; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java index cd00a798ce6..548d5c6e2fa 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java @@ -93,7 +93,7 @@ public class WordUtil { */ public static String reassignBinDataID(String content) { ChangeSet changeSet = new ChangeSet(content); - Map<String, String> guidMap = new HashMap<String, String>(); + Map<String, String> guidMap = new HashMap<>(); binIdMatcher.reset(content); boolean atLeastOneMatch = false; @@ -132,7 +132,7 @@ public class WordUtil { chStmt.runPreparedQuery(SELECT_WORD_VALUES, artId, CoreAttributeTypes.WordTemplateContent.getGuid(), branch.getUuid()); - List<Pair<String, Integer>> values = new LinkedList<Pair<String, Integer>>(); + List<Pair<String, Integer>> values = new LinkedList<>(); while (chStmt.next()) { String content; try { @@ -153,7 +153,7 @@ public class WordUtil { if (iter.hasNext()) { Pair<String, Integer> newest; Pair<String, Integer> nextNewest = iter.next(); - Collection<Integer> repeatGammas = new LinkedList<Integer>(); + Collection<Integer> repeatGammas = new LinkedList<>(); while (iter.hasNext()) { newest = nextNewest; nextNewest = iter.next(); @@ -217,7 +217,7 @@ public class WordUtil { } public static String referencesOnly(String content) { - List<String> references = new ArrayList<String>(); + List<String> references = new ArrayList<>(); Matcher referenceMatcher = referencePattern.matcher(content); while (referenceMatcher.find()) { diff --git a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/BranchModel.java b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/BranchModel.java index 04bf3535fe0..6708075fff8 100644 --- a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/BranchModel.java +++ b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/BranchModel.java @@ -34,8 +34,8 @@ public class BranchModel extends Node implements Serializable { public BranchModel(Branch branch) { super(); this.branch = branch; - this.children = new ArrayList<BranchModel>(); - this.txs = new LinkedList<TxModel>(); + this.children = new ArrayList<>(); + this.txs = new LinkedList<>(); this.parent = null; this.isLoaded = false; this.depth = -1; @@ -84,7 +84,7 @@ public class BranchModel extends Node implements Serializable { } public List<BranchModel> getAllChildrenBelow() { - List<BranchModel> children = new ArrayList<BranchModel>(getChildren()); + List<BranchModel> children = new ArrayList<>(getChildren()); for (BranchModel child : getChildren()) { children.addAll(child.getAllChildrenBelow()); } diff --git a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/GraphCache.java b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/GraphCache.java index 6280136ce0c..78cb369793b 100644 --- a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/GraphCache.java +++ b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/GraphCache.java @@ -30,8 +30,8 @@ public class GraphCache { private final Map<Long, TxModel> txNumberToTxModelMap; public GraphCache(Branch rootBranch) throws OseeCoreException { - this.branchToBranchModelMap = new HashMap<Branch, BranchModel>(); - this.txNumberToTxModelMap = new HashMap<Long, TxModel>(); + this.branchToBranchModelMap = new HashMap<>(); + this.txNumberToTxModelMap = new HashMap<>(); this.rootModel = this.getOrCreateBranchModel(rootBranch); this.rootModel.setDepth(0); } @@ -41,7 +41,7 @@ public class GraphCache { } public List<Node> getNodes() { - List<Node> nodes = new ArrayList<Node>(); + List<Node> nodes = new ArrayList<>(); nodes.addAll(branchToBranchModelMap.values()); nodes.addAll(txNumberToTxModelMap.values()); return nodes; diff --git a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/GraphLoader.java b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/GraphLoader.java index c2e5910c69f..5b540f10eb2 100644 --- a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/GraphLoader.java +++ b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/GraphLoader.java @@ -61,7 +61,7 @@ public class GraphLoader { private static void addParentTxData(GraphCache graphCache, BranchModel current, boolean recurse, IProgressListener listener) throws OseeCoreException { IdJoinQuery joinQuery = JoinUtility.createIdJoinQuery(); try { - List<Branch> branches = new ArrayList<Branch>(current.getBranch().getChildBranches(recurse)); + List<Branch> branches = new ArrayList<>(current.getBranch().getChildBranches(recurse)); branches.add(current.getBranch()); for (Branch branch : branches) { joinQuery.add(branch.getSourceTransaction().getId()); @@ -80,7 +80,7 @@ public class GraphLoader { private static void updateConnections(GraphCache graphCache, BranchModel current, boolean recurse, IProgressListener listener) { TxModel systemRootTx = null; - List<BranchModel> models = new ArrayList<BranchModel>(); + List<BranchModel> models = new ArrayList<>(); // models.addAll(current.getChildren()); // if (recurse) { models.addAll(current.getAllChildrenBelow()); @@ -141,7 +141,7 @@ public class GraphLoader { } private static List<TxData> getTxData(int queryId) throws OseeCoreException { - List<TxData> txDatas = new ArrayList<TxData>(); + List<TxData> txDatas = new ArrayList<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { chStmt.runPreparedQuery(GET_TRANSACTION_DATA, queryId); diff --git a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/StubBranchModel.java b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/StubBranchModel.java index 6553e4c197e..12ee9868a11 100644 --- a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/StubBranchModel.java +++ b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/StubBranchModel.java @@ -28,7 +28,7 @@ public class StubBranchModel extends BranchModel { public StubBranchModel() { super(STUB_BRANCH); - this.stubs = new HashMap<Long, TxModel>(); + this.stubs = new HashMap<>(); } public TxModel addTx(Long value) { diff --git a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/TxModel.java b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/TxModel.java index 23deb919f87..92d8e27f486 100644 --- a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/TxModel.java +++ b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/TxModel.java @@ -65,7 +65,7 @@ public class TxModel extends Node implements Serializable, Comparable<TxModel> { public void addMergedTx(TxModel node) { if (mergedTxs == null) { - mergedTxs = new ArrayList<TxModel>(); + mergedTxs = new ArrayList<>(); } mergedTxs.add(node); } diff --git a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/parts/GraphEditPart.java b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/parts/GraphEditPart.java index cd4b2916fa1..6ea8bd0f4ba 100644 --- a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/parts/GraphEditPart.java +++ b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/parts/GraphEditPart.java @@ -79,11 +79,11 @@ public class GraphEditPart extends AbstractGraphicalEditPart { public GraphEditPart(GraphicalViewer viewer) { super(); this.viewer = viewer; - this.branchFigureMap = new HashMap<Branch, BranchFigure>(); - this.txNumberToTxModelMap = new HashMap<Long, TxModel>(); - this.txNumberToTxFigureMap = new HashMap<Long, TxFigure>(); - this.branchesByLevel = new HashCollection<Integer, BranchModel>(); - this.connectionMap = new HashCollection<ConnectionType, Connection>(); + this.branchFigureMap = new HashMap<>(); + this.txNumberToTxModelMap = new HashMap<>(); + this.txNumberToTxFigureMap = new HashMap<>(); + this.branchesByLevel = new HashCollection<>(); + this.connectionMap = new HashCollection<>(); this.preferenceStore = Activator.getInstance().getPreferenceStore(); } @@ -123,7 +123,7 @@ public class GraphEditPart extends AbstractGraphicalEditPart { protected List<BranchModel> getModelChildren() { GraphCache graphCache = (GraphCache) getModel(); - List<BranchModel> nodes = new ArrayList<BranchModel>(); + List<BranchModel> nodes = new ArrayList<>(); nodes.add(graphCache.getRootModel()); nodes.addAll(graphCache.getRootModel().getAllChildrenBelow()); Collections.sort(nodes, new Comparator<BranchModel>() { @@ -159,7 +159,7 @@ public class GraphEditPart extends AbstractGraphicalEditPart { } }); - List<BranchModel> toDraw = new ArrayList<BranchModel>(); + List<BranchModel> toDraw = new ArrayList<>(); for (int index = 0; index < nodes.size(); index++) { BranchModel model = nodes.get(index); model.setIndex(index); @@ -313,7 +313,7 @@ public class GraphEditPart extends AbstractGraphicalEditPart { if (connectLevel < filters.length && connectLevel >= 0) { filter = filters[connectLevel]; } - Set<ConnectionType> filtered = new HashSet<ConnectionType>(); + Set<ConnectionType> filtered = new HashSet<>(); switch (filter) { case FILTER_CHILD_BRANCH_CONNECTIONS: filtered.add(ConnectionType.PARENT_CHILD); diff --git a/plugins/org.eclipse.osee.framework.ui.data.model.editor/src/org/eclipse/osee/framework/ui/data/model/editor/ArtifactURIHandler.java b/plugins/org.eclipse.osee.framework.ui.data.model.editor/src/org/eclipse/osee/framework/ui/data/model/editor/ArtifactURIHandler.java index 12bf9e44c91..71884b6c7d4 100644 --- a/plugins/org.eclipse.osee.framework.ui.data.model.editor/src/org/eclipse/osee/framework/ui/data/model/editor/ArtifactURIHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.data.model.editor/src/org/eclipse/osee/framework/ui/data/model/editor/ArtifactURIHandler.java @@ -88,7 +88,7 @@ public class ArtifactURIHandler extends URIHandlerImpl { @Override public Map<String, ?> getAttributes(URI uri, Map<?, ?> options) { - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); Set<String> requestedAttributes = getRequestedAttributes(options); if (requestedAttributes == null || requestedAttributes.contains(URIConverter.ATTRIBUTE_READ_ONLY)) { result.put(URIConverter.ATTRIBUTE_READ_ONLY, false); diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/AWorkbench.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/AWorkbench.java index e71d849e623..4e22b785d8a 100644 --- a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/AWorkbench.java +++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/AWorkbench.java @@ -82,7 +82,7 @@ public final class AWorkbench { } public static List<IEditorReference> getEditors(String editorId) { - List<IEditorReference> editors = new ArrayList<IEditorReference>(); + List<IEditorReference> editors = new ArrayList<>(); for (IEditorReference editor : getEditors()) { if (editor.getId().equals(editorId)) { editors.add(editor); @@ -92,7 +92,7 @@ public final class AWorkbench { } public static List<IEditorReference> getEditors() { - List<IEditorReference> editors = new ArrayList<IEditorReference>(); + List<IEditorReference> editors = new ArrayList<>(); for (IWorkbenchPage page : PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPages()) { for (IEditorReference editor : page.getEditorReferences()) { editors.add(editor); diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/DirectoryOrFileSelector.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/DirectoryOrFileSelector.java index b3354adcd9b..b7e06b99ddc 100644 --- a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/DirectoryOrFileSelector.java +++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/DirectoryOrFileSelector.java @@ -110,7 +110,7 @@ public class DirectoryOrFileSelector extends Composite implements Listener { @Override public void widgetSelected(SelectionEvent e) { Iterable<File> files = selectFiles(); - List<String> paths = new LinkedList<String>(); + List<String> paths = new LinkedList<>(); for (File file : files) { if (file != null && file.isFile()) { paths.add(file.getPath()); @@ -154,7 +154,7 @@ public class DirectoryOrFileSelector extends Composite implements Listener { } private Iterable<File> getFiles(String paths) { - List<File> toReturn = new LinkedList<File>(); + List<File> toReturn = new LinkedList<>(); for (String path : paths.split(FILE_SEPARATOR)) { toReturn.add(new File(path)); } @@ -220,7 +220,7 @@ public class DirectoryOrFileSelector extends Composite implements Listener { if (path != null) { String selectedPath = dialog.getFilterPath(); - List<File> files = new LinkedList<File>(); + List<File> files = new LinkedList<>(); for (String filename : dialog.getFileNames()) { files.add(new File(selectedPath + IPath.SEPARATOR + filename)); } diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/ModelessDialog.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/ModelessDialog.java index f75b9408c36..ba5870ff424 100644 --- a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/ModelessDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/ModelessDialog.java @@ -20,7 +20,7 @@ import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Shell; public class ModelessDialog extends MessageDialog { - private final List<IShellCloseEvent> closeEventListeners = new ArrayList<IShellCloseEvent>(); + private final List<IShellCloseEvent> closeEventListeners = new ArrayList<>(); public ModelessDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage, int dialogImageType, String[] dialogButtonLabels, int defaultIndex) { super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/ObjectList.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/ObjectList.java index af62d3b6053..8038f144d41 100644 --- a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/ObjectList.java +++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/ObjectList.java @@ -23,7 +23,7 @@ public class ObjectList<A> extends List { public ObjectList(Composite parent, int style) { super(parent, style); - items = new ArrayList<A>(); + items = new ArrayList<>(); } @Override @@ -67,7 +67,7 @@ public class ObjectList<A> extends List { public Collection<A> getSelectedItems() { int[] selected = super.getSelectionIndices(); - ArrayList<A> selectedItems = new ArrayList<A>(selected.length); + ArrayList<A> selectedItems = new ArrayList<>(selected.length); for (int i : selected) { selectedItems.add(items.get(i)); } diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/OseeConsole.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/OseeConsole.java index fb9f0f2c092..a4f21691d66 100644 --- a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/OseeConsole.java +++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/OseeConsole.java @@ -216,7 +216,7 @@ public class OseeConsole { private final CopyOnWriteArrayList<IConsoleInputListener> listeners; public HandleInput() { - listeners = new CopyOnWriteArrayList<IConsoleInputListener>(); + listeners = new CopyOnWriteArrayList<>(); } public void addListener(IConsoleInputListener listener) { diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/ViewPartUtil.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/ViewPartUtil.java index 8d9acca2faf..d9e0de387c4 100644 --- a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/ViewPartUtil.java +++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/ViewPartUtil.java @@ -41,7 +41,7 @@ public class ViewPartUtil { * and 3 are currently running, the next instance of the view should be 2. */ - SortedSet<Integer> set = new TreeSet<Integer>(); + SortedSet<Integer> set = new TreeSet<>(); IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); IViewReference[] viewRefs = page.getViewReferences(); for (IViewReference viewRef : viewRefs) { diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/WindowLocal.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/WindowLocal.java index b15b3619197..edbdea11d96 100644 --- a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/WindowLocal.java +++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/util/WindowLocal.java @@ -27,7 +27,7 @@ public class WindowLocal<T> { private final WindowKey windowKey; public WindowLocal() { - this.valueMap = new HashMap<Object, T>(); + this.valueMap = new HashMap<>(); windowKey = new WindowKey(); } diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/views/property/AbstractPropertySource.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/views/property/AbstractPropertySource.java index 6111da377e5..0cf226a3b7c 100644 --- a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/views/property/AbstractPropertySource.java +++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/views/property/AbstractPropertySource.java @@ -35,7 +35,7 @@ public abstract class AbstractPropertySource implements IPropertySource2 { @Override public IPropertyDescriptor[] getPropertyDescriptors() { if (descriptors == null) { - ArrayList<IPropertyDescriptor> list = new ArrayList<IPropertyDescriptor>(); + ArrayList<IPropertyDescriptor> list = new ArrayList<>(); addPropertyDescriptors(list); descriptors = new IPropertyDescriptor[list.size()]; list.toArray(descriptors); diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/views/property/CompositePropertySource.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/views/property/CompositePropertySource.java index 29bc2b98480..410440da202 100644 --- a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/views/property/CompositePropertySource.java +++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/views/property/CompositePropertySource.java @@ -35,7 +35,7 @@ public class CompositePropertySource extends AbstractPropertySource { public void add(IPropertySource propertySource) { if (propertySource instanceof AbstractPropertySource) { if (sources == null) { - sources = new ArrayList<AbstractPropertySource>(); + sources = new ArrayList<>(); } sources.add((AbstractPropertySource) propertySource); } diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/widgets/PropertyStoreControlContributions.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/widgets/PropertyStoreControlContributions.java index 3f490209b73..80d350e8ad3 100644 --- a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/widgets/PropertyStoreControlContributions.java +++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/widgets/PropertyStoreControlContributions.java @@ -32,7 +32,7 @@ public class PropertyStoreControlContributions { } public static List<IPropertyStoreBasedControl> getContributions(String viewIdToMatch) { - List<IPropertyStoreBasedControl> toReturn = new ArrayList<IPropertyStoreBasedControl>(); + List<IPropertyStoreBasedControl> toReturn = new ArrayList<>(); List<IConfigurationElement> elements = ExtensionPoints.getExtensionElements(UiPluginConstants.PLUGIN_ID + ".PropertyStoreControl", "PropertyStoreControl"); diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateCommonItems.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateCommonItems.java index 65b3eb551fe..6dc7070da83 100644 --- a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateCommonItems.java +++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateCommonItems.java @@ -43,7 +43,7 @@ public class XNavigateCommonItems { if (items != null) { return items; } - items = new HashSet<IXNavigateCommonItem>(); + items = new HashSet<>(); IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.osee.framework.ui.plugin.XCommonNavigateItem"); diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateContentProvider.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateContentProvider.java index 2df631dc86c..b7328122d05 100644 --- a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateContentProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateContentProvider.java @@ -33,7 +33,7 @@ public class XNavigateContentProvider implements ITreeContentProvider { return ((Collection<?>) parentElement).toArray(); } if (parentElement instanceof XNavigateItem) { - List<XNavigateItem> items = new ArrayList<XNavigateItem>(); + List<XNavigateItem> items = new ArrayList<>(); items.addAll(((XNavigateItem) parentElement).getDynamicChildren()); items.addAll(((XNavigateItem) parentElement).getChildren()); return items.toArray(new Object[items.size()]); diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateContributionManager.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateContributionManager.java index dfd2fab2d85..9fc24a4b857 100644 --- a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateContributionManager.java +++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateContributionManager.java @@ -37,7 +37,7 @@ public final class XNavigateContributionManager { public static Set<XNavigateExtensionPointData> getNavigateItems(String viewIdToMatch) throws OseeCoreException { Conditions.checkNotNull(viewIdToMatch, "viewIdToMatch"); - Set<XNavigateExtensionPointData> toReturn = new HashSet<XNavigateExtensionPointData>(); + Set<XNavigateExtensionPointData> toReturn = new HashSet<>(); List<IConfigurationElement> elements = ExtensionPoints.getExtensionElements(UiPluginConstants.PLUGIN_ID + ".XNavigateItem", "XNavigateItem"); for (IConfigurationElement element : elements) { diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateEventManager.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateEventManager.java index 6357f6507a4..e943bfe9eeb 100644 --- a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateEventManager.java +++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateEventManager.java @@ -19,7 +19,7 @@ import org.eclipse.osee.framework.ui.swt.Displays; public class XNavigateEventManager { - private static final Set<IXNavigateEventListener> listeners = new HashSet<IXNavigateEventListener>(); + private static final Set<IXNavigateEventListener> listeners = new HashSet<>(); public static void register(IXNavigateEventListener listener) { listeners.add(listener); diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateItem.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateItem.java index ecfe06a30da..2e24943e93e 100644 --- a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateItem.java +++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/xnavigate/XNavigateItem.java @@ -23,7 +23,7 @@ import org.eclipse.swt.graphics.Image; */ public class XNavigateItem { - private final List<XNavigateItem> children = new ArrayList<XNavigateItem>(); + private final List<XNavigateItem> children = new ArrayList<>(); private String name; private XNavigateItem parent; private final KeyedImage oseeImage; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java index 2c3f82417b9..0106f1d5fbe 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPromptChangeTest.java @@ -42,7 +42,7 @@ public class ArtifactPromptChangeTest { @Test public void test() throws OseeCoreException { boolean persist = true; - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); MockPromptFactory MockPromptFactory = new MockPromptFactory(); AccessPolicy policyHandler = new MockAccessPolicyHandler(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/PresentationTypeTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/PresentationTypeTest.java index d2128c43578..123fb9e6150 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/PresentationTypeTest.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/PresentationTypeTest.java @@ -42,7 +42,7 @@ public class PresentationTypeTest { @Test public void testNoMatch() throws OseeCoreException { - Collection<PresentationType> toMatch = new ArrayList<PresentationType>(); + Collection<PresentationType> toMatch = new ArrayList<>(); for (PresentationType item : PresentationType.values()) { if (item != target) { toMatch.add(item); @@ -61,7 +61,7 @@ public class PresentationTypeTest { @Test public void testMatch() throws OseeCoreException { - Collection<PresentationType> toMatch = new ArrayList<PresentationType>(); + Collection<PresentationType> toMatch = new ArrayList<>(); for (PresentationType item : PresentationType.values()) { toMatch.add(item); if (item != target) { @@ -80,7 +80,7 @@ public class PresentationTypeTest { @Parameters public static Collection<Object[]> getData() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); for (PresentationType underTest : PresentationType.values()) { data.add(new Object[] {underTest}); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/RelationOrderRendererTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/RelationOrderRendererTest.java index 3e9a44a9ad4..0db888633e5 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/RelationOrderRendererTest.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/RelationOrderRendererTest.java @@ -65,7 +65,7 @@ public class RelationOrderRendererTest { @Test public void testRenderingAllValid() throws OseeCoreException { RelationOrderData orderData = new MockRelationOrderData(); - List<Object[]> expectedData = new ArrayList<Object[]>(); + List<Object[]> expectedData = new ArrayList<>(); addData(orderData, expectedData, "Relation 1", "Relation 1_A", RelationSide.SIDE_A, RelationOrderBaseTypes.LEXICOGRAPHICAL_ASC.getGuid(), "1", "2", "3"); @@ -82,7 +82,7 @@ public class RelationOrderRendererTest { @Test(expected = OseeCoreException.class) public void testRenderingOrderTypeNotFound() throws OseeCoreException { RelationOrderData orderData = new MockRelationOrderData(); - List<Object[]> expectedData = new ArrayList<Object[]>(); + List<Object[]> expectedData = new ArrayList<>(); addData(orderData, expectedData, "Relation 1", "Relation 1_A", RelationSide.SIDE_A, GUID.create(), "0", "1", "2"); checkRelationOrderRenderer(getExpected(expectedData), orderData); } @@ -90,7 +90,7 @@ public class RelationOrderRendererTest { @Test public void testRenderingEmptyGuids() throws OseeCoreException { RelationOrderData orderData = new MockRelationOrderData(); - List<Object[]> expectedData = new ArrayList<Object[]>(); + List<Object[]> expectedData = new ArrayList<>(); addData(orderData, expectedData, "Relation 1", "Relation 1_A", RelationSide.SIDE_A, RelationOrderBaseTypes.USER_DEFINED.getGuid()); checkRelationOrderRenderer(getExpected(expectedData), orderData); @@ -99,12 +99,12 @@ public class RelationOrderRendererTest { @Test public void testEmptyData() { RelationOrderData orderData = new MockRelationOrderData(); - List<Object[]> expectedData = new ArrayList<Object[]>(); + List<Object[]> expectedData = new ArrayList<>(); checkRelationOrderRenderer(getExpected(expectedData), orderData); } private void addData(RelationOrderData orderData, List<Object[]> expectedData, String relationType, String relationSideName, RelationSide side, String relationOrderIdGuid, String... guids) throws OseeCoreException { - List<String> artGuids = new ArrayList<String>(); + List<String> artGuids = new ArrayList<>(); if (guids != null && guids.length > 0) { artGuids.addAll(Arrays.asList(guids)); } @@ -223,7 +223,7 @@ public class RelationOrderRendererTest { @Override public List<String> resolveAsOseeLinks(IOseeBranch branch, List<String> artifactGuids) { - List<String> values = new ArrayList<String>(); + List<String> values = new ArrayList<>(); for (String guid : artifactGuids) { values.add(guid); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/imageDetection/WordImageCompareTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/imageDetection/WordImageCompareTest.java index f3d0594c713..58df31bf9dd 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/imageDetection/WordImageCompareTest.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/renderer/imageDetection/WordImageCompareTest.java @@ -75,7 +75,7 @@ public class WordImageCompareTest { private static List<WordmlPicture> createPictureList(String wordml) { int startIndex = 0; - List<WordmlPicture> pictures = new LinkedList<WordmlPicture>(); + List<WordmlPicture> pictures = new LinkedList<>(); while (wordml.indexOf("<w:pict>", startIndex) > 0) { int currentStartIndex = wordml.indexOf("<w:pict>", startIndex); int currentEndIndex = wordml.indexOf("</w:pict", currentStartIndex); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditorConverterTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditorConverterTest.java index e7dd2a09ba3..f8bddff25f2 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditorConverterTest.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditorConverterTest.java @@ -269,7 +269,7 @@ public class ResultsEditorConverterTest { } private IResultsEditorTableTab createTab(String tabName) { - List<String[]> rows = new ArrayList<String[]>(); + List<String[]> rows = new ArrayList<>(); rows.add(new String[] {"a", "b", "c"}); rows.add(new String[] {"e", "d", "f"}); return new MockResultsEditorTableTab(tabName, new String[] {"1", "2", "3"}, rows); @@ -290,7 +290,7 @@ public class ResultsEditorConverterTest { public MockResultsProvider(String editorName) { this.editorName = editorName; - this.tabs = new ArrayList<IResultsEditorTab>(); + this.tabs = new ArrayList<>(); } @Override @@ -317,7 +317,7 @@ public class ResultsEditorConverterTest { @Override public List<XViewerColumn> getTableColumns() { - List<XViewerColumn> xColumns = new ArrayList<XViewerColumn>(); + List<XViewerColumn> xColumns = new ArrayList<>(); for (String col : columns) { xColumns.add(new XViewerColumn("", col, 0, 0, true, SortDataType.String, false, "")); } @@ -326,7 +326,7 @@ public class ResultsEditorConverterTest { @Override public Collection<IResultsXViewerRow> getTableRows() { - List<IResultsXViewerRow> xRows = new ArrayList<IResultsXViewerRow>(); + List<IResultsXViewerRow> xRows = new ArrayList<>(); for (String[] row : rows) { xRows.add(new ResultsXViewerRow(row)); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactContentProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactContentProvider.java index 1a0d971f094..26997b79dfb 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactContentProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactContentProvider.java @@ -86,7 +86,7 @@ public class ArtifactContentProvider implements ITreeContentProvider, ArtifactCh if (AccessControlManager.hasPermission(parentItem, PermissionEnum.READ)) { Collection<Artifact> children = parentItem.getChildren(); List<RelationLink> relationsAll = parentItem.getRelationsAll(DeletionFlag.EXCLUDE_DELETED); - List<Object> allChildren = new ArrayList<Object>(); + List<Object> allChildren = new ArrayList<>(); if (children != null) { allChildren.addAll(children); } @@ -100,7 +100,7 @@ public class ArtifactContentProvider implements ITreeContentProvider, ArtifactCh OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex); } } else if (parentElement instanceof ArtifactExplorerLinkNode) { - List<Artifact> children = new ArrayList<Artifact>(); + List<Artifact> children = new ArrayList<>(); ArtifactExplorerLinkNode artifactExplorerLinkNode = (ArtifactExplorerLinkNode) parentElement; children.addAll(artifactExplorerLinkNode.getOppositeArtifacts()); @@ -116,7 +116,7 @@ public class ArtifactContentProvider implements ITreeContentProvider, ArtifactCh } private void addRelations(Artifact parentItem, List<RelationLink> relationsAll, List<Object> allChildren) { - Set<ArtifactExplorerLinkNode> relationTypes = new HashSet<ArtifactExplorerLinkNode>(); + Set<ArtifactExplorerLinkNode> relationTypes = new HashSet<>(); for (RelationLink link : relationsAll) { if (!link.isOfType(CoreRelationTypes.Default_Hierarchical__Child)) { if (link.getAArtifactId() == parentItem.getArtId()) { @@ -126,7 +126,7 @@ public class ArtifactContentProvider implements ITreeContentProvider, ArtifactCh } } } - List<ArtifactExplorerLinkNode> sortedRelationTypes = new ArrayList<ArtifactExplorerLinkNode>(relationTypes); + List<ArtifactExplorerLinkNode> sortedRelationTypes = new ArrayList<>(relationTypes); java.util.Collections.sort(sortedRelationTypes, new Comparator<ArtifactExplorerLinkNode>() { @Override diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java index a0ce3e74169..192c03c73a0 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java @@ -219,7 +219,7 @@ public class ArtifactDecorator implements IArtifactDecoratorPreferences { Conditions.checkNotNull(artifact, "artifact"); Collection<IAttributeType> selectedItems = attributesAction.getSelected(); - List<String> info = new ArrayList<String>(); + List<String> info = new ArrayList<>(); for (IAttributeType attributeType : artifact.getAttributeTypes()) { if (selectedItems.contains(attributeType)) { String value = artifact.getAttributesToString(attributeType); @@ -331,7 +331,7 @@ public class ArtifactDecorator implements IArtifactDecoratorPreferences { public ShowAttributeAction(IBranchProvider branchProvider, KeyedImage image) { super("Show Attributes", IAction.AS_PUSH_BUTTON); this.branchProvider = branchProvider; - this.selectedTypes = new HashSet<IAttributeType>(); + this.selectedTypes = new HashSet<>(); if (image != null) { setImageDescriptor(ImageManager.getImageDescriptor(image)); } @@ -357,7 +357,7 @@ public class ArtifactDecorator implements IArtifactDecoratorPreferences { "Select attribute types to display."); dialog.setSelectable(selectableTypes); - List<IAttributeType> initSelection = new ArrayList<IAttributeType>(); + List<IAttributeType> initSelection = new ArrayList<>(); for (IAttributeType entry : selectedTypes) { for (IAttributeType type : selectableTypes) { if (type.equals(entry)) { @@ -420,7 +420,7 @@ public class ArtifactDecorator implements IArtifactDecoratorPreferences { } private static void notifySettingsChanged(ArtifactDecorator source) { - List<Object> toRemove = new ArrayList<Object>(); + List<Object> toRemove = new ArrayList<>(); for (WeakReference<ArtifactDecorator> ref : DECORATOR_INSTANCES) { ArtifactDecorator decorator = ref.get(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java index ba5d47d7d9f..4ea1ec1a556 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java @@ -62,7 +62,7 @@ public final class ArtifactImageManager { public synchronized static void loadCache() { - Set<IArtifactType> imageKeys = new HashSet<IArtifactType>(); + Set<IArtifactType> imageKeys = new HashSet<>(); imageKeys.addAll(providersOverrideImageMap.keySet()); imageKeys.addAll(artifactTypeImageMap.keySet()); imageKeys.addAll(artifactTypeImageProviderMap.keySet()); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactLabelProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactLabelProvider.java index c622b035ed2..e80bc06ae2b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactLabelProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactLabelProvider.java @@ -66,7 +66,7 @@ public class ArtifactLabelProvider extends LabelProvider { //StyledCellLabelProv if (element instanceof Artifact) { Artifact artifact = (Artifact) element; - List<String> extraInfo = new ArrayList<String>(); + List<String> extraInfo = new ArrayList<>(); String name = artifact.getName(); extraInfo.add(name != null ? name : ""); if (artifact.isDeleted()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactValidationCheckOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactValidationCheckOperation.java index df37642da77..e6c1778ac35 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactValidationCheckOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactValidationCheckOperation.java @@ -33,7 +33,7 @@ public class ArtifactValidationCheckOperation extends AbstractOperation { public ArtifactValidationCheckOperation(final Collection<Artifact> itemsToCheck, boolean stopOnFirstError) { super("Validate Artifact(s)", Activator.PLUGIN_ID); this.stopOnFirstError = stopOnFirstError; - this.itemsToCheck = new ArrayList<Artifact>(itemsToCheck); + this.itemsToCheck = new ArrayList<>(itemsToCheck); if (itemsToCheck != null) { this.itemsToCheck.addAll(itemsToCheck); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/AttributesComposite.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/AttributesComposite.java index a7b3cbddd22..35036f2825a 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/AttributesComposite.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/AttributesComposite.java @@ -63,7 +63,7 @@ public class AttributesComposite extends Composite { private Artifact artifact; private final IDirtiableEditor editor; private Label warningLabel; - private final ArrayList<ModifyAttributesListener> modifyAttrListeners = new ArrayList<ModifyAttributesListener>(); + private final ArrayList<ModifyAttributesListener> modifyAttrListeners = new ArrayList<>(); private MenuItem deleteItem; private final ToolBar toolBar; @@ -246,7 +246,7 @@ public class AttributesComposite extends Composite { addItem.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - Collection<IAttributeType> selectableTypes = new ArrayList<IAttributeType>(); + Collection<IAttributeType> selectableTypes = new ArrayList<>(); try { for (IAttributeType attrType : artifact.getAttributeTypes()) { if (artifact.getRemainingAttributeCount(attrType) > 0) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/DialogPopupLoggerListener.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/DialogPopupLoggerListener.java index db32b2242ac..9a436df4fcf 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/DialogPopupLoggerListener.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/DialogPopupLoggerListener.java @@ -33,7 +33,7 @@ public class DialogPopupLoggerListener implements ILoggerListener { final IStatus status; final String realMessageText; if (th != null) { - List<IStatus> exc = new ArrayList<IStatus>(); + List<IStatus> exc = new ArrayList<>(); exceptionToString(true, loggerName, th, exc); status = new MultiStatus(loggerName, IStatus.ERROR, exc.toArray(new IStatus[exc.size()]), th.getMessage(), th); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/FindInWorkspaceOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/FindInWorkspaceOperation.java index f12155bebe0..64a60cb7ae7 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/FindInWorkspaceOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/FindInWorkspaceOperation.java @@ -66,7 +66,7 @@ public class FindInWorkspaceOperation extends AbstractOperation { } private Map<String, Artifact> getGuidMap() { - Map<String, Artifact> guids = new HashMap<String, Artifact>(); + Map<String, Artifact> guids = new HashMap<>(); for (Artifact art : artifacts) { guids.put(art.getGuid(), art); } @@ -75,7 +75,7 @@ public class FindInWorkspaceOperation extends AbstractOperation { private void findByName(Map<String, Artifact> guids, IProgressMonitor monitor) throws Exception { IContainer ws = ResourcesPlugin.getWorkspace().getRoot(); - List<Artifact> toSearch = new LinkedList<Artifact>(guids.values()); + List<Artifact> toSearch = new LinkedList<>(guids.values()); for (Artifact artifact : toSearch) { if (artifact.getArtifactType().equals(CoreArtifactTypes.TestCase)) { String artifactName = artifact.getName(); @@ -83,7 +83,7 @@ public class FindInWorkspaceOperation extends AbstractOperation { if (endOfPackageName != -1) { String packageName = artifactName.substring(0, endOfPackageName); String fileName = artifactName.substring(endOfPackageName + 1) + ".java"; - List<IResource> finds = new ArrayList<IResource>(); + List<IResource> finds = new ArrayList<>(); AWorkspace.recursiveFileFind(fileName, ws, finds); for (IResource find : finds) { if (find.toString().contains(packageName)) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/HTMLTransferFormatter.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/HTMLTransferFormatter.java index 953acef6f96..fc31d8ee209 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/HTMLTransferFormatter.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/HTMLTransferFormatter.java @@ -55,7 +55,7 @@ public class HTMLTransferFormatter { sb.append("Version:1.0\r\nStartHTML:2\r\nEndHTML:170\r\nStartFragment:140\r\nEndFragment:160\r\n" + "StartSelection:140\r\nEndSelection:160\r\n<HTML><HEAD><TITLE> The HTML Clipboard</TITLE></HEAD><BODY>\r\n" + "<!--StartFragment -->\r\n"); } - List<String> urls = new ArrayList<String>(artifacts.length); + List<String> urls = new ArrayList<>(artifacts.length); for (Artifact artifact : artifacts) { String link = null; try { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportOperationFactory.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportOperationFactory.java index 7eb5bd39d74..6fe6d9fb790 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportOperationFactory.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportOperationFactory.java @@ -155,7 +155,7 @@ public final class ArtifactImportOperationFactory { builder.addOp(new RoughToRealArtifactOperation(transaction, destinationArtifact, collector, resolver, deleteUnmatchedArtifacts, extractor)); - final List<Artifact> children = new ArrayList<Artifact>(); + final List<Artifact> children = new ArrayList<>(); builder.addOp(new FetchAndAddDescendantsOperation(children, destinationArtifact)); builder.addOp(new ArtifactValidationCheckOperation(children, stopOnError)); builder.addOp(new CompleteArtifactImportOperation(transaction, destinationArtifact)); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportPage.java index 44050676c63..e4bcc2f1aee 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportPage.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/Import/ArtifactImportPage.java @@ -92,7 +92,7 @@ public class ArtifactImportPage extends WizardDataTransferPage { protected ArtifactImportPage(File defaultSourceFile, Artifact defaultDestinationArtifact) { super(PAGE_NAME); - selectedArtifactTypes = new ArrayList<IArtifactType>(); + selectedArtifactTypes = new ArrayList<>(); selectionLatch = new SelectionLatch(); collector = new RoughArtifactCollector(new RoughArtifact(RoughArtifactKind.PRIMARY)); artifactSelectPanel = new ArtifactSelectPanel(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OpenContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OpenContributionItem.java index 65481d4b42c..1dadf9332d8 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OpenContributionItem.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OpenContributionItem.java @@ -70,7 +70,7 @@ public class OpenContributionItem extends ContributionItem { private static final String DEFAULT_OPEN_CMD_ID = "org.eclipse.osee.framework.ui.skynet.open.command"; - private final Collection<IContributionItem> openWithItems = new ArrayList<IContributionItem>(); + private final Collection<IContributionItem> openWithItems = new ArrayList<>(); private final ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class); private IContributionItem defaultOpenItem; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseePreferencePage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseePreferencePage.java index 6cf24d7e47b..1957b058a56 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseePreferencePage.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseePreferencePage.java @@ -86,7 +86,7 @@ public class OseePreferencePage extends PreferencePage implements IWorkbenchPref OseeLog.log(Activator.class, Level.SEVERE, ex); } - networkButtons = new HashMap<InetAddress, Button>(); + networkButtons = new HashMap<>(); Button defaultButton = new Button(group, SWT.RADIO); defaultButton.setText("Default"); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationContentProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationContentProvider.java index 467e0df7027..78af9448244 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationContentProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationContentProvider.java @@ -40,7 +40,7 @@ import org.eclipse.osee.framework.ui.skynet.internal.Activator; public class RelationContentProvider implements ITreeContentProvider { private static Object[] EMPTY_ARRAY = new Object[0]; private Artifact artifactRoot; - private final Map<Object, Object> childToParentMap = new HashMap<Object, Object>(); + private final Map<Object, Object> childToParentMap = new HashMap<>(); @Override public void dispose() { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationOrderContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationOrderContributionItem.java index f677460b43a..cdf8db00547 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationOrderContributionItem.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationOrderContributionItem.java @@ -47,7 +47,7 @@ public class RelationOrderContributionItem extends ContributionItem { } private final ISelectionProvider selectionProvider; - private final Collection<SelectionListener> listeners = new CopyOnWriteArrayList<SelectionListener>(); + private final Collection<SelectionListener> listeners = new CopyOnWriteArrayList<>(); public RelationOrderContributionItem(ISelectionProvider selectionProvider) { super("relation.order.contribution.item"); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationSkynetDragAndDrop.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationSkynetDragAndDrop.java index 8bcb436d18d..ae299ee654e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationSkynetDragAndDrop.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationSkynetDragAndDrop.java @@ -288,7 +288,7 @@ public final class RelationSkynetDragAndDrop extends SkynetDragAndDrop { @Override protected void doWork(IProgressMonitor monitor) throws Exception { - Collection<URI> resources = new LinkedList<URI>(); + Collection<URI> resources = new LinkedList<>(); for (String path : input) { File file = new File(path); if (file.exists()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationsComposite.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationsComposite.java index 29c6e0e2d56..c7e52225281 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationsComposite.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationsComposite.java @@ -334,7 +334,7 @@ public class RelationsComposite extends Composite implements ISelectedArtifact { public void widgetSelected(SelectionEvent e) { TreeViewerReport report = new TreeViewerReport("Relation View Report for " + artifact.getName(), treeViewer); - ArrayList<Integer> ignoreCols = new ArrayList<Integer>(); + ArrayList<Integer> ignoreCols = new ArrayList<>(); ignoreCols.add(COLUMN_ORDER); report.setIgnoreColumns(ignoreCols); report.open(); @@ -380,7 +380,7 @@ public class RelationsComposite extends Composite implements ISelectedArtifact { } private void openWordViewer(IStructuredSelection selection) { - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); for (Object object : selection.toArray()) { if (object instanceof WrapperForRelationLink) { @@ -397,7 +397,7 @@ public class RelationsComposite extends Composite implements ISelectedArtifact { } private Set<Artifact> getSelectedArtifacts(IStructuredSelection selection) { - Set<Artifact> selectedArtifacts = new HashSet<Artifact>(); + Set<Artifact> selectedArtifacts = new HashSet<>(); Iterator<?> iter = selection.iterator(); while (iter.hasNext()) { Object object = iter.next(); @@ -452,8 +452,8 @@ public class RelationsComposite extends Composite implements ISelectedArtifact { Collection<MenuItem> artEnabledOnlyitems; public NeedSelectedArtifactListener() { - accessControlitems = new LinkedList<MenuItem>(); - artEnabledOnlyitems = new LinkedList<MenuItem>(); + accessControlitems = new LinkedList<>(); + artEnabledOnlyitems = new LinkedList<>(); } public void addArtifactEnabled(MenuItem item) { @@ -623,7 +623,7 @@ public class RelationsComposite extends Composite implements ISelectedArtifact { boolean hasPermission = false; try { RelationTypeSide relationTypeSide = null; - ArrayList<Artifact> artifacts = new ArrayList<Artifact>(); + ArrayList<Artifact> artifacts = new ArrayList<>(); if (object instanceof WrapperForRelationLink) {//used for ordering WrapperForRelationLink targetLink = (WrapperForRelationLink) object; relationTypeSide = new RelationTypeSide(targetLink.getRelationType(), targetLink.getRelationSide()); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ResServiceContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ResServiceContributionItem.java index 2f3464b6db7..87acc0de36b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ResServiceContributionItem.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ResServiceContributionItem.java @@ -109,7 +109,7 @@ public class ResServiceContributionItem extends OseeStatusContributionItem imple @Override public void run() { boolean isActive = getStatus(); - Set<OseeStatusContributionItem> toRemove = new HashSet<OseeStatusContributionItem>(); + Set<OseeStatusContributionItem> toRemove = new HashSet<>(); for (OseeStatusContributionItem item : itemsToUpdate) { if (item.isDisposed()) { toRemove.add(item); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SelectionProviderWrapper.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SelectionProviderWrapper.java index 95e228c2533..8e8a1e5a2bb 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SelectionProviderWrapper.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SelectionProviderWrapper.java @@ -28,7 +28,7 @@ public class SelectionProviderWrapper implements ISelectionProvider { @Override public void addSelectionChangedListener(ISelectionChangedListener listener) { if (selectionListeners == null) { - selectionListeners = new ArrayList<Object>(1); + selectionListeners = new ArrayList<>(1); } selectionListeners.add(listener); if (provider != null) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/TreeViewerReport.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/TreeViewerReport.java index 4e02ede801a..a5c08d0e04d 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/TreeViewerReport.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/TreeViewerReport.java @@ -24,7 +24,7 @@ import org.eclipse.swt.widgets.TreeItem; public class TreeViewerReport { private final TreeViewer treeViewer; - private ArrayList<Integer> ignoreCols = new ArrayList<Integer>(); + private ArrayList<Integer> ignoreCols = new ArrayList<>(); private final String title; public TreeViewerReport(String title, TreeViewer treeViewer) { @@ -71,7 +71,7 @@ public class TreeViewerReport { html += AHTML.addHeaderRowMultiColumnTable(colNames, width); // Get column widths and column name and setup the columns ITableLabelProvider labelProv = (ITableLabelProvider) treeViewer.getLabelProvider(); - ArrayList<String[]> list = new ArrayList<String[]>(); + ArrayList<String[]> list = new ArrayList<>(); for (TreeItem item : items) { addRow(item, list, labelProv, cols.length, 1); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/XWidgetParser.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/XWidgetParser.java index 77f0ac39d29..54db95716f3 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/XWidgetParser.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/XWidgetParser.java @@ -65,7 +65,7 @@ public class XWidgetParser { public static List<XWidgetRendererItem> extractlayoutDatas(SwtXWidgetRenderer dynamicXWidgetLayout, Element xWidgets) { NodeList widgets = xWidgets.getElementsByTagName(SwtXWidgetRenderer.XWIDGET); - List<XWidgetRendererItem> layoutDatas = new ArrayList<XWidgetRendererItem>(widgets.getLength()); + List<XWidgetRendererItem> layoutDatas = new ArrayList<>(widgets.getLength()); for (int i = 0; i < widgets.getLength(); i++) { layoutDatas.add(extractWorkAttribute(dynamicXWidgetLayout, (Element) widgets.item(i))); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyDialog.java index 7a4af370c68..9e3920a9fb4 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyDialog.java @@ -87,7 +87,7 @@ public class PolicyDialog extends Dialog { cmbUsers.setText("-Select Person-"); cmbPermissionLevel.setText("-Select Permission-"); - ArrayList<Artifact> subjectList = new ArrayList<Artifact>(); + ArrayList<Artifact> subjectList = new ArrayList<>(); subjectList.addAll(UserManager.getUsersSortedByName()); subjectList.addAll(ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.UserGroup, BranchManager.getCommonBranch())); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyTableViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyTableViewer.java index d7f2cc3c784..d50833870ca 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyTableViewer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyTableViewer.java @@ -39,8 +39,8 @@ import org.eclipse.swt.widgets.Composite; */ public class PolicyTableViewer { - private final Map<String, AccessControlData> accessControlList = new HashMap<String, AccessControlData>(); - private final Collection<AccessControlData> deleteControlList = new ArrayList<AccessControlData>(); + private final Map<String, AccessControlData> accessControlList = new HashMap<>(); + private final Collection<AccessControlData> deleteControlList = new ArrayList<>(); private final Object object; private final Composite parent; private PermissionEnum maxModificationLevel = PermissionEnum.FULLACCESS; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyTableXviewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyTableXviewer.java index f240d0c4bea..7286b3e9ce8 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyTableXviewer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/access/PolicyTableXviewer.java @@ -87,7 +87,7 @@ public class PolicyTableXviewer extends XViewer implements IMultiColumnEditProvi } TreeSelection treeSelection = (TreeSelection) getSelection(); Iterator<?> elements = treeSelection.iterator(); - ArrayList<AccessControlData> userData = new ArrayList<AccessControlData>(); + ArrayList<AccessControlData> userData = new ArrayList<>(); while (elements.hasNext()) { AccessControlData ac = (AccessControlData) elements.next(); if (PermissionEnum.getMostRestrictive(ac.getPermission(), maxPermission).equals(ac.getPermission())) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/action/PurgeTransactionAction.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/action/PurgeTransactionAction.java index 39964cf4320..b492985b726 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/action/PurgeTransactionAction.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/action/PurgeTransactionAction.java @@ -57,7 +57,7 @@ public class PurgeTransactionAction extends Action { @Override public void run() { - final List<TransactionRecord> useTransactions = new ArrayList<TransactionRecord>(transactions); + final List<TransactionRecord> useTransactions = new ArrayList<>(transactions); if (useTransactions.isEmpty()) { if (!getTransactions(useTransactions)) { return; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactNameConflictHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactNameConflictHandler.java index 53323d47a43..6767e6cc32f 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactNameConflictHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactNameConflictHandler.java @@ -22,7 +22,7 @@ import org.eclipse.osee.framework.ui.swt.Displays; public class ArtifactNameConflictHandler { public String resolve(IArtifact source) { - final Pair<String, String> beforeAfterNames = new Pair<String, String>("", ""); + final Pair<String, String> beforeAfterNames = new Pair<>("", ""); String startingName = source.getName(); beforeAfterNames.setFirst(startingName); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPasteOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPasteOperation.java index 62499481651..34e3d9d50ce 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPasteOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/ArtifactPasteOperation.java @@ -107,7 +107,7 @@ public class ArtifactPasteOperation extends AbstractOperation { if (!(source instanceof User)) { newArtifact = source.duplicate(destination.getBranch()); destination.addChild(newArtifact); - List<Artifact> copiedChildren = new ArrayList<Artifact>(); + List<Artifact> copiedChildren = new ArrayList<>(); if (config.isIncludeChildrenOfCopiedElements()) { Collection<Artifact> children = source.getChildren(); if (!children.isEmpty()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/EnumSelectionDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/EnumSelectionDialog.java index f7c4c1188df..f514fee3180 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/EnumSelectionDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/EnumSelectionDialog.java @@ -63,7 +63,7 @@ public class EnumSelectionDialog extends FilteredCheckboxTreeDialog { selected = Selection.ReplaceAll; } } catch (OseeCoreException ex) { - options = new HashSet<String>(); + options = new HashSet<>(); options.add(ex.getLocalizedMessage()); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/EnumSingletonSelectionDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/EnumSingletonSelectionDialog.java index 8ffda3bcaef..9d5a6708c20 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/EnumSingletonSelectionDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/EnumSingletonSelectionDialog.java @@ -46,7 +46,7 @@ public class EnumSingletonSelectionDialog extends ListDialog { isRemoveAllAllowed = AttributeTypeManager.checkIfRemovalAllowed(attributeType, artifacts); } catch (OseeCoreException ex) { - options = new HashSet<String>(); + options = new HashSet<>(); options.add(ex.getLocalizedMessage()); } setInput(options); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/annotation/AttributeAnnotationManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/annotation/AttributeAnnotationManager.java index 25dc8a752bd..d7be4c7ba94 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/annotation/AttributeAnnotationManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/annotation/AttributeAnnotationManager.java @@ -55,7 +55,7 @@ public class AttributeAnnotationManager { return Collections.emptySet(); } ensureLoaded(); - Set<ArtifactAnnotation> annotations = new HashSet<ArtifactAnnotation>(); + Set<ArtifactAnnotation> annotations = new HashSet<>(); for (IArtifactAnnotation annotation : extensionDefinedObjects.getObjects()) { annotation.getAnnotations(artifact, annotations); } @@ -76,7 +76,7 @@ public class AttributeAnnotationManager { * annotation for this artifact as annotations can be added via extension point. */ public List<ArtifactAnnotation> getAnnotations() throws OseeCoreException { - List<ArtifactAnnotation> annotations = new ArrayList<ArtifactAnnotation>(); + List<ArtifactAnnotation> annotations = new ArrayList<>(); for (String value : artifact.getAttributesToStringList(CoreAttributeTypes.Annotation)) { ArtifactAnnotation annotation = new ArtifactAnnotation(value); annotations.add(annotation); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorEventManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorEventManager.java index 70cdfb87c4e..1e1a39945e1 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorEventManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorEventManager.java @@ -44,7 +44,7 @@ import org.eclipse.osee.framework.ui.swt.Displays; */ public class ArtifactEditorEventManager implements IArtifactEventListener, IBranchEventListener, IAccessControlEventListener { - List<IArtifactEditorEventHandler> handlers = new CopyOnWriteArrayList<IArtifactEditorEventHandler>(); + List<IArtifactEditorEventHandler> handlers = new CopyOnWriteArrayList<>(); static ArtifactEditorEventManager instance; public static void add(IArtifactEditorEventHandler iWorldEventHandler) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/pages/ArtifactEditorOutlinePage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/pages/ArtifactEditorOutlinePage.java index 2f4639484bf..654cbff083f 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/pages/ArtifactEditorOutlinePage.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/pages/ArtifactEditorOutlinePage.java @@ -100,7 +100,7 @@ public class ArtifactEditorOutlinePage extends ContentOutlinePage { private final List<AttributeTypeContainer> containers; public InternalLabelProvider() { - this.containers = new ArrayList<AttributeTypeContainer>(); + this.containers = new ArrayList<>(); } @Override @@ -148,7 +148,7 @@ public class ArtifactEditorOutlinePage extends ContentOutlinePage { @Override public Object[] getChildren(Object element) { - List<Object> items = new ArrayList<Object>(); + List<Object> items = new ArrayList<>(); if (element instanceof ArtifactEditor) { ArtifactEditorInput editorInput = ((ArtifactEditor) element).getEditorInput(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/pages/ArtifactFormPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/pages/ArtifactFormPage.java index 8ddcb67fca1..1ddb2c77649 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/pages/ArtifactFormPage.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/pages/ArtifactFormPage.java @@ -70,7 +70,7 @@ public class ArtifactFormPage extends FormPage { public ArtifactFormPage(FormEditor editor, String id, String title) { super(editor, id, title); - sectionParts = new LinkedHashMap<SectionEnum, SectionPart>(); + sectionParts = new LinkedHashMap<>(); } @Override diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/parts/AttributeFormPart.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/parts/AttributeFormPart.java index 6e5c2df84b3..1f1fcbce7af 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/parts/AttributeFormPart.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/parts/AttributeFormPart.java @@ -72,7 +72,7 @@ public class AttributeFormPart extends AbstractFormPart { private final ArtifactEditor editor; private Composite composite; private final XWidgetDecorator decorator = new XWidgetDecorator(); - private final Map<IAttributeType, Composite> xWidgetsMap = new HashMap<IAttributeType, Composite>(); + private final Map<IAttributeType, Composite> xWidgetsMap = new HashMap<>(); private final XModifiedListener widgetModifiedListener = new XModifiedListener() { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/sections/AttributeTypeEditDisplay.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/sections/AttributeTypeEditDisplay.java index 0995b3385e9..c04d55b5c53 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/sections/AttributeTypeEditDisplay.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/sections/AttributeTypeEditDisplay.java @@ -72,7 +72,7 @@ public final class AttributeTypeEditDisplay implements AttributeTypeEditPresente dialog.setInput(input); int result = dialog.open(); if (result == Window.OK) { - toReturn = new ArrayList<IAttributeType>(); + toReturn = new ArrayList<>(); for (Object object : dialog.getResult()) { if (object instanceof IAttributeType) { toReturn.add((IAttributeType) object); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/sections/AttributeTypeUtil.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/sections/AttributeTypeUtil.java index 24b30949e6b..9d68443fa28 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/sections/AttributeTypeUtil.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/sections/AttributeTypeUtil.java @@ -28,7 +28,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Attribute; public class AttributeTypeUtil { public static List<IAttributeType> getEmptyTypes(Artifact artifact) throws OseeCoreException { - List<IAttributeType> items = new ArrayList<IAttributeType>(); + List<IAttributeType> items = new ArrayList<>(); for (IAttributeType type : artifact.getAttributeTypes()) { if (!CoreAttributeTypes.Name.equals(type) && artifact.getAttributes(type).isEmpty()) { items.add(type); @@ -39,7 +39,7 @@ public class AttributeTypeUtil { } private static Set<AttributeType> toTypes(List<Attribute<?>> attributes) { - Set<AttributeType> types = new HashSet<AttributeType>(); + Set<AttributeType> types = new HashSet<>(); for (Attribute<?> attribute : attributes) { types.add(attribute.getAttributeType()); } @@ -47,7 +47,7 @@ public class AttributeTypeUtil { } public static List<IAttributeType> getTypesWithData(Artifact artifact) throws OseeCoreException { - List<IAttributeType> items = new ArrayList<IAttributeType>(); + List<IAttributeType> items = new ArrayList<>(); List<Attribute<?>> attributeInstances = artifact.getAttributes(artifact.isDeleted()); Set<AttributeType> typesInExistence = toTypes(attributeInstances); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassArtifactEditor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassArtifactEditor.java index 232e2c5fead..e029b3cf5d5 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassArtifactEditor.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassArtifactEditor.java @@ -91,14 +91,14 @@ public class MassArtifactEditor extends AbstractArtifactEditor { } public static void editArtifacts(final String name, final Collection<? extends Artifact> artifacts, TableLoadOption... tableLoadOptions) { - Set<TableLoadOption> options = new HashSet<TableLoadOption>(); + Set<TableLoadOption> options = new HashSet<>(); options.addAll(Arrays.asList(tableLoadOptions)); Displays.ensureInDisplayThread(new Runnable() { @Override public void run() { boolean accessControlFilteredResults = false; try { - Set<Artifact> accessibleArts = new HashSet<Artifact>(); + Set<Artifact> accessibleArts = new HashSet<>(); for (Artifact artifact : artifacts) { if (!AccessControlManager.hasPermission(artifact, PermissionEnum.READ)) { OseeLog.log(Activator.class, Level.INFO, @@ -339,7 +339,7 @@ public class MassArtifactEditor extends AbstractArtifactEditor { } public static Collection<MassArtifactEditor> getEditors() { - final List<MassArtifactEditor> editors = new ArrayList<MassArtifactEditor>(); + final List<MassArtifactEditor> editors = new ArrayList<>(); Displays.pendInDisplayThread(new Runnable() { @Override public void run() { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassContentProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassContentProvider.java index d7bb25ff747..72ab4c1df22 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassContentProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassContentProvider.java @@ -23,7 +23,7 @@ import org.eclipse.osee.framework.ui.swt.Displays; * @author Donald G. Dunne */ public class MassContentProvider implements ITreeContentProvider { - protected Collection<Artifact> rootSet = new HashSet<Artifact>(); + protected Collection<Artifact> rootSet = new HashSet<>(); private final MassXViewer xViewer; private static Object[] EMPTY_ARRAY = new Object[0]; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassXViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassXViewer.java index 5e39db22b5d..421a818e3ec 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassXViewer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassXViewer.java @@ -64,7 +64,7 @@ import org.eclipse.swt.widgets.TreeItem; public class MassXViewer extends XViewer implements IMassViewerEventHandler { private String title; - private final Set<Artifact> artifacts = new HashSet<Artifact>(50); + private final Set<Artifact> artifacts = new HashSet<>(50); private final IDirtiableEditor editor; private final List<String> EXTRA_COLUMNS = Arrays.asList(new String[] {"GUID", "Artifact Type"}); private final Composite parent; @@ -88,7 +88,7 @@ public class MassXViewer extends XViewer implements IMassViewerEventHandler { @Override public void handleColumnMultiEdit(TreeColumn treeColumn, Collection<TreeItem> treeItems) { String colName = treeColumn.getText(); - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); for (TreeItem item : treeItems) { artifacts.add((Artifact) item.getData()); } @@ -166,7 +166,7 @@ public class MassXViewer extends XViewer implements IMassViewerEventHandler { return; } // get attributes that can be deleted (from artifact and validity) - Set<IAttributeType> attrTypesUsed = new HashSet<IAttributeType>(); + Set<IAttributeType> attrTypesUsed = new HashSet<>(); for (Artifact art : artifacts) { // include attribute types that are used even if invalid for (Attribute<?> attr : art.getAttributes()) { @@ -288,7 +288,7 @@ public class MassXViewer extends XViewer implements IMassViewerEventHandler { } public ArrayList<Artifact> getLoadedArtifacts() { - ArrayList<Artifact> arts = new ArrayList<Artifact>(); + ArrayList<Artifact> arts = new ArrayList<>(); TreeItem items[] = getTree().getItems(); if (items.length > 0) { for (TreeItem item : items) { @@ -306,7 +306,7 @@ public class MassXViewer extends XViewer implements IMassViewerEventHandler { } public ArrayList<Artifact> getSelectedArtifacts() { - ArrayList<Artifact> arts = new ArrayList<Artifact>(); + ArrayList<Artifact> arts = new ArrayList<>(); TreeItem items[] = getTree().getSelection(); if (items.length > 0) { for (TreeItem item : items) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassXViewerEventManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassXViewerEventManager.java index f25b3bb1d9f..67cce478ca1 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassXViewerEventManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/massEditor/MassXViewerEventManager.java @@ -35,7 +35,7 @@ import org.eclipse.osee.framework.ui.swt.Displays; */ public class MassXViewerEventManager implements IArtifactEventListener { - List<IMassViewerEventHandler> handlers = new CopyOnWriteArrayList<IMassViewerEventHandler>(); + List<IMassViewerEventHandler> handlers = new CopyOnWriteArrayList<>(); static MassXViewerEventManager instance; public static void add(IMassViewerEventHandler iWorldEventHandler) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/prompt/EnumeratedHandlePromptChange.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/prompt/EnumeratedHandlePromptChange.java index 7dc8bc726ba..39f404a2a0c 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/prompt/EnumeratedHandlePromptChange.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/prompt/EnumeratedHandlePromptChange.java @@ -107,7 +107,7 @@ public class EnumeratedHandlePromptChange implements IHandlePromptChange { private boolean storeNonSingleton() throws OseeCoreException { boolean result = false; - Set<String> selected = new HashSet<String>(); + Set<String> selected = new HashSet<>(); for (Object obj : dialog.getResult()) { selected.add((String) obj); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamContributionManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamContributionManager.java index c02f1f5bb99..e8fed07e696 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamContributionManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamContributionManager.java @@ -37,7 +37,7 @@ public class BlamContributionManager implements IXNavigateCommonItem { public synchronized static Map<String, AbstractBlam> getBlamMap() { if (blams == null) { - blams = new TreeMap<String, AbstractBlam>(); + blams = new TreeMap<>(); ExtensionDefinedObjects<AbstractBlam> definedObjects = new ExtensionDefinedObjects<AbstractBlam>("org.eclipse.osee.framework.ui.skynet.BlamOperation", "Operation", "className"); @@ -83,7 +83,7 @@ public class BlamContributionManager implements IXNavigateCommonItem { @Override public void createCommonSection(List<XNavigateItem> items, List<String> excludeSectionIds) { - Map<String, XNavigateItem> nameToParent = new HashMap<String, XNavigateItem>(); + Map<String, XNavigateItem> nameToParent = new HashMap<>(); XNavigateItem blamOperationItems = new XNavigateItem(null, "Blam Operations", FrameworkImage.BLAM); for (AbstractBlam blamOperation : getBlamOperations()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamEditor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamEditor.java index 47f9a4d4e3d..ef7b688e06e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamEditor.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamEditor.java @@ -158,7 +158,7 @@ public class BlamEditor extends FormEditor implements IDirtiableEditor { } public static Collection<BlamEditor> getEditors() { - final List<BlamEditor> editors = new ArrayList<BlamEditor>(); + final List<BlamEditor> editors = new ArrayList<>(); Displays.pendInDisplayThread(new Runnable() { @Override public void run() { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/VariableMap.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/VariableMap.java index 87e01216fb9..fca45d7cc36 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/VariableMap.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/VariableMap.java @@ -28,7 +28,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact; * @author Ryan D. Brooks */ public class VariableMap { - private final Map<String, Object> variableMap = new HashMap<String, Object>(); + private final Map<String, Object> variableMap = new HashMap<>(); public VariableMap() { // provides a constructor that does not throw OseeArgumentException @@ -105,7 +105,7 @@ public class VariableMap { @SuppressWarnings("unchecked") public <T> Collection<T> getCollection(Class<T> clazz, String parameterName) throws OseeArgumentException { - List<T> results = new ArrayList<T>(); + List<T> results = new ArrayList<>(); for (Object obj : getValue(Collection.class, parameterName)) { if (clazz.isInstance(obj)) { results.add((T) obj); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/AdvancedKeywordSearchBlam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/AdvancedKeywordSearchBlam.java index f5383e4338a..e9c0072f8ec 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/AdvancedKeywordSearchBlam.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/AdvancedKeywordSearchBlam.java @@ -59,7 +59,7 @@ public class AdvancedKeywordSearchBlam extends AbstractBlam { return; } Collection<AttributeType> attrTypes = variableMap.getAttributeTypes("Include Attribute Values in Results"); - HashCollection<Artifact, String> artifactToMatch = new HashCollection<Artifact, String>(100); + HashCollection<Artifact, String> artifactToMatch = new HashCollection<>(100); for (String keywords : keywordgroups.split(System.getProperty("line.separator"))) { for (Artifact art : ArtifactQuery.getArtifactListFromAttributeKeywords(branch, keywords, true, EXCLUDE_DELETED, false)) { @@ -71,14 +71,14 @@ public class AdvancedKeywordSearchBlam extends AbstractBlam { XResultData resultData = new XResultData(false); resultData.log(String.format("[%s] on branch [%s] (keyword groups listed below results)", getName(), branch)); resultData.addRaw(AHTML.beginMultiColumnTable(100, 1)); - List<String> headerList = new ArrayList<String>(); + List<String> headerList = new ArrayList<>(); headerList.addAll(Arrays.asList("Artifact", "Keywords matched", "Guid", "Link", "Artifact Type")); for (AttributeType attrType : attrTypes) { headerList.add(attrType.getName()); } resultData.addRaw(AHTML.addHeaderRowMultiColumnTable(headerList)); for (Entry<Artifact, Collection<String>> entry : artifactToMatch.entrySet()) { - List<String> valueList = new ArrayList<String>(); + List<String> valueList = new ArrayList<>(); valueList.addAll(Arrays.asList(entry.getKey().getName(), Collections.toString(";", entry.getValue()), entry.getKey().getGuid(), XResultDataUI.getHyperlink("open", entry.getKey()), entry.getKey().getArtifactTypeName())); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/AttributeCheckOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/AttributeCheckOperation.java index 1705d1c7aef..68b3eec6024 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/AttributeCheckOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/AttributeCheckOperation.java @@ -63,7 +63,7 @@ public class AttributeCheckOperation extends AbstractOperation { } private String findMostPopularAttributeValue(List<Artifact> allDescendants, IProgressMonitor monitor) throws OseeCoreException { - CountingMap<String> countingMap = new CountingMap<String>(); + CountingMap<String> countingMap = new CountingMap<>(); for (Artifact child : allDescendants) { if (!monitor.isCanceled()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DatabaseHealth.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DatabaseHealth.java index 9e7dfe277d1..ca87f8722dd 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DatabaseHealth.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/DatabaseHealth.java @@ -107,8 +107,8 @@ public class DatabaseHealth extends AbstractBlam { private final class MasterDbHealthOperation extends AbstractOperation { - private final Set<DatabaseHealthOperation> fixOperations = new HashSet<DatabaseHealthOperation>(); - private final Set<DatabaseHealthOperation> verifyOperations = new HashSet<DatabaseHealthOperation>(); + private final Set<DatabaseHealthOperation> fixOperations = new HashSet<>(); + private final Set<DatabaseHealthOperation> verifyOperations = new HashSet<>(); public MasterDbHealthOperation(String operationName) { super(operationName, Activator.PLUGIN_ID); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/EmailGroupsBlam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/EmailGroupsBlam.java index ff58030ca0c..7a2d68d2282 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/EmailGroupsBlam.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/EmailGroupsBlam.java @@ -59,7 +59,7 @@ public class EmailGroupsBlam extends AbstractBlam { private XText subjectTextBox, replyToAddressTextBox; private XCheckBox isBodyHtmlCheckbox; private ExecutorService emailTheadPool; - private final Collection<Future<String>> futures = new ArrayList<Future<String>>(300); + private final Collection<Future<String>> futures = new ArrayList<>(300); private final XModifiedListener listener = new ModificationListerner(); @Override @@ -105,7 +105,7 @@ public class EmailGroupsBlam extends AbstractBlam { emailTheadPool = Executors.newFixedThreadPool(30); futures.clear(); - TreeSet<Artifact> users = new TreeSet<Artifact>(data.getUserToGroupMap().keySet()); + TreeSet<Artifact> users = new TreeSet<>(data.getUserToGroupMap().keySet()); for (Artifact user : users) { sendEmailTo(data, (User) user); } @@ -239,7 +239,7 @@ public class EmailGroupsBlam extends AbstractBlam { bodyTextBox.set(body); } else { XArtifactList groupList = (XArtifactList) xWidget; - Collection<Artifact> templates = new ArrayList<Artifact>(); + Collection<Artifact> templates = new ArrayList<>(); for (Object group : groupList.getSelected()) { templates.addAll(((Artifact) group).getChildren()); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/EmailGroupsData.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/EmailGroupsData.java index b585907ac1a..e35e3f39e1a 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/EmailGroupsData.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/EmailGroupsData.java @@ -33,7 +33,7 @@ public class EmailGroupsData { private String subject; private String body; private boolean bodyIsHtml; - private final Set<Artifact> groups = new HashSet<Artifact>(5); + private final Set<Artifact> groups = new HashSet<>(5); public String getSubject() { return subject; @@ -64,7 +64,7 @@ public class EmailGroupsData { } public HashCollection<Artifact, Artifact> getUserToGroupMap() throws OseeCoreException { - HashCollection<Artifact, Artifact> userToGroupMap = new HashCollection<Artifact, Artifact>(); + HashCollection<Artifact, Artifact> userToGroupMap = new HashCollection<>(); for (Artifact group : groups) { for (Artifact user : group.getRelatedArtifacts(CoreRelationTypes.Users_User)) { Boolean isActive = user.getSoleAttributeValue(CoreAttributeTypes.Active); @@ -93,7 +93,7 @@ public class EmailGroupsData { if (groups.isEmpty()) { return new Result("No groups selected"); } - Set<Artifact> groupArts = new HashSet<Artifact>(); + Set<Artifact> groupArts = new HashSet<>(); groupArts.addAll(getUserToGroupMap().getValues()); if (groupArts.isEmpty()) { return new Result("No valid users in groups selected"); @@ -113,7 +113,7 @@ public class EmailGroupsData { html.append("</pre>"); } - Set<String> groupsAllowed = new HashSet<String>(); + Set<String> groupsAllowed = new HashSet<>(); for (Artifact group : groups) { groupsAllowed.add(group.getName()); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ExportArtifacts.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ExportArtifacts.java index e8cb1e9b645..b3113d272a6 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ExportArtifacts.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ExportArtifacts.java @@ -56,7 +56,7 @@ public class ExportArtifacts extends AbstractBlam { List<Artifact> artifacts; if (variableMap.getBoolean("Include Children")) { - artifacts = new ArrayList<Artifact>(400); + artifacts = new ArrayList<>(400); for (Artifact artifact : parentArtifacts) { artifacts.add(artifact); artifacts.addAll(artifact.getDescendants()); @@ -101,7 +101,7 @@ public class ExportArtifacts extends AbstractBlam { } private void mapAttributeTypeToColumn(List<Artifact> artifacts) throws OseeCoreException { - HashSet<IAttributeType> attributeTypes = new HashSet<IAttributeType>(); + HashSet<IAttributeType> attributeTypes = new HashSet<>(); for (Artifact artifact : artifacts) { for (IAttributeType attributeType : artifact.getAttributeTypes()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ExtractReqPriority.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ExtractReqPriority.java index e64ec4c457b..fe067663003 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ExtractReqPriority.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ExtractReqPriority.java @@ -31,7 +31,7 @@ public class ExtractReqPriority implements RowProcessor { private final HashMap<String, String> reqPriorities; public ExtractReqPriority(String excelMlPath) throws UnsupportedEncodingException, FileNotFoundException, IOException, SAXException { - this.reqPriorities = new HashMap<String, String>(); + this.reqPriorities = new HashMap<>(); File file = new File(excelMlPath); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/PopulateUserGroupBlam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/PopulateUserGroupBlam.java index f99e9c40c99..746ce489db6 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/PopulateUserGroupBlam.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/PopulateUserGroupBlam.java @@ -40,7 +40,7 @@ import org.eclipse.ui.forms.widgets.FormToolkit; * @author Ryan D. Brooks */ public class PopulateUserGroupBlam extends AbstractBlam { - HashMap<String, User> emailToUser = new HashMap<String, User>(); + HashMap<String, User> emailToUser = new HashMap<>(); @Override public String getName() { @@ -57,7 +57,7 @@ public class PopulateUserGroupBlam extends AbstractBlam { emailToUser.put(user.getSoleAttributeValue(CoreAttributeTypes.Email, ""), user); } - List<User> users = new ArrayList<User>(); + List<User> users = new ArrayList<>(); int count = 0; for (String emailAddress : emailAddresses.split("[\n\r\t ,;]+")) { User user = emailToUser.get(emailAddress); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/PurgeAttributesBlam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/PurgeAttributesBlam.java index 6bcda1f1b4e..1303a89f783 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/PurgeAttributesBlam.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/PurgeAttributesBlam.java @@ -51,7 +51,7 @@ public class PurgeAttributesBlam extends AbstractBlam { List<Artifact> artifacts = variableMap.getArtifacts("artifacts"); - List<Attribute<?>> attributesToPurge = new ArrayList<Attribute<?>>(); + List<Attribute<?>> attributesToPurge = new ArrayList<>(); for (Artifact artifact : artifacts) { for (IAttributeType attributeType : purgeAttributeTypes) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ReplaceAttributeWithBaselineOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ReplaceAttributeWithBaselineOperation.java index c30a1f53c7b..2d52720070c 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ReplaceAttributeWithBaselineOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/ReplaceAttributeWithBaselineOperation.java @@ -46,7 +46,7 @@ public class ReplaceAttributeWithBaselineOperation extends AbstractOperation { protected void doWork(IProgressMonitor monitor) throws Exception { if (!monitor.isCanceled() && Conditions.notNull(changes) && !changes.isEmpty()) { monitor.beginTask("Reverting attribute", changes.size()); - Set<Artifact> artifactHistory = new HashSet<Artifact>(); + Set<Artifact> artifactHistory = new HashSet<>(); Change firstChange = changes.iterator().next(); SkynetTransaction transaction = diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/StringGuidsToArtifactListOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/StringGuidsToArtifactListOperation.java index ec0ecde9930..b4b6a67897a 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/StringGuidsToArtifactListOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/operation/StringGuidsToArtifactListOperation.java @@ -63,8 +63,8 @@ public class StringGuidsToArtifactListOperation extends AbstractOperation { String[] guids = this.rawGuidsData.split(splitRegex); monitor.beginTask(taskName, guids.length + costOfArtifactRetrieval); - List<String> validGuids = new ArrayList<String>(guids.length); - final Collection<Object> artifacts = new ArrayList<Object>(guids.length); //widget accepts Collection<Object> + List<String> validGuids = new ArrayList<>(guids.length); + final Collection<Object> artifacts = new ArrayList<>(guids.length); //widget accepts Collection<Object> for (int guidIndex = 0; !monitor.isCanceled() && guidIndex < guids.length; guidIndex++) { if (GUID.isValid(guids[guidIndex])) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/sections/BlamInputSection.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/sections/BlamInputSection.java index aae67d85571..f6794429f05 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/sections/BlamInputSection.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/sections/BlamInputSection.java @@ -39,7 +39,7 @@ import org.eclipse.ui.forms.widgets.Section; * @author Roberto E. Escobar */ public class BlamInputSection extends BaseBlamSection { - private final Collection<XWidgetRendererItem> dynamicInputLayouts = new ArrayList<XWidgetRendererItem>(); + private final Collection<XWidgetRendererItem> dynamicInputLayouts = new ArrayList<>(); public BlamInputSection(FormEditor editor, AbstractBlam abstractBlam, Composite parent, FormToolkit toolkit, int style) { super(editor, abstractBlam, parent, toolkit, style); @@ -104,7 +104,7 @@ public class BlamInputSection extends BaseBlamSection { } private List<XWidgetRendererItem> getDynamicXWidgetLayouts() throws Exception { - List<XWidgetRendererItem> itemsToReturn = new ArrayList<XWidgetRendererItem>(); + List<XWidgetRendererItem> itemsToReturn = new ArrayList<>(); itemsToReturn.addAll(getAbstractBlam().getLayoutDatas()); itemsToReturn.addAll(dynamicInputLayouts); return itemsToReturn; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeUiData.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeUiData.java index 8495b9be79b..b5be4d97432 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeUiData.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/ChangeUiData.java @@ -18,7 +18,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.skynet.core.change.Change; public class ChangeUiData { - private final Collection<Change> changes = new ArrayList<Change>(); + private final Collection<Change> changes = new ArrayList<>(); private Artifact associatedArtifact; private boolean isLoaded; private boolean loadOnOpen; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiSelectBetweenDeltasBranchProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiSelectBetweenDeltasBranchProvider.java index 163114ca89d..5f8e11a6d28 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiSelectBetweenDeltasBranchProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/UiSelectBetweenDeltasBranchProvider.java @@ -43,7 +43,7 @@ public final class UiSelectBetweenDeltasBranchProvider implements IBranchProvide if (txDelta.areOnTheSameBranch()) { selectedBranch[0] = txDelta.getStartTx().getFullBranch(); } else { - final Collection<Branch> selectable = new ArrayList<Branch>(); + final Collection<Branch> selectable = new ArrayList<>(); selectable.add(uiData.getTxDelta().getStartTx().getFullBranch()); selectable.add(uiData.getTxDelta().getEndTx().getFullBranch()); IStatus status = executeInUiThread(selectable, selectedBranch); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportTable.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportTable.java index f156d1c010c..c24e6db7781 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportTable.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportTable.java @@ -134,7 +134,7 @@ public class ChangeReportTable implements EditorSection.IWidget { @Override public Artifact[] getArtifacts() { IStructuredSelection selection = (IStructuredSelection) xChangeViewer.getSelection(); - ArrayList<Artifact> artifacts = new ArrayList<Artifact>(); + ArrayList<Artifact> artifacts = new ArrayList<>(); if (selection != null && !selection.isEmpty()) { for (Object object : selection.toArray()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/CopyHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/CopyHandler.java index 2ef74e0df9d..5817d4dd6c6 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/CopyHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/CopyHandler.java @@ -44,8 +44,8 @@ public class CopyHandler extends AbstractHandler { if (selectionProvider != null && selectionProvider.getSelection() instanceof IStructuredSelection) { IStructuredSelection selection = (IStructuredSelection) selectionProvider.getSelection(); - List<String> names = new LinkedList<String>(); - List<Artifact> artifacts = new LinkedList<Artifact>(); + List<String> names = new LinkedList<>(); + List<Artifact> artifacts = new LinkedList<>(); ArtifactClipboard clipboard = new ArtifactClipboard(view.getSite().getId()); Iterator<?> iterator = selection.iterator(); Object selectionObject = null; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/Handlers.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/Handlers.java index 6d9626a3e98..158a2d4d952 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/Handlers.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/Handlers.java @@ -70,7 +70,7 @@ public class Handlers { * @return Returns a list of objects from the sturctruedSelection that are an instance of the Class */ public static <E> List<E> processSelectionObjects(Class<E> clazz, IStructuredSelection structuredSelection) { - List<E> objects = new LinkedList<E>(); + List<E> objects = new LinkedList<>(); Iterator<?> iterator = structuredSelection.iterator(); while (iterator.hasNext()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ArchiveBranchCompoundContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ArchiveBranchCompoundContributionItem.java index 7142a66de4a..6c3b4f46de3 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ArchiveBranchCompoundContributionItem.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ArchiveBranchCompoundContributionItem.java @@ -47,7 +47,7 @@ public class ArchiveBranchCompoundContributionItem extends CompoundContributionP @Override protected IContributionItem[] getContributionItems() { ISelectionProvider selectionProvider = getSelectionProvider(); - ArrayList<IContributionItem> contributionItems = new ArrayList<IContributionItem>(40); + ArrayList<IContributionItem> contributionItems = new ArrayList<>(40); if (selectionProvider != null && selectionProvider.getSelection() instanceof IStructuredSelection) { IStructuredSelection structuredSelection = (IStructuredSelection) selectionProvider.getSelection(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java index 8b8eac6e858..adfe5b7eaf5 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/GeneralBranchHandler.java @@ -57,7 +57,7 @@ public abstract class GeneralBranchHandler extends CommandHandler { List<Branch> selectedBranches = Handlers.getBranchesFromStructuredSelection(selection); Iterator<Branch> iterator = selectedBranches.iterator(); - List<Branch> hasChildren = new LinkedList<Branch>(); + List<Branch> hasChildren = new LinkedList<>(); while (iterator.hasNext()) { Branch branch = iterator.next(); Collection<Branch> childBranches = branch.getChildBranches(); @@ -71,7 +71,7 @@ public abstract class GeneralBranchHandler extends CommandHandler { StringBuilder children = new StringBuilder(); children.append(String.format("The following branches have children and cannot be %sd:\n", type.dialogType)); for (Branch b : hasChildren) { - List<Branch> branches = new LinkedList<Branch>(b.getChildBranches(true)); + List<Branch> branches = new LinkedList<>(b.getChildBranches(true)); children.append(String.format("Branch %s has children: %s\n", b.getName(), Strings.buildStatment(branches))); } MessageDialog.openError(Displays.getActiveShell(), type.dialogTitle, children.toString()); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/PurgeBranchHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/PurgeBranchHandler.java index 4450afa76f5..53401211796 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/PurgeBranchHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/PurgeBranchHandler.java @@ -34,7 +34,7 @@ public final class PurgeBranchHandler extends GeneralBranchHandler { @Override public void performOperation(List<Branch> branches) { - List<Branch> hasChildren = new LinkedList<Branch>(); + List<Branch> hasChildren = new LinkedList<>(); for (Branch branch : branches) { try { if (branch.getAllChildBranches(false).isEmpty()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchContributionItem.java index 33bb3cd63b3..f3e80c7247d 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchContributionItem.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/ToggleFavoriteBranchContributionItem.java @@ -44,7 +44,7 @@ public class ToggleFavoriteBranchContributionItem extends CompoundContributionPr @Override protected IContributionItem[] getContributionItems() { ISelectionProvider selectionProvider = getSelectionProvider(); - ArrayList<IContributionItem> contributionItems = new ArrayList<IContributionItem>(40); + ArrayList<IContributionItem> contributionItems = new ArrayList<>(40); if (selectionProvider != null && selectionProvider.getSelection() instanceof IStructuredSelection) { IStructuredSelection structuredSelection = (IStructuredSelection) selectionProvider.getSelection(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoParentCompoundContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoParentCompoundContributionItem.java index 59b2a60fc09..8af3780b562 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoParentCompoundContributionItem.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/branch/commit/CommitIntoParentCompoundContributionItem.java @@ -56,7 +56,7 @@ public class CommitIntoParentCompoundContributionItem extends CompoundContributi @Override protected IContributionItem[] getContributionItems() { ISelectionProvider selectionProvider = getSelectionProvider(); - ArrayList<IContributionItem> contributionItems = new ArrayList<IContributionItem>(40); + ArrayList<IContributionItem> contributionItems = new ArrayList<>(40); if (selectionProvider != null && selectionProvider.getSelection() instanceof IStructuredSelection) { IStructuredSelection structuredSelection = (IStructuredSelection) selectionProvider.getSelection(); @@ -88,7 +88,7 @@ public class CommitIntoParentCompoundContributionItem extends CompoundContributi private CommandContributionItem createCommand(Branch branch, String commandId) throws OseeCoreException { - Map<String, String> parameters = new HashMap<String, String>(); + Map<String, String> parameters = new HashMap<>(); parameters.put(BranchView.BRANCH_ID, Long.toString(branch.getUuid())); parameters.put(CommitBranchParameter.ARCHIVE_PARENT_BRANCH, "true"); CommandContributionItem contributionItem; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/change/GenericDiffHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/change/GenericDiffHandler.java index a36a7e2b58c..4f1a39eb82c 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/change/GenericDiffHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/change/GenericDiffHandler.java @@ -42,8 +42,8 @@ public class GenericDiffHandler extends CommandHandler { public Object executeWithException(ExecutionEvent event, IStructuredSelection selection) throws OseeCoreException { List<Change> localChanges = Handlers.getArtifactChangesFromStructuredSelection(selection); if (!localChanges.isEmpty()) { - Collection<Change> changes = new ArrayList<Change>(localChanges.size()); - Set<Artifact> artifacts = new HashSet<Artifact>(); + Collection<Change> changes = new ArrayList<>(localChanges.size()); + Set<Artifact> artifacts = new HashSet<>(); for (Change change : localChanges) { Artifact artifact = change.getChangeArtifact(); if (!artifacts.contains(artifact)) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/change/SingleNativeDiffHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/change/SingleNativeDiffHandler.java index 71e57527f46..6f6f4106998 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/change/SingleNativeDiffHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/change/SingleNativeDiffHandler.java @@ -34,7 +34,7 @@ public class SingleNativeDiffHandler extends CommandHandler { @Override public boolean isEnabledWithException(IStructuredSelection structuredSelection) throws OseeCoreException { - changes = new ArrayList<Change>(Handlers.getArtifactChangesFromStructuredSelection(structuredSelection)); + changes = new ArrayList<>(Handlers.getArtifactChangesFromStructuredSelection(structuredSelection)); if (changes.size() == 1) { Artifact sampleArtifact = changes.iterator().next().getChangeArtifact(); return AccessControlManager.hasPermission(sampleArtifact, PermissionEnum.READ); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/change/ViewWordChangeReportHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/change/ViewWordChangeReportHandler.java index 6c383fb70fb..020dd5a0d33 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/change/ViewWordChangeReportHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/change/ViewWordChangeReportHandler.java @@ -39,8 +39,8 @@ public class ViewWordChangeReportHandler extends CommandHandler { public Object executeWithException(ExecutionEvent event, IStructuredSelection selection) throws OseeCoreException { List<Change> localChanges = Handlers.getArtifactChangesFromStructuredSelection(selection); if (!localChanges.isEmpty()) { - Collection<Change> changes = new ArrayList<Change>(localChanges.size()); - Set<Artifact> artifacts = new HashSet<Artifact>(); + Collection<Change> changes = new ArrayList<>(localChanges.size()); + Set<Artifact> artifacts = new HashSet<>(); for (Change change : localChanges) { Artifact artifact = change.getChangeArtifact(); if (!artifacts.contains(artifact)) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/merge/MergeCompoundContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/merge/MergeCompoundContributionItem.java index 2c5a59799e9..5cb7ce2db3c 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/merge/MergeCompoundContributionItem.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/commandHandlers/merge/MergeCompoundContributionItem.java @@ -58,7 +58,7 @@ public class MergeCompoundContributionItem extends CompoundContributionProvider @Override protected IContributionItem[] getContributionItems() { ISelectionProvider selectionProvider = getSelectionProvider(); - ArrayList<IContributionItem> contributionItems = new ArrayList<IContributionItem>(40); + ArrayList<IContributionItem> contributionItems = new ArrayList<>(40); if (selectionProvider != null && selectionProvider.getSelection() instanceof IStructuredSelection) { IStructuredSelection structuredSelection = (IStructuredSelection) selectionProvider.getSelection(); @@ -95,7 +95,7 @@ public class MergeCompoundContributionItem extends CompoundContributionProvider } private CommandContributionItem createCommand(Long branchUuid, String commandId) throws OseeCoreException { - Map<String, String> parameters = new HashMap<String, String>(); + Map<String, String> parameters = new HashMap<>(); parameters.put(BranchView.BRANCH_ID, Long.toString(branchUuid)); CommandContributionItem contributionItem; String label = branchUuid == 0 ? "Can't Merge a Root Branch" : BranchManager.getBranch(branchUuid).getName(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/AuthorIdCheck.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/AuthorIdCheck.java index c3194b89b93..302a946dcee 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/AuthorIdCheck.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/AuthorIdCheck.java @@ -54,7 +54,7 @@ public class AuthorIdCheck extends DatabaseHealthOperation { rd.addRaw(AHTML.beginMultiColumnTable(100, 1)); rd.addRaw(AHTML.addHeaderRowMultiColumnTable(columnHeaders)); - Set<Integer> authors = new HashSet<Integer>(); + Set<Integer> authors = new HashSet<>(); JdbcStatement chStmt1 = ConnectionHandler.getStatement(); try { chStmt1.runPreparedQuery(GET_AUTHOR_IDS); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/BranchStateHealthCheck.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/BranchStateHealthCheck.java index 6d9590aab58..f34e2b5d28e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/BranchStateHealthCheck.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/BranchStateHealthCheck.java @@ -38,7 +38,7 @@ public class BranchStateHealthCheck extends DatabaseHealthOperation { @Override protected void doHealthCheck(IProgressMonitor monitor) throws Exception { monitor.setTaskName("Loading Branch information"); - List<BranchData> itemsToFix = new ArrayList<BranchData>(); + List<BranchData> itemsToFix = new ArrayList<>(); Collection<BranchData> branchDatas = getAllBranchData(); monitor.worked(calculateWork(0.25)); @@ -102,7 +102,7 @@ public class BranchStateHealthCheck extends DatabaseHealthOperation { setItemsToFix(itemsToFix.size()); if (isFixOperationEnabled() && getItemsToFixCount() > 0) { monitor.setTaskName("Fixing Branch State data"); - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); for (BranchData branchData : itemsToFix) { data.add(new Object[] {branchData.getBranchState().getValue(), branchData.getId()}); } @@ -168,7 +168,7 @@ public class BranchStateHealthCheck extends DatabaseHealthOperation { } private Collection<BranchData> getAllBranchData() throws OseeCoreException { - Map<Long, BranchData> data = new HashMap<Long, BranchData>(); + Map<Long, BranchData> data = new HashMap<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { chStmt.runPreparedQuery("select * from osee_branch"); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/DatabaseHealthOpsExtensionManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/DatabaseHealthOpsExtensionManager.java index a7c3ba9466f..ecdf9b7d22e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/DatabaseHealthOpsExtensionManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/DatabaseHealthOpsExtensionManager.java @@ -26,8 +26,8 @@ public class DatabaseHealthOpsExtensionManager { private static final String CLASS_ATTRIBUTE_NAME = "className"; private static final String EXTENSION_POINT = Activator.PLUGIN_ID + "." + EXTENSION_ELEMENT; - private static final Map<String, DatabaseHealthOperation> fixOps = new TreeMap<String, DatabaseHealthOperation>(); - private static final Map<String, DatabaseHealthOperation> verifyOps = new TreeMap<String, DatabaseHealthOperation>(); + private static final Map<String, DatabaseHealthOperation> fixOps = new TreeMap<>(); + private static final Map<String, DatabaseHealthOperation> verifyOps = new TreeMap<>(); public static Set<String> getFixOperationNames() { return getOperationNames(true); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/DatabaseIntegrityCheckApplication.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/DatabaseIntegrityCheckApplication.java index 5eee2d57158..9dc9a6aad2e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/DatabaseIntegrityCheckApplication.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/DatabaseIntegrityCheckApplication.java @@ -80,7 +80,7 @@ public class DatabaseIntegrityCheckApplication implements IApplication { operation.setFixOperationEnabled(false); Operations.executeWorkAndCheckStatus(operation); - List<String> summaryLinks = new ArrayList<String>(); + List<String> summaryLinks = new ArrayList<>(); int count = operation.getItemsToFixCount(); if (count > 0) { writeReport(operation, reportsDirectory, summaryLinks); @@ -143,7 +143,7 @@ public class DatabaseIntegrityCheckApplication implements IApplication { public SummaryTab(String title) { this.title = title; - this.tabs = new ArrayList<IResultsEditorTab>(); + this.tabs = new ArrayList<>(); mainTab = new ResultsEditorTableTab(title); mainTab.addColumn(new XViewerColumn("1", "Operation", 220, SWT.LEFT, true, SortDataType.String, false, "")); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/ItemsDeletedWithNoOtherModification.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/ItemsDeletedWithNoOtherModification.java index f3c294d4439..2f447621532 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/ItemsDeletedWithNoOtherModification.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/ItemsDeletedWithNoOtherModification.java @@ -107,7 +107,7 @@ public class ItemsDeletedWithNoOtherModification extends DatabaseHealthOperation boolean verify = !isFixOperationEnabled(); if (verify || addressing == null) { - addressing = new HashSet<LocalValues>(); + addressing = new HashSet<>(); detectAndCollectErrors(monitor, TxChange.DELETED, ModificationType.DELETED); detectAndCollectErrors(monitor, TxChange.ARTIFACT_DELETED, ModificationType.ARTIFACT_DELETED); } else { @@ -126,7 +126,7 @@ public class ItemsDeletedWithNoOtherModification extends DatabaseHealthOperation setItemsToFix(addressing != null ? addressing.size() : 0); if (isFixOperationEnabled() && getItemsToFixCount() > 0) { - List<Object[]> insertParameters = new LinkedList<Object[]>(); + List<Object[]> insertParameters = new LinkedList<>(); for (LocalValues value : addressing) { insertParameters.add(new Object[] {value.gammaId, value.transactionId}); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RelationIntegrityCheck.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RelationIntegrityCheck.java index 01d8e6af629..722be607e88 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RelationIntegrityCheck.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RelationIntegrityCheck.java @@ -136,8 +136,8 @@ public class RelationIntegrityCheck extends DatabaseHealthOperation { private boolean verify; //Containers for different cases - private final Collection<LocalRelationLink> unExpectedCases = new ArrayList<LocalRelationLink>(); - private final Collection<LocalRelationLink> newRelationOnDeletedArtifact = new ArrayList<LocalRelationLink>(); + private final Collection<LocalRelationLink> unExpectedCases = new ArrayList<>(); + private final Collection<LocalRelationLink> newRelationOnDeletedArtifact = new ArrayList<>(); private List<Object[]> insertArtifactDeleted; private List<Object[]> updatePreviousAddressing; @@ -177,8 +177,8 @@ public class RelationIntegrityCheck extends DatabaseHealthOperation { private void loadBrokenRelations() throws OseeCoreException { if (isLoadingBrokenRelationsNecessary()) { - deleteMap = new DoubleKeyHashMap<Integer, Integer, LocalRelationLink>(); - updateMap = new DoubleKeyHashMap<Integer, Integer, LocalRelationLink>(); + deleteMap = new DoubleKeyHashMap<>(); + updateMap = new DoubleKeyHashMap<>(); loadData("Loading Relations with nonexistent artifacts on the A side", NO_ADDRESSING_ARTIFACTS_A, true); loadData("Loading Relations with nonexistent artifacts on the B side", NO_ADDRESSING_ARTIFACTS_B, true); @@ -192,10 +192,10 @@ public class RelationIntegrityCheck extends DatabaseHealthOperation { private void classifyResults() { - insertArtifactDeleted = new LinkedList<Object[]>(); - updatePreviousAddressing = new LinkedList<Object[]>(); - updateCurrentAddressing = new LinkedList<Object[]>(); - commitOfNewRelationOnDeletedArtifactCases = new ArrayList<Object[]>(); + insertArtifactDeleted = new LinkedList<>(); + updatePreviousAddressing = new LinkedList<>(); + updateCurrentAddressing = new LinkedList<>(); + commitOfNewRelationOnDeletedArtifactCases = new ArrayList<>(); for (LocalRelationLink relLink : updateMap.allValues()) { if (relLink.relTransId > relLink.transIdForArtifactDeletion) { @@ -239,7 +239,7 @@ public class RelationIntegrityCheck extends DatabaseHealthOperation { } private void deleteInvalidRelationAddressing() throws OseeCoreException { - List<Object[]> rowsToDelete = new LinkedList<Object[]>(); + List<Object[]> rowsToDelete = new LinkedList<>(); for (LocalRelationLink relLink : deleteMap.allValues()) { rowsToDelete.add(new Object[] {relLink.gammaId, relLink.relTransId, relLink.branchUuid}); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RepeatEnumerationAttributeValues.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RepeatEnumerationAttributeValues.java index cb18aedd860..dd416911a67 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RepeatEnumerationAttributeValues.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RepeatEnumerationAttributeValues.java @@ -53,7 +53,7 @@ public class RepeatEnumerationAttributeValues extends DatabaseHealthOperation { @Override protected void doHealthCheck(IProgressMonitor monitor) throws Exception { - HashCollection<Branch, AttrData> attributesWithErrors = new HashCollection<Branch, AttrData>(); + HashCollection<Branch, AttrData> attributesWithErrors = new HashCollection<>(); List<Branch> branches = BranchManager.getBaselineBranches(); if (branches.isEmpty()) { throw new OseeStateException("no branches found"); @@ -87,7 +87,7 @@ public class RepeatEnumerationAttributeValues extends DatabaseHealthOperation { if (isFixOperationEnabled() && hadItemsToFix()) { for (Branch branch : attributesWithErrors.keySet()) { Collection<AttrData> attributeData = attributesWithErrors.getValues(branch); - List<String> artifactGuids = new ArrayList<String>(attributeData.size()); + List<String> artifactGuids = new ArrayList<>(attributeData.size()); for (AttrData attrData : attributeData) { artifactGuids.add(attrData.getArtifactGuid()); } @@ -124,7 +124,7 @@ public class RepeatEnumerationAttributeValues extends DatabaseHealthOperation { } private Set<AttrData> getRepeatEnumeratedAttrs(IProgressMonitor monitor, Branch branch) throws OseeCoreException { - Set<AttrData> attrData = new HashSet<AttrData>(); + Set<AttrData> attrData = new HashSet<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { chStmt.runPreparedQuery(FIND_REPEAT_ENUMS, branch.getUuid(), branch.getUuid()); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dialogs/ArtifactSelectionDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dialogs/ArtifactSelectionDialog.java index e4252a67377..ed073434abe 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dialogs/ArtifactSelectionDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dialogs/ArtifactSelectionDialog.java @@ -217,7 +217,7 @@ public class ArtifactSelectionDialog extends SelectionStatusDialog { updateOKStatus(); } }); - List<Object> data = new ArrayList<Object>(1); + List<Object> data = new ArrayList<>(1); data.add(input); treeViewer.setInput(data); return treeViewer; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java index 989fbfc4f73..76720cc2275 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorer.java @@ -164,7 +164,7 @@ public class ArtifactExplorer extends GenericViewPart implements IArtifactExplor private static final String ROOT_UUID = "artifact.explorer.last.root_uuid"; private static final String ROOT_BRANCH = "artifact.explorer.last.root_branch"; private static final ArtifactClipboard artifactClipboard = new ArtifactClipboard(VIEW_ID); - private static final LinkedList<Tree> trees = new LinkedList<Tree>(); + private static final LinkedList<Tree> trees = new LinkedList<>(); private TreeViewer treeViewer; private Action upAction; @@ -914,8 +914,8 @@ public class ArtifactExplorer extends GenericViewPart implements IArtifactExplor public void widgetSelected(SelectionEvent e) { IStructuredSelection selection = (IStructuredSelection) treeViewer.getSelection(); Iterator<?> iterator = selection.iterator(); - Set<Artifact> lockArtifacts = new HashSet<Artifact>(); - Set<Artifact> unlockArtifacts = new HashSet<Artifact>(); + Set<Artifact> lockArtifacts = new HashSet<>(); + Set<Artifact> unlockArtifacts = new HashSet<>(); while (iterator.hasNext()) { try { Artifact object = (Artifact) iterator.next(); @@ -959,7 +959,7 @@ public class ArtifactExplorer extends GenericViewPart implements IArtifactExplor private void performCopy() throws OseeCoreException { IStructuredSelection selection = (IStructuredSelection) treeViewer.getSelection(); - List<Artifact> artifactTransferData = new ArrayList<Artifact>(); + List<Artifact> artifactTransferData = new ArrayList<>(); Artifact artifact; if (selection != null && !selection.isEmpty()) { @@ -1121,7 +1121,7 @@ public class ArtifactExplorer extends GenericViewPart implements IArtifactExplor private final HashCollection<Class<? extends Artifact>, MenuItem> menuItemMap; public NeedArtifactMenuListener() { - menuItemMap = new HashCollection<Class<? extends Artifact>, MenuItem>(); + menuItemMap = new HashCollection<>(); } public void add(MenuItem item) { @@ -1159,7 +1159,7 @@ public class ArtifactExplorer extends GenericViewPart implements IArtifactExplor Collection<MenuItem> items; public NeedProjectMenuListener() { - items = new LinkedList<MenuItem>(); + items = new LinkedList<>(); } public void add(MenuItem item) { @@ -1317,7 +1317,7 @@ public class ArtifactExplorer extends GenericViewPart implements IArtifactExplor @Override public ArtifactStructuredSelection getSelection() { - final List<Artifact> selectedItems = new LinkedList<Artifact>(); + final List<Artifact> selectedItems = new LinkedList<>(); TreeViewerUtility.getPreorderSelection(treeViewer, selectedItems); return new ArtifactStructuredSelection(selectedItems); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerDragAndDrop.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerDragAndDrop.java index a933667e460..1ad446b0f19 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerDragAndDrop.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerDragAndDrop.java @@ -120,7 +120,7 @@ public class ArtifactExplorerDragAndDrop extends SkynetDragAndDrop { try { AccessPolicy policy = ServiceUtil.getAccessPolicy(); Artifact[] artifactsBeingDropped = toBeDropped.getArtifacts(); - List<Artifact> artsOnSameBranchAsDestination = new LinkedList<Artifact>(); + List<Artifact> artsOnSameBranchAsDestination = new LinkedList<>(); IOseeBranch destinationBranch = dropTarget.getBranch(); for (Artifact art : artifactsBeingDropped) { if (art.getBranch().equals(destinationBranch)) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerEventManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerEventManager.java index 6d12dcf329f..c7207c0acc0 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerEventManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerEventManager.java @@ -42,7 +42,7 @@ import org.eclipse.ui.PlatformUI; */ public class ArtifactExplorerEventManager implements IArtifactEventListener { - List<IArtifactExplorerEventHandler> handlers = new CopyOnWriteArrayList<IArtifactExplorerEventHandler>(); + List<IArtifactExplorerEventHandler> handlers = new CopyOnWriteArrayList<>(); static ArtifactExplorerEventManager instance; public static void add(IArtifactExplorerEventHandler iWorldEventHandler) { @@ -86,7 +86,7 @@ public class ArtifactExplorerEventManager implements IArtifactEventListener { } // Do not process event if branch is null, deleted or purged. But, don't want to remove as handler cause another branch may be selected - final List<IArtifactExplorerEventHandler> handlersToProcess = new ArrayList<IArtifactExplorerEventHandler>(); + final List<IArtifactExplorerEventHandler> handlersToProcess = new ArrayList<>(); for (IArtifactExplorerEventHandler handler : handlers) { if (handler.isDisposed()) { handlers.remove(handler); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerLinkNode.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerLinkNode.java index 710c418f408..aa513f91b32 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerLinkNode.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerLinkNode.java @@ -90,7 +90,7 @@ public class ArtifactExplorerLinkNode { } public List<Artifact> getOppositeArtifacts() { - List<Artifact> oppositeArtifacts = new ArrayList<Artifact>(); + List<Artifact> oppositeArtifacts = new ArrayList<>(); for (RelationLink link : artifact.getRelationsAll(DeletionFlag.EXCLUDE_DELETED)) { if (link.getRelationType().getName().equals(relationTypeName)) { if (link.getAArtifactId() == artifactId) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/export/ArtifactExportPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/export/ArtifactExportPage.java index a8143b2903f..86d580ff6bf 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/export/ArtifactExportPage.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/export/ArtifactExportPage.java @@ -41,7 +41,7 @@ public class ArtifactExportPage extends WizardDataTransferPage { super("Main"); this.exportPath = OseeData.getPath().toFile(); - selectedArtifacts = new ArrayList<Artifact>(); + selectedArtifacts = new ArrayList<>(); if (selection != null) { Iterator<?> selectionIterator = selection.iterator(); while (selectionIterator.hasNext()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorer.java index 0b697cddb04..2fcaa457111 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorer.java @@ -221,7 +221,7 @@ public class GroupExplorer extends GenericViewPart implements IArtifactEventList } private class OpenOnShowListener implements MenuListener { - private final List<MenuItem> items = new LinkedList<MenuItem>(); + private final List<MenuItem> items = new LinkedList<>(); public void add(MenuItem item) { items.add(item); @@ -354,7 +354,7 @@ public class GroupExplorer extends GenericViewPart implements IArtifactEventList } private ArrayList<GroupExplorerItem> getSelectedItems() { - ArrayList<GroupExplorerItem> arts = new ArrayList<GroupExplorerItem>(); + ArrayList<GroupExplorerItem> arts = new ArrayList<>(); Iterator<?> i = ((IStructuredSelection) treeViewer.getSelection()).iterator(); while (i.hasNext()) { Object obj = i.next(); @@ -366,7 +366,7 @@ public class GroupExplorer extends GenericViewPart implements IArtifactEventList } private ArrayList<GroupExplorerItem> getSelectedUniversalGroupItems() { - ArrayList<GroupExplorerItem> arts = new ArrayList<GroupExplorerItem>(); + ArrayList<GroupExplorerItem> arts = new ArrayList<>(); Iterator<?> i = ((IStructuredSelection) treeViewer.getSelection()).iterator(); while (i.hasNext()) { Object obj = i.next(); @@ -421,7 +421,7 @@ public class GroupExplorer extends GenericViewPart implements IArtifactEventList Collection<MenuItem> items; public NeedProjectMenuListener() { - this.items = new LinkedList<MenuItem>(); + this.items = new LinkedList<>(); } @Override diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorerDragAndDrop.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorerDragAndDrop.java index 8065ebb75de..24c0cd5db56 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorerDragAndDrop.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorerDragAndDrop.java @@ -88,7 +88,7 @@ public class GroupExplorerDragAndDrop extends SkynetDragAndDrop { public Artifact[] getArtifacts() { IStructuredSelection selection = (IStructuredSelection) treeViewer.getSelection(); Iterator<?> i = selection.iterator(); - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); while (i.hasNext()) { Object object = i.next(); if (object instanceof GroupExplorerItem) { @@ -196,7 +196,7 @@ public class GroupExplorerDragAndDrop extends SkynetDragAndDrop { else { IStructuredSelection selectedItem = (IStructuredSelection) treeViewer.getSelection(); Iterator<?> iterator = selectedItem.iterator(); - final Set<Artifact> insertArts = new HashSet<Artifact>(); + final Set<Artifact> insertArts = new HashSet<>(); while (iterator.hasNext()) { Object obj = iterator.next(); if (obj instanceof GroupExplorerItem) { @@ -228,7 +228,7 @@ public class GroupExplorerDragAndDrop extends SkynetDragAndDrop { if (((ArtifactData) event.data).getSource().equals(viewId)) { IStructuredSelection selectedItem = (IStructuredSelection) treeViewer.getSelection(); Iterator<?> iterator = selectedItem.iterator(); - Set<Artifact> insertArts = new HashSet<Artifact>(); + Set<Artifact> insertArts = new HashSet<>(); while (iterator.hasNext()) { Object obj = iterator.next(); if (obj instanceof GroupExplorerItem) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorerItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorerItem.java index b204c28faae..1274393c945 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorerItem.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorerItem.java @@ -109,11 +109,11 @@ public class GroupExplorerItem implements IAdaptable { public List<GroupExplorerItem> getGroupItems() { // Light loading; load the first time getChildren is called if (groupItems == null) { - groupItems = new ArrayList<GroupExplorerItem>(); + groupItems = new ArrayList<>(); // populateUpdateCategory(); } // populateUpdateCategory(); - // List<GroupExplorerItem> items = new ArrayList<GroupExplorerItem>(); + // List<GroupExplorerItem> items = new ArrayList<>(); // if (groupItems != null) items.addAll(groupItems); // return items; @@ -125,7 +125,7 @@ public class GroupExplorerItem implements IAdaptable { } catch (OseeCoreException ex) { OseeLog.log(Activator.class, Level.SEVERE, ex); } - List<GroupExplorerItem> items = new ArrayList<GroupExplorerItem>(); + List<GroupExplorerItem> items = new ArrayList<>(); if (groupItems != null) { items.addAll(groupItems); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/handler/RemoveTrackChangesHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/handler/RemoveTrackChangesHandler.java index c2e76f01511..b0b103bcddd 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/handler/RemoveTrackChangesHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/handler/RemoveTrackChangesHandler.java @@ -40,7 +40,7 @@ public class RemoveTrackChangesHandler implements IStatusHandler { final MutableBoolean isOkToRemove = new MutableBoolean(false); final String message = (String) source; - final Pair<MutableBoolean, Integer> answer = new Pair<MutableBoolean, Integer>(isOkToRemove, NO); + final Pair<MutableBoolean, Integer> answer = new Pair<>(isOkToRemove, NO); if (RenderingUtil.arePopupsAllowed()) { Displays.pendInDisplayThread(new Runnable() { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/menu/ArtifactTreeViewerGlobalMenuHelper.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/menu/ArtifactTreeViewerGlobalMenuHelper.java index b42372a8974..7d60e77275c 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/menu/ArtifactTreeViewerGlobalMenuHelper.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/menu/ArtifactTreeViewerGlobalMenuHelper.java @@ -32,7 +32,7 @@ public class ArtifactTreeViewerGlobalMenuHelper implements IGlobalMenuHelper { @Override public Collection<Artifact> getArtifacts() { - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); if (treeViewer == null || treeViewer.getTree().isDisposed()) { return artifacts; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/menu/GlobalMenu.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/menu/GlobalMenu.java index 40f82d80074..71dd6e0f4f9 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/menu/GlobalMenu.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/menu/GlobalMenu.java @@ -68,7 +68,7 @@ public class GlobalMenu { public static final Collection<GlobalMenuItem> ALL = Arrays.asList(GlobalMenuItem.values()); }; - private final ArrayList<GlobalMenuListener> listeners = new ArrayList<GlobalMenuListener>(); + private final ArrayList<GlobalMenuListener> listeners = new ArrayList<>(); public GlobalMenu(Menu parentMenu, IGlobalMenuHelper globalMenuHelper) { this.globalMenuHelper = globalMenuHelper; @@ -215,7 +215,7 @@ public class GlobalMenu { try { boolean recurseChildren = dialog.getToggleState(); - Collection<Artifact> toPurge = new LinkedHashSet<Artifact>(); + Collection<Artifact> toPurge = new LinkedHashSet<>(); for (Artifact artifactToPurge : artifactsToBePurged) { if (!artifactToPurge.isDeleted()) { toPurge.add(artifactToPurge); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/mergeWizard/EmbeddedEnumAttributeEditor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/mergeWizard/EmbeddedEnumAttributeEditor.java index a4f86dc9ca3..a7da4e35a3b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/mergeWizard/EmbeddedEnumAttributeEditor.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/mergeWizard/EmbeddedEnumAttributeEditor.java @@ -78,10 +78,10 @@ public class EmbeddedEnumAttributeEditor implements IEmbeddedAttributeEditor { } editor = new EmbeddedEnumEditor(PROMPT); editor.createEditor(composite); - TreeSet<String> options = new TreeSet<String>(); + TreeSet<String> options = new TreeSet<>(); try { if (obj instanceof Artifact) { - options = new TreeSet<String>(AttributeTypeManager.getEnumerationValues(attributeType)); + options = new TreeSet<>(AttributeTypeManager.getEnumerationValues(attributeType)); } if (obj instanceof AttributeConflict) { options = ((AttributeConflict) obj).getEnumerationAttributeValues(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/AbstractItemSelectPanel.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/AbstractItemSelectPanel.java index 94a8ccab475..64999ea3890 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/AbstractItemSelectPanel.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/AbstractItemSelectPanel.java @@ -48,7 +48,7 @@ public abstract class AbstractItemSelectPanel<T> { private final IContentProvider contentProvider; protected AbstractItemSelectPanel(IBaseLabelProvider labelProvider, IContentProvider contentProvider) { - listeners = new HashSet<Listener>(); + listeners = new HashSet<>(); this.labelProvider = labelProvider; this.contentProvider = contentProvider; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/ArtifactExtractorSelectPanel.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/ArtifactExtractorSelectPanel.java index 4aed0ab0412..bfe24431f0a 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/ArtifactExtractorSelectPanel.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/ArtifactExtractorSelectPanel.java @@ -39,7 +39,7 @@ public class ArtifactExtractorSelectPanel { private IArtifactExtractor selectedParser; public ArtifactExtractorSelectPanel(ArtifactExtractorContributionManager importContributionManager) { - this.listeners = new HashSet<Listener>(); + this.listeners = new HashSet<>(); this.importContributionManager = importContributionManager; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/AuthenticationComposite.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/AuthenticationComposite.java index 24f86d868aa..a17bf03e3e3 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/AuthenticationComposite.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/AuthenticationComposite.java @@ -93,9 +93,9 @@ public class AuthenticationComposite extends Composite { public AuthenticationComposite(Composite parent, int style, boolean buildSubmitButton) { super(parent, style); this.buildSubmitButton = buildSubmitButton; - fieldMap = new HashMap<LabelEnum, Control>(); - dataMap = new HashMap<LabelEnum, String>(); - statusMap = new HashMap<LabelEnum, Label>(); + fieldMap = new HashMap<>(); + dataMap = new HashMap<>(); + statusMap = new HashMap<>(); createControl(); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/BranchSelectSimpleComposite.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/BranchSelectSimpleComposite.java index 0b543ac06ab..abac69f5aa9 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/BranchSelectSimpleComposite.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/BranchSelectSimpleComposite.java @@ -182,7 +182,7 @@ public class BranchSelectSimpleComposite extends Composite implements Listener { } } - List<String> branchUuidsToUse = new ArrayList<String>(); + List<String> branchUuidsToUse = new ArrayList<>(); for (String id : branchUuids) { try { Branch branch = BranchManager.getBranch(Long.parseLong(id)); @@ -232,7 +232,7 @@ public class BranchSelectSimpleComposite extends Composite implements Listener { public String[] getBranchIds() { String[] items = branchSelectCombo.getItems(); - List<String> toReturn = new ArrayList<String>(); + List<String> toReturn = new ArrayList<>(); for (String item : items) { Branch branch = (Branch) branchSelectCombo.getData(item); if (branch != null) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/SearchComposite.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/SearchComposite.java index c5589abf9e9..1d64dff3575 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/SearchComposite.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/SearchComposite.java @@ -58,7 +58,7 @@ public class SearchComposite extends Composite implements Listener { public SearchComposite(Composite parent, int style, String buttonText, String groupBoxText) { super(parent, style); - this.listeners = new HashSet<Listener>(); + this.listeners = new HashSet<>(); this.entryChanged = false; this.buttonText = buttonText; this.groupBoxText = groupBoxText; @@ -257,7 +257,7 @@ public class SearchComposite extends Composite implements Listener { if (querySearches == null || querySearches.isEmpty()) { if (Strings.isValid(lastSelected)) { - querySearches = new ArrayList<String>(); + querySearches = new ArrayList<>(); querySearches.add(lastSelected); } else { querySearches = Collections.emptyList(); @@ -294,7 +294,7 @@ public class SearchComposite extends Composite implements Listener { } public List<Control> getSearchChildren() { - List<Control> children = new ArrayList<Control>(); + List<Control> children = new ArrayList<>(); if (Widgets.isAccessible(this.searchArea) && Widgets.isAccessible(this.executeSearch) && Widgets.isAccessible(this.clear)) { children = Arrays.asList(this, searchArea, executeSearch, clear); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/ArtifactModelList.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/ArtifactModelList.java index 609648dc553..09fb3f3a2e0 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/ArtifactModelList.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/ArtifactModelList.java @@ -17,16 +17,16 @@ import java.util.Set; public class ArtifactModelList { - private ArrayList<ArtifactModel> artifacts = new ArrayList<ArtifactModel>(); - private Set<IArtifactListViewer> changeListeners = new HashSet<IArtifactListViewer>(); + private ArrayList<ArtifactModel> artifacts = new ArrayList<>(); + private Set<IArtifactListViewer> changeListeners = new HashSet<>(); /** * Constructor */ public ArtifactModelList() { super(); - artifacts = new ArrayList<ArtifactModel>(); - changeListeners = new HashSet<IArtifactListViewer>(); + artifacts = new ArrayList<>(); + changeListeners = new HashSet<>(); } /** diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationExplorerWindow.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationExplorerWindow.java index 65c39ce75b8..ef5926a5aee 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationExplorerWindow.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationExplorerWindow.java @@ -78,14 +78,14 @@ public class RelationExplorerWindow { public static final int REASON_NUM = 1; public RelationExplorerWindow(StructuredViewer viewer, RelationTypeSideSorter group, boolean persistOnOk) { - this.validArtifacts = new ArrayList<Artifact>(); - this.invalidArtifacts = new ArrayList<Artifact>(); + this.validArtifacts = new ArrayList<>(); + this.invalidArtifacts = new ArrayList<>(); - this.urls = new ArrayList<String>(); - this.names = new ArrayList<String>(); + this.urls = new ArrayList<>(); + this.names = new ArrayList<>(); - this.invalidName = new ArrayList<String>(); - this.invalidReason = new ArrayList<String>(); + this.invalidName = new ArrayList<>(); + this.invalidReason = new ArrayList<>(); this.viewer = viewer; this.relationGroup = group; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationTableViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationTableViewer.java index 72853142a5e..f4b4261f5a1 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationTableViewer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/relation/explorer/RelationTableViewer.java @@ -60,7 +60,7 @@ public class RelationTableViewer { public RelationTableViewer(Table validTable, Table invalidTable, IOseeBranch branch) { try { - fullDescriptorList = new ArrayList<ArtifactType>(ArtifactTypeManager.getValidArtifactTypes(branch)); + fullDescriptorList = new ArrayList<>(ArtifactTypeManager.getValidArtifactTypes(branch)); } catch (OseeCoreException ex) { OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactFileMonitor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactFileMonitor.java index 942d662a56b..6d1dd12a729 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactFileMonitor.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactFileMonitor.java @@ -38,7 +38,7 @@ final class ArtifactFileMonitor implements IFileWatcherListener { private final ResourceAttributes readonlyfileAttributes; private final FileWatcher watcher; private final boolean firstTime; - private final Map<File, IOperation> fileMap = new ConcurrentHashMap<File, IOperation>(128); + private final Map<File, IOperation> fileMap = new ConcurrentHashMap<>(128); public ArtifactFileMonitor() { firstTime = true; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuidToWordML.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuidToWordML.java index 6d04dba7d01..ff2397cc8a1 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuidToWordML.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuidToWordML.java @@ -31,7 +31,7 @@ public class ArtifactGuidToWordML { } public List<String> resolveAsOseeLinks(IOseeBranch branch, List<String> artifactGuids) throws OseeCoreException { - List<String> mlLinks = new ArrayList<String>(); + List<String> mlLinks = new ArrayList<>(); for (String guid : artifactGuids) { Long uuidFromGuid = ArtifactQuery.getUuidFromGuid(guid, branch); Artifact artifact = ArtifactQuery.checkArtifactFromId(uuidFromGuid, branch); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuis.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuis.java index e4f55b2088c..a0bd29956ca 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuis.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuis.java @@ -42,7 +42,7 @@ public final class ArtifactGuis { Conditions.checkExpressionFailOnTrue(artifacts.isEmpty(), "Must have at least one artifact for checking"); StringBuilder message = new StringBuilder(); - Set<String> otherBranches = new HashSet<String>(); + Set<String> otherBranches = new HashSet<>(); int modifiedCount = artifactsModified(artifacts, otherBranches); if (modifiedCount > 0) { message.append(String.format(EDIT_MESSAGE, modifiedCount, artifacts.size())); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/DefaultArtifactRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/DefaultArtifactRenderer.java index 7283d184f01..b266d23e502 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/DefaultArtifactRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/DefaultArtifactRenderer.java @@ -191,7 +191,7 @@ public class DefaultArtifactRenderer implements IRenderer { @Override public List<IAttributeType> getOrderedAttributeTypes(Artifact artifact, Collection<IAttributeType> attributeTypes) { - ArrayList<IAttributeType> orderedAttributeTypes = new ArrayList<IAttributeType>(attributeTypes.size()); + ArrayList<IAttributeType> orderedAttributeTypes = new ArrayList<>(attributeTypes.size()); IAttributeType contentType = null; for (IAttributeType attributeType : attributeTypes) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/HTMLRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/HTMLRenderer.java index a0bf476e05a..7daad4b7566 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/HTMLRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/HTMLRenderer.java @@ -134,7 +134,7 @@ public class HTMLRenderer extends FileSystemRenderer { } private void renderHtmlArtifact(StringBuilder output, IOseeBranch branch, Artifact artifact) throws Exception { - Map<String, String> fileNameReplace = new HashMap<String, String>(); + Map<String, String> fileNameReplace = new HashMap<>(); String htmlContent = ""; String blankLine = "<br /><br />"; String underline = "<span style=\"text-decoration: underline;\">"; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/JavaRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/JavaRenderer.java index ba617339396..e00614ff12e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/JavaRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/JavaRenderer.java @@ -84,7 +84,7 @@ public class JavaRenderer extends FileSystemRenderer { @Override public void open(final List<Artifact> artifacts, PresentationType presentationType) { - final List<Artifact> notMatched = new LinkedList<Artifact>(); + final List<Artifact> notMatched = new LinkedList<>(); final StringBuffer findErrorMessage = new StringBuffer(); FindInWorkspaceCollector collector = new FindInWorkspaceCollector() { @@ -159,8 +159,8 @@ public class JavaRenderer extends FileSystemRenderer { @Override public InputStream getRenderInputStream(PresentationType presentationType, List<Artifact> artifacts) throws OseeCoreException { - final List<IResource> matches = new LinkedList<IResource>(); - final List<Artifact> notMatched = new LinkedList<Artifact>(); + final List<IResource> matches = new LinkedList<>(); + final List<Artifact> notMatched = new LinkedList<>(); FindInWorkspaceCollector collector = new FindInWorkspaceCollector() { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RendererManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RendererManager.java index 9d02c9994ee..d633d7b593c 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RendererManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RendererManager.java @@ -44,7 +44,7 @@ import org.eclipse.osee.framework.ui.skynet.render.word.Producer; * @author Ryan D. Brooks */ public final class RendererManager { - private static final List<IRenderer> renderers = new ArrayList<IRenderer>(20); + private static final List<IRenderer> renderers = new ArrayList<>(20); private static boolean firstTimeThrough = true; private RendererManager() { @@ -137,7 +137,7 @@ public final class RendererManager { } private static List<IRenderer> getApplicableRenderers(PresentationType presentationType, Artifact artifact) throws OseeCoreException { - ArrayList<IRenderer> applicableRenderers = new ArrayList<IRenderer>(); + ArrayList<IRenderer> applicableRenderers = new ArrayList<>(); IRenderer bestRenderer = getBestRenderer(presentationType, artifact); int rendererMinimumRanking = bestRenderer.minimumRanking(); int minimumRank = Math.max(rendererMinimumRanking, IRenderer.BASE_MATCH); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/TisRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/TisRenderer.java index ac5388b96b2..3fc4391ddca 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/TisRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/TisRenderer.java @@ -76,7 +76,7 @@ public class TisRenderer extends WordTemplateRenderer { template = getTemplate(firstArtifact, presentationType); } - List<ITemplateAttributeHandler> handlers = new ArrayList<ITemplateAttributeHandler>(); + List<ITemplateAttributeHandler> handlers = new ArrayList<>(); handlers.add(new SRSSpecialPublishingAttributeHandler()); handlers.add(new TISAttributeHandler()); handlers.add(new WordAttributeTypeAttributeHandler()); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java index a4b46e9fa60..7d7f1e30247 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/UpdateArtifactOperation.java @@ -102,7 +102,7 @@ public class UpdateArtifactOperation extends AbstractOperation { } private Collection<AttributeChange> getAttributeChanges(Artifact artifact, WordArtifactChange change) { - List<AttributeChange> attributeChanges = new LinkedList<AttributeChange>(); + List<AttributeChange> attributeChanges = new LinkedList<>(); for (long attrTypeId : change.getChangedAttrTypes()) { AttributeType type = AttributeTypeManager.getTypeByGuid(attrTypeId); Attribute<?> attribute = artifact.getSoleAttribute(type); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WholeWordRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WholeWordRenderer.java index 6de742b1077..dfc1612753f 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WholeWordRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WholeWordRenderer.java @@ -105,7 +105,7 @@ public class WholeWordRenderer extends WordRenderer { artifact.getName(), artifact.getBranch().getName()); } - Set<String> unknownGuids = new HashSet<String>(); + Set<String> unknownGuids = new HashSet<>(); LinkType linkType = LinkType.OSEE_SERVER_LINK; content = WordMlLinkHandler.link(linkType, artifact, content, unknownGuids); WordUiUtil.displayUnknownGuids(artifact, unknownGuids); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordImageChecker.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordImageChecker.java index c17f83d8bbe..f961d3f6d64 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordImageChecker.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordImageChecker.java @@ -79,7 +79,7 @@ public class WordImageChecker { private static List<WordmlPicture> createPictureList(String wordml, Attribute<String> attribute) { int startIndex = 0; - List<WordmlPicture> pictures = new LinkedList<WordmlPicture>(); + List<WordmlPicture> pictures = new LinkedList<>(); while (wordml.indexOf("<w:pict>", startIndex) > 0) { int currentStartIndex = wordml.indexOf("<w:pict>", startIndex); int currentEndIndex = wordml.indexOf("</w:pict", currentStartIndex); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordTemplateRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordTemplateRenderer.java index df459e81ee1..d858f6023de 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordTemplateRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordTemplateRenderer.java @@ -158,7 +158,7 @@ public class WordTemplateRenderer extends WordRenderer implements ITemplateRende data = WordUtil.reassignBinDataID(data); LinkType linkType = (LinkType) getOption("linkType"); - Set<String> unknownGuids = new HashSet<String>(); + Set<String> unknownGuids = new HashSet<>(); data = WordMlLinkHandler.link(linkType, artifact, data, unknownGuids); WordUiUtil.displayUnknownGuids(artifact, unknownGuids); @@ -188,7 +188,7 @@ public class WordTemplateRenderer extends WordRenderer implements ITemplateRende @Override public InputStream getRenderInputStream(PresentationType presentationType, List<Artifact> artifacts) throws OseeCoreException { - final List<Artifact> notMultiEditableArtifacts = new LinkedList<Artifact>(); + final List<Artifact> notMultiEditableArtifacts = new LinkedList<>(); String template; if (artifacts.isEmpty()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/artifactElement/MergeEditArtifactElementExtractor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/artifactElement/MergeEditArtifactElementExtractor.java index c2cb60c68ac..a06dc66315e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/artifactElement/MergeEditArtifactElementExtractor.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/artifactElement/MergeEditArtifactElementExtractor.java @@ -39,8 +39,8 @@ public class MergeEditArtifactElementExtractor implements IElementExtractor { @Override public Collection<WordExtractorData> extractElements() throws DOMException, OseeCoreException { - final Collection<WordExtractorData> artifactElements = new LinkedList<WordExtractorData>(); - Collection<Element> sectList = new LinkedList<Element>(); + final Collection<WordExtractorData> artifactElements = new LinkedList<>(); + Collection<Element> sectList = new LinkedList<>(); Element rootElement = document.getDocumentElement(); oleDataElement = null; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/artifactElement/WordImageArtifactElementExtractor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/artifactElement/WordImageArtifactElementExtractor.java index dc7365883db..a1b8ba1a5c2 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/artifactElement/WordImageArtifactElementExtractor.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/artifactElement/WordImageArtifactElementExtractor.java @@ -62,7 +62,7 @@ public class WordImageArtifactElementExtractor implements IElementExtractor { this.document = document; this.numberOfEndTags = 0; this.numberOfStartTags = 0; - this.pictureMap = new HashMap<String, Element>(); + this.pictureMap = new HashMap<>(); WordImageArtifactElementExtractor.START_IMAGE_CHECKSUM = -1; WordImageArtifactElementExtractor.END_IMAGE_CHECKSUM = -1; @@ -88,7 +88,7 @@ public class WordImageArtifactElementExtractor implements IElementExtractor { } public List<WordExtractorData> extractElements(OseeLinkBuilder linkBuilder) throws DOMException, OseeCoreException { - final List<WordExtractorData> artifactElements = new LinkedList<WordExtractorData>(); + final List<WordExtractorData> artifactElements = new LinkedList<>(); Element rootElement = document.getDocumentElement(); resetClassFields(); @@ -168,7 +168,7 @@ public class WordImageArtifactElementExtractor implements IElementExtractor { } private Node cloneWithoutArtifactEditImage(Element element, Side keepSide, OseeLinkBuilder linkBuilder) { - Collection<Node> removals = new LinkedList<Node>(); + Collection<Node> removals = new LinkedList<>(); Element clonedElement = (Element) element.cloneNode(true); boolean beforeEditTag = true; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/AbstractWordCompare.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/AbstractWordCompare.java index c62955edad4..68c38333fe7 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/AbstractWordCompare.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/AbstractWordCompare.java @@ -45,7 +45,7 @@ import org.eclipse.osee.framework.ui.skynet.util.WordUiUtil; public abstract class AbstractWordCompare implements IComparator { private final FileSystemRenderer renderer; private final ArtifactDeltaToFileConverter converter; - private final List<IAttributeType> wordAttributeType = new ArrayList<IAttributeType>(); + private final List<IAttributeType> wordAttributeType = new ArrayList<>(); private static final Pattern authorPattern = Pattern.compile("aml:author=\".*?\"", Pattern.CASE_INSENSITIVE | Pattern.DOTALL | Pattern.MULTILINE); @@ -138,7 +138,7 @@ public abstract class AbstractWordCompare implements IComparator { compareFiles = converter.convertToFile(presentationType, artifactDelta); } else { // The artifactDelta is a 3 Way Merge - List<IFile> outputFiles = new ArrayList<IFile>(); + List<IFile> outputFiles = new ArrayList<>(); converter.convertToFileForMerge(outputFiles, artifactDelta.getBaseArtifact(), artifactDelta.getStartArtifact()); converter.convertToFileForMerge(outputFiles, artifactDelta.getBaseArtifact(), artifactDelta.getEndArtifact()); // this is where we are getting the exception that the length of outputFiles is 1 @@ -155,7 +155,7 @@ public abstract class AbstractWordCompare implements IComparator { throw new OseeCoreException(ex, "Empty file for comparison could not be created, [%s]", outputFileName); } } - compareFiles = new Pair<IFile, IFile>(outputFiles.get(0), outputFiles.get(1)); + compareFiles = new Pair<>(outputFiles.get(0), outputFiles.get(1)); data.addMerge(outputFiles.get(0).getLocation().toOSString()); } WordImageChecker.restoreOriginalValue(baseContent, originalValue); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/CompareData.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/CompareData.java index aac4b2a45b5..38aa4b31bb0 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/CompareData.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/CompareData.java @@ -19,8 +19,8 @@ import java.util.Set; public class CompareData { - private final Map<String, String> dataToCompare = new LinkedHashMap<String, String>(); - private final List<String> mergeList = new ArrayList<String>(); + private final Map<String, String> dataToCompare = new LinkedHashMap<>(); + private final List<String> mergeList = new ArrayList<>(); private final String outputPath; private final String generatorScriptPath; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordMLProducer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordMLProducer.java index 3961d49a303..51f4ebd8401 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordMLProducer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordMLProducer.java @@ -63,7 +63,7 @@ public class WordMLProducer extends Producer { outlineLevel = 0; flattenedLevelCount = 0; - alphabetMap = new HashMap<String, Integer>(); + alphabetMap = new HashMap<>(); alphabetMap.put("A.0", 1); alphabetMap.put("B.0", 2); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java index 44c3d38fd87..b4917758ed7 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateFileDiffer.java @@ -93,7 +93,7 @@ public final class WordTemplateFileDiffer { boolean recurseOnLoad = renderer.getBooleanOption(WordTemplateProcessor.RECURSE_ON_LOAD); Collection<Artifact> toProcess = (recurseChildren || recurseOnLoad) ? getAllArtifacts(endArtifacts) : endArtifacts; - List<Change> changes = new LinkedList<Change>(); + List<Change> changes = new LinkedList<>(); ChangeDataLoader changeLoader = new ChangeDataLoader(changes, txDelta); IProgressMonitor monitor = (IProgressMonitor) renderer.getOption("Progress Monitor"); if (monitor == null) { @@ -110,7 +110,7 @@ public final class WordTemplateFileDiffer { } private Collection<Artifact> getAllArtifacts(List<Artifact> endArtifacts) throws OseeCoreException { - Set<Artifact> toReturn = new LinkedHashSet<Artifact>(); + Set<Artifact> toReturn = new LinkedHashSet<>(); for (Artifact art : endArtifacts) { toReturn.add(art); toReturn.addAll(art.getDescendants()); @@ -120,9 +120,9 @@ public final class WordTemplateFileDiffer { private void diff(List<Change> changes, Collection<Artifact> endArtifacts, String diffPrefix, TransactionDelta txDelta) throws OseeCoreException { - Collection<ArtifactDelta> artifactDeltas = new ArrayList<ArtifactDelta>(); - Set<Integer> addedIds = new HashSet<Integer>(); - Set<Integer> changeIds = new HashSet<Integer>(changes.size()); + Collection<ArtifactDelta> artifactDeltas = new ArrayList<>(); + Set<Integer> addedIds = new HashSet<>(); + Set<Integer> changeIds = new HashSet<>(changes.size()); for (Change change : changes) { changeIds.add(change.getArtId()); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java index 39e8bad495f..754db5ba6b3 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java @@ -117,10 +117,10 @@ public class WordTemplateProcessor { private boolean recurseChildren; private String outlineNumber; private IAttributeType headingAttributeType; - private final List<AttributeElement> attributeElements = new LinkedList<AttributeElement>(); - final List<Artifact> nonTemplateArtifacts = new LinkedList<Artifact>(); - private final Set<String> ignoreAttributeExtensions = new HashSet<String>(); - private final Set<Artifact> processedArtifacts = new HashSet<Artifact>(); + private final List<AttributeElement> attributeElements = new LinkedList<>(); + final List<Artifact> nonTemplateArtifacts = new LinkedList<>(); + private final Set<String> ignoreAttributeExtensions = new HashSet<>(); + private final Set<Artifact> processedArtifacts = new HashSet<>(); private final WordTemplateRenderer renderer; private boolean isDiff; private boolean excludeFolders; @@ -468,7 +468,7 @@ public class WordTemplateProcessor { private void populateRequest(List<Artifact> artifacts, DataRightInput request) { if (request.isEmpty()) { - List<Artifact> allArtifacts = new ArrayList<Artifact>(); + List<Artifact> allArtifacts = new ArrayList<>(); if (recurseChildren) { for (Artifact art : artifacts) { allArtifacts.add(art); @@ -603,7 +603,7 @@ public class WordTemplateProcessor { @Override public void run() { - ArrayList<Artifact> nonTempArtifacts = new ArrayList<Artifact>(artifacts.size()); + ArrayList<Artifact> nonTempArtifacts = new ArrayList<>(artifacts.size()); nonTempArtifacts.addAll(artifacts); WordUiUtil.displayUnhandledArtifacts(artifacts, warningString); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/BasicTemplateAttributeHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/BasicTemplateAttributeHandler.java index a0f004c18a8..ee1caf305b6 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/BasicTemplateAttributeHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/BasicTemplateAttributeHandler.java @@ -31,7 +31,7 @@ public final class BasicTemplateAttributeHandler implements ITemplateAttributeHa private final Set<String> ignoreAttributeExtensions; public BasicTemplateAttributeHandler() { - this.ignoreAttributeExtensions = new HashSet<String>(); + this.ignoreAttributeExtensions = new HashSet<>(); } @Override diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/WordTemplateManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/WordTemplateManager.java index 496d9b4c5dd..38c9215d4a9 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/WordTemplateManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/template/WordTemplateManager.java @@ -70,7 +70,7 @@ public class WordTemplateManager { private String template; private final String artifactSetName; - private final List<ITemplateTask> tasks = new ArrayList<ITemplateTask>(); + private final List<ITemplateTask> tasks = new ArrayList<>(); private final List<ITemplateAttributeHandler> attributeHandlers; public WordTemplateManager(String template, List<ITemplateAttributeHandler> attributeHandlers) { @@ -149,7 +149,7 @@ public class WordTemplateManager { tasks.add(new AddTemplateText(last, start, template)); int end = headElementsMatcher.end(); last = end; - List<ITemplateTask> innerTasks = new ArrayList<ITemplateTask>(); + List<ITemplateTask> innerTasks = new ArrayList<>(); String artifactSection = headElementsMatcher.group(4); String elementType = headElementsMatcher.group(3); @@ -209,7 +209,7 @@ public class WordTemplateManager { } private List<Artifact> recurseArtifactChildren(List<Artifact> artifacts) throws OseeCoreException { - List<Artifact> arts = new ArrayList<Artifact>(); + List<Artifact> arts = new ArrayList<>(); for (Artifact art : artifacts) { recursiveChildResolver(art, arts); } @@ -227,7 +227,7 @@ public class WordTemplateManager { * This method expands wildcard(*) attribute names into all of the attribute types of a particular artifact. */ private List<ITemplateTask> preProcessTemplateTasks(List<ITemplateTask> tasks, Artifact artifact) throws OseeCoreException { - List<ITemplateTask> newTasks = new ArrayList<ITemplateTask>(); + List<ITemplateTask> newTasks = new ArrayList<>(); for (ITemplateTask task : tasks) { if (task instanceof TemplateAttribute && ((TemplateAttribute) task).isTypeNameWildcard()) { TemplateAttribute attributeTask = (TemplateAttribute) task; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/MultiPageResultsProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/MultiPageResultsProvider.java index b4c66e9329b..d418628d5df 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/MultiPageResultsProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/MultiPageResultsProvider.java @@ -19,7 +19,7 @@ import org.eclipse.osee.framework.ui.skynet.dbHealth.DatabaseHealthOperation; */ public class MultiPageResultsProvider implements IResultsEditorProvider { private final DatabaseHealthOperation healthOperation; - private final List<IResultsEditorTab> resultsTabs = new ArrayList<IResultsEditorTab>(4); + private final List<IResultsEditorTab> resultsTabs = new ArrayList<>(4); public MultiPageResultsProvider(DatabaseHealthOperation healthOperation) { super(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditor.java index 5053df28d5a..f490e192b1d 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditor.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditor.java @@ -91,7 +91,7 @@ public class ResultsEditor extends AbstractArtifactEditor { } private List<Object> rowsToData(ISelection selection) { - List<Object> datas = new LinkedList<Object>(); + List<Object> datas = new LinkedList<>(); if (selection instanceof IStructuredSelection) { IStructuredSelection selected = (IStructuredSelection) selection; Iterator<?> iterator = selected.iterator(); @@ -230,7 +230,7 @@ public class ResultsEditor extends AbstractArtifactEditor { @Override public List<IResultsEditorTab> getResultsEditorTabs() { - List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>(); + List<IResultsEditorTab> tabs = new ArrayList<>(); tabs.add(new ResultsEditorHtmlTab(title, tabName, html)); return tabs; } @@ -247,7 +247,7 @@ public class ResultsEditor extends AbstractArtifactEditor { @Override public List<IResultsEditorTab> getResultsEditorTabs() { - List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>(); + List<IResultsEditorTab> tabs = new ArrayList<>(); tabs.add(new ResultsEditorHtmlTab(XResultDataUI.getReport(data, name))); return tabs; } @@ -265,7 +265,7 @@ public class ResultsEditor extends AbstractArtifactEditor { @Override public List<IResultsEditorTab> getResultsEditorTabs() { - List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>(); + List<IResultsEditorTab> tabs = new ArrayList<>(); tabs.add(new ResultsEditorHtmlTab(xResultPage)); return tabs; } @@ -302,7 +302,7 @@ public class ResultsEditor extends AbstractArtifactEditor { } public static Collection<ResultsEditor> getEditors() { - final List<ResultsEditor> editors = new ArrayList<ResultsEditor>(); + final List<ResultsEditor> editors = new ArrayList<>(); Displays.pendInDisplayThread(new Runnable() { @Override public void run() { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditorConverter.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditorConverter.java index ddc5731990d..23eb178c9f6 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditorConverter.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditorConverter.java @@ -36,7 +36,7 @@ public class ResultsEditorConverter { private final List<IEditorTabConverter> converters; public ResultsEditorConverter() { - converters = new ArrayList<IEditorTabConverter>(); + converters = new ArrayList<>(); converters.add(new HTMLEditorTabConverter()); converters.add(new ExcelEditorTabConverter()); converters.add(new MultiTypeEditorTabConverter("PDF")); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/example/ResultsEditorExample.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/example/ResultsEditorExample.java index 4dbec92514d..c517dbd80ae 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/example/ResultsEditorExample.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/example/ResultsEditorExample.java @@ -99,7 +99,7 @@ public class ResultsEditorExample extends XNavigateItemAction { @Override public List<IResultsEditorTab> getResultsEditorTabs() { if (tabs == null) { - tabs = new LinkedList<IResultsEditorTab>(); + tabs = new LinkedList<>(); tabs.add(createChartTab()); tabs.add(createDataTab()); tabs.add(createHtmlTab()); @@ -115,7 +115,7 @@ public class ResultsEditorExample extends XNavigateItemAction { } private IResultsEditorTab createDataTab() { - List<IResultsXViewerRow> rows = new ArrayList<IResultsXViewerRow>(); + List<IResultsXViewerRow> rows = new ArrayList<>(); for (int x = 0; x < chartDateStrs.size(); x++) { rows.add(new ResultsXViewerRow(new String[] { chartDateStrs.get(x), @@ -143,7 +143,7 @@ public class ResultsEditorExample extends XNavigateItemAction { "Requirement Artifact"), new XViewerColumn("GUID", "GUID", 200, SWT.LEFT, true, SortDataType.String, false, "TestScript Name")); - List<IResultsXViewerRow> artRows = new ArrayList<IResultsXViewerRow>(); + List<IResultsXViewerRow> artRows = new ArrayList<>(); List<Artifact> userArts = null; try { userArts = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.User, CoreBranches.COMMON); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/example/XViewerExample.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/example/XViewerExample.java index af4792f889b..e3dc9ad86d7 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/example/XViewerExample.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/example/XViewerExample.java @@ -54,8 +54,8 @@ public final class XViewerExample extends XNavigateItemAction { @Override public List<IResultsEditorTab> getResultsEditorTabs() { - List<IResultsXViewerRow> rows = new ArrayList<IResultsXViewerRow>(); - List<IResultsXViewerRow> bigRows = new ArrayList<IResultsXViewerRow>(); + List<IResultsXViewerRow> rows = new ArrayList<>(); + List<IResultsXViewerRow> bigRows = new ArrayList<>(); for (int x = 0; x < 50000; x++) { if (x < 15000) { rows.add(new ResultsXViewerRow(new String[] {"Date " + x, "hello", "world"})); @@ -67,7 +67,7 @@ public final class XViewerExample extends XNavigateItemAction { SortDataType.String, false, ""), new XViewerColumn(Columns.String1.name(), Columns.String1.name(), 80, SWT.LEFT, true, SortDataType.Integer, false, ""), new XViewerColumn(Columns.String2.name(), Columns.String2.name(), 80, SWT.LEFT, true, SortDataType.Integer, false, "")); - List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>(); + List<IResultsEditorTab> tabs = new ArrayList<>(); tabs.add(new ResultsEditorTableTab("15,000 entries", columns, rows)); tabs.add(new ResultsEditorTableTab("50,000 entries", columns, bigRows)); return tabs; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/ResultsEditorHtmlTab.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/ResultsEditorHtmlTab.java index d00e8e3be8b..d0d2cf39c22 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/ResultsEditorHtmlTab.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/ResultsEditorHtmlTab.java @@ -115,7 +115,7 @@ public class ResultsEditorHtmlTab implements IResultsEditorHtmlTab, IBrowserActi item.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { - Set<Manipulations> manipulations = new HashSet<Manipulations>(); + Set<Manipulations> manipulations = new HashSet<>(); manipulations.add(Manipulations.NONE); Dialogs.emailDialog(resultsEditor.getTitle(), xResultPage.getManipulatedHtml(manipulations)); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/XResultPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/XResultPage.java index d9bfcae21d4..66e31f87650 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/XResultPage.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/XResultPage.java @@ -56,7 +56,7 @@ public class XResultPage { private String html; private final String id; // Used to add and remove to menu item private String manipulatedHtml; - private Set<Manipulations> manipulations = new HashSet<Manipulations>(); + private Set<Manipulations> manipulations = new HashSet<>(); private int numWarnings = Integer.MAX_VALUE; private int numErrors = Integer.MAX_VALUE; @@ -171,7 +171,7 @@ public class XResultPage { // Match getText so it doesn't mess up replace // Retireve all ATS=WPN_PAGE:HSRID matches Matcher m = ATS_NAME_AND_GUID_REGEX.matcher(str); - Set<String> cmdNameGuids = new HashSet<String>(); + Set<String> cmdNameGuids = new HashSet<>(); while (m.find()) { cmdNameGuids.add(m.group()); } @@ -196,7 +196,7 @@ public class XResultPage { } // Retrieve all ATS=GUID matches and replace with hyperlinking m = ATS_GUID_REGEX.matcher(str); - Set<String> cmdGuids = new HashSet<String>(); + Set<String> cmdGuids = new HashSet<>(); while (m.find()) { cmdGuids.add(m.group()); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/XResultsComposite.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/XResultsComposite.java index 2c54b1dca2f..35bab90c06f 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/XResultsComposite.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/html/XResultsComposite.java @@ -129,7 +129,7 @@ public class XResultsComposite extends Composite { AWorkbench.popup("ERROR", "Nothing to email"); return; } - Set<Manipulations> manipulations = new HashSet<Manipulations>(); + Set<Manipulations> manipulations = new HashSet<>(); manipulations.add(Manipulations.ALL); manipulations.add(Manipulations.ERROR_WARNING_HEADER); Dialogs.emailDialog(title, htmlText); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/ResultsEditorTableTab.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/ResultsEditorTableTab.java index 97f03be18a4..9f43a85aa64 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/ResultsEditorTableTab.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/ResultsEditorTableTab.java @@ -189,7 +189,7 @@ public class ResultsEditorTableTab implements IResultsEditorTableTab { item.addSelectionListener(new SelectionAdapter() { private List<String> getColumns() { - List<String> cols = new ArrayList<String>(); + List<String> cols = new ArrayList<>(); for (XViewerColumn col : columns) { cols.add(col.getName()); } @@ -197,7 +197,7 @@ public class ResultsEditorTableTab implements IResultsEditorTableTab { } private void writeRows(TableWriterAdaptor writerAdaptor) { - List<String> rws = new ArrayList<String>(); + List<String> rws = new ArrayList<>(); for (IResultsXViewerRow row : rows) { for (int i = 0; i < columns.size(); i++) { rws.add(row.getValue(i)); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/xresults/ResultsXViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/xresults/ResultsXViewer.java index ee5f8ba6887..60555f14732 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/xresults/ResultsXViewer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/xresults/ResultsXViewer.java @@ -30,7 +30,7 @@ import org.eclipse.swt.widgets.TreeItem; */ public class ResultsXViewer extends XViewer { - List<IResultsEditorTableListener> listeners = new ArrayList<IResultsEditorTableListener>(); + List<IResultsEditorTableListener> listeners = new ArrayList<>(); public ResultsXViewer(Composite parent, int style, List<XViewerColumn> xColumns, XViewerFactory xViewerFactory) { super(parent, style, xViewerFactory); @@ -58,7 +58,7 @@ public class ResultsXViewer extends XViewer { } public ArrayList<ResultsXViewerRow> getSelectedRows() { - ArrayList<ResultsXViewerRow> arts = new ArrayList<ResultsXViewerRow>(); + ArrayList<ResultsXViewerRow> arts = new ArrayList<>(); TreeItem items[] = getTree().getSelection(); for (TreeItem item : items) { arts.add((ResultsXViewerRow) item.getData()); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/xresults/ResultsXViewerContentProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/xresults/ResultsXViewerContentProvider.java index 6277d11778c..dc684e15868 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/xresults/ResultsXViewerContentProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/xresults/ResultsXViewerContentProvider.java @@ -18,7 +18,7 @@ import org.eclipse.osee.framework.ui.skynet.results.table.IResultsXViewerRow; public class ResultsXViewerContentProvider implements ITreeContentProvider { - protected Collection<IResultsXViewerRow> rootSet = new HashSet<IResultsXViewerRow>(); + protected Collection<IResultsXViewerRow> rootSet = new HashSet<>(); private static Object[] EMPTY_ARRAY = new Object[0]; public ResultsXViewerContentProvider() { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/AbstractArtifactSearchResult.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/AbstractArtifactSearchResult.java index 4f7b3151cc4..15e4b318bdc 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/AbstractArtifactSearchResult.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/AbstractArtifactSearchResult.java @@ -35,7 +35,7 @@ public abstract class AbstractArtifactSearchResult extends AbstractTextSearchRes } public List<Artifact> getArtifactResults() { - List<Artifact> toReturn = new ArrayList<Artifact>(); + List<Artifact> toReturn = new ArrayList<>(); for (Object element : getElements()) { if (element instanceof Artifact) { toReturn.add((Artifact) element); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/ArtifactSearchPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/ArtifactSearchPage.java index e673acf5e99..55a3fdd4f49 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/ArtifactSearchPage.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/ArtifactSearchPage.java @@ -545,7 +545,7 @@ public class ArtifactSearchPage extends DialogPage implements ISearchPage, IRepl IDialogSettings dialogSettings = Activator.getInstance().getDialogSettings(); if (dialogSettings != null) { - List<String> filterString = new ArrayList<String>(); + List<String> filterString = new ArrayList<>(); FilterModelList filterList = filterviewer.getFilterList(); for (FilterModel model : filterList.getFilters()) { filterString.add(asString(model)); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/FilterArtifactSearchQuery.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/FilterArtifactSearchQuery.java index 4017c97dbe6..ebbbc127215 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/FilterArtifactSearchQuery.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/FilterArtifactSearchQuery.java @@ -50,7 +50,7 @@ public class FilterArtifactSearchQuery extends AbstractLegacyArtifactSearchQuery firstTime = false; } - List<Artifact> toReturn = new LinkedList<Artifact>(); + List<Artifact> toReturn = new LinkedList<>(); for (Artifact art : queryBuilderArtifact.getResults()) { toReturn.add(art); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/IdArtifactSearch.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/IdArtifactSearch.java index c3c10f971b6..f1e9459c345 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/IdArtifactSearch.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/IdArtifactSearch.java @@ -40,8 +40,8 @@ final class IdArtifactSearch extends AbstractLegacyArtifactSearchQuery { @Override public Collection<Artifact> getArtifacts() throws Exception { - List<Integer> artIds = new LinkedList<Integer>(); - List<String> guids = new LinkedList<String>(); + List<Integer> artIds = new LinkedList<>(); + List<String> guids = new LinkedList<>(); for (String id : Arrays.asList(searchString.split("[\\s,]+"))) { if (Strings.isNumeric(id)) { artIds.add(Integer.parseInt(id)); @@ -50,7 +50,7 @@ final class IdArtifactSearch extends AbstractLegacyArtifactSearchQuery { } } - List<Artifact> toReturn = new LinkedList<Artifact>(); + List<Artifact> toReturn = new LinkedList<>(); if (!artIds.isEmpty()) { QueryBuilderArtifact query = ArtifactQuery.createQueryBuilder(branchToSearch); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchOptionComposite.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchOptionComposite.java index f70e8ac61a5..a7c7241eb65 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchOptionComposite.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchOptionComposite.java @@ -78,10 +78,10 @@ public class QuickSearchOptionComposite extends Composite { public QuickSearchOptionComposite(Composite parent, int style) { super(parent, style); - this.optionsButtons = new LinkedHashMap<SearchOption, Button>(); - this.textAreas = new HashMap<SearchOption, Text>(); - this.optionsMap = new LinkedHashMap<SearchOption, Boolean>(); - this.configurableOptionSet = new HashMap<SearchOption, IOptionConfigurationHandler<?>>(); + this.optionsButtons = new LinkedHashMap<>(); + this.textAreas = new HashMap<>(); + this.optionsMap = new LinkedHashMap<>(); + this.configurableOptionSet = new HashMap<>(); for (SearchOption option : SearchOption.values()) { this.optionsMap.put(option, false); @@ -270,8 +270,8 @@ public class QuickSearchOptionComposite extends Composite { } public void loadState(IMemento memento) { - Map<SearchOption, String[]> configs = new HashMap<SearchOption, String[]>(); - Map<SearchOption, Boolean> options = new HashMap<SearchOption, Boolean>(); + Map<SearchOption, String[]> configs = new HashMap<>(); + Map<SearchOption, Boolean> options = new HashMap<>(); for (SearchOption option : SearchOption.values()) { options.put(option, new Boolean(memento.getString(OPTIONS_KEY_ID + option.name()))); @@ -377,7 +377,7 @@ public class QuickSearchOptionComposite extends Composite { public static Map<SearchOption, IOptionConfigurationHandler<?>> getConfigurableOptions() { if (configurable == null) { - configurable = new HashMap<SearchOption, IOptionConfigurationHandler<?>>(); + configurable = new HashMap<>(); for (SearchOption option : SearchOption.values()) { if (option.isConfigurable()) { configurable.put(option, option.getConfigHandler()); @@ -410,7 +410,7 @@ public class QuickSearchOptionComposite extends Composite { public AttributeTypeFilterConfigHandler() { this.attrTypeComparator = new AttributeTypeComparator(); - this.configuration = new ArrayList<IAttributeType>(); + this.configuration = new ArrayList<>(); this.configuration.add(getDefault()); } @@ -424,7 +424,7 @@ public class QuickSearchOptionComposite extends Composite { dialog.setSelectable(taggableItems); dialog.setShowSelectButtons(true); - List<IAttributeType> selectedElements = new ArrayList<IAttributeType>(); + List<IAttributeType> selectedElements = new ArrayList<>(); for (IAttributeType type : taggableItems) { if (configuration.contains(type)) { selectedElements.add(type); @@ -515,7 +515,7 @@ public class QuickSearchOptionComposite extends Composite { public ArtifactTypeFilterConfigHandler() { this.artTypeComparator = new ArtifactTypeComparator(); - this.configuration = new ArrayList<IArtifactType>(); + this.configuration = new ArrayList<>(); } @Override @@ -528,7 +528,7 @@ public class QuickSearchOptionComposite extends Composite { dialog.setShowSelectButtons(true); dialog.setInput(artifactTypes); - List<IArtifactType> selectedElements = new ArrayList<IArtifactType>(); + List<IArtifactType> selectedElements = new ArrayList<>(); for (ArtifactType type : artifactTypes) { if (configuration.contains(type)) { selectedElements.add(type); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java index 09606b2fe02..f57ee9c60e3 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java @@ -126,7 +126,7 @@ public class QuickSearchView extends GenericViewPart { if (DbConnectionExceptionComposite.dbConnectionIsOk() && memento != null) { if (Widgets.isAccessible(attrSearchComposite)) { String lastQuery = memento.getString(LAST_QUERY_KEY_ID); - List<String> queries = new ArrayList<String>(); + List<String> queries = new ArrayList<>(); String rawHistory = memento.getString(QUERY_HISTORY_KEY_ID); if (rawHistory != null) { String[] values = rawHistory.split(ENTRY_SEPARATOR); @@ -309,7 +309,7 @@ public class QuickSearchView extends GenericViewPart { } } else if (Widgets.isAccessible(guidSearchComposite) && guidSearchComposite.isExecuteSearchEvent(event)) { String searchString = guidSearchComposite.getQuery(); - List<String> invalids = new LinkedList<String>(); + List<String> invalids = new LinkedList<>(); for (String id : Arrays.asList(searchString.split("[\\s,]+"))) { if (!Strings.isValid(id) || !(GUID.isValid(id) || Strings.isNumeric(id))) { invalids.add(id); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/RemoteArtifactSearch.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/RemoteArtifactSearch.java index 3846569e083..39946012592 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/RemoteArtifactSearch.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/RemoteArtifactSearch.java @@ -51,7 +51,7 @@ public final class RemoteArtifactSearch extends AbstractArtifactSearchQuery { @Override public String getCriteriaLabel() { SearchOptions options = searchRequest.getOptions(); - List<String> optionsList = new ArrayList<String>(); + List<String> optionsList = new ArrayList<>(); if (options.getDeletionFlag().areDeletedAllowed()) { optionsList.add("Include Deleted"); } @@ -133,7 +133,7 @@ public final class RemoteArtifactSearch extends AbstractArtifactSearchQuery { private final AbstractTextSearchResult fResult; private ArrayList<Match> fCachedMatches; - private final Map<Integer, String> attrContent = new HashMap<Integer, String>(); + private final Map<Integer, String> attrContent = new HashMap<>(); private static final int HALF_LINE_CHAR_COUNT = 40; private ResultCollector(AbstractTextSearchResult result) { @@ -266,7 +266,7 @@ public final class RemoteArtifactSearch extends AbstractArtifactSearchQuery { } public void beginReporting() { - fCachedMatches = new ArrayList<Match>(); + fCachedMatches = new ArrayList<>(); } public void endReporting() { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/filter/FilterModelList.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/filter/FilterModelList.java index ec72a2c629f..6a307fa5119 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/filter/FilterModelList.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/filter/FilterModelList.java @@ -17,8 +17,8 @@ import org.eclipse.osee.framework.ui.skynet.search.ui.IFilterListViewer; public class FilterModelList { - private ArrayList<FilterModel> filters = new ArrayList<FilterModel>(); - private Set<IFilterListViewer> changeListeners = new HashSet<IFilterListViewer>(); + private ArrayList<FilterModel> filters = new ArrayList<>(); + private Set<IFilterListViewer> changeListeners = new HashSet<>(); private boolean isAllSelected; /** @@ -26,8 +26,8 @@ public class FilterModelList { */ public FilterModelList() { super(); - filters = new ArrayList<FilterModel>(); - changeListeners = new HashSet<IFilterListViewer>(); + filters = new ArrayList<>(); + changeListeners = new HashSet<>(); } /** diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchLabelProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchLabelProvider.java index 6f4471f147a..34e6afaeb48 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchLabelProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchLabelProvider.java @@ -56,7 +56,7 @@ public class ArtifactSearchLabelProvider extends LabelProvider implements IStyle public ArtifactSearchLabelProvider(AbstractArtifactSearchViewPage page, ArtifactDecorator artifactDecorator) { this.artifactDecorator = artifactDecorator; - this.disabledImageMap = new HashMap<Image, Image>(); + this.disabledImageMap = new HashMap<>(); fPage = page; fMatchComparator = new Comparator() { @Override diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchPage.java index 7c0db65c865..7498b23c5b6 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchPage.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchPage.java @@ -395,7 +395,7 @@ public class ArtifactSearchPage extends AbstractArtifactSearchViewPage implement return Collections.emptyList(); } - Set<Artifact> artifacts = new LinkedHashSet<Artifact>(); + Set<Artifact> artifacts = new LinkedHashSet<>(); for (Object object : objects) { Artifact toAdd = null; if (object instanceof AttributeLineElement) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactTreeContentProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactTreeContentProvider.java index 88515460ae7..6dd9b4944de 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactTreeContentProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactTreeContentProvider.java @@ -78,7 +78,7 @@ public class ArtifactTreeContentProvider implements ITreeContentProvider, IArtif @SuppressWarnings("rawtypes") private synchronized void initialize(AbstractArtifactSearchResult result) { searchResult = result; - childrenMap = new HashMap<Object, Set>(); + childrenMap = new HashMap<>(); boolean showLineMatches = searchResult.hasAttributeMatches(); if (result != null) { @@ -133,7 +133,7 @@ public class ArtifactTreeContentProvider implements ITreeContentProvider, IArtif private boolean insertChild(Object parent, Object child) { Set<Object> children = childrenMap.get(parent); if (children == null) { - children = new HashSet<Object>(); + children = new HashSet<>(); childrenMap.put(parent, children); } return children.add(child); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/AttributeLineElement.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/AttributeLineElement.java index 636af96aa4e..0e766586b9a 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/AttributeLineElement.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/AttributeLineElement.java @@ -61,7 +61,7 @@ public class AttributeLineElement implements IAdaptable { } public AttributeMatch[] getMatches(AbstractArtifactSearchResult result) { - ArrayList<AttributeMatch> res = new ArrayList<AttributeMatch>(); + ArrayList<AttributeMatch> res = new ArrayList<>(); Match[] matches = result.getMatches(parent); for (int i = 0; i < matches.length; i++) { AttributeMatch curr = (AttributeMatch) matches[i]; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/ArtifactGraphContentProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/ArtifactGraphContentProvider.java index 22f70391bd5..aa562778abb 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/ArtifactGraphContentProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/ArtifactGraphContentProvider.java @@ -33,7 +33,7 @@ import org.eclipse.zest.core.viewers.IGraphEntityContentProvider; * @author Donald G. Dunne */ public class ArtifactGraphContentProvider implements IGraphEntityContentProvider { - // private static final Collection<Artifact>EMPTY_LIST = new ArrayList<Artifact>(0); + // private static final Collection<Artifact>EMPTY_LIST = new ArrayList<>(0); private final SkyWalkerOptions options; public ArtifactGraphContentProvider(SkyWalkerOptions options) { @@ -43,7 +43,7 @@ public class ArtifactGraphContentProvider implements IGraphEntityContentProvider @Override public Object[] getConnectedTo(Object entity) { - List<Artifact> otherItems = new LinkedList<Artifact>(); + List<Artifact> otherItems = new LinkedList<>(); // Don't want to create any links to artifacts that are NOT in displayArtifacts try { @@ -87,7 +87,7 @@ public class ArtifactGraphContentProvider implements IGraphEntityContentProvider } return otherItems.toArray(); } - private final Set<Artifact> displayArtifacts = new HashSet<Artifact>(); + private final Set<Artifact> displayArtifacts = new HashSet<>(); @Override public Object[] getElements(Object inputElement) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/ArtifactGraphLabelProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/ArtifactGraphLabelProvider.java index 64b2e8e0bb0..ac13a2e9cd8 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/ArtifactGraphLabelProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/ArtifactGraphLabelProvider.java @@ -61,7 +61,7 @@ public class ArtifactGraphLabelProvider implements ILabelProvider { Collection<RelationLink> links = dest.internalGetRelations(source); - Collection<String> linkNames = new ArrayList<String>(links.size()); + Collection<String> linkNames = new ArrayList<>(links.size()); for (RelationLink link : links) { if (options.getLinkName() == LinkName.Phrasing_A_to_B) { if (link.getArtifactA().equals(source)) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerArtTypeTabItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerArtTypeTabItem.java index 2367717b8c7..ace45c2ce41 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerArtTypeTabItem.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerArtTypeTabItem.java @@ -142,7 +142,7 @@ public class SkyWalkerArtTypeTabItem { } public void storeSelected() { - Set<IArtifactType> selected = new HashSet<IArtifactType>(); + Set<IArtifactType> selected = new HashSet<>(); for (Object obj : treeViewer.getCheckedElements()) { if (obj instanceof IArtifactType) { selected.add((IArtifactType) obj); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerOptions.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerOptions.java index 8eaff4c3761..e367ef5c3df 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerOptions.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerOptions.java @@ -60,7 +60,7 @@ public final class SkyWalkerOptions { // RelationLinkDescriptor and RelationLinkDescriptorSide private Map<Object, Boolean> relTypes; private boolean filterEnabled = true; - private final Set<ISkyWalkerOptionsChangeListener> listeners = new HashSet<ISkyWalkerOptionsChangeListener>(); + private final Set<ISkyWalkerOptionsChangeListener> listeners = new HashSet<>(); public static final String RADIAL_DOWN_LAYOUT = "Radial - Down"; public static final String RADIAL_RIGHT_LAYOUT = "Radial - Right"; public static final String SPRING_LAYOUT = "Spring"; @@ -100,7 +100,7 @@ public final class SkyWalkerOptions { private void loadArtTypes() { if (artTypes == null) { - artTypes = new HashMap<IArtifactType, Boolean>(); + artTypes = new HashMap<>(); try { for (IArtifactType descriptor : ArtifactTypeManager.getValidArtifactTypes(artifact.getBranch())) { artTypes.put(descriptor, true); @@ -113,7 +113,7 @@ public final class SkyWalkerOptions { private void loadAttributeTypes() { if (showAttributes == null) { - showAttributes = new HashMap<IAttributeType, Boolean>(); + showAttributes = new HashMap<>(); try { for (IAttributeType descriptor : AttributeTypeManager.getValidAttributeTypes(artifact.getBranch())) { showAttributes.put(descriptor, false); @@ -126,7 +126,7 @@ public final class SkyWalkerOptions { private void loadRelTypes() { if (relTypes == null) { - relTypes = new HashMap<Object, Boolean>(); + relTypes = new HashMap<>(); try { for (RelationType relationType : RelationTypeManager.getValidTypes(artifact.getBranch())) { relTypes.put(relationType, true); @@ -243,7 +243,7 @@ public final class SkyWalkerOptions { private Map<AbstractLayoutAlgorithm, String> loadLayouts() { if (layouts == null) { - layouts = new HashMap<AbstractLayoutAlgorithm, String>(); + layouts = new HashMap<>(); RadialLayoutAlgorithm radLayout = new RadialLayoutAlgorithm(LayoutStyles.NO_LAYOUT_NODE_RESIZING); radLayout.setRangeToLayout(-90 * Math.PI / 360, 90 * Math.PI / 360); @@ -368,7 +368,7 @@ public final class SkyWalkerOptions { if (relTypes == null) { loadRelTypes(); } - List<Object> selList = new ArrayList<Object>(); + List<Object> selList = new ArrayList<>(); for (Object obj : selected) { selList.add(obj); } @@ -379,7 +379,7 @@ public final class SkyWalkerOptions { } public void setSelectedShowAttributes(Object[] selected) { - List<Object> selList = new ArrayList<Object>(); + List<Object> selList = new ArrayList<>(); for (Object obj : selected) { selList.add(obj); } @@ -400,7 +400,7 @@ public final class SkyWalkerOptions { } public Set<IArtifactType> getSelectedArtTypes() { - Set<IArtifactType> selected = new HashSet<IArtifactType>(); + Set<IArtifactType> selected = new HashSet<>(); if (artTypes == null) { return selected; } @@ -413,7 +413,7 @@ public final class SkyWalkerOptions { } public Set<Object> getSelectedRelTypes() { - Set<Object> selected = new HashSet<Object>(); + Set<Object> selected = new HashSet<>(); if (relTypes == null) { return selected; } @@ -426,7 +426,7 @@ public final class SkyWalkerOptions { } public Set<IAttributeType> getSelectedShowAttributeTypes() { - Set<IAttributeType> selected = new HashSet<IAttributeType>(); + Set<IAttributeType> selected = new HashSet<>(); if (showAttributes == null) { return selected; } @@ -463,7 +463,7 @@ public final class SkyWalkerOptions { if (relTypes == null) { return new HashSet<RelationType>(); } - Set<RelationType> descs = new HashSet<RelationType>(); + Set<RelationType> descs = new HashSet<>(); for (Object obj : relTypes.keySet()) { if (obj instanceof RelationType) { descs.add((RelationType) obj); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerView.java index e144bbf4a13..c592bc2042c 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerView.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerView.java @@ -74,7 +74,7 @@ public class SkyWalkerView extends GenericViewPart { private String storedGuid; private String storedBrandId; private final SkyWalkerOptions options = new SkyWalkerOptions(); - private final List<Artifact> history = new LinkedList<Artifact>(); + private final List<Artifact> history = new LinkedList<>(); private Action filterAction; private Composite viewerComp; protected SashForm sashForm; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/arttype/ArtifactTypeContentProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/arttype/ArtifactTypeContentProvider.java index 3346f176c5a..25d457bb75a 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/arttype/ArtifactTypeContentProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/arttype/ArtifactTypeContentProvider.java @@ -25,7 +25,7 @@ import org.eclipse.zest.core.viewers.IGraphEntityContentProvider; * @author Donald G. Dunne */ public class ArtifactTypeContentProvider implements IGraphEntityContentProvider { - // private static final Collection<Artifact>EMPTY_LIST = new ArrayList<Artifact>(0); + // private static final Collection<Artifact>EMPTY_LIST = new ArrayList<>(0); public ArtifactTypeContentProvider() { super(); @@ -47,7 +47,7 @@ public class ArtifactTypeContentProvider implements IGraphEntityContentProvider public Object[] getElements(Object inputElement) { try { if (inputElement instanceof ArtifactType) { - Set<ArtifactType> artifactTypes = new HashSet<ArtifactType>(); + Set<ArtifactType> artifactTypes = new HashSet<>(); artifactTypes.add((ArtifactType) inputElement); getDecendents((ArtifactType) inputElement, artifactTypes); return artifactTypes.toArray(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/ArtifactTemplateProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/ArtifactTemplateProvider.java index 2a559925e24..9457f5f388b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/ArtifactTemplateProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/ArtifactTemplateProvider.java @@ -43,7 +43,7 @@ public class ArtifactTemplateProvider implements ITemplateProvider { private synchronized void ensureTemplateCachePopulated() throws OseeCoreException { if (templateMap == null) { - templateMap = new HashMap<String, Artifact>(); + templateMap = new HashMap<>(); templates = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.RendererTemplate, BranchManager.getCommonBranch()); for (Artifact art : templates) { @@ -114,7 +114,7 @@ public class ArtifactTemplateProvider implements ITemplateProvider { throw new OseeArgumentException("Invalid renderer[%s] or presentationType[%s]", renderer.toString(), presentationType.toString()); } - List<String> list = new ArrayList<String>(); + List<String> list = new ArrayList<>(); String rendererId = renderer.getClass().getCanonicalName(); if (artifact != null && option != null) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/TemplateManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/TemplateManager.java index 871b70a78a2..0335da8e627 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/TemplateManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/TemplateManager.java @@ -53,7 +53,7 @@ public class TemplateManager { } public static List<Artifact> getAllTemplates() { - List<Artifact> templates = new ArrayList<Artifact>(); + List<Artifact> templates = new ArrayList<>(); try { for (ITemplateProvider provider : instance.templateProviders) { templates.addAll(provider.getAllTemplates()); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/update/InterArtifactExplorerDropHandlerOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/update/InterArtifactExplorerDropHandlerOperation.java index aa8bf3b73c5..1fa84474dcc 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/update/InterArtifactExplorerDropHandlerOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/update/InterArtifactExplorerDropHandlerOperation.java @@ -52,7 +52,7 @@ public class InterArtifactExplorerDropHandlerOperation extends AbstractOperation super("Introduce Artifact(s)", Activator.PLUGIN_ID); this.destinationParentArtifact = destinationParentArtifact; this.prompt = prompt; - this.sourceArtifacts = new ArrayList<Artifact>(Arrays.asList(sourceArtifacts)); + this.sourceArtifacts = new ArrayList<>(Arrays.asList(sourceArtifacts)); } @Override @@ -126,7 +126,7 @@ public class InterArtifactExplorerDropHandlerOperation extends AbstractOperation } private Collection<Artifact> getRecurseChildren() throws OseeCoreException { - Collection<Artifact> allArtifacts = new ArrayList<Artifact>(); + Collection<Artifact> allArtifacts = new ArrayList<>(); for (Artifact art : sourceArtifacts) { allArtifacts.addAll(art.getDescendants(DeletionFlag.INCLUDE_DELETED)); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/update/RevertLabelProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/update/RevertLabelProvider.java index 100a39c02d7..35b1de16b01 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/update/RevertLabelProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/update/RevertLabelProvider.java @@ -33,7 +33,7 @@ public class RevertLabelProvider extends LabelProvider implements IStyledLabelPr public RevertLabelProvider() { super(); - this.disabledMap = new HashMap<Image, Image>(); + this.disabledMap = new HashMap<>(); } @Override diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/user/perspective/UserNavigateViewItems.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/user/perspective/UserNavigateViewItems.java index 9f7839c5dd1..428d4b3bee3 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/user/perspective/UserNavigateViewItems.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/user/perspective/UserNavigateViewItems.java @@ -39,7 +39,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.xnavigate.XNavigateItemBlam; public class UserNavigateViewItems implements XNavigateViewItems, IXNavigateCommonItem { private final static UserNavigateViewItems instance = new UserNavigateViewItems(); - private final List<XNavigateItem> items = new CopyOnWriteArrayList<XNavigateItem>(); + private final List<XNavigateItem> items = new CopyOnWriteArrayList<>(); private boolean ensurePopulatedRanOnce = false; public static UserNavigateViewItems getInstance() { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/ArtifactClipboard.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/ArtifactClipboard.java index db77a74f587..69bf12d8b7e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/ArtifactClipboard.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/ArtifactClipboard.java @@ -45,7 +45,7 @@ public class ArtifactClipboard { } private List<Artifact> getArtifactsWithPermission(AccessPolicy accessService, PermissionEnum permission, List<Artifact> artifacts) throws OseeCoreException { - ArrayList<Artifact> toReturn = new ArrayList<Artifact>(artifacts); + ArrayList<Artifact> toReturn = new ArrayList<>(artifacts); Iterator<Artifact> artIterator = toReturn.iterator(); // Remove Artifact that do not have write permission. @@ -75,14 +75,14 @@ public class ArtifactClipboard { this.clipboard = new Clipboard(null); } - List<Artifact> authFailedList = new ArrayList<Artifact>(artifactTransferData); + List<Artifact> authFailedList = new ArrayList<>(artifactTransferData); List<Artifact> authorizedArtifacts = getArtifactsWithPermission(policyHandlerService, PermissionEnum.READ, artifactTransferData); authFailedList.removeAll(authorizedArtifacts); if (authorizedArtifacts.size() > 0) { - ArrayList<String> textTransferData = new ArrayList<String>(); + ArrayList<String> textTransferData = new ArrayList<>(); for (Artifact cur : authorizedArtifacts) { textTransferData.add(cur.getName()); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/OseeMainDictionary.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/OseeMainDictionary.java index 2a601e9cd57..77680ba21cf 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/OseeMainDictionary.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/OseeMainDictionary.java @@ -25,7 +25,7 @@ import org.osgi.framework.Bundle; * @author Donald G. Dunne */ public class OseeMainDictionary implements IOseeDictionary { - private final Set<String> dictionary = new HashSet<String>(); + private final Set<String> dictionary = new HashSet<>(); private volatile boolean wasLoaded = false; @Override diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/SkynetDragAndDrop.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/SkynetDragAndDrop.java index 5172f4a5f26..51ed2365eb4 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/SkynetDragAndDrop.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/SkynetDragAndDrop.java @@ -156,7 +156,7 @@ public abstract class SkynetDragAndDrop { try { if (getArtifacts() != null && getArtifacts().length > 0) { Artifact[] artifacts = getArtifacts(); - Collection<String> names = new ArrayList<String>(artifacts.length); + Collection<String> names = new ArrayList<>(artifacts.length); for (Artifact artifact : artifacts) { names.add(artifact.getName()); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/email/EmailUserGroups.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/email/EmailUserGroups.java index 2bcb5dd9c53..5c75c563f62 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/email/EmailUserGroups.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/email/EmailUserGroups.java @@ -51,7 +51,7 @@ public class EmailUserGroups extends XNavigateItemAction { } public static Set<Artifact> getEmailGroupsAndUserGroups(User user) throws OseeCoreException { - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); for (Artifact art : ArtifactQuery.getArtifactListFromTypeWithInheritence(CoreArtifactTypes.UserGroup, BranchManager.getCommonBranch(), DeletionFlag.EXCLUDE_DELETED)) { // Only add group if have read permissions @@ -70,7 +70,7 @@ public class EmailUserGroups extends XNavigateItemAction { new FilteredCheckboxTreeArtifactDialog("Select Groups to Email", groupOptions); if (dialog.open() == 0) { - Set<String> emails = new HashSet<String>(); + Set<String> emails = new HashSet<>(); for (Artifact artifact : dialog.getChecked()) { if (artifact.isOfType(CoreArtifactTypes.UniversalGroup)) { for (Artifact userArt : artifact.getRelatedArtifacts(CoreRelationTypes.Universal_Grouping__Members)) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/email/EmailWizardPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/email/EmailWizardPage.java index fc5864c9a1f..d3889bbe3a0 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/email/EmailWizardPage.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/email/EmailWizardPage.java @@ -94,7 +94,7 @@ public class EmailWizardPage extends WizardPage { namesComp.setLayoutData(gd); // Fill names array - ArrayList<Object> names = new ArrayList<Object>(); + ArrayList<Object> names = new ArrayList<>(); if (groups != null) { names.addAll(groups); if (groups.size() > 0) { @@ -325,7 +325,7 @@ public class EmailWizardPage extends WizardPage { public String[] getEmails(ListViewer list) throws OseeCoreException { - ArrayList<String> emails = new ArrayList<String>(); + ArrayList<String> emails = new ArrayList<>(); for (int x = 0; x < list.getList().getItemCount(); x++) { Object obj = list.getElementAt(x); if (obj instanceof User) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/matrix/Matrix.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/matrix/Matrix.java index fdf4b6fee01..87cacc5e299 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/matrix/Matrix.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/matrix/Matrix.java @@ -28,11 +28,11 @@ import org.eclipse.osee.framework.jdk.core.util.AHTML; public class Matrix { private final String title; private final ArrayList<MatrixItem> items; - private final Map<String, MatrixItem> nameToItem = new HashMap<String, MatrixItem>(); - private final Set<String> values = new HashSet<String>(); - private final Map<String, Set<String>> nameToValues = new HashMap<String, Set<String>>(); + private final Map<String, MatrixItem> nameToItem = new HashMap<>(); + private final Set<String> values = new HashSet<>(); + private final Map<String, Set<String>> nameToValues = new HashMap<>(); // Names with no values will be listed at the bottom of the report so they don't take up space - private final Set<String> noValueNames = new HashSet<String>(); + private final Set<String> noValueNames = new HashSet<>(); private boolean useNameAsMark = false; private IProgressMonitor monitor; @@ -68,7 +68,7 @@ public class Matrix { StringBuilder sb = new StringBuilder(); sb.append(AHTML.beginMultiColumnTable(100, 1)); // Determine all the names to deal with - Set<String> names = new HashSet<String>(); + Set<String> names = new HashSet<>(); // Don't want to take up valuable table space with names that have no values; keep track // of them and print them at the end of the report for (String name : nameToItem.keySet()) { @@ -98,7 +98,7 @@ public class Matrix { if (monitor != null) { monitor.subTask(str); } - List<String> marks = new ArrayList<String>(); + List<String> marks = new ArrayList<>(); marks.add(value); for (String name : sortedNames) { if (nameToValues.get(name) != null && nameToValues.get(name).contains(value)) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/matrix/MatrixItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/matrix/MatrixItem.java index 643dee68a57..72b9f25363e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/matrix/MatrixItem.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/matrix/MatrixItem.java @@ -20,7 +20,7 @@ import java.util.Set; public class MatrixItem { private String name; - private Set<String> values = new HashSet<String>(); + private Set<String> values = new HashSet<>(); public MatrixItem() { this("Unset", null); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/AttributeContentProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/AttributeContentProvider.java index 4165497188a..c99809694ee 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/AttributeContentProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/AttributeContentProvider.java @@ -33,7 +33,7 @@ public class AttributeContentProvider implements ITreeContentProvider { @Override public Object[] getChildren(Object parentElement) { if (parentElement instanceof Branch) { - ArrayList<Object> descriptors = new ArrayList<Object>(); + ArrayList<Object> descriptors = new ArrayList<>(); try { for (IAttributeType descriptor : AttributeTypeManager.getValidAttributeTypes((Branch) parentElement)) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/RelationTypeContentProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/RelationTypeContentProvider.java index 559b8111107..e15afd6479c 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/RelationTypeContentProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/RelationTypeContentProvider.java @@ -33,7 +33,7 @@ public class RelationTypeContentProvider implements ITreeContentProvider { @Override public Object[] getChildren(Object parentElement) { if (parentElement instanceof Branch) { - ArrayList<Object> descriptors = new ArrayList<Object>(); + ArrayList<Object> descriptors = new ArrayList<>(); try { for (RelationType descriptor : RelationTypeManager.getValidTypes((Branch) parentElement)) { descriptors.add(descriptor); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/SkynetSpellModifyDictionary.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/SkynetSpellModifyDictionary.java index 424c2a7b253..154719296c9 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/SkynetSpellModifyDictionary.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/SkynetSpellModifyDictionary.java @@ -58,7 +58,7 @@ public class SkynetSpellModifyDictionary implements XTextSpellModifyDictionary, if (MessageDialog.openConfirm(Displays.getActiveShell(), "Add to " + type + " Dictionary", "Add \"" + word + "\" to " + type + " Dictionary")) { try { - Set<String> words = new HashSet<String>(); + Set<String> words = new HashSet<>(); for (String str : art.getSoleAttributeValue(CoreAttributeTypes.Dictionary, "").split(";")) { words.add(str); } @@ -92,7 +92,7 @@ public class SkynetSpellModifyDictionary implements XTextSpellModifyDictionary, return; } try { - dictionary = new HashSet<String>(); + dictionary = new HashSet<>(); User user = UserManager.getUser(); if (user != null) { String value = user.getSoleAttributeValue(CoreAttributeTypes.Dictionary, ""); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XArtifactTypeComboViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XArtifactTypeComboViewer.java index 08fa548adc2..6d985a0408b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XArtifactTypeComboViewer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XArtifactTypeComboViewer.java @@ -43,14 +43,14 @@ public class XArtifactTypeComboViewer extends XComboViewer { try { Collection<ArtifactType> artifactTypes = ArtifactTypeManager.getAllTypes(); - List<ArtifactType> sortedArtifatTypes = new ArrayList<ArtifactType>(); + List<ArtifactType> sortedArtifatTypes = new ArrayList<>(); sortedArtifatTypes.addAll(artifactTypes); Collections.sort(sortedArtifatTypes); getComboViewer().setInput(sortedArtifatTypes); } catch (OseeCoreException ex) { OseeLog.log(Activator.class, Level.SEVERE, ex); } - ArrayList<Object> defaultSelection = new ArrayList<Object>(); + ArrayList<Object> defaultSelection = new ArrayList<>(); defaultSelection.add("--select--"); setSelected(defaultSelection); addXModifiedListener(new XModifiedListener() { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XAttributeTypeComboViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XAttributeTypeComboViewer.java index e3cf08848db..352a2a20d1f 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XAttributeTypeComboViewer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XAttributeTypeComboViewer.java @@ -43,14 +43,14 @@ public class XAttributeTypeComboViewer extends XComboViewer { try { Collection<AttributeType> AttributeTypes = AttributeTypeManager.getAllTypes(); - List<AttributeType> sortedArtifatTypes = new ArrayList<AttributeType>(); + List<AttributeType> sortedArtifatTypes = new ArrayList<>(); sortedArtifatTypes.addAll(AttributeTypes); Collections.sort(sortedArtifatTypes); getComboViewer().setInput(sortedArtifatTypes); } catch (OseeCoreException ex) { OseeLog.log(Activator.class, Level.SEVERE, ex); } - ArrayList<Object> defaultSelection = new ArrayList<Object>(); + ArrayList<Object> defaultSelection = new ArrayList<>(); defaultSelection.add("--select--"); setSelected(defaultSelection); addXModifiedListener(new XModifiedListener() { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectComboWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectComboWidget.java index 9363e50d548..9a51ad4a6b7 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectComboWidget.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectComboWidget.java @@ -39,7 +39,7 @@ public class XBranchSelectComboWidget extends GenericXWidget implements Listener private Composite composite; private final int defaultBranch; - private final List<Listener> listeners = new ArrayList<Listener>(); + private final List<Listener> listeners = new ArrayList<>(); public XBranchSelectComboWidget(String label) { super(label); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidget.java index 81db152dafc..6b6a277e738 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidget.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XBranchSelectWidget.java @@ -40,7 +40,7 @@ public class XBranchSelectWidget extends GenericXWidget implements Listener { private Composite composite; private IOseeBranch defaultBranch; - private final List<Listener> listeners = new ArrayList<Listener>(); + private final List<Listener> listeners = new ArrayList<>(); public XBranchSelectWidget(String label) { super(label); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XCombo.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XCombo.java index 559cc476f7b..bf6e801606a 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XCombo.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XCombo.java @@ -35,7 +35,7 @@ public class XCombo extends XButtonCommon { protected String data = ""; protected String[] inDataStrings; // Strings sent in for display // - private final Map<String, Integer> displayDataStrings = new LinkedHashMap<String, Integer>(); + private final Map<String, Integer> displayDataStrings = new LinkedHashMap<>(); private String displayArray[]; private boolean isDefaultSelectionAllowed; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XComboWithTextAndComboWithText.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XComboWithTextAndComboWithText.java index fdd5207eabf..f4efbaf2b72 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XComboWithTextAndComboWithText.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XComboWithTextAndComboWithText.java @@ -220,7 +220,7 @@ public class XComboWithTextAndComboWithText extends XCombo { @Override public Collection<? extends XWidget> getChildrenXWidgets() { - List<XWidget> widgets = new ArrayList<XWidget>(); + List<XWidget> widgets = new ArrayList<>(); if (text != null) { widgets.add(text); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XDate.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XDate.java index 37c8a415fbb..e993660bb67 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XDate.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XDate.java @@ -36,7 +36,7 @@ import org.eclipse.swt.widgets.Label; */ public class XDate extends XWidget { - private final ArrayList<ModifyListener> listeners = new ArrayList<ModifyListener>(); + private final ArrayList<ModifyListener> listeners = new ArrayList<>(); private String defaultFormat = DateUtil.MMDDYYHHMM; private boolean requireFutureDate = false; private CalendarWidget dateCombo; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XFilteredTree.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XFilteredTree.java index 04f69685b53..847216eadc0 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XFilteredTree.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XFilteredTree.java @@ -177,7 +177,7 @@ public class XFilteredTree extends GenericXWidget { } public Collection<Object> getSelected() { - List<Object> results = new ArrayList<Object>(); + List<Object> results = new ArrayList<>(); Iterator<?> i = ((IStructuredSelection) filteredTree.getViewer().getSelection()).iterator(); while (i.hasNext()) { Object obj = i.next(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XFlatWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XFlatWidget.java index 5db6f4695c4..376567569b1 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XFlatWidget.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XFlatWidget.java @@ -284,10 +284,10 @@ public abstract class XFlatWidget<T> extends XLabel { private final class FlatControl { private final List<String> pageIds; private Composite flatComposite; - private final Map<String, Composite> pages = new HashMap<String, Composite>(); + private final Map<String, Composite> pages = new HashMap<>(); public FlatControl() { - this.pageIds = new ArrayList<String>(); + this.pageIds = new ArrayList<>(); } private void createControl(Composite parent) { @@ -371,7 +371,7 @@ public abstract class XFlatWidget<T> extends XLabel { if (minPage <= numberOfPages && maxPage >= numberOfPages) { status = Status.OK_STATUS; } else { - List<String> message = new ArrayList<String>(); + List<String> message = new ArrayList<>(); if (numberOfPages < minPage) { message.add(String.format("Must have at least [%s] page%s", minPage, minPage == 1 ? "" : "s")); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelGroupSelection.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelGroupSelection.java index 3d02b26d76e..82f04fef6e1 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelGroupSelection.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelGroupSelection.java @@ -32,7 +32,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.dialog.FilteredCheckboxTreeD public class XHyperlabelGroupSelection extends XHyperlinkLabelCmdValueSelection { public static final String WIDGET_ID = XHyperlabelGroupSelection.class.getSimpleName(); - Set<Artifact> selectedGroups = new HashSet<Artifact>(); + Set<Artifact> selectedGroups = new HashSet<>(); public XHyperlabelGroupSelection(String label) { super(label, true, 80); @@ -80,7 +80,7 @@ public class XHyperlabelGroupSelection extends XHyperlinkLabelCmdValueSelection } private Collection<Artifact> getGroups() { - List<Artifact> groups = new ArrayList<Artifact>(); + List<Artifact> groups = new ArrayList<>(); for (Artifact art : UniversalGroup.getGroups(BranchManager.getCommonBranch())) { if (!art.isOfType(CoreArtifactTypes.RootArtifact)) { groups.add(art); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelMemberSelDam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelMemberSelDam.java index c3d6b790253..28aada7c925 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelMemberSelDam.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelMemberSelDam.java @@ -57,7 +57,7 @@ public class XHyperlabelMemberSelDam extends XHyperlabelMemberSelection implemen } public Set<User> getStoredUsers() { - Set<User> users = new HashSet<User>(); + Set<User> users = new HashSet<>(); try { for (String userId : artifact.getAttributesToStringList(attributeType)) { try { @@ -76,7 +76,7 @@ public class XHyperlabelMemberSelDam extends XHyperlabelMemberSelection implemen @Override public void saveToArtifact() { try { - Set<String> userIds = new HashSet<String>(); + Set<String> userIds = new HashSet<>(); for (User user : getSelectedUsers()) { userIds.add(user.getUserId()); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelMemberSelection.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelMemberSelection.java index 74973d1346b..acc690f8efb 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelMemberSelection.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelMemberSelection.java @@ -26,7 +26,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.dialog.UserCheckTreeDialog; */ public class XHyperlabelMemberSelection extends XHyperlinkLabelCmdValueSelection { - Set<User> selectedUsers = new HashSet<User>(); + Set<User> selectedUsers = new HashSet<>(); private final Collection<User> users; public XHyperlabelMemberSelection(String label) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XList.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XList.java index 3383fa82e76..f6946020269 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XList.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XList.java @@ -91,7 +91,7 @@ public class XList extends GenericXWidget { private Menu listMenu; private Composite parent; private Composite composite; - private final Map<String, XListItem> items = new TreeMap<String, XListItem>(); + private final Map<String, XListItem> items = new TreeMap<>(); private int requiredMinSelected = 0; private int requiredMaxSelected = 0; private boolean grabHorizontal = false; @@ -224,7 +224,7 @@ public class XList extends GenericXWidget { } public Set<XListItem> getSelected() { - Set<XListItem> sel = new HashSet<XListItem>(); + Set<XListItem> sel = new HashSet<>(); for (XListItem xItem : items.values()) { if (xItem.isSelected()) { sel.add(xItem); @@ -251,7 +251,7 @@ public class XList extends GenericXWidget { } public Collection<String> getSelectedStrs() { - Set<String> selected = new HashSet<String>(); + Set<String> selected = new HashSet<>(); for (XListItem item : getSelected()) { selected.add(item.getName()); } @@ -272,8 +272,8 @@ public class XList extends GenericXWidget { return; } String listItems[] = listList.getItems(); - Set<String> listItemsSet = new HashSet<String>(); - Set<String> selected = new HashSet<String>(); + Set<String> listItemsSet = new HashSet<>(); + Set<String> selected = new HashSet<>(); for (String listItem : listItems) { listItemsSet.add(listItem); } @@ -332,7 +332,7 @@ public class XList extends GenericXWidget { } public void setSelected(Collection<String> names) { - ArrayList<String> handledNames = new ArrayList<String>(); + ArrayList<String> handledNames = new ArrayList<>(); for (Entry<String, XListItem> entry : items.entrySet()) { if (names.contains(entry.getKey())) { entry.getValue().selected = true; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListDropViewWithSave.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListDropViewWithSave.java index da534dc601d..5181e628e5b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListDropViewWithSave.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListDropViewWithSave.java @@ -81,7 +81,7 @@ public class XListDropViewWithSave extends XListDropViewer implements IAttribute public Result isDirty() { if (isEditable()) { try { - List<Artifact> enteredValues = new ArrayList<Artifact>(); + List<Artifact> enteredValues = new ArrayList<>(); Collections.flatten(getArtifacts(), enteredValues); Collection<Artifact> storedValues = getStored(); if (!Collections.isEqual(enteredValues, storedValues)) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListDropViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListDropViewer.java index ac819c2c05e..9a64db7d2af 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListDropViewer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListDropViewer.java @@ -86,7 +86,7 @@ public class XListDropViewer extends XListViewer implements IXWidgetInputAddable Collection<Object> items = getCollectionInput(); if (items != null && !items.isEmpty()) { - List<Object> modList = new ArrayList<Object>(); + List<Object> modList = new ArrayList<>(); while (iterator.hasNext()) { modList.remove(iterator.next()); @@ -134,7 +134,7 @@ public class XListDropViewer extends XListViewer implements IXWidgetInputAddable } public List<Artifact> getSelectedArtifacts() { - List<Object> selectedArtifacts = new ArrayList<Object>(); + List<Object> selectedArtifacts = new ArrayList<>(); Collections.flatten(getSelected(), selectedArtifacts); return Collections.castAll(Artifact.class, selectedArtifacts); } @@ -143,7 +143,7 @@ public class XListDropViewer extends XListViewer implements IXWidgetInputAddable * Adds artifacts to the viewer's input. */ public void addToInput(Artifact... artifacts) { - List<Object> objects = new ArrayList<Object>(); + List<Object> objects = new ArrayList<>(); for (Artifact artifact : artifacts) { objects.add(artifact); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListViewer.java index 77537284dd4..1a514f07eaf 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListViewer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XListViewer.java @@ -249,7 +249,7 @@ public class XListViewer extends GenericXWidget { } public ArrayList<Object> getSelected() { - ArrayList<Object> selected = new ArrayList<Object>(); + ArrayList<Object> selected = new ArrayList<>(); IStructuredSelection selection = (IStructuredSelection) listViewer.getSelection(); Iterator<?> i = selection.iterator(); while (i.hasNext()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XMembersList.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XMembersList.java index c59e6d298d3..a2c7e7a8647 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XMembersList.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XMembersList.java @@ -36,7 +36,7 @@ public class XMembersList extends XListViewer { } public String[] getEmails() throws OseeCoreException { - ArrayList<String> v = new ArrayList<String>(); + ArrayList<String> v = new ArrayList<>(); for (Object obj : this.getSelected()) { User u = (User) obj; String name = u.getName(); @@ -51,7 +51,7 @@ public class XMembersList extends XListViewer { } public ArrayList<User> getUsers() { - ArrayList<User> v = new ArrayList<User>(); + ArrayList<User> v = new ArrayList<>(); for (Object obj : this.getSelected()) { v.add((User) obj); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XOptionHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XOptionHandler.java index 19c379299b1..8407c310029 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XOptionHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XOptionHandler.java @@ -19,7 +19,7 @@ import java.util.Set; */ public class XOptionHandler { - private final Set<XOption> xOptions = new HashSet<XOption>(); + private final Set<XOption> xOptions = new HashSet<>(); public XOptionHandler(XOption... xOption) { set(xOption); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XRadioButtons.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XRadioButtons.java index 1583f2261cb..de327b4637b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XRadioButtons.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XRadioButtons.java @@ -41,7 +41,7 @@ import org.eclipse.swt.widgets.Label; public class XRadioButtons extends GenericXWidget { private Composite comp; - private final ArrayList<XRadioButton> xButtons = new ArrayList<XRadioButton>(); + private final ArrayList<XRadioButton> xButtons = new ArrayList<>(); private boolean multiSelect; private boolean vertical; private int verticalColumns; @@ -122,7 +122,7 @@ public class XRadioButtons extends GenericXWidget { @Override protected void createControls(Composite parent, int horizontalSpan) { - Map<String, XRadioButton> nameToButton = new HashMap<String, XRadioButton>(); + Map<String, XRadioButton> nameToButton = new HashMap<>(); String names[] = new String[xButtons.size()]; int x = 0; for (XRadioButton rb : xButtons) { @@ -229,7 +229,7 @@ public class XRadioButtons extends GenericXWidget { } public Set<String> getSelectedNames() { - Set<String> names = new HashSet<String>(); + Set<String> names = new HashSet<>(); for (XRadioButton rb : xButtons) { if (rb.isSelected()) { names.add(rb.getLabel()); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromDialog.java index 82002fba145..d3f8d25c48e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromDialog.java @@ -40,8 +40,8 @@ import org.eclipse.swt.widgets.Label; */ public abstract class XSelectFromDialog<T> extends XText { - private final List<T> selected = new ArrayList<T>(); - private final List<T> input = new ArrayList<T>(); + private final List<T> selected = new ArrayList<>(); + private final List<T> input = new ArrayList<>(); private int minSelectionRequired, maxSelectionRequired = 1; private Button selectionButton; @@ -165,14 +165,14 @@ public abstract class XSelectFromDialog<T> extends XText { } else { try { FilteredCheckboxTreeDialog dialog = createDialog(); - Set<T> choices = new HashSet<T>(selected); + Set<T> choices = new HashSet<>(selected); choices.addAll(input); dialog.setInput(choices); dialog.setInitialSelections(getSelected()); int result = dialog.open(); if (result == 0) { - List<T> dialogSelections = new ArrayList<T>(); + List<T> dialogSelections = new ArrayList<>(); for (Object obj : dialog.getResult()) { dialogSelections.add((T) obj); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XStackedDam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XStackedDam.java index 4843a2b619d..0d43a574784 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XStackedDam.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XStackedDam.java @@ -58,7 +58,7 @@ public class XStackedDam extends XStackedWidget<String> implements IAttributeWid public XStackedDam(String displayLabel) { super(displayLabel); - this.xWidgets = new LinkedHashMap<String, XWidget>(); + this.xWidgets = new LinkedHashMap<>(); this.artifact = null; this.xModifiedListener = new XModifiedListener() { @Override @@ -94,7 +94,7 @@ public class XStackedDam extends XStackedWidget<String> implements IAttributeWid @Override protected void createControls(Composite parent, int horizontalSpan) { super.createControls(parent, horizontalSpan); - final Collection<String> values = new ArrayList<String>(); + final Collection<String> values = new ArrayList<>(); try { boolean attributeTypeIsPlainTextEditable = false; for (Attribute<Object> attribute : getArtifact().getAttributes(getAttributeType())) { @@ -134,7 +134,7 @@ public class XStackedDam extends XStackedWidget<String> implements IAttributeWid } public List<String> getInput() { - List<String> data = new ArrayList<String>(); + List<String> data = new ArrayList<>(); for (XWidget widget : xWidgets.values()) { if (widget instanceof XText) { data.add(((XText) widget).get()); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XStackedWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XStackedWidget.java index 8936c45deee..be3c8211f9b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XStackedWidget.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XStackedWidget.java @@ -367,7 +367,7 @@ public abstract class XStackedWidget<T> extends XLabel { public StackedControl() { this.stackedViewer = null; this.currentPage = -1; - this.pageIds = new ArrayList<String>(); + this.pageIds = new ArrayList<>(); } private void createControl(Composite parent) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextDam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextDam.java index ebdfdd50383..5f5f4b6c80c 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextDam.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextDam.java @@ -63,7 +63,7 @@ public class XTextDam extends XText implements IAttributeWidget { private void setArtifact(Artifact artifact) { if (isWeakReference) { - this.artifactRef = new WeakReference<Artifact>(artifact); + this.artifactRef = new WeakReference<>(artifact); } else { artifactStrongRef = artifact; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextFlatDam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextFlatDam.java index 0703014a121..4a43c7d095b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextFlatDam.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextFlatDam.java @@ -59,7 +59,7 @@ public class XTextFlatDam extends XFlatWidget<String> implements IAttributeWidge public XTextFlatDam(String displayLabel) { super(displayLabel); - this.xWidgets = new LinkedHashMap<String, XWidget>(); + this.xWidgets = new LinkedHashMap<>(); this.artifact = null; this.xModifiedListener = new XModifiedListener() { @Override @@ -101,7 +101,7 @@ public class XTextFlatDam extends XFlatWidget<String> implements IAttributeWidge @Override protected void createControls(Composite parent, int horizontalSpan) { super.createControls(parent, horizontalSpan); - final Collection<String> values = new ArrayList<String>(); + final Collection<String> values = new ArrayList<>(); try { values.addAll(getStored()); for (int index = 0; index < values.size(); index++) { @@ -135,7 +135,7 @@ public class XTextFlatDam extends XFlatWidget<String> implements IAttributeWidge } public List<String> getInput() { - List<String> data = new ArrayList<String>(); + List<String> data = new ArrayList<>(); for (XWidget widget : xWidgets.values()) { if (widget instanceof XText) { data.add(((XText) widget).get()); @@ -157,7 +157,7 @@ public class XTextFlatDam extends XFlatWidget<String> implements IAttributeWidge public Result isDirty() throws OseeCoreException { if (isEditable()) { try { - Collection<String> enteredValues = new ArrayList<String>();//getSelected(); + Collection<String> enteredValues = new ArrayList<>();//getSelected(); Collection<String> storedValues = getStored(); if (!Collections.isEqual(enteredValues, storedValues)) { return new Result(true, getAttributeType() + " is dirty"); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextResourceDropDam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextResourceDropDam.java index 799581a0ad8..616ace8d51d 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextResourceDropDam.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextResourceDropDam.java @@ -73,7 +73,7 @@ public class XTextResourceDropDam extends XTextDam { } private void performDrop(DropTargetEvent e) { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); if (e.data instanceof String) { strs.add((String) e.data); } else if (e.data instanceof String[]) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextSpellCheckListener.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextSpellCheckListener.java index fe525ae8ddd..408f24ca316 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextSpellCheckListener.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextSpellCheckListener.java @@ -44,7 +44,7 @@ public class XTextSpellCheckListener implements ModifyListener { private final IDictionary dict; private final XText xText; - private final Set<ASpellWord> errors = new LinkedHashSet<ASpellWord>(); + private final Set<ASpellWord> errors = new LinkedHashSet<>(); private XTextSpellModifyDictionary modDict; private Integer maxLength = 50000; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextUrlListener.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextUrlListener.java index 82d368edcb8..2b754983da4 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextUrlListener.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XTextUrlListener.java @@ -39,7 +39,7 @@ import org.eclipse.swt.widgets.Display; public class XTextUrlListener implements ModifyListener { private final XText xText; - private final Set<UrlWord> urls = new HashSet<UrlWord>(); + private final Set<UrlWord> urls = new HashSet<>(); private Integer maxLength = 50000; public class UrlWord { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidget.java index f205f65c050..633e508b3db 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidget.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidget.java @@ -56,7 +56,7 @@ public abstract class XWidget { protected boolean fillHorizontally = false; private boolean displayLabel = true; - private final Set<XModifiedListener> modifiedListeners = new LinkedHashSet<XModifiedListener>(); + private final Set<XModifiedListener> modifiedListeners = new LinkedHashSet<>(); private MouseListener mouseLabelListener; protected FormToolkit toolkit; private Object object; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidgetDecorator.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidgetDecorator.java index 4a5d0ae7c12..90910f91cac 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidgetDecorator.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidgetDecorator.java @@ -46,8 +46,8 @@ public class XWidgetDecorator { } public XWidgetDecorator() { - decoratorMap = new HashMap<XWidget, Decorator>(); - providers = new ArrayList<DecorationProvider>(); + decoratorMap = new HashMap<>(); + providers = new ArrayList<>(); } public void addWidget(XWidget xWidget) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidgetUtility.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidgetUtility.java index 3d7f232d1ef..63b8d2b68ab 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidgetUtility.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XWidgetUtility.java @@ -26,7 +26,7 @@ public final class XWidgetUtility { } public static List<XWidget> findXWidgetsInControl(Widget parent) { - List<XWidget> xWidgets = new ArrayList<XWidget>(); + List<XWidget> xWidgets = new ArrayList<>(); XWidget xWidget = asXWidget(parent); if (xWidget != null) { xWidgets.add(xWidget); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/ChangeBranchArchivedStateDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/ChangeBranchArchivedStateDialog.java index c77c46b76b0..8a76d797b28 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/ChangeBranchArchivedStateDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/ChangeBranchArchivedStateDialog.java @@ -62,7 +62,7 @@ public class ChangeBranchArchivedStateDialog extends ListDialog { layout.marginWidth = 20; getTableViewer().getTable().getParent().setLayout(layout); if (selected != null) { - ArrayList<Object> sel = new ArrayList<Object>(); + ArrayList<Object> sel = new ArrayList<>(); sel.add(selected); getTableViewer().setSelection(new StructuredSelection(sel.toArray(new Object[sel.size()]))); getTableViewer().getTable().setFocus(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/ChangeBranchStateDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/ChangeBranchStateDialog.java index 82b811e14eb..b8e45d209ae 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/ChangeBranchStateDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/ChangeBranchStateDialog.java @@ -62,7 +62,7 @@ public class ChangeBranchStateDialog extends ListDialog { layout.marginWidth = 20; getTableViewer().getTable().getParent().setLayout(layout); if (selected != null) { - ArrayList<Object> sel = new ArrayList<Object>(); + ArrayList<Object> sel = new ArrayList<>(); sel.add(selected); getTableViewer().setSelection(new StructuredSelection(sel.toArray(new Object[sel.size()]))); getTableViewer().getTable().setFocus(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/ChangeBranchTypeDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/ChangeBranchTypeDialog.java index 491771e503a..e565100b5bb 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/ChangeBranchTypeDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/ChangeBranchTypeDialog.java @@ -62,7 +62,7 @@ public class ChangeBranchTypeDialog extends ListDialog { layout.marginWidth = 20; getTableViewer().getTable().getParent().setLayout(layout); if (selected != null) { - ArrayList<Object> sel = new ArrayList<Object>(); + ArrayList<Object> sel = new ArrayList<>(); sel.add(selected); getTableViewer().setSelection(new StructuredSelection(sel.toArray(new Object[sel.size()]))); getTableViewer().getTable().setFocus(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryComboDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryComboDialog.java index cc8da12a7b6..c519f41abb6 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryComboDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryComboDialog.java @@ -24,7 +24,7 @@ import org.eclipse.swt.widgets.Composite; public class EntryComboDialog extends EntryDialog { private final String comboMessage; - private List<String> options = new ArrayList<String>(); + private List<String> options = new ArrayList<>(); private String defaultSelection = null; private String selection = ""; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialog.java index ef6bb50aafb..77a7c17f47d 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialog.java @@ -64,7 +64,7 @@ public class EntryDialog extends MessageDialog { private String label; private Integer textHeight = null; - private final List<IShellCloseEvent> closeEventListeners = new ArrayList<IShellCloseEvent>(); + private final List<IShellCloseEvent> closeEventListeners = new ArrayList<>(); private final String dialogTitle; public EntryDialog(String dialogTitle, String dialogMessage) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialogWithBranchSelect.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialogWithBranchSelect.java index 28c7adf7dd7..b7079efb50e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialogWithBranchSelect.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/EntryDialogWithBranchSelect.java @@ -52,7 +52,7 @@ public class EntryDialogWithBranchSelect extends MessageDialog { BranchSelectComposite branchSelect; boolean fillVertically = false; - private final List<IShellCloseEvent> closeEventListeners = new ArrayList<IShellCloseEvent>(); + private final List<IShellCloseEvent> closeEventListeners = new ArrayList<>(); public EntryDialogWithBranchSelect(String dialogTitle, String dialogMessage) { super(Displays.getActiveShell(), dialogTitle, null, dialogMessage, MessageDialog.QUESTION, new String[] { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxArtifactTypeDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxArtifactTypeDialog.java index 5ff67fc1316..f0e519195e3 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxArtifactTypeDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxArtifactTypeDialog.java @@ -64,7 +64,7 @@ public class FilteredCheckboxArtifactTypeDialog extends FilteredCheckboxTreeDial if (super.getTreeViewer() == null) { return Collections.emptyList(); } - Set<IArtifactType> checked = new HashSet<IArtifactType>(); + Set<IArtifactType> checked = new HashSet<>(); for (Object obj : getResult()) { checked.add((IArtifactType) obj); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxAttributeTypeDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxAttributeTypeDialog.java index d36fbd2f687..9ebff90b849 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxAttributeTypeDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxAttributeTypeDialog.java @@ -62,7 +62,7 @@ public class FilteredCheckboxAttributeTypeDialog extends FilteredCheckboxTreeDia if (super.getTreeViewer() == null) { return Collections.emptyList(); } - Set<IAttributeType> checked = new HashSet<IAttributeType>(); + Set<IAttributeType> checked = new HashSet<>(); for (Object obj : getResult()) { checked.add((IAttributeType) obj); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxBranchDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxBranchDialog.java index f0f0bb4eddc..4a00363ef76 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxBranchDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxBranchDialog.java @@ -57,7 +57,7 @@ public class FilteredCheckboxBranchDialog extends FilteredCheckboxTreeDialog { if (super.getTreeViewer() == null) { return Collections.emptyList(); } - Set<IOseeBranch> checked = new HashSet<IOseeBranch>(); + Set<IOseeBranch> checked = new HashSet<>(); for (Object obj : getResult()) { checked.add((IOseeBranch) obj); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTree.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTree.java index 804e61f3216..07cfbea507c 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTree.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTree.java @@ -127,7 +127,7 @@ public class FilteredCheckboxTree extends FilteredTree { @SuppressWarnings("unchecked") public <T> Collection<T> getChecked() { - List<T> checked = new ArrayList<T>(); + List<T> checked = new ArrayList<>(); for (Object obj : getCheckboxTreeViewer().getCheckedElements()) { checked.add((T) obj); } @@ -212,7 +212,7 @@ public class FilteredCheckboxTree extends FilteredTree { class FilteredCheckboxTreeItem { Object data; // Data element String state; // Checked State - List<FilteredCheckboxTreeItem> children = new ArrayList<FilteredCheckboxTreeItem>(); + List<FilteredCheckboxTreeItem> children = new ArrayList<>(); public FilteredCheckboxTreeItem(Object data, String state, Map<Object, FilteredCheckboxTreeItem> itemCache, FilteredCheckboxTreeItem parent) { this.data = data; @@ -225,13 +225,13 @@ public class FilteredCheckboxTree extends FilteredTree { } /* A cache of all the nodes */ - Map<Object, FilteredCheckboxTreeItem> itemCache = new HashMap<Object, FilteredCheckboxTreeItem>(); + Map<Object, FilteredCheckboxTreeItem> itemCache = new HashMap<>(); /* The preRefresh Listeners */ - List<PreRefreshNotifier> refreshingListeners = new ArrayList<PreRefreshNotifier>(); + List<PreRefreshNotifier> refreshingListeners = new ArrayList<>(); @Override protected void unmapAllElements() { - itemCache = new HashMap<Object, FilteredCheckboxTreeItem>(); + itemCache = new HashMap<>(); super.unmapAllElements(); } @@ -299,7 +299,7 @@ public class FilteredCheckboxTree extends FilteredTree { public Object[] getCheckedChildren(Object element) { FilteredCheckboxTreeItem item = itemCache.get(element); - List<Object> checkedChildren = new ArrayList<Object>(); + List<Object> checkedChildren = new ArrayList<>(); if (item != null) { List<FilteredCheckboxTreeItem> children = item.children; Iterator<FilteredCheckboxTreeItem> iterator = children.iterator(); @@ -320,7 +320,7 @@ public class FilteredCheckboxTree extends FilteredTree { @Override public Object[] getCheckedElements() { Iterator<FilteredCheckboxTreeItem> iterator = itemCache.values().iterator(); - List<Object> checkedElements = new LinkedList<Object>(); + List<Object> checkedElements = new LinkedList<>(); while (iterator.hasNext()) { getCheckedElementsRecurse(iterator.next(), checkedElements); } @@ -359,7 +359,7 @@ public class FilteredCheckboxTree extends FilteredTree { */ @Override public void setCheckedElements(Object[] elements) { - Set<Object> s = new HashSet<Object>(itemCache.keySet()); + Set<Object> s = new HashSet<>(itemCache.keySet()); s.removeAll(new HashSet<Object>(Arrays.asList(elements))); for (int i = 0; i < elements.length; i++) { FilteredCheckboxTreeItem item = itemCache.get(elements[i]); @@ -504,7 +504,7 @@ public class FilteredCheckboxTree extends FilteredTree { * A helper method to get all the items in the tree */ private ArrayList<TreeItem> getAllTreeItems(TreeItem[] roots) { - ArrayList<TreeItem> list = new ArrayList<TreeItem>(); + ArrayList<TreeItem> list = new ArrayList<>(); for (int i = 0; i < roots.length; i++) { TreeItem item = roots[i]; list.add(item); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTreeArtifactDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTreeArtifactDialog.java index 83b273d5704..c3ef93eee64 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTreeArtifactDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTreeArtifactDialog.java @@ -51,7 +51,7 @@ public class FilteredCheckboxTreeArtifactDialog extends FilteredCheckboxTreeDial if (super.getTreeViewer() == null) { return Collections.emptyList(); } - Set<Artifact> checked = new HashSet<Artifact>(); + Set<Artifact> checked = new HashSet<>(); for (Object obj : getResult()) { checked.add((Artifact) obj); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTreeDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTreeDialog.java index 359d7fcea69..9f2935210ba 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTreeDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTreeDialog.java @@ -255,7 +255,7 @@ public class FilteredCheckboxTreeDialog extends MessageDialog { @SuppressWarnings("unchecked") public <T> Collection<T> getChecked() { - List<T> checked = new ArrayList<T>(); + List<T> checked = new ArrayList<>(); for (Object obj : getResult()) { checked.add((T) obj); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredTreeDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredTreeDialog.java index 8f4eb959b41..de4c7cf057f 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredTreeDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredTreeDialog.java @@ -51,7 +51,7 @@ public class FilteredTreeDialog extends MessageDialog { private ViewerSorter viewerSorter; private boolean multiSelect = true; private PatternFilter patternFilter; - List<Object> selected = new ArrayList<Object>(); + List<Object> selected = new ArrayList<>(); public FilteredTreeDialog(String dialogTitle, String dialogMessage, IContentProvider contentProvider, IBaseLabelProvider labelProvider) { this(dialogTitle, dialogMessage, contentProvider, labelProvider, null); @@ -179,7 +179,7 @@ public class FilteredTreeDialog extends MessageDialog { } public List<TreeItem> getVisibleItems() { - List<TreeItem> toReturn = new ArrayList<TreeItem>(); + List<TreeItem> toReturn = new ArrayList<>(); getVisibleItems(toReturn, treeViewer.getViewer().getTree().getItems()); return toReturn; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/UserCheckTreeDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/UserCheckTreeDialog.java index 2ba3529f6db..f5d8a384365 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/UserCheckTreeDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/UserCheckTreeDialog.java @@ -52,7 +52,7 @@ public class UserCheckTreeDialog extends FilteredCheckboxTreeArtifactDialog { } public Collection<User> getUsersSelected() { - Set<User> selected = new HashSet<User>(); + Set<User> selected = new HashSet<>(); for (FullyNamed art : getChecked()) { selected.add((User) art); } @@ -119,7 +119,7 @@ public class UserCheckTreeDialog extends FilteredCheckboxTreeArtifactDialog { */ public void setTeamMembers(Collection<? extends User> teamMembers) { if (this.teamMembers == null) { - this.teamMembers = new HashSet<User>(); + this.teamMembers = new HashSet<>(); } this.teamMembers.addAll(teamMembers); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/UserListDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/UserListDialog.java index ea9935de81c..4d394e6fdd1 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/UserListDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/UserListDialog.java @@ -44,7 +44,7 @@ public class UserListDialog extends FilteredTreeArtifactDialog { } else if (active == Active.Active) { users = UserManager.getUsersSortedByName(); } else { - users = new ArrayList<User>(); + users = new ArrayList<>(); for (User user : UserManager.getUsersAllSortedByName()) { if (!user.isActive()) { users.add(user); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/CalendarWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/CalendarWidget.java index 39877a5dbc5..117417c29e8 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/CalendarWidget.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/CalendarWidget.java @@ -50,7 +50,7 @@ public class CalendarWidget extends Composite { void dateChanged(Calendar calendar); } - private final List<CalendarListener> listeners = new CopyOnWriteArrayList<CalendarListener>(); + private final List<CalendarListener> listeners = new CopyOnWriteArrayList<>(); private Text text; private Calendar calendar; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/DefaultAttributeXWidgetProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/DefaultAttributeXWidgetProvider.java index dfb57a294e9..09c44a00571 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/DefaultAttributeXWidgetProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/DefaultAttributeXWidgetProvider.java @@ -50,7 +50,7 @@ public class DefaultAttributeXWidgetProvider implements IAttributeXWidgetProvide @Override public List<XWidgetRendererItem> getDynamicXWidgetLayoutData(IAttributeType attributeType) throws OseeCoreException { - List<XWidgetRendererItem> xWidgetLayoutData = new ArrayList<XWidgetRendererItem>(); + List<XWidgetRendererItem> xWidgetLayoutData = new ArrayList<>(); XWidgetRendererItem defaultData = createDynamicXWidgetLayout(attributeType, AttributeTypeManager.getMinOccurrences(attributeType)); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/FrameworkXWidgetProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/FrameworkXWidgetProvider.java index 47ecc46ca30..4e1a0673e76 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/FrameworkXWidgetProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/FrameworkXWidgetProvider.java @@ -409,7 +409,7 @@ public final class FrameworkXWidgetProvider { XArtifactTypeMultiChoiceSelect widget = new XArtifactTypeMultiChoiceSelect(); String defaultType = xWidgetLayoutData.getDefaultValue(); if (Strings.isValid(defaultType)) { - List<ArtifactType> types = new LinkedList<ArtifactType>(); + List<ArtifactType> types = new LinkedList<>(); for (String type : defaultType.split(",")) { try { types.add(ArtifactTypeManager.getType(type)); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/SwtXWidgetRenderer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/SwtXWidgetRenderer.java index 142e4ac86ae..fd919199ddf 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/SwtXWidgetRenderer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/SwtXWidgetRenderer.java @@ -57,15 +57,15 @@ import org.w3c.dom.Element; public class SwtXWidgetRenderer { public static final String XWIDGET = "XWidget"; - private final Set<XWidgetRendererItem> datas = new LinkedHashSet<XWidgetRendererItem>(); - private final Map<String, XWidgetRendererItem> nameToLayoutData = new HashMap<String, XWidgetRendererItem>(); + private final Set<XWidgetRendererItem> datas = new LinkedHashSet<>(); + private final Map<String, XWidgetRendererItem> nameToLayoutData = new HashMap<>(); - private final Collection<ArrayList<String>> orRequired = new ArrayList<ArrayList<String>>(); - private final Collection<ArrayList<String>> xorRequired = new ArrayList<ArrayList<String>>(); + private final Collection<ArrayList<String>> orRequired = new ArrayList<>(); + private final Collection<ArrayList<String>> xorRequired = new ArrayList<>(); private final IDynamicWidgetLayoutListener dynamicWidgetLayoutListener; private final IXWidgetOptionResolver optionResolver; - private final Collection<XWidget> xWidgets = new ArrayList<XWidget>(); + private final Collection<XWidget> xWidgets = new ArrayList<>(); public SwtXWidgetRenderer() { this(null, new DefaultXWidgetOptionResolver()); @@ -435,7 +435,7 @@ public class SwtXWidgetRenderer { } protected void processOrRequired(String instr) { - ArrayList<String> names = new ArrayList<String>(); + ArrayList<String> names = new ArrayList<>(); for (String attr : instr.split(";")) { if (!attr.contains("[ \\s]*")) { names.add(attr); @@ -445,7 +445,7 @@ public class SwtXWidgetRenderer { } protected void processXOrRequired(String instr) { - ArrayList<String> names = new ArrayList<String>(); + ArrayList<String> names = new ArrayList<>(); for (String attr : instr.split(";")) { if (!attr.contains("[ \\s]*")) { names.add(attr); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchContentProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchContentProvider.java index ea3ff5bd155..6cc188bd52c 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchContentProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchContentProvider.java @@ -78,7 +78,7 @@ public class XBranchContentProvider implements ITreeContentProvider { public Object[] getBranchChildren(Branch branch) { try { if (showChildBranchesUnderParents) { - List<Object> items = new LinkedList<Object>(); + List<Object> items = new LinkedList<>(); Collection<Branch> childBrances = showArchivedBranches ? branch.getChildBranches(true) : branch.getChildBranches(); @@ -97,7 +97,7 @@ public class XBranchContentProvider implements ITreeContentProvider { protected Object[] getBranchManagerChildren() { BranchArchivedState branchState = BranchArchivedState.UNARCHIVED; - List<BranchType> branchTypes = new ArrayList<BranchType>(4); + List<BranchType> branchTypes = new ArrayList<>(4); try { boolean isAdmin = AccessControlManager.isOseeAdmin(); @@ -116,7 +116,7 @@ public class XBranchContentProvider implements ITreeContentProvider { branchTypes.add(BranchType.WORKING); } - Set<Branch> branchesToReturn = new HashSet<Branch>(); + Set<Branch> branchesToReturn = new HashSet<>(); if (showOnlyWorkingBranches) { branchesToReturn.addAll(BranchManager.getBranches(BranchArchivedState.UNARCHIVED, BranchType.WORKING)); } @@ -200,7 +200,7 @@ public class XBranchContentProvider implements ITreeContentProvider { } public Object[] getAllElements(Object inputElement) { - ArrayList<Object> objects = new ArrayList<Object>(); + ArrayList<Object> objects = new ArrayList<>(); objects.addAll(recurseAllElements(inputElement)); @@ -212,7 +212,7 @@ public class XBranchContentProvider implements ITreeContentProvider { } private ArrayList<Object> recurseAllElements(Object inputElement) { - ArrayList<Object> objects = new ArrayList<Object>(); + ArrayList<Object> objects = new ArrayList<>(); for (Object object : getChildren(inputElement)) { objects.add(object); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java index f212161d721..ecb9065639e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/XBranchWidget.java @@ -84,7 +84,7 @@ public class XBranchWidget extends GenericXWidget { this.searchRealTime = searchRealTime; this.selectedBranch = selectedBranch; this.menuListener = menuListener; - branchSelectedListeners = new CopyOnWriteArrayList<BranchSelectedListener>(); + branchSelectedListeners = new CopyOnWriteArrayList<>(); branchXViewerFactory = new BranchXViewerFactory(); } @@ -220,7 +220,7 @@ public class XBranchWidget extends GenericXWidget { } public ArrayList<Branch> getSelectedBranches() { - ArrayList<Branch> items = new ArrayList<Branch>(); + ArrayList<Branch> items = new ArrayList<>(); if (branchXViewer == null || branchXViewer.getSelection().isEmpty()) { return items; } @@ -237,7 +237,7 @@ public class XBranchWidget extends GenericXWidget { @SuppressWarnings("rawtypes") public ArrayList<TransactionRecord> getSelectedTransactionRecords() { - ArrayList<TransactionRecord> items = new ArrayList<TransactionRecord>(); + ArrayList<TransactionRecord> items = new ArrayList<>(); if (branchXViewer == null || branchXViewer.getSelection().isEmpty()) { return items; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java index 30246fe7c82..5ee6deda259 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java @@ -200,7 +200,7 @@ public class HistoryView extends GenericViewPart implements IBranchEventListener } private class OpenOnShowListener implements MenuListener { - private final List<MenuItem> items = new LinkedList<MenuItem>(); + private final List<MenuItem> items = new LinkedList<>(); public void add(MenuItem item) { items.add(item); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryXViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryXViewer.java index d6f0bad1fb7..c3d8935254f 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryXViewer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryXViewer.java @@ -48,7 +48,7 @@ public class HistoryXViewer extends XViewer { } public ArrayList<Artifact> getSelectedChanges() { - ArrayList<Artifact> arts = new ArrayList<Artifact>(); + ArrayList<Artifact> arts = new ArrayList<>(); TreeItem items[] = getTree().getSelection(); if (items.length > 0) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryWidget.java index 61f607b753a..f6874b54845 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryWidget.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryWidget.java @@ -194,7 +194,7 @@ public class XHistoryWidget extends GenericXWidget { } public ArrayList<Branch> getSelectedBranches() { - ArrayList<Branch> items = new ArrayList<Branch>(); + ArrayList<Branch> items = new ArrayList<>(); if (xHistoryViewer == null) { return items; } @@ -258,7 +258,7 @@ public class XHistoryWidget extends GenericXWidget { @Override protected IStatus run(IProgressMonitor monitor) { - final Collection<Change> changes = new ArrayList<Change>(); + final Collection<Change> changes = new ArrayList<>(); try { if (loadHistory) { @@ -315,7 +315,7 @@ public class XHistoryWidget extends GenericXWidget { @Override public Artifact[] getArtifacts() { IStructuredSelection selection = (IStructuredSelection) xHistoryViewer.getSelection(); - ArrayList<Artifact> artifacts = new ArrayList<Artifact>(); + ArrayList<Artifact> artifacts = new ArrayList<>(); if (selection != null && !selection.isEmpty()) { for (Object object : selection.toArray()) { @@ -335,7 +335,7 @@ public class XHistoryWidget extends GenericXWidget { @SuppressWarnings("rawtypes") public ArrayList<TransactionRecord> getSelectedTransactionRecords() { - ArrayList<TransactionRecord> items = new ArrayList<TransactionRecord>(); + ArrayList<TransactionRecord> items = new ArrayList<>(); if (xHistoryViewer == null) { return items; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xbargraph/XBarGraphLine.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xbargraph/XBarGraphLine.java index 0588b56f496..7e2155d0658 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xbargraph/XBarGraphLine.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xbargraph/XBarGraphLine.java @@ -47,7 +47,7 @@ public class XBarGraphLine { public XBarGraphLine(String name, int foreground, int background, long value, String valueStr) { this.name = name; - segments = new ArrayList<XBarGraphLineSegment>(); + segments = new ArrayList<>(); segments.add(new XBarGraphLineSegment(valueStr, foreground, background, value)); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xbargraph/XBarGraphTable.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xbargraph/XBarGraphTable.java index 5679d3db947..8271d6e0d63 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xbargraph/XBarGraphTable.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xbargraph/XBarGraphTable.java @@ -137,12 +137,12 @@ public class XBarGraphTable extends XButtonCommon { shell.setLayout(new GridLayout(1, false)); shell.setText("Show results as a bar chart in Table"); - List<XBarGraphLine> lines = new ArrayList<XBarGraphLine>(); + List<XBarGraphLine> lines = new ArrayList<>(); lines.add(XBarGraphLine.getPercentLine("Fix", 34)); lines.add(XBarGraphLine.getPercentLine("Improvement", 100)); lines.add(new XBarGraphLine("Support", SWT.COLOR_GREEN, SWT.COLOR_YELLOW, SWT.COLOR_RED, SWT.COLOR_YELLOW, 33, "33%", "67%")); - List<XBarGraphLineSegment> segments = new ArrayList<XBarGraphLineSegment>(); + List<XBarGraphLineSegment> segments = new ArrayList<>(); segments.add(XBarGraphLineSegment.getPercentSegment("23%", SWT.COLOR_GREEN, 23)); segments.add(XBarGraphLineSegment.getPercentSegment("45%", SWT.COLOR_BLUE, 45)); segments.add(XBarGraphLineSegment.getPercentSegment("20%", SWT.COLOR_YELLOW, 20)); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xchange/ChangeXViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xchange/ChangeXViewer.java index 3cdf505c5e5..635b530ca09 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xchange/ChangeXViewer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xchange/ChangeXViewer.java @@ -71,7 +71,7 @@ public class ChangeXViewer extends XViewer { } private ArrayList<Change> getSelectedChanges() { - ArrayList<Change> arts = new ArrayList<Change>(); + ArrayList<Change> arts = new ArrayList<>(); TreeItem items[] = getTree().getSelection(); if (items.length > 0) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xchange/DefaultHierarchySorter.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xchange/DefaultHierarchySorter.java index 30235387e4d..ca7bbd78b72 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xchange/DefaultHierarchySorter.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xchange/DefaultHierarchySorter.java @@ -34,8 +34,8 @@ public class DefaultHierarchySorter implements Comparator<Artifact> { @Override public int compare(Artifact firstArtifact, Artifact secondArtifact) { - List<Artifact> firstArtifactsParentList = new ArrayList<Artifact>(); - List<Artifact> secondArtifactParentList = new ArrayList<Artifact>(); + List<Artifact> firstArtifactsParentList = new ArrayList<>(); + List<Artifact> secondArtifactParentList = new ArrayList<>(); try { firstArtifactsParentList = populateParent(firstArtifact, firstArtifactsParentList); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/DiffHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/DiffHandler.java index f64ee80e3b0..4ca80f8f9a5 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/DiffHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/DiffHandler.java @@ -88,7 +88,7 @@ class DiffHandler extends AbstractSelectionEnabledHandler { @Override public boolean isEnabledWithException(IStructuredSelection structuredSelection) throws OseeCoreException { - artifacts = new LinkedList<Artifact>(); + artifacts = new LinkedList<>(); List<Conflict> conflicts = Handlers.getConflictsFromStructuredSelection(structuredSelection); if (conflicts.size() != 1) { return false; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeCustomMenu.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeCustomMenu.java index d12e48e97d5..8cea92df213 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeCustomMenu.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeCustomMenu.java @@ -488,7 +488,7 @@ public class MergeCustomMenu extends XViewerCustomMenu { @Override public boolean isEnabledWithException(IStructuredSelection structuredSelection) throws OseeCoreException { - artifacts = new LinkedList<Artifact>(); + artifacts = new LinkedList<>(); List<Conflict> conflicts = Handlers.getConflictsFromStructuredSelection(structuredSelection); for (Conflict conflict : conflicts) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java index b7c2b918b44..907fa59982e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java @@ -691,8 +691,8 @@ public class MergeXWidget extends GenericXWidget { Conflict[] conflicts = getConflicts(); if (conflicts.length != 0) { if (conflicts[0].getSourceBranch() != null) { - ArrayList<String> selections = new ArrayList<String>(); - ArrayList<Long> branchUuids = new ArrayList<Long>(); + ArrayList<String> selections = new ArrayList<>(); + ArrayList<Long> branchUuids = new ArrayList<>(); try { Collection<Long> destBranches = ConflictManagerInternal.getDestinationBranchesMerged(sourceBranch.getUuid()); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/ThreeWayWordMergeOperation.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/ThreeWayWordMergeOperation.java index 23d6786d9aa..54d1b30a93f 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/ThreeWayWordMergeOperation.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/ThreeWayWordMergeOperation.java @@ -78,7 +78,7 @@ public class ThreeWayWordMergeOperation extends AbstractOperation { Artifact startArtifact = MergeUtility.getStartArtifact(attributeConflict); monitor.worked(5); - List<IFile> outputFiles = new ArrayList<IFile>(); + List<IFile> outputFiles = new ArrayList<>(); createMergeDiffFile(outputFiles, startArtifact, attributeConflict.getSourceArtifact()); monitor.worked(15); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetCustomizations.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetCustomizations.java index 47637bb9c07..89912a9779e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetCustomizations.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetCustomizations.java @@ -71,7 +71,7 @@ public class SkynetCustomizations implements IXViewerCustomizations, IArtifactEv @Override public List<CustomizeData> getSavedCustDatas() throws OseeCoreException { ensurePopulated(false); - List<CustomizeData> thisCustDatas = new ArrayList<CustomizeData>(); + List<CustomizeData> thisCustDatas = new ArrayList<>(); for (CustomizeData custData : custDatas) { if (custData.getNameSpace().equals(this.skynetXViewerFactory.getNamespace())) { thisCustDatas.add(custData); @@ -215,7 +215,7 @@ public class SkynetCustomizations implements IXViewerCustomizations, IArtifactEv private static List<CustomizeData> getArtifactCustomizations(Artifact customizationArtifact) throws OseeCoreException { // ElapsedTime time = new ElapsedTime("getArtifactCustomizations"); - List<CustomizeData> custDatas = new ArrayList<CustomizeData>(); + List<CustomizeData> custDatas = new ArrayList<>(); if (customizationArtifact != null) { Collection<Attribute<String>> attributes = diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetUserArtifactCustomizeDefaults.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetUserArtifactCustomizeDefaults.java index f572a0fbc68..e84cc1df4fd 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetUserArtifactCustomizeDefaults.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetUserArtifactCustomizeDefaults.java @@ -31,7 +31,7 @@ import org.eclipse.osee.framework.ui.skynet.internal.Activator; * @author Donald G. Dunne */ public class SkynetUserArtifactCustomizeDefaults { - Set<String> defaultGuids = new HashSet<String>(); + Set<String> defaultGuids = new HashSet<>(); private static String DEFAULT_CUST_GUID_TAG = "defaultCustGuid"; private final User user; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetXViewerFactory.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetXViewerFactory.java index 4407c280857..c42345b0d4a 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetXViewerFactory.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetXViewerFactory.java @@ -88,7 +88,7 @@ public class SkynetXViewerFactory extends XViewerFactory { } public static List<XViewerColumn> getAllAttributeColumns() throws OseeCoreException { - List<XViewerColumn> columns = new ArrayList<XViewerColumn>(); + List<XViewerColumn> columns = new ArrayList<>(); for (AttributeType attributeType : AttributeTypeManager.getAllTypes()) { columns.add(getAttributeColumn(attributeType)); } @@ -104,9 +104,9 @@ public class SkynetXViewerFactory extends XViewerFactory { * @return columns for attributes valid for at least on of the given artifacts; those with content first */ public static List<XViewerColumn> getAllAttributeColumnsForArtifacts(Collection<? extends Artifact> artifacts) throws OseeCoreException { - List<XViewerColumn> columns = new ArrayList<XViewerColumn>(); - Set<IAttributeType> attrTypesUsed = new HashSet<IAttributeType>(); - Set<IAttributeType> attributeTypes = new HashSet<IAttributeType>(); + List<XViewerColumn> columns = new ArrayList<>(); + Set<IAttributeType> attrTypesUsed = new HashSet<>(); + Set<IAttributeType> attributeTypes = new HashSet<>(); try { for (Artifact art : artifacts) { attributeTypes.addAll(art.getAttributeTypes()); @@ -119,7 +119,7 @@ public class SkynetXViewerFactory extends XViewerFactory { } catch (OseeCoreException ex) { OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex); } - Set<String> attrNames = new HashSet<String>(); + Set<String> attrNames = new HashSet<>(); // Add Name first columns.add(new ArtifactNameColumn(true)); attrNames.add("Name"); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/column/HierarchyIndexColumn.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/column/HierarchyIndexColumn.java index 75ddfe3a471..2ad1ea2af70 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/column/HierarchyIndexColumn.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/column/HierarchyIndexColumn.java @@ -33,7 +33,7 @@ import com.google.common.cache.CacheBuilder; * @author Ryan D. Brooks */ public class HierarchyIndexColumn extends XViewerValueColumn { - private final Set<Artifact> strongArtifactRefs = new HashSet<Artifact>(); + private final Set<Artifact> strongArtifactRefs = new HashSet<>(); public static HierarchyIndexColumn instance = new HierarchyIndexColumn(); diff --git a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/CursorManager.java b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/CursorManager.java index 0be22a2ee09..a07afdd87aa 100644 --- a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/CursorManager.java +++ b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/CursorManager.java @@ -20,7 +20,7 @@ import org.eclipse.swt.widgets.Display; */ public class CursorManager { - private static final Map<Integer, Cursor> cursors = new HashMap<Integer, Cursor>(); + private static final Map<Integer, Cursor> cursors = new HashMap<>(); private CursorManager() { } diff --git a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/DynamicWizard.java b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/DynamicWizard.java index 6e650468fe5..33fa18752de 100644 --- a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/DynamicWizard.java +++ b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/DynamicWizard.java @@ -49,7 +49,7 @@ public abstract class DynamicWizard implements IWizard { /** * This wizard's list of pages (element type: <code>IWizardPage</code>). */ - private final Map<String, IWizardPage> pages = new HashMap<String, IWizardPage>(); + private final Map<String, IWizardPage> pages = new HashMap<>(); /** * Indicates whether this wizard needs a progress monitor. diff --git a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/FontManager.java b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/FontManager.java index bcc5a1e7207..b822d0ed945 100644 --- a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/FontManager.java +++ b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/FontManager.java @@ -24,7 +24,7 @@ import org.eclipse.swt.graphics.FontData; */ public final class FontManager { - public static Map<String, Font> fontMap = new HashMap<String, Font>(); + public static Map<String, Font> fontMap = new HashMap<>(); private FontManager() { // Utility Class diff --git a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/FormattedText.java b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/FormattedText.java index 8832a5afcaf..6030d34924a 100644 --- a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/FormattedText.java +++ b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/FormattedText.java @@ -47,7 +47,7 @@ public class FormattedText extends Composite { this.editable = editable; this.height = height; this.width = width; - this.styleArray = new ArrayList<StyleRange>(); + this.styleArray = new ArrayList<>(); createTextArea(); } diff --git a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/OverlayImage.java b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/OverlayImage.java index 7ff5ab4d5ed..1dece11a626 100644 --- a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/OverlayImage.java +++ b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/OverlayImage.java @@ -54,7 +54,7 @@ public class OverlayImage extends CompositeImageDescriptor { public OverlayImage(Image baseImage, ImageDescriptor overlayImageDescriptor, Location location) { this.baseImage = baseImage; this.overlayImageDescriptor = overlayImageDescriptor; - this.imageInfo = new ArrayList<ImageInfo>(2); + this.imageInfo = new ArrayList<>(2); imageInfo.add(new ImageInfo(overlayImageDescriptor, location)); } diff --git a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/StackedViewer.java b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/StackedViewer.java index 70c99a9d29c..11e7b289af8 100644 --- a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/StackedViewer.java +++ b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/StackedViewer.java @@ -32,7 +32,7 @@ public class StackedViewer extends Composite { public StackedViewer(Composite parent, int style) { super(parent, style); - compositeMap = new HashMap<String, Control>(); + compositeMap = new HashMap<>(); create(); } diff --git a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/TreeNode.java b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/TreeNode.java index f0275e38ab5..f8b52bd5f6d 100644 --- a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/TreeNode.java +++ b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/TreeNode.java @@ -54,7 +54,7 @@ public class TreeNode implements ITreeNode, Serializable { if (objChildren == null) { this.children = new Object[0]; } else { - Collection<Object> newChildren = new ArrayList<Object>(objChildren.length); + Collection<Object> newChildren = new ArrayList<>(objChildren.length); for (Object obj : objChildren) { newChildren.add(obj instanceof ITreeNode ? obj : getChild(obj)); diff --git a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/TreeViewerUtility.java b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/TreeViewerUtility.java index 4c1b6bf7fe6..bde139f8f43 100644 --- a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/TreeViewerUtility.java +++ b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/TreeViewerUtility.java @@ -33,8 +33,8 @@ public class TreeViewerUtility { * @param treeViewer The tree to be traversed */ public static <A extends Object> void getPreorderSelection(TreeViewer treeViewer, List<A> selectedTreeItems) { - Map<A, Object> expansionHash = new HashMap<A, Object>(); - Map<A, Object> selectionHash = new HashMap<A, Object>(); + Map<A, Object> expansionHash = new HashMap<>(); + Map<A, Object> selectionHash = new HashMap<>(); populateSelectionHash(treeViewer, selectionHash); populateExpansionHash(treeViewer, expansionHash); traverseTree(((ITreeContentProvider) treeViewer.getContentProvider()).getChildren(treeViewer.getInput()), diff --git a/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/BundleCollection.java b/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/BundleCollection.java index 9fc6001c937..98d7304470f 100644 --- a/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/BundleCollection.java +++ b/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/BundleCollection.java @@ -20,8 +20,8 @@ import java.util.Map; public class BundleCollection { - Map<String, List<BundleInfoLite>> bundleByName = new HashMap<String, List<BundleInfoLite>>(); - Map<URL, BundleInfoLite> bundleByURL = new HashMap<URL, BundleInfoLite>(); + Map<String, List<BundleInfoLite>> bundleByName = new HashMap<>(); + Map<URL, BundleInfoLite> bundleByURL = new HashMap<>(); public BundleCollection(){ @@ -30,7 +30,7 @@ public class BundleCollection { public void add(BundleInfoLite bundle){ List<BundleInfoLite> bundles = bundleByName.get(bundle.getSymbolicName()); if(bundles == null){ - bundles = new ArrayList<BundleInfoLite>(); + bundles = new ArrayList<>(); bundleByName.put(bundle.getSymbolicName(), bundles); } bundles.add(bundle); @@ -46,7 +46,7 @@ public class BundleCollection { } public List<BundleInfoLite> getInstalledBundles() { - List<BundleInfoLite> bundles = new ArrayList<BundleInfoLite>(); + List<BundleInfoLite> bundles = new ArrayList<>(); for(BundleInfoLite info: bundleByURL.values()){ if(info.isInstalled()){ bundles.add(info); @@ -56,7 +56,7 @@ public class BundleCollection { } public List<BundleInfoLite> getLatestBundles() { - List<BundleInfoLite> latest = new ArrayList<BundleInfoLite>(); + List<BundleInfoLite> latest = new ArrayList<>(); for(List<BundleInfoLite> infolist:this.bundleByName.values()){ if(infolist.size() == 1){ latest.add(infolist.get(0)); diff --git a/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/FileChangeDetector.java b/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/FileChangeDetector.java index 8937d5dce43..976ebf7869e 100644 --- a/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/FileChangeDetector.java +++ b/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/FileChangeDetector.java @@ -28,7 +28,7 @@ public class FileChangeDetector { private final ConcurrentHashMap<URL, byte[]> bundleNameToMd5Map; public FileChangeDetector() { - bundleNameToMd5Map = new ConcurrentHashMap<URL, byte[]>(); + bundleNameToMd5Map = new ConcurrentHashMap<>(); } public boolean isChanged(URL url) { diff --git a/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/JarCollectionNature.java b/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/JarCollectionNature.java index 86e79862d04..e6b694f5b49 100644 --- a/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/JarCollectionNature.java +++ b/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/JarCollectionNature.java @@ -85,7 +85,7 @@ public class JarCollectionNature implements IProjectNature { } public Collection<URL> getBundles() { - Collection<URL> urls = new ArrayList<URL>(); + Collection<URL> urls = new ArrayList<>(); if (isClosing) { return urls; @@ -154,7 +154,7 @@ public class JarCollectionNature implements IProjectNature { IWorkspaceRoot workspaceRoot = workspace.getRoot(); IProject[] projects = workspaceRoot.getProjects(); - Collection<T> natures = new LinkedList<T>(); + Collection<T> natures = new LinkedList<>(); for (IProject project : projects) { if (project.isOpen()) { diff --git a/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/WorkspaceBundleLoadCoordinator.java b/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/WorkspaceBundleLoadCoordinator.java index 4967e6cb156..70b35f2fe29 100644 --- a/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/WorkspaceBundleLoadCoordinator.java +++ b/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/WorkspaceBundleLoadCoordinator.java @@ -79,7 +79,7 @@ public class WorkspaceBundleLoadCoordinator { private FrameworkWiring wiring; public WorkspaceBundleLoadCoordinator(File temporaryBundleLocationFolder) { - bundlesToCheck = new HashSet<String>(); + bundlesToCheck = new HashSet<>(); this.managedFolderArea = new ManagedFolderArea(temporaryBundleLocationFolder); managedFolderArea.initialize(); this.wiring = getFrameworkWiring(); @@ -277,7 +277,7 @@ public class WorkspaceBundleLoadCoordinator { } private Set<String> determineManagedViews(List<BundleInfoLite> uninstallList){ - Set<String> managedViewIds = new HashSet<String>(); + Set<String> managedViewIds = new HashSet<>(); IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry(); IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint("org.eclipse.ui.views"); IExtension[] extensions = extensionPoint.getExtensions(); @@ -353,7 +353,7 @@ public class WorkspaceBundleLoadCoordinator { private List<BundleInfoLite> determineDeltasBetweenBundlesToLoad() { - List<BundleInfoLite> bundlesToOperateOn = new ArrayList<BundleInfoLite>(); + List<BundleInfoLite> bundlesToOperateOn = new ArrayList<>(); for(String urlString:bundlesToCheck){ try { URL newURL; @@ -410,8 +410,8 @@ public class WorkspaceBundleLoadCoordinator { public synchronized void installLatestBundles(final IProgressMonitor subMonitor){ final List<BundleInfoLite> bundles = managedArea.getLatestBundles(); - Collection<Bundle> bundlesToRefresh = new ArrayList<Bundle>(); - List<BundleInfoLite> uninstallListAll = new ArrayList<BundleInfoLite>(); + Collection<Bundle> bundlesToRefresh = new ArrayList<>(); + List<BundleInfoLite> uninstallListAll = new ArrayList<>(); for(BundleInfoLite info:bundles){ if(!info.isInstalled()){ List<BundleInfoLite> uninstallList = managedArea.getByBundleName(info.getSymbolicName()); diff --git a/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/internal/ManagedFolderArea.java b/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/internal/ManagedFolderArea.java index cfa3fee6360..5e0c83ab5ea 100644 --- a/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/internal/ManagedFolderArea.java +++ b/plugins/org.eclipse.osee.framework.ui.workspacebundleloader/src/org/eclipse/osee/framework/ui/workspacebundleloader/internal/ManagedFolderArea.java @@ -66,7 +66,7 @@ public class ManagedFolderArea { } public List<BundleInfoLite> copyDeltasToManagedFolder(List<BundleInfoLite> copies) { - List<BundleInfoLite> bundlesAdded = new ArrayList<BundleInfoLite>(); + List<BundleInfoLite> bundlesAdded = new ArrayList<>(); for(BundleInfoLite info: copies){ File folder = new File(bundleLocationFolder, info.getSymbolicName()); folder.mkdirs(); diff --git a/plugins/org.eclipse.osee.framework.ui.ws/src/org/eclipse/osee/framework/ui/ws/AJavaProject.java b/plugins/org.eclipse.osee.framework.ui.ws/src/org/eclipse/osee/framework/ui/ws/AJavaProject.java index 26b2eb9e4a0..9b1e842625d 100644 --- a/plugins/org.eclipse.osee.framework.ui.ws/src/org/eclipse/osee/framework/ui/ws/AJavaProject.java +++ b/plugins/org.eclipse.osee.framework.ui.ws/src/org/eclipse/osee/framework/ui/ws/AJavaProject.java @@ -72,7 +72,7 @@ public final class AJavaProject { } public static ArrayList<File> getJavaProjectProjectDependancies(IJavaProject javaProject) { - ArrayList<File> urls = new ArrayList<File>(); + ArrayList<File> urls = new ArrayList<>(); try { IClasspathEntry[] paths = localGetResolvedClasspath(javaProject); for (int i = 0; i < paths.length; i++) { diff --git a/plugins/org.eclipse.osee.framework.ui.ws/src/org/eclipse/osee/framework/ui/ws/AWorkspace.java b/plugins/org.eclipse.osee.framework.ui.ws/src/org/eclipse/osee/framework/ui/ws/AWorkspace.java index c35c8fb76f6..d0d3ba5837c 100644 --- a/plugins/org.eclipse.osee.framework.ui.ws/src/org/eclipse/osee/framework/ui/ws/AWorkspace.java +++ b/plugins/org.eclipse.osee.framework.ui.ws/src/org/eclipse/osee/framework/ui/ws/AWorkspace.java @@ -192,7 +192,7 @@ public final class AWorkspace { public static IResource findWorkspaceFile(String fileName) { IContainer ws = ResourcesPlugin.getWorkspace().getRoot(); - List<IResource> resources = new ArrayList<IResource>(); + List<IResource> resources = new ArrayList<>(); recursiveFileFind(fileName, ws, resources); return !resources.isEmpty() ? resources.iterator().next() : null; } @@ -214,7 +214,7 @@ public final class AWorkspace { public static List<IResource> findWorkspaceFileMatch(String regex) { IContainer ws = ResourcesPlugin.getWorkspace().getRoot(); - List<IResource> resources = new ArrayList<IResource>(); + List<IResource> resources = new ArrayList<>(); recursiveFileFindMatch(regex, ws, resources); return resources; } diff --git a/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/JaxRsClientBuilderTest.java b/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/JaxRsClientBuilderTest.java index 5d69bc0827f..ec26a5405e7 100644 --- a/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/JaxRsClientBuilderTest.java +++ b/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/JaxRsClientBuilderTest.java @@ -342,7 +342,7 @@ public class JaxRsClientBuilderTest { @Test public void testDefaultProperties() { - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); builder.properties(properties); JaxRsClient actual = builder.build(); @@ -395,7 +395,7 @@ public class JaxRsClientBuilderTest { @Test public void testPropertiesDefaultsWithNegatives() { - Map<String, Object> props = new HashMap<String, Object>(); + Map<String, Object> props = new HashMap<>(); props.put(JAXRS_CLIENT_CONNECTION_TIMEOUT, NEGATIVE_TIMEOUT); props.put(JAXRS_CLIENT_RECEIVE_TIMEOUT, NEGATIVE_TIMEOUT); props.put(JAXRS_CLIENT_MAX_RETRANSMITS, NEGATIVE_INT); @@ -439,7 +439,7 @@ public class JaxRsClientBuilderTest { @Test public void testProperties() { - Map<String, Object> props = new HashMap<String, Object>(); + Map<String, Object> props = new HashMap<>(); props.put(JAXRS_CLIENT_ASYNC_EXECUTE_TIMEOUT, ASYNC_EXECUTE_TIMEOUT); props.put(JAXRS_CLIENT_ASYNC_EXECUTE_TIMEOUT_REJECTION, ASYNC_EXECUTE_TIMEOUT_REJECTION); props.put(JAXRS_CLIENT_CHUNK_SIZE, CHUNK_SIZE); diff --git a/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/internal/ext/CxfJaxRsClientConfiguratorTest.java b/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/internal/ext/CxfJaxRsClientConfiguratorTest.java index 6ca1be8f74e..2c1a1757f53 100644 --- a/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/internal/ext/CxfJaxRsClientConfiguratorTest.java +++ b/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/internal/ext/CxfJaxRsClientConfiguratorTest.java @@ -137,7 +137,7 @@ public class CxfJaxRsClientConfiguratorTest { configurator = new CxfJaxRsClientConfigurator(oauthFactory); - props = new LinkedHashMap<String, Object>(); + props = new LinkedHashMap<>(); props.put("a", "1"); props.put("b", "2"); props.put("c", "3"); diff --git a/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2FlowsTest.java b/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2FlowsTest.java index de9c202c730..4f8faa6bf64 100644 --- a/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2FlowsTest.java +++ b/plugins/org.eclipse.osee.jaxrs.client.test/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2FlowsTest.java @@ -141,7 +141,7 @@ public class OAuth2FlowsTest { permission.setDefault(true); List<? extends Permission> permissions = Arrays.asList(permission); - appProperties = new HashMap<String, String>(); + appProperties = new HashMap<>(); appProperties.put("prop1", "a"); appProperties.put("prop2", "b"); diff --git a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/CxfJaxRsClientConfigurator.java b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/CxfJaxRsClientConfigurator.java index 606ef758a42..19827d9ebf2 100644 --- a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/CxfJaxRsClientConfigurator.java +++ b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/CxfJaxRsClientConfigurator.java @@ -89,19 +89,19 @@ public final class CxfJaxRsClientConfigurator implements JaxRsClientConfigurator @Override public void configureDefaults(Map<String, Object> properties) { - List<Object> providers = new ArrayList<Object>(); + List<Object> providers = new ArrayList<>(); providers.add(new GenericResponseExceptionMapper()); providers.addAll(JacksonFeature.getProviders()); providers.addAll(OAuth2Util.getOAuthProviders()); this.providers = providers; - List<Feature> features = new ArrayList<Feature>(2); + List<Feature> features = new ArrayList<>(2); LoggingFeature loggingFeature = new LoggingFeature(); loggingFeature.setPrettyLogging(true); features.add(loggingFeature); features.add(new GZIPFeature()); this.features = features; - this.properties = new LinkedHashMap<String, Object>(properties); + this.properties = new LinkedHashMap<>(properties); } @Override diff --git a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Flows.java b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Flows.java index 7d6e527cc94..cda290cb4bf 100644 --- a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Flows.java +++ b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Flows.java @@ -99,7 +99,7 @@ public class OAuth2Flows { } public ClientAccessToken refreshFlow(ClientAccessToken data, String state) { - Map<String, String> extraParams = new HashMap<String, String>(); + Map<String, String> extraParams = new HashMap<>(); if (data.getParameters() != null) { extraParams.putAll(data.getParameters()); } @@ -180,7 +180,7 @@ public class OAuth2Flows { } protected ClientAccessToken exchangeCodeForToken(String sessionCookie, String authCode, String state, String scope, String redirectUri) { - Map<String, String> extraParams = new HashMap<String, String>(); + Map<String, String> extraParams = new HashMap<>(); if (state != null) { extraParams.put(OAuthConstants.STATE, state); } @@ -274,7 +274,7 @@ public class OAuth2Flows { @Override public List<? extends Permission> getPermissionsRequested() { if (permissions == null) { - List<Permission> permissions = new ArrayList<Permission>(); + List<Permission> permissions = new ArrayList<>(); for (org.apache.cxf.rs.security.oauth2.common.Permission perm : data.getPermissions()) { permissions.add(asPermission(perm)); } diff --git a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Util.java b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Util.java index 60df6adba57..f90ccfb4fef 100644 --- a/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Util.java +++ b/plugins/org.eclipse.osee.jaxrs.client/src/org/eclipse/osee/jaxrs/client/internal/ext/OAuth2Util.java @@ -39,7 +39,7 @@ public class OAuth2Util { public static List<Object> getOAuthProviders() { if (PROVIDERS == null) { - List<Object> providers = new ArrayList<Object>(); + List<Object> providers = new ArrayList<>(); providers.add(OAuth2Util.getOAuthJSONProvider()); providers.add(new OAuthContextProvider()); PROVIDERS = providers; diff --git a/plugins/org.eclipse.osee.jaxrs.server.test/src/org/eclipse/osee/jaxrs/server/internal/JaxRsConfigurationTest.java b/plugins/org.eclipse.osee.jaxrs.server.test/src/org/eclipse/osee/jaxrs/server/internal/JaxRsConfigurationTest.java index 7011916bf9a..79021f9e088 100644 --- a/plugins/org.eclipse.osee.jaxrs.server.test/src/org/eclipse/osee/jaxrs/server/internal/JaxRsConfigurationTest.java +++ b/plugins/org.eclipse.osee.jaxrs.server.test/src/org/eclipse/osee/jaxrs/server/internal/JaxRsConfigurationTest.java @@ -53,7 +53,7 @@ public class JaxRsConfigurationTest { @Test public void testDefaultProperties() { - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); builder.properties(properties); JaxRsConfiguration actual = builder.build(); @@ -63,7 +63,7 @@ public class JaxRsConfigurationTest { @Test public void testConfigProperties() { - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(JaxRsConstants.JAXRS_BASE_CONTEXT, BASE_CONTEXT_PATH); builder.properties(properties); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsAdminApplication.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsAdminApplication.java index 83ccc43ea21..10a2ea00058 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsAdminApplication.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsAdminApplication.java @@ -23,7 +23,7 @@ import org.eclipse.osee.jaxrs.server.internal.resources.JaxRsContributionsResour @ApplicationPath("jaxrs-admin") public class JaxRsAdminApplication extends Application { - private final Set<Object> singletons = new LinkedHashSet<Object>(); + private final Set<Object> singletons = new LinkedHashSet<>(); private JaxRsApplicationRegistry registry; private JaxRsResourceManager manager; diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsDynamicServiceManager.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsDynamicServiceManager.java index b8b059eda78..9dcb4116be7 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsDynamicServiceManager.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsDynamicServiceManager.java @@ -23,7 +23,7 @@ import org.osgi.framework.ServiceReference; */ public abstract class JaxRsDynamicServiceManager<T> { - private final List<ServiceReference<T>> pendingReg = new ArrayList<ServiceReference<T>>(); + private final List<ServiceReference<T>> pendingReg = new ArrayList<>(); private final AtomicReference<JaxRsApplicationRegistry> registryRef = new AtomicReference<JaxRsApplicationRegistry>(); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsResourceManager.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsResourceManager.java index 979382ab22d..4cc6398ae5b 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsResourceManager.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsResourceManager.java @@ -78,8 +78,8 @@ public final class JaxRsResourceManager implements BundleListener { } public void start(BundleContext context) { - pathToResource = new HashMap<String, Resource>(); - bundleToKey = new HashMap<Bundle, Set<String>>(); + pathToResource = new HashMap<>(); + bundleToKey = new HashMap<>(); context.addBundleListener(this); @@ -170,7 +170,7 @@ public final class JaxRsResourceManager implements BundleListener { } private List<MediaType> getMediaTypesToSearch(ContainerRequestContext requestContext) { - List<MediaType> acceptableMediaTypes = new ArrayList<MediaType>(); + List<MediaType> acceptableMediaTypes = new ArrayList<>(); MediaType mediaType = requestContext.getMediaType(); if (mediaType != null) { acceptableMediaTypes.add(mediaType); @@ -267,7 +267,7 @@ public final class JaxRsResourceManager implements BundleListener { if (resourceUrls != null && !resourceUrls.isEmpty()) { Set<String> paths = bundleToKey.get(bundle); if (paths == null) { - paths = new HashSet<String>(); + paths = new HashSet<>(); bundleToKey.put(bundle, paths); } for (URL url : resourceUrls) { @@ -283,7 +283,7 @@ public final class JaxRsResourceManager implements BundleListener { } private List<URL> findUrls(Bundle bundle, String headerValue, boolean recurse, String... resources) { - List<URL> resourceUrls = new ArrayList<URL>(); + List<URL> resourceUrls = new ArrayList<>(); for (String resource : resources) { int index = resource.lastIndexOf('/'); String path = index != -1 ? resource.substring(0, index) : "/"; diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/AbstractJaxRsApplicationContainer.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/AbstractJaxRsApplicationContainer.java index 3a712328818..e2e42efc812 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/AbstractJaxRsApplicationContainer.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/AbstractJaxRsApplicationContainer.java @@ -88,8 +88,8 @@ public abstract class AbstractJaxRsApplicationContainer implements JaxRsVisitabl } private final Application newCompositeApplication() { - final Set<Class<?>> classes = new LinkedHashSet<Class<?>>(); - final Set<Object> singletons = new LinkedHashSet<Object>(); + final Set<Class<?>> classes = new LinkedHashSet<>(); + final Set<Object> singletons = new LinkedHashSet<>(); for (JaxRsApplicationEntry appEntry : applications.values()) { Application application = appEntry.getApplication(); classes.addAll(application.getClasses()); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/AbstractJaxRsContainer.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/AbstractJaxRsContainer.java index 9be73fb362a..1208eeb3b81 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/AbstractJaxRsContainer.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/AbstractJaxRsContainer.java @@ -36,11 +36,11 @@ public abstract class AbstractJaxRsContainer<H extends HttpServlet, C extends Ab private final HttpService httpService; private final Dictionary<String, Object> props; - private final ConcurrentHashMap<String, C> applications = new ConcurrentHashMap<String, C>(); - private final ConcurrentHashMap<String, F> providers = new ConcurrentHashMap<String, F>(); + private final ConcurrentHashMap<String, C> applications = new ConcurrentHashMap<>(); + private final ConcurrentHashMap<String, F> providers = new ConcurrentHashMap<>(); - private final Map<String, String> componentToContext = new ConcurrentHashMap<String, String>(); - private final AtomicReference<String> servletContextName = new AtomicReference<String>(); + private final Map<String, String> componentToContext = new ConcurrentHashMap<>(); + private final AtomicReference<String> servletContextName = new AtomicReference<>(); private final AtomicBoolean isRegistered = new AtomicBoolean(false); private volatile H baseJaxsRsServlet; diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/exceptions/JaxRsExceptions.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/exceptions/JaxRsExceptions.java index 3a802ea9791..06b553ad1c1 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/exceptions/JaxRsExceptions.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/exceptions/JaxRsExceptions.java @@ -43,7 +43,7 @@ public final class JaxRsExceptions { * Create exception handling providers */ public static List<?> newExceptionProviders(Log logger) { - List<Object> providers = new ArrayList<Object>(); + List<Object> providers = new ArrayList<>(); providers.add(new ErrorResponseMessageBodyWriter()); providers.add(new GenericExceptionMapper(logger)); providers.add(new ForbiddenExceptionMapper(logger)); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/CxfJaxRsFactory.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/CxfJaxRsFactory.java index aa2aa66c58b..38d73577f70 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/CxfJaxRsFactory.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/CxfJaxRsFactory.java @@ -76,7 +76,7 @@ public final class CxfJaxRsFactory implements JaxRsFactory { RuntimeDelegate runtimeDelegate = new org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl(); RuntimeDelegate.setInstance(runtimeDelegate); - List<Object> providers = new ArrayList<Object>(); + List<Object> providers = new ArrayList<>(); WebApplicationExceptionMapper waem = new WebApplicationExceptionMapper(); waem.setPrintStackTrace(true); waem.setAddMessageToResponse(true); @@ -86,7 +86,7 @@ public final class CxfJaxRsFactory implements JaxRsFactory { providers.addAll(JacksonFeature.getProviders()); this.providers = providers; - List<Feature> features = new ArrayList<Feature>(); + List<Feature> features = new ArrayList<>(); LoggingFeature loggingFeature = new LoggingFeature(); loggingFeature.setPrettyLogging(true); @@ -94,7 +94,7 @@ public final class CxfJaxRsFactory implements JaxRsFactory { features.add(new GZIPFeature()); this.features = features; - Map<Object, Object> extensionMappings = new HashMap<Object, Object>(6); + Map<Object, Object> extensionMappings = new HashMap<>(6); extensionMappings.put("html", MediaType.TEXT_HTML); extensionMappings.put("txt", MediaType.TEXT_PLAIN); extensionMappings.put("xml", MediaType.APPLICATION_XML); @@ -145,7 +145,7 @@ public final class CxfJaxRsFactory implements JaxRsFactory { @Override public JaxRsContainer newJaxRsContainer(String contextName) { - Dictionary<String, Object> props = new Hashtable<String, Object>(); + Dictionary<String, Object> props = new Hashtable<>(); CxfJaxRsContainer container = new CxfJaxRsContainer(logger, httpService, props); container.setServletContext(contextName); logger.trace("Create - [%s]", container); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/RestResourceConcatenator.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/RestResourceConcatenator.java index 98e779a01cd..7aec6fba6b1 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/RestResourceConcatenator.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/ext/RestResourceConcatenator.java @@ -27,7 +27,7 @@ import com.google.common.io.InputSupplier; * @author David W. Miller */ public class RestResourceConcatenator { - private final Set<String> resources = new HashSet<String>(); + private final Set<String> resources = new HashSet<>(); private String header; private String footer; private Pattern resourcePattern = null; diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/mvc/ViewModelWriter.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/mvc/ViewModelWriter.java index 8931a70e16b..9de67a67b00 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/mvc/ViewModelWriter.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/mvc/ViewModelWriter.java @@ -123,7 +123,7 @@ public class ViewModelWriter implements MessageBodyWriter<ViewModel> { } private static <T> List<T> getAnnotations(Method method, Class<T> clazz) { - List<T> annotations = new ArrayList<T>(); + List<T> annotations = new ArrayList<>(); if (method != null) { for (Annotation annotation : method.getAnnotations()) { if (annotation.annotationType().isAssignableFrom(clazz)) { @@ -137,7 +137,7 @@ public class ViewModelWriter implements MessageBodyWriter<ViewModel> { } private static List<MediaType> getMediaTypesProduced(ResourceInfo resourceInfo) { - ArrayList<MediaType> produces = new ArrayList<MediaType>(); + ArrayList<MediaType> produces = new ArrayList<>(); boolean hasText = false; Method method = resourceInfo.getResourceMethod(); @@ -165,7 +165,7 @@ public class ViewModelWriter implements MessageBodyWriter<ViewModel> { private static <T> ResolvedView<T> newResolved(ViewResolver<T> resolver, Class<?> resourceClass, MediaType mediaType, ViewModel model, T viewReference) { String viewId = model.getViewId(); - ResolvedView<T> toReturn = new ResolvedView<T>(viewId, resolver, mediaType, viewReference); + ResolvedView<T> toReturn = new ResolvedView<>(viewId, resolver, mediaType, viewReference); toReturn.asMap().putAll(model.asMap()); return toReturn; } diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/resources/JaxRsContributionsResource.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/resources/JaxRsContributionsResource.java index 73ae6ffd617..5111c69ec49 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/resources/JaxRsContributionsResource.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/resources/JaxRsContributionsResource.java @@ -75,7 +75,7 @@ public class JaxRsContributionsResource { @GET @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Collection<JaxRsContributionInfo> getContributionDetails(final @Context UriInfo uriInfo) { - final Map<String, JaxRsContributionInfo> contribs = new HashMap<String, JaxRsContributionInfo>(); + final Map<String, JaxRsContributionInfo> contribs = new HashMap<>(); visitable.accept(new JaxRsVisitor() { @Override public void onApplication(String applicationContext, String componentName, Bundle bundle, Application application) { diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/OAuthUtil.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/OAuthUtil.java index f60f8d9aaa5..9100614869d 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/OAuthUtil.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/OAuthUtil.java @@ -166,7 +166,7 @@ public final class OAuthUtil { private static final String SUBJECT_OSEE_GUID = "osee.guid"; public static UserSubject newUserSubject(OseePrincipal subject) { - List<String> roles = new ArrayList<String>(); + List<String> roles = new ArrayList<>(); for (String role : subject.getRoles()) { roles.add(role); } @@ -175,7 +175,7 @@ public final class OAuthUtil { data.setLogin(subject.getUserName()); data.setRoles(roles); - Map<String, String> properties = new HashMap<String, String>(); + Map<String, String> properties = new HashMap<>(); properties.put(SUBJECT_USERNAME, subject.getUserName()); String displayName = subject.getDisplayName(); if (displayName.contains(",")) { @@ -193,7 +193,7 @@ public final class OAuthUtil { public static OseePrincipal newOseePrincipal(UserSubject subject) { Long id = getUserSubjectUuid(subject); - Set<String> roles = new LinkedHashSet<String>(); + Set<String> roles = new LinkedHashSet<>(); List<String> sRoles = subject.getRoles(); if (sRoles != null) { roles.addAll(sRoles); @@ -228,7 +228,7 @@ public final class OAuthUtil { String name = principal != null ? principal.getName() : "UNKNOWN"; List<String> roleNames = Collections.emptyList(); if (securityContext instanceof LoginSecurityContext) { - roleNames = new ArrayList<String>(); + roleNames = new ArrayList<>(); Set<Principal> roles = ((LoginSecurityContext) securityContext).getUserRoles(); for (Principal p : roles) { roleNames.add(p.getName()); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/OseeOAuthContextProvider.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/OseeOAuthContextProvider.java index 4c2ebaca36e..c5ed666f75f 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/OseeOAuthContextProvider.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/OseeOAuthContextProvider.java @@ -111,7 +111,7 @@ public class OseeOAuthContextProvider implements ContextProvider<OseeOAuthContex List<OseePermission> perms = Collections.emptyList(); List<OAuthPermission> permissions = ctx.getPermissions(); if (permissions != null && !permissions.isEmpty()) { - perms = new ArrayList<OseePermission>(); + perms = new ArrayList<>(); for (OAuthPermission permission : permissions) { perms.add(newPermission(permission)); } diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2ServerProvider.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2ServerProvider.java index 5003b2fdf09..926ccb0db78 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2ServerProvider.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OAuth2ServerProvider.java @@ -72,7 +72,7 @@ public class OAuth2ServerProvider { private static final String OAUTH2_APPLICATION_COMPONENT_NAME = qualify("application"); - private final Set<String> registeredProviders = new HashSet<String>(); + private final Set<String> registeredProviders = new HashSet<>(); private List<String> audiences; private OAuth2DataProvider dataProvider; private NonceVerifier nonceVerifier; @@ -154,7 +154,7 @@ public class OAuth2ServerProvider { filter = new OAuth2RequestFilter(logger, resourceManager, subjectProvider); bind(filter, dataProvider); - endpoints = new HashSet<Object>(); + endpoints = new HashSet<>(); endpoints.add(bind(new AccessTokenService(), dataProvider)); endpoints.add(bind(new TokenRevocationService(), dataProvider)); @@ -175,13 +175,13 @@ public class OAuth2ServerProvider { application = new OAuth2Application(endpoints); - grantHandlers = new ArrayList<AccessTokenGrantHandler>(); + grantHandlers = new ArrayList<>(); grantHandlers.add(bind(new AuthorizationCodeGrantHandler(), dataProvider, new DigestCodeVerifier())); grantHandlers.add(bind(new ClientCredentialsGrantHandler(), dataProvider)); grantHandlers.add(bind(new ResourceOwnerGrantHandler(), dataProvider, subjectProvider)); grantHandlers.add(bind(new RefreshTokenGrantHandler(), dataProvider)); - tokenValidators = new ArrayList<AccessTokenValidator>(); + tokenValidators = new ArrayList<>(); if (config.isHawkTokenSupported()) { NonceVerifierImpl nonceVerifier = new NonceVerifierImpl(); NonceStore nonceStore = null; diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OseeAnnotationsInterceptor.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OseeAnnotationsInterceptor.java index a72f1b6138d..9a67bdfd516 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OseeAnnotationsInterceptor.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/OseeAnnotationsInterceptor.java @@ -35,7 +35,7 @@ public class OseeAnnotationsInterceptor extends SecureAnnotationsInterceptor { } private void initRoles(Class<?> clazz) { - Map<String, String> rolesMap = new HashMap<String, String>(); + Map<String, String> rolesMap = new HashMap<>(); findRoles(clazz, rolesMap); super.setMethodRolesMap(rolesMap); } diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/OAuthEncryption.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/OAuthEncryption.java index 42093f3ad52..6101ab893c7 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/OAuthEncryption.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/adapters/OAuthEncryption.java @@ -144,7 +144,7 @@ public class OAuthEncryption { } private static Map<String, String> parseSimpleMap(String mapStr) { - Map<String, String> props = new HashMap<String, String>(); + Map<String, String> props = new HashMap<>(); List<String> entries = parseSimpleList(mapStr); for (String entry : entries) { String[] pair = entry.split("="); @@ -204,7 +204,7 @@ public class OAuthEncryption { // Permissions if (!parts[9].trim().isEmpty()) { - List<OAuthPermission> perms = new LinkedList<OAuthPermission>(); + List<OAuthPermission> perms = new LinkedList<>(); String[] allPermParts = parts[9].split("&"); for (int i = 0; i + 4 < allPermParts.length; i = i + 5) { OAuthPermission perm = new OAuthPermission(allPermParts[i], allPermParts[i + 1]); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/ClientFormData.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/ClientFormData.java index c57814439d8..0a763c110c3 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/ClientFormData.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/ClientFormData.java @@ -29,7 +29,7 @@ public class ClientFormData extends BaseIdentity<String> implements Named { private String description; private String webUri; private String logoUri; - private List<String> certificates = new LinkedList<String>(); + private List<String> certificates = new LinkedList<>(); private List<String> redirectUris; @@ -37,11 +37,11 @@ public class ClientFormData extends BaseIdentity<String> implements Named { private Map<String, String> logoParameters; private boolean isConfidential; - private List<String> allowedGrantTypes = new LinkedList<String>(); - private List<String> allowedScopes = new LinkedList<String>(); - private List<String> allowedAudiences = new LinkedList<String>(); + private List<String> allowedGrantTypes = new LinkedList<>(); + private List<String> allowedScopes = new LinkedList<>(); + private List<String> allowedAudiences = new LinkedList<>(); - private Map<String, String> properties = new HashMap<String, String>(); + private Map<String, String> properties = new HashMap<>(); public ClientFormData(String id) { super(id); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/ClientRegistrationEndpoint.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/ClientRegistrationEndpoint.java index 1f6076338da..c0bd749c0d3 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/ClientRegistrationEndpoint.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/provider/endpoints/ClientRegistrationEndpoint.java @@ -164,7 +164,7 @@ public class ClientRegistrationEndpoint extends AbstractClientService { private List<String> parseMultilined(String rawData) { List<String> toReturn = Collections.emptyList(); if (Strings.isValid(rawData)) { - toReturn = new ArrayList<String>(); + toReturn = new ArrayList<>(); String[] entries = rawData.split("\\s+"); for (String entry : entries) { entry = entry.trim(); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/rs/OAuth2ResourceServer.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/rs/OAuth2ResourceServer.java index 3fb6c86650d..d3e1914ee64 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/rs/OAuth2ResourceServer.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/oauth2/rs/OAuth2ResourceServer.java @@ -31,7 +31,7 @@ public class OAuth2ResourceServer { private JaxRsApplicationRegistry registry; - private final Set<String> registeredProviders = new HashSet<String>(); + private final Set<String> registeredProviders = new HashSet<>(); private final AtomicBoolean wasRegistered = new AtomicBoolean(); private volatile JaxRsOAuthResourceServerFilter filter; private volatile List<String> audiences; diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/util/CustomSecurityContextImpl.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/util/CustomSecurityContextImpl.java index f66bace8001..8cfe41ad37d 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/util/CustomSecurityContextImpl.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/util/CustomSecurityContextImpl.java @@ -93,7 +93,7 @@ public class CustomSecurityContextImpl implements SecurityContext, Serializable Set<String> roles; String allRoles = in.readUTF(); if (Strings.isValid(allRoles)) { - roles = new LinkedHashSet<String>(); + roles = new LinkedHashSet<>(); for (String role : allRoles.split(",")) { roles.add(role); } @@ -117,7 +117,7 @@ public class CustomSecurityContextImpl implements SecurityContext, Serializable Map<String, String> props; String allProps = in.readUTF(); if (Strings.isValid(allProps)) { - props = new LinkedHashMap<String, String>(); + props = new LinkedHashMap<>(); String key = null; for (String value : allProps.split(",")) { if (key == null) { diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/util/HiddenFormFields.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/util/HiddenFormFields.java index fd07f49e520..63f6b20d45e 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/util/HiddenFormFields.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/util/HiddenFormFields.java @@ -21,7 +21,7 @@ import org.eclipse.osee.framework.jdk.core.util.Strings; */ public final class HiddenFormFields { - private final Map<String, String> data = new HashMap<String, String>(); + private final Map<String, String> data = new HashMap<>(); public static HiddenFormFields newForm() { return new HiddenFormFields(); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/util/InputFields.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/util/InputFields.java index 825fdc60803..2101527f020 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/util/InputFields.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/security/util/InputFields.java @@ -64,7 +64,7 @@ public final class InputFields { return new InputFields(ContainerType.FORM_GROUP, false); } - private final Map<String, Data> data = new LinkedHashMap<String, Data>(); + private final Map<String, Data> data = new LinkedHashMap<>(); private final ContainerType containerType; private final boolean wrapInContainer; diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/security/JaxRsOAuth.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/security/JaxRsOAuth.java index 6f9bc71e643..0373529301b 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/security/JaxRsOAuth.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/security/JaxRsOAuth.java @@ -32,7 +32,7 @@ public final class JaxRsOAuth { public static List<? extends Object> getOAuthProviders() { if (OAUTH_PROVIDERS == null) { - List<Object> providers = new ArrayList<Object>(); + List<Object> providers = new ArrayList<>(); providers.add(new OAuthJSONProvider()); providers.add(new OAuthContextProvider()); providers.add(new OseeOAuthContextProvider()); diff --git a/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JacksonFeature.java b/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JacksonFeature.java index 61e14c904d6..9a48a4f2df3 100644 --- a/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JacksonFeature.java +++ b/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JacksonFeature.java @@ -84,7 +84,7 @@ public class JacksonFeature implements Feature { } public static List<? extends Object> getProviders() { - List<Object> providers = new ArrayList<Object>(); + List<Object> providers = new ArrayList<>(); providers.add(JacksonFeature.newJacksonJsonProvider()); providers.add(JsonParseExceptionMapper.class); providers.add(JsonMappingExceptionMapper.class); diff --git a/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JaxRsContributionInfo.java b/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JaxRsContributionInfo.java index 71118262fef..36baaa747be 100644 --- a/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JaxRsContributionInfo.java +++ b/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JaxRsContributionInfo.java @@ -53,7 +53,7 @@ public class JaxRsContributionInfo { @XmlElement public Set<ApplicationInfo> getApplications() { if (applications == null) { - applications = new TreeSet<ApplicationInfo>(); + applications = new TreeSet<>(); } return applications; } @@ -65,7 +65,7 @@ public class JaxRsContributionInfo { @XmlElement public Set<String> getProviders() { if (providers == null) { - providers = new TreeSet<String>(); + providers = new TreeSet<>(); } return providers; } @@ -77,7 +77,7 @@ public class JaxRsContributionInfo { @XmlElement public Set<String> getStaticResources() { if (staticResources == null) { - staticResources = new TreeSet<String>(); + staticResources = new TreeSet<>(); } return staticResources; } diff --git a/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JaxRsTemplateContribution.java b/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JaxRsTemplateContribution.java index 741f8bdba91..e9fa7b808a5 100644 --- a/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JaxRsTemplateContribution.java +++ b/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JaxRsTemplateContribution.java @@ -47,7 +47,7 @@ public class JaxRsTemplateContribution { @XmlElement public Set<JaxRsTemplateLink> getTemplates() { if (templates == null) { - templates = new TreeSet<JaxRsTemplateLink>(); + templates = new TreeSet<>(); } return templates; } diff --git a/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JaxRsTemplateInfo.java b/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JaxRsTemplateInfo.java index 71a7aa3eccd..87df63692ac 100644 --- a/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JaxRsTemplateInfo.java +++ b/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JaxRsTemplateInfo.java @@ -24,7 +24,7 @@ public class JaxRsTemplateInfo extends JaxRsTemplateId { public Set<String> getAttributes() { if (attributes == null) { - attributes = new TreeSet<String>(); + attributes = new TreeSet<>(); } return attributes; } diff --git a/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/mvc/JaxRsMvcUtils.java b/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/mvc/JaxRsMvcUtils.java index 0bc0bc25b3f..50d0ce06f11 100644 --- a/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/mvc/JaxRsMvcUtils.java +++ b/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/mvc/JaxRsMvcUtils.java @@ -44,11 +44,11 @@ public final class JaxRsMvcUtils { if (charset != null) { encoding = Charset.forName(charset); } else { - HashMap<String, String> params = new HashMap<String, String>(mediaType.getParameters()); + HashMap<String, String> params = new HashMap<>(mediaType.getParameters()); params.put(MediaType.CHARSET_PARAMETER, encoding.name()); contentType = new MediaType(mediaType.getType(), mediaType.getSubtype(), params); } - ArrayList<Object> typeList = new ArrayList<Object>(1); + ArrayList<Object> typeList = new ArrayList<>(1); typeList.add(contentType.toString()); httpHeaders.put(HttpHeaders.CONTENT_TYPE, typeList); return encoding; diff --git a/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/JdbcReadWriteTest.java b/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/JdbcReadWriteTest.java index 7ebee8158d6..7954e241c9f 100644 --- a/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/JdbcReadWriteTest.java +++ b/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/JdbcReadWriteTest.java @@ -95,7 +95,7 @@ public class JdbcReadWriteTest { client.migrate(new JdbcMigrationOptions(true, true), Collections.singleton(migrationResource)); client.runBatchUpdate("insert into books (id, title, author) values (?,?,?)", Arrays.asList(DB_DATA)); - List<Book> books = new ArrayList<Book>(); + List<Book> books = new ArrayList<>(); client.runQuery(newBookProcessor(books), "select * from books"); assertEquals(4, books.size()); diff --git a/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/internal/osgi/JdbcComponentFactoryTest.java b/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/internal/osgi/JdbcComponentFactoryTest.java index e3ce2f9345b..745a745fe3f 100644 --- a/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/internal/osgi/JdbcComponentFactoryTest.java +++ b/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/internal/osgi/JdbcComponentFactoryTest.java @@ -258,7 +258,7 @@ public class JdbcComponentFactoryTest { } private static Map<String, Object> map(Object... keyVals) { - Map<String, Object> data = new HashMap<String, Object>(); + Map<String, Object> data = new HashMap<>(); String key = null; boolean isKey = true; for (Object keyVal : keyVals) { diff --git a/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/internal/osgi/JdbcSvcCfgChangeTypeTest.java b/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/internal/osgi/JdbcSvcCfgChangeTypeTest.java index 351a2067b11..004322da1be 100644 --- a/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/internal/osgi/JdbcSvcCfgChangeTypeTest.java +++ b/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/internal/osgi/JdbcSvcCfgChangeTypeTest.java @@ -55,7 +55,7 @@ public class JdbcSvcCfgChangeTypeTest { @Parameters public static Collection<Object[]> data() { - List<Object[]> tests = new ArrayList<Object[]>(); + List<Object[]> tests = new ArrayList<>(); //@formatter:off tests.add(row(NO_CHANGE, map("a", "1"), map("a", "1"))); @@ -76,7 +76,7 @@ public class JdbcSvcCfgChangeTypeTest { } private static Map<String, Object> map(Object... keyVals) { - Map<String, Object> data = new HashMap<String, Object>(); + Map<String, Object> data = new HashMap<>(); String key = null; boolean isKey = true; for (Object keyVal : keyVals) { diff --git a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/JdbcClientBuilder.java b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/JdbcClientBuilder.java index 9e072aefa45..4d69a8382e0 100644 --- a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/JdbcClientBuilder.java +++ b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/JdbcClientBuilder.java @@ -99,7 +99,7 @@ public final class JdbcClientBuilder extends JdbcClientConfig { } private JdbcConnectionProvider getConnectionProvider(JdbcPoolConfig poolConfig) { - Map<String, JdbcConnectionFactory> factories = new ConcurrentHashMap<String, JdbcConnectionFactory>(); + Map<String, JdbcConnectionFactory> factories = new ConcurrentHashMap<>(); JdbcConnectionFactoryManager manager = new JdbcConnectionFactoryManager(factories); JdbcConnectionProvider connectionProvider; diff --git a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/SQL3DataType.java b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/SQL3DataType.java index 52af19d5ddf..c552d8969b2 100644 --- a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/SQL3DataType.java +++ b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/SQL3DataType.java @@ -54,7 +54,7 @@ public enum SQL3DataType { private Class<?> javaClassEquivalent; private int sqlTypeNumber; - private static HashMap<Integer, SQL3DataType> typeToEnum = new HashMap<Integer, SQL3DataType>(); + private static HashMap<Integer, SQL3DataType> typeToEnum = new HashMap<>(); private SQL3DataType(int sqlTypeNumber, Class<?> classEquiv) { this.javaClassEquivalent = classEquiv; diff --git a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcClientImpl.java b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcClientImpl.java index d70e17ebdc6..59c1015428b 100644 --- a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcClientImpl.java +++ b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcClientImpl.java @@ -465,7 +465,7 @@ public final class JdbcClientImpl implements JdbcClient { @Override public List<IVariantData> runQuery(String query, Object... data) { - List<IVariantData> toReturn = new ArrayList<IVariantData>(); + List<IVariantData> toReturn = new ArrayList<>(); runQuery(new JdbcVariantDataProcessor(toReturn), query, data); return toReturn; } diff --git a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcMigration.java b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcMigration.java index 7880d9906cd..0eee71ebd50 100644 --- a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcMigration.java +++ b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcMigration.java @@ -41,7 +41,7 @@ public class JdbcMigration { public void migrate(JdbcMigrationOptions options, Iterable<JdbcMigrationResource> migrations) { try { - ArrayList<String> allPaths = new ArrayList<String>(); + ArrayList<String> allPaths = new ArrayList<>(); if (options.isBaselineOnMigration()) { baselineOnMigrate(); } diff --git a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcSequenceProvider.java b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcSequenceProvider.java index 5a877a73aaa..71ac08dc0e3 100644 --- a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcSequenceProvider.java +++ b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcSequenceProvider.java @@ -23,7 +23,7 @@ import org.eclipse.osee.jdbc.JdbcTransaction; */ public class JdbcSequenceProvider { - private final HashMap<String, SequenceRange> sequences = new HashMap<String, SequenceRange>(30); + private final HashMap<String, SequenceRange> sequences = new HashMap<>(30); public synchronized void invalidate() { sequences.clear(); diff --git a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/PoolFactory.java b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/PoolFactory.java index e4c287e10ee..50ee2ff9cf7 100644 --- a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/PoolFactory.java +++ b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/PoolFactory.java @@ -50,7 +50,7 @@ public class PoolFactory { } public Map<String, String> getPoolStats() { - Map<String, String> stats = new LinkedHashMap<String, String>(); + Map<String, String> stats = new LinkedHashMap<>(); PoolingDriver driver = poolingDriver.get(); diff --git a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/dbsupport/hsql/HsqlJdbcServer.java b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/dbsupport/hsql/HsqlJdbcServer.java index 7fea9ab4cc9..4dfa73c37b9 100644 --- a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/dbsupport/hsql/HsqlJdbcServer.java +++ b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/dbsupport/hsql/HsqlJdbcServer.java @@ -24,7 +24,7 @@ public final class HsqlJdbcServer implements JdbcServer { private final JdbcLogger logger; private final JdbcServerConfig config; - private final AtomicReference<HsqlServerDelegate> serverRef = new AtomicReference<HsqlServerDelegate>(); + private final AtomicReference<HsqlServerDelegate> serverRef = new AtomicReference<>(); private final AtomicBoolean wasStarted = new AtomicBoolean(false); public HsqlJdbcServer(JdbcLogger logger, JdbcServerConfig config) { diff --git a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcServiceConfig.java b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcServiceConfig.java index f909ab1c1b1..1d5ae9942d7 100644 --- a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcServiceConfig.java +++ b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcServiceConfig.java @@ -24,7 +24,7 @@ import org.eclipse.osee.jdbc.internal.JdbcUtil; */ public class JdbcServiceConfig { - private final Map<String, Object> data = new LinkedHashMap<String, Object>(); + private final Map<String, Object> data = new LinkedHashMap<>(); public String getId() { return JdbcUtil.getServiceId(data); @@ -39,7 +39,7 @@ public class JdbcServiceConfig { } public Dictionary<String, Object> asDictionary() { - Dictionary<String, Object> toReturn = new Hashtable<String, Object>(); + Dictionary<String, Object> toReturn = new Hashtable<>(); for (Entry<String, Object> entry : data.entrySet()) { toReturn.put(entry.getKey(), entry.getValue()); } diff --git a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcServiceConfigParser.java b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcServiceConfigParser.java index 9c42e17008c..580ad5ecac3 100644 --- a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcServiceConfigParser.java +++ b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcServiceConfigParser.java @@ -31,10 +31,10 @@ import org.json.JSONObject; public final class JdbcServiceConfigParser { public Map<String, JdbcServiceConfig> parse(String source) { - Map<String, JdbcServiceConfig> toReturn = new LinkedHashMap<String, JdbcServiceConfig>(); + Map<String, JdbcServiceConfig> toReturn = new LinkedHashMap<>(); if (Strings.isValid(source)) { try { - Set<String> allBindings = new HashSet<String>(); + Set<String> allBindings = new HashSet<>(); JSONArray array = new JSONArray(source); for (int index = 0; index < array.length(); index++) { JSONObject object = array.getJSONObject(index); @@ -69,7 +69,7 @@ public final class JdbcServiceConfigParser { } private Dictionary<String, Object> asDictionary(JSONObject object) throws JSONException { - Dictionary<String, Object> toReturn = new Hashtable<String, Object>(); + Dictionary<String, Object> toReturn = new Hashtable<>(); String[] names = JSONObject.getNames(object); for (String key : names) { Object value = object.get(key); @@ -84,7 +84,7 @@ public final class JdbcServiceConfigParser { } private Set<String> asSet(String key, JSONArray array) throws JSONException { - Set<String> toReturn = new TreeSet<String>(); + Set<String> toReturn = new TreeSet<>(); for (int index = 0; index < array.length(); index++) { String name = array.getString(index); if (Strings.isValid(name)) { diff --git a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcServiceImpl.java b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcServiceImpl.java index 402b62ca91d..aa1b2acec9d 100644 --- a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcServiceImpl.java +++ b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcServiceImpl.java @@ -35,8 +35,8 @@ import org.eclipse.osee.logger.Log; */ public class JdbcServiceImpl implements JdbcService { - private final AtomicReference<JdbcServer> serverRef = new AtomicReference<JdbcServer>(); - private final AtomicReference<JdbcClient> clientRef = new AtomicReference<JdbcClient>(); + private final AtomicReference<JdbcServer> serverRef = new AtomicReference<>(); + private final AtomicReference<JdbcClient> clientRef = new AtomicReference<>(); private final JdbcClient clientProxy = createClientProxy(); diff --git a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcSvcCfgChangeType.java b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcSvcCfgChangeType.java index 0c51532dec2..5f3e4ce65c2 100644 --- a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcSvcCfgChangeType.java +++ b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcSvcCfgChangeType.java @@ -71,7 +71,7 @@ public enum JdbcSvcCfgChangeType { } private static Map<String, Object> jdbcEntries(Map<String, Object> original) { - Map<String, Object> toReturn = new HashMap<String, Object>(); + Map<String, Object> toReturn = new HashMap<>(); for (Entry<String, Object> entry : original.entrySet()) { if (entry.getKey().startsWith(JdbcConstants.NAMESPACE)) { toReturn.put(entry.getKey(), entry.getValue()); diff --git a/plugins/org.eclipse.osee.mail.api/src/org/eclipse/osee/mail/api/MailMessage.java b/plugins/org.eclipse.osee.mail.api/src/org/eclipse/osee/mail/api/MailMessage.java index 86074f7d702..38dc8729bf3 100644 --- a/plugins/org.eclipse.osee.mail.api/src/org/eclipse/osee/mail/api/MailMessage.java +++ b/plugins/org.eclipse.osee.mail.api/src/org/eclipse/osee/mail/api/MailMessage.java @@ -34,13 +34,13 @@ public class MailMessage { private String from; @XmlElement - private final Collection<String> replyToAddress = new LinkedHashSet<String>(); + private final Collection<String> replyToAddress = new LinkedHashSet<>(); @XmlElement - private final Collection<String> recepientAddresses = new LinkedHashSet<String>(); + private final Collection<String> recepientAddresses = new LinkedHashSet<>(); @XmlTransient - private final List<DataHandler> attachments = new ArrayList<DataHandler>(); + private final List<DataHandler> attachments = new ArrayList<>(); public void setId(String id) { this.id = id; @@ -109,9 +109,9 @@ public class MailMessage { private String subject; private String from; - private final Collection<String> replyTos = new LinkedHashSet<String>(); - private final Collection<String> recipients = new LinkedHashSet<String>(); - private final List<DataHandler> attachments = new ArrayList<DataHandler>(); + private final Collection<String> replyTos = new LinkedHashSet<>(); + private final Collection<String> recipients = new LinkedHashSet<>(); + private final List<DataHandler> attachments = new ArrayList<>(); public MailMessage build() { MailMessage message = new MailMessage(); diff --git a/plugins/org.eclipse.osee.mail.api/src/org/eclipse/osee/mail/api/MailStatus.java b/plugins/org.eclipse.osee.mail.api/src/org/eclipse/osee/mail/api/MailStatus.java index 6e41e7d7c0c..2debea3af24 100644 --- a/plugins/org.eclipse.osee.mail.api/src/org/eclipse/osee/mail/api/MailStatus.java +++ b/plugins/org.eclipse.osee.mail.api/src/org/eclipse/osee/mail/api/MailStatus.java @@ -27,10 +27,10 @@ public class MailStatus { private Date dateSent; private boolean verified; - private final Set<String> fromAddress = new HashSet<String>(); - private final Set<String> invalidAddress = new HashSet<String>(); - private final Set<String> sentAddress = new HashSet<String>(); - private final Set<String> unsentAddress = new HashSet<String>(); + private final Set<String> fromAddress = new HashSet<>(); + private final Set<String> invalidAddress = new HashSet<>(); + private final Set<String> sentAddress = new HashSet<>(); + private final Set<String> unsentAddress = new HashSet<>(); public void setUuid(String uuid) { this.uuid = uuid; diff --git a/plugins/org.eclipse.osee.mail.test/src/org/eclipse/osee/mail/internal/MailConfigurationTest.java b/plugins/org.eclipse.osee.mail.test/src/org/eclipse/osee/mail/internal/MailConfigurationTest.java index 0d7fe2f1eb7..b8f815c5627 100644 --- a/plugins/org.eclipse.osee.mail.test/src/org/eclipse/osee/mail/internal/MailConfigurationTest.java +++ b/plugins/org.eclipse.osee.mail.test/src/org/eclipse/osee/mail/internal/MailConfigurationTest.java @@ -138,7 +138,7 @@ public class MailConfigurationTest { @Test public void testDefaultProperties() { - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); builder.properties(properties); MailConfiguration actual = builder.build(); @@ -157,7 +157,7 @@ public class MailConfigurationTest { @Test public void testConfigProperties() { - Map<String, Object> properties = new HashMap<String, Object>(); + Map<String, Object> properties = new HashMap<>(); properties.put(MAIL_SERVER_ADMIN_EMAIL, ADMIN_EMAIL); properties.put(MAIL_SERVER_HOST, HOST); properties.put(MAIL_SERVER_PASSWORD, PASSWORD); diff --git a/plugins/org.eclipse.osee.mail.test/src/org/eclipse/osee/mail/internal/MailMessageTest.java b/plugins/org.eclipse.osee.mail.test/src/org/eclipse/osee/mail/internal/MailMessageTest.java index a5d174954ff..22bd023f7c8 100644 --- a/plugins/org.eclipse.osee.mail.test/src/org/eclipse/osee/mail/internal/MailMessageTest.java +++ b/plugins/org.eclipse.osee.mail.test/src/org/eclipse/osee/mail/internal/MailMessageTest.java @@ -80,7 +80,7 @@ public class MailMessageTest { @org.junit.Test public void testMailMsgAddAttachments() { MailMessage msg = new MailMessage(); - LinkedList<DataSource> dslist = new LinkedList<DataSource>(); + LinkedList<DataSource> dslist = new LinkedList<>(); for (String item : llist) { DataSource ds = MailUtils.createFromString(item, item); @@ -93,7 +93,7 @@ public class MailMessageTest { @Parameters public static Collection<Object[]> getData() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); data.add(new Object[] { "One new string value.", diff --git a/plugins/org.eclipse.osee.mail.test/src/org/eclipse/osee/mail/internal/MailUtilsTest.java b/plugins/org.eclipse.osee.mail.test/src/org/eclipse/osee/mail/internal/MailUtilsTest.java index 7133a5adf3f..8f019525bcc 100644 --- a/plugins/org.eclipse.osee.mail.test/src/org/eclipse/osee/mail/internal/MailUtilsTest.java +++ b/plugins/org.eclipse.osee.mail.test/src/org/eclipse/osee/mail/internal/MailUtilsTest.java @@ -176,7 +176,7 @@ public class MailUtilsTest { //@formatter:on private List<String> parseMultiPart(String actualMessage) { - List<String> toReturn = new ArrayList<String>(); + List<String> toReturn = new ArrayList<>(); Matcher matcher = MULTI_PART_PATTERN.matcher(actualMessage); while (matcher.find()) { toReturn.add(matcher.group(1).trim()); diff --git a/plugins/org.eclipse.osee.mail/src/org/eclipse/osee/mail/internal/MailServiceImpl.java b/plugins/org.eclipse.osee.mail/src/org/eclipse/osee/mail/internal/MailServiceImpl.java index 9433d1f53a1..6fae11ec63e 100644 --- a/plugins/org.eclipse.osee.mail/src/org/eclipse/osee/mail/internal/MailServiceImpl.java +++ b/plugins/org.eclipse.osee.mail/src/org/eclipse/osee/mail/internal/MailServiceImpl.java @@ -116,7 +116,7 @@ public class MailServiceImpl implements MailService { @Override public List<MailStatus> sendMessages(Iterable<MailMessage> emails) { List<Future<MailStatus>> futures = sendAsyncMessages(emails); - List<MailStatus> toReturn = new ArrayList<MailStatus>(); + List<MailStatus> toReturn = new ArrayList<>(); for (Future<MailStatus> future : futures) { toReturn.add(executeAndGetStatus(future)); } @@ -151,7 +151,7 @@ public class MailServiceImpl implements MailService { @Override public List<Future<MailStatus>> sendAsyncMessages(MailCallback mailCallback, Iterable<MailMessage> emails) { - List<Future<MailStatus>> futures = new ArrayList<Future<MailStatus>>(); + List<Future<MailStatus>> futures = new ArrayList<>(); for (MailMessage mail : emails) { String uuid = mail.getId(); diff --git a/plugins/org.eclipse.osee.mail/src/org/eclipse/osee/mail/internal/resources/MailApplication.java b/plugins/org.eclipse.osee.mail/src/org/eclipse/osee/mail/internal/resources/MailApplication.java index cf226af5e2f..4556c2c82e7 100644 --- a/plugins/org.eclipse.osee.mail/src/org/eclipse/osee/mail/internal/resources/MailApplication.java +++ b/plugins/org.eclipse.osee.mail/src/org/eclipse/osee/mail/internal/resources/MailApplication.java @@ -22,7 +22,7 @@ import org.eclipse.osee.mail.api.MailService; @ApplicationPath("mail") public class MailApplication extends Application { - private final Set<Object> singletons = new HashSet<Object>(); + private final Set<Object> singletons = new HashSet<>(); private MailService mailService; public void setMailService(MailService mailService) { diff --git a/plugins/org.eclipse.osee.orcs.account.admin.test/src/org/eclipse/osee/orcs/account/admin/integration/JdbcJaxRsOAuthStorageTest.java b/plugins/org.eclipse.osee.orcs.account.admin.test/src/org/eclipse/osee/orcs/account/admin/integration/JdbcJaxRsOAuthStorageTest.java index 0bcf2940788..999b3ca3883 100644 --- a/plugins/org.eclipse.osee.orcs.account.admin.test/src/org/eclipse/osee/orcs/account/admin/integration/JdbcJaxRsOAuthStorageTest.java +++ b/plugins/org.eclipse.osee.orcs.account.admin.test/src/org/eclipse/osee/orcs/account/admin/integration/JdbcJaxRsOAuthStorageTest.java @@ -109,7 +109,7 @@ public class JdbcJaxRsOAuthStorageTest { public void testSetup() { initMocks(this); - applicationProperties = new LinkedHashMap<String, String>(); + applicationProperties = new LinkedHashMap<>(); applicationProperties.put("a", "1"); applicationProperties.put("b", "2"); applicationProperties.put("c", "3"); diff --git a/plugins/org.eclipse.osee.orcs.account.admin.test/src/org/eclipse/osee/orcs/account/admin/integration/OrcsAccountStorageTest.java b/plugins/org.eclipse.osee.orcs.account.admin.test/src/org/eclipse/osee/orcs/account/admin/integration/OrcsAccountStorageTest.java index e1f3f1aa3d4..9e060bff5ca 100644 --- a/plugins/org.eclipse.osee.orcs.account.admin.test/src/org/eclipse/osee/orcs/account/admin/integration/OrcsAccountStorageTest.java +++ b/plugins/org.eclipse.osee.orcs.account.admin.test/src/org/eclipse/osee/orcs/account/admin/integration/OrcsAccountStorageTest.java @@ -80,7 +80,7 @@ public class OrcsAccountStorageTest { username = String.format("userName-%s", methodName); active = true; - prefs = new HashMap<String, String>(); + prefs = new HashMap<>(); prefs.put("a", "1"); prefs.put("b", "2"); prefs.put("c", "true"); @@ -186,7 +186,7 @@ public class OrcsAccountStorageTest { @Test public void testSetAccountPreferences() { - Map<String, String> expected = new HashMap<String, String>(); + Map<String, String> expected = new HashMap<>(); expected.put("a", "x"); expected.put("b", "y"); expected.put("c", "z"); diff --git a/plugins/org.eclipse.osee.orcs.account.admin.test/src/org/eclipse/osee/orcs/account/admin/integration/OrcsSubscriptionStorageTest.java b/plugins/org.eclipse.osee.orcs.account.admin.test/src/org/eclipse/osee/orcs/account/admin/integration/OrcsSubscriptionStorageTest.java index 7a22fd85716..a427ad49a2a 100644 --- a/plugins/org.eclipse.osee.orcs.account.admin.test/src/org/eclipse/osee/orcs/account/admin/integration/OrcsSubscriptionStorageTest.java +++ b/plugins/org.eclipse.osee.orcs.account.admin.test/src/org/eclipse/osee/orcs/account/admin/integration/OrcsSubscriptionStorageTest.java @@ -83,7 +83,7 @@ public class OrcsSubscriptionStorageTest { username = String.format("userName-%s", methodName); active = true; - prefs = new HashMap<String, String>(); + prefs = new HashMap<>(); prefs.put("a", "1"); prefs.put("b", "2"); prefs.put("c", "true"); diff --git a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/AccountPreferencesArtifact.java b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/AccountPreferencesArtifact.java index dc0e669d95d..d9197284ce2 100644 --- a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/AccountPreferencesArtifact.java +++ b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/AccountPreferencesArtifact.java @@ -78,7 +78,7 @@ public class AccountPreferencesArtifact extends BaseIdentity<String> implements } catch (Exception ex) { throw new OseeCoreException(ex); } - Map<String, String> map = new HashMap<String, String>(); + Map<String, String> map = new HashMap<>(); for (String key : storage.keySet()) { map.put(key, storage.get(key)); } diff --git a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/AccountSessionDatabaseStore.java b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/AccountSessionDatabaseStore.java index d9161bb042a..b33d58d7dd0 100644 --- a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/AccountSessionDatabaseStore.java +++ b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/AccountSessionDatabaseStore.java @@ -85,7 +85,7 @@ public class AccountSessionDatabaseStore implements AccountSessionStorage { @Override protected ResultSet<AccountSession> innerCall() throws Exception { - List<AccountSession> list = new LinkedList<AccountSession>(); + List<AccountSession> list = new LinkedList<>(); JdbcStatement chStmt = jdbcClient.getStatement(); try { chStmt.runPreparedQuery(query, data); @@ -115,7 +115,7 @@ public class AccountSessionDatabaseStore implements AccountSessionStorage { @Override protected Integer innerCall() throws Exception { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); for (AccountSession session : datas) { data.add(asInsert(session)); } @@ -131,7 +131,7 @@ public class AccountSessionDatabaseStore implements AccountSessionStorage { @Override protected Integer innerCall() throws Exception { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); for (AccountSession session : datas) { data.add(asUpdate(session)); } diff --git a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/OrcsSubscriptionStorage.java b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/OrcsSubscriptionStorage.java index ac2b08f950f..a37746329d2 100644 --- a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/OrcsSubscriptionStorage.java +++ b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/OrcsSubscriptionStorage.java @@ -41,7 +41,7 @@ public class OrcsSubscriptionStorage extends AbstractOrcsStorage implements Subs ArtifactReadable account = accountResults.getExactlyOne(); ResultSet<ArtifactReadable> allGroups = newQuery().andIsOfType(CoreArtifactTypes.SubscriptionGroup).getResults(); - List<Subscription> subscriptions = new ArrayList<Subscription>(); + List<Subscription> subscriptions = new ArrayList<>(); for (ArtifactReadable group : allGroups) { boolean related = account.areRelated(CoreRelationTypes.Users_Artifact, group); subscriptions.add(SubscriptionUtil.fromArtifactData(account, group, related)); diff --git a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/AbstractDatabaseStorage.java b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/AbstractDatabaseStorage.java index 9068c641fe2..de1105d574a 100644 --- a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/AbstractDatabaseStorage.java +++ b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/AbstractDatabaseStorage.java @@ -99,7 +99,7 @@ public abstract class AbstractDatabaseStorage<T> { @Override protected ResultSet<T> innerCall() throws Exception { - List<T> list = new LinkedList<T>(); + List<T> list = new LinkedList<>(); JdbcStatement chStmt = jdbcClient.getStatement(); try { chStmt.runPreparedQuery(query, data); @@ -130,7 +130,7 @@ public abstract class AbstractDatabaseStorage<T> { @Override protected Integer innerCall() throws Exception { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); for (T item : items) { data.add(asInsert(item)); } @@ -144,7 +144,7 @@ public abstract class AbstractDatabaseStorage<T> { @Override protected Integer innerCall() throws Exception { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); for (T item : items) { data.add(asDelete(item)); } @@ -158,7 +158,7 @@ public abstract class AbstractDatabaseStorage<T> { @Override protected Integer innerCall() throws Exception { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); for (T item : items) { data.add(asUpdate(item)); } diff --git a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/AuthCodeGrantStorage.java b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/AuthCodeGrantStorage.java index a8b414cb759..923b8431e56 100644 --- a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/AuthCodeGrantStorage.java +++ b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/AuthCodeGrantStorage.java @@ -81,7 +81,7 @@ public class AuthCodeGrantStorage extends AbstractDatabaseStorage<OAuthCodeGrant private List<String> parseScopes(String scopes) { List<String> toReturn = Collections.emptyList(); if (scopes != null) { - toReturn = new ArrayList<String>(); + toReturn = new ArrayList<>(); String[] scopeValues = scopes.split(SCOPES_SEPARATOR); for (String scope : scopeValues) { if (Strings.isValid(scope)) { diff --git a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientCredentialStorage.java b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientCredentialStorage.java index f14ad9c72ee..d561403baac 100644 --- a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientCredentialStorage.java +++ b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientCredentialStorage.java @@ -121,7 +121,7 @@ public class ClientCredentialStorage extends AbstractDatabaseStorage<OAuthClient private List<String> fromCertString(String certs) { List<String> toReturn = null; if (Strings.isValid(certs)) { - toReturn = new ArrayList<String>(); + toReturn = new ArrayList<>(); String[] certArray = certs.split(";"); for (String cert : certArray) { toReturn.add(cert); diff --git a/plugins/org.eclipse.osee.orcs.authorization/src/org/eclipse/osee/orcs/authorization/OseeAuthorizationProvider.java b/plugins/org.eclipse.osee.orcs.authorization/src/org/eclipse/osee/orcs/authorization/OseeAuthorizationProvider.java index 7674df4ee07..33016a8abcd 100644 --- a/plugins/org.eclipse.osee.orcs.authorization/src/org/eclipse/osee/orcs/authorization/OseeAuthorizationProvider.java +++ b/plugins/org.eclipse.osee.orcs.authorization/src/org/eclipse/osee/orcs/authorization/OseeAuthorizationProvider.java @@ -71,7 +71,7 @@ public class OseeAuthorizationProvider implements AuthorizationProvider, Authori } private Set<String> getRolesFromStore(long identifier) { - Set<String> roles = new HashSet<String>(); + Set<String> roles = new HashSet<>(); ArtifactReadable oseeUser = getQuery().fromBranch(getAdminBranch()).andUuid(identifier).getResults().getExactlyOne(); ResultSet<ArtifactReadable> groups = oseeUser.getRelated(CoreRelationTypes.Universal_Grouping__Group); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactoryTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactoryTest.java index 5f1977757b6..29962e20060 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactoryTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactoryTest.java @@ -97,7 +97,7 @@ public class ArtifactFactoryTest { guid = GUID.create(); - types = new ArrayList<IAttributeType>(); + types = new ArrayList<>(); types.add(CoreAttributeTypes.RelationOrder); types.add(CoreAttributeTypes.City); types.add(CoreAttributeTypes.Annotation); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeClassResolverTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeClassResolverTest.java index 2984c3d4e3a..c12dcc7ee39 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeClassResolverTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeClassResolverTest.java @@ -146,7 +146,7 @@ public class AttributeClassResolverTest { @Parameters public static Collection<Object[]> data() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); data.add(new Object[] {"BooleanAttribute", BooleanAttribute.class}); data.add(new Object[] {"CompressedContentAttribute", CompressedContentAttribute.class}); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeResultSetTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeResultSetTest.java index c4f6145cea0..669328344c3 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeResultSetTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeResultSetTest.java @@ -54,9 +54,9 @@ public class AttributeResultSetTest { public void init() { MockitoAnnotations.initMocks(this); - list = new ArrayList<Attribute<String>>(); - rSetNoType = new AttributeResultSet<String>(null, list); - rSetWithType = new AttributeResultSet<String>(factory, type, list); + list = new ArrayList<>(); + rSetNoType = new AttributeResultSet<>(null, list); + rSetWithType = new AttributeResultSet<>(factory, type, list); } @Test @@ -74,7 +74,7 @@ public class AttributeResultSetTest { @Test public void testIterator() { List<Attribute<String>> spy = spy(list); - rSetNoType = new AttributeResultSet<String>(factory, spy); + rSetNoType = new AttributeResultSet<>(factory, spy); rSetNoType.iterator(); verify(spy).iterator(); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/BranchUtilBranchReadableTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/BranchUtilBranchReadableTest.java index 1e2b9c869e6..c792be4011e 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/BranchUtilBranchReadableTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/BranchUtilBranchReadableTest.java @@ -46,7 +46,7 @@ public class BranchUtilBranchReadableTest { @Test public void testConnectedBranchSorting() { initBranchParentageList(); - List<BranchReadable> branchList = new LinkedList<BranchReadable>(); + List<BranchReadable> branchList = new LinkedList<>(); initOutOfOrderList(branchList); List<BranchReadable> ordered = BranchUtil.orderByParentReadable(queryFactory, branchList); Assert.assertEquals("[ten, nine, eight, seven, six, five, four, three, two, one]", ordered.toString()); @@ -55,7 +55,7 @@ public class BranchUtilBranchReadableTest { @Test public void testDisjointBranchSorting() { initDisjointParentageList(); - List<BranchReadable> branchList = new LinkedList<BranchReadable>(); + List<BranchReadable> branchList = new LinkedList<>(); initDisjointOrderList(branchList); List<BranchReadable> ordered = BranchUtil.orderByParentReadable(queryFactory, branchList); Assert.assertEquals("[four, three, two, seven, six, five, ten, nine, eight, one]", ordered.toString()); @@ -64,7 +64,7 @@ public class BranchUtilBranchReadableTest { @Test public void testDisjointOutOfOrderBranchSorting() { initDisjointParentageList(); - List<BranchReadable> branchList = new LinkedList<BranchReadable>(); + List<BranchReadable> branchList = new LinkedList<>(); initOutOfOrderList(branchList); List<BranchReadable> ordered = BranchUtil.orderByParentReadable(queryFactory, branchList); Assert.assertEquals("[four, ten, seven, three, six, nine, eight, two, five, one]", ordered.toString()); @@ -72,7 +72,7 @@ public class BranchUtilBranchReadableTest { @Test public void testOutsideParentsBranchSorting() { - List<BranchReadable> branchList = new LinkedList<BranchReadable>(); + List<BranchReadable> branchList = new LinkedList<>(); initOutsideParentList(); initOutOfOrderList(branchList); List<BranchReadable> ordered = BranchUtil.orderByParentReadable(queryFactory, branchList); @@ -171,7 +171,7 @@ public class BranchUtilBranchReadableTest { } private ResultSet<BranchReadable> makeResults(BranchReadable input) { - List<BranchReadable> list = new ArrayList<BranchReadable>(); + List<BranchReadable> list = new ArrayList<>(); list.add(input); ResultSet<BranchReadable> results = ResultSets.newResultSet(list); return results; diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/BranchUtilBranchTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/BranchUtilBranchTest.java index e0d892718d0..293d2ef5216 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/BranchUtilBranchTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/BranchUtilBranchTest.java @@ -112,7 +112,7 @@ public class BranchUtilBranchTest { @Test public void testConnectedBranchSorting() { - List<Branch> branchList = new LinkedList<Branch>(); + List<Branch> branchList = new LinkedList<>(); initBranchParentageList(); initOutOfOrderList(branchList); List<Branch> ordered = BranchUtil.orderByParent(branchList); @@ -121,7 +121,7 @@ public class BranchUtilBranchTest { @Test public void testDisjointBranchSorting() { - List<Branch> branchList = new LinkedList<Branch>(); + List<Branch> branchList = new LinkedList<>(); initDisjointParentageList(); initDisjointOrderList(branchList); List<Branch> ordered = BranchUtil.orderByParent(branchList); @@ -130,7 +130,7 @@ public class BranchUtilBranchTest { @Test public void testDisjointOutOfOrderBranchSorting() { - List<Branch> branchList = new LinkedList<Branch>(); + List<Branch> branchList = new LinkedList<>(); initDisjointParentageList(); initOutOfOrderList(branchList); List<Branch> ordered = BranchUtil.orderByParent(branchList); @@ -139,7 +139,7 @@ public class BranchUtilBranchTest { @Test public void testOutsideParentsBranchSorting() { - List<Branch> branchList = new LinkedList<Branch>(); + List<Branch> branchList = new LinkedList<>(); initOutsideParentList(); initOutOfOrderList(branchList); List<Branch> ordered = BranchUtil.orderByParent(branchList); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MockBranchProvider.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MockBranchProvider.java index 7a90806fce5..d082f9b00e0 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MockBranchProvider.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MockBranchProvider.java @@ -26,7 +26,7 @@ public final class MockBranchProvider implements BranchProvider { private final static String ROOT_BRANCH_NAME = "ROOT"; public static Collection<Branch> createTestBranches() throws OseeCoreException { - Collection<Branch> branches = new ArrayList<Branch>(); + Collection<Branch> branches = new ArrayList<>(); //create a root branch Branch root = new Branch(Lib.generateUuid(), ROOT_BRANCH_NAME, BranchType.SYSTEM_ROOT, BranchState.COMMITTED, false, false); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MultiBranchProviderTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MultiBranchProviderTest.java index f38bf16236f..e36e3e1e876 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MultiBranchProviderTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/branch/provider/MultiBranchProviderTest.java @@ -30,7 +30,7 @@ public class MultiBranchProviderTest { public void testGetBranchesRecursive() throws OseeCoreException { BranchFilter filter = new BranchFilter(); filter.setNegatedBranchTypes(BranchType.BASELINE); - Set<Branch> branchRoots = new HashSet<Branch>(); + Set<Branch> branchRoots = new HashSet<>(); Collection<Branch> testBranchesA = MockBranchProvider.createTestBranches(); Collection<Branch> testBranchesB = MockBranchProvider.createTestBranches(); @@ -56,7 +56,7 @@ public class MultiBranchProviderTest { int numBranches = provider1.getBranches().size(); Assert.assertEquals(1, numBranches); - Set<Branch> branches = new HashSet<Branch>(MockBranchProvider.createTestBranches()); + Set<Branch> branches = new HashSet<>(MockBranchProvider.createTestBranches()); MultiBranchProvider provider2 = new MultiBranchProvider(false, branches, filter); numBranches = provider2.getBranches().size(); Assert.assertEquals(branches.size(), numBranches); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/proxy/impl/AttributeReadOnlyImplTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/proxy/impl/AttributeReadOnlyImplTest.java index 103b3a33918..d792ac1535e 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/proxy/impl/AttributeReadOnlyImplTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/proxy/impl/AttributeReadOnlyImplTest.java @@ -53,7 +53,7 @@ public class AttributeReadOnlyImplTest { public void setUp() { MockitoAnnotations.initMocks(this); - readOnly = new AttributeReadOnlyImpl<Date>(proxyManager, session, proxiedObject); + readOnly = new AttributeReadOnlyImpl<>(proxyManager, session, proxiedObject); } @Test diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/RelationManagerTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/RelationManagerTest.java index 72b02aad071..df1e94d6e5c 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/RelationManagerTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/RelationManagerTest.java @@ -154,7 +154,7 @@ public class RelationManagerTest { when(node2.getOrderData()).thenReturn(""); when(node3.getOrderData()).thenReturn(""); - mockDb = new HashMap<Integer, RelationNode>(); + mockDb = new HashMap<>(); mockDb.put(11, node1); mockDb.put(22, node2); mockDb.put(33, node3); @@ -332,7 +332,7 @@ public class RelationManagerTest { @SuppressWarnings("unchecked") @Override public Iterable<RelationNode> answer(InvocationOnMock invocation) throws Throwable { - List<RelationNode> artLoaded = new ArrayList<RelationNode>(); + List<RelationNode> artLoaded = new ArrayList<>(); Collection<Integer> toLoad = (Collection<Integer>) invocation.getArguments()[2]; artLoaded.clear(); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImplTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImplTest.java index 85756734aff..1876a77cc01 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImplTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImplTest.java @@ -179,7 +179,7 @@ public class RelationManagerImplTest { @Test public void testGetValidRelationTypes() throws OseeCoreException { - final List<IRelationType> expected = new ArrayList<IRelationType>(); + final List<IRelationType> expected = new ArrayList<>(); when(node1.getArtifactType()).thenReturn(artifactType1); when(node2.getArtifactType()).thenReturn(artifactType2); when(validity.getValidRelationTypes(artifactType1)).thenAnswer(new Answer<List<IRelationType>>() { diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderManagerTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderManagerTest.java index 39d83ce1df4..13df3c44995 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderManagerTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderManagerTest.java @@ -78,7 +78,7 @@ public class OrderManagerTest { orderManager = new OrderManager(new SorterProvider(relationTypeCache), accessor); - items = new ArrayList<Identifiable<String>>(); + items = new ArrayList<>(); items.add(mock1); items.add(mock2); items.add(mock3); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParserTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParserTest.java index 8382f23c17f..873317a3920 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParserTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParserTest.java @@ -206,7 +206,7 @@ public class OrderParserTest { @Test public void testToXml() throws OseeCoreException { //@formatter:off - Map<IRelationTypeSide, OrderData> data = new LinkedHashMap<IRelationTypeSide, OrderData>(); + Map<IRelationTypeSide, OrderData> data = new LinkedHashMap<>(); add(data, REL_TYPE_1_ID, REL_TYPE_1_NAME, RelationSide.SIDE_B, RelationOrderBaseTypes.USER_DEFINED, ORDER_LIST_2); add(data, REL_TYPE_2_ID, REL_TYPE_2_NAME, RelationSide.SIDE_A, RelationOrderBaseTypes.LEXICOGRAPHICAL_ASC, ORDER_LIST_3); //@formatter:on @@ -219,7 +219,7 @@ public class OrderParserTest { @Test public void testToXmlEmptyEntries() throws OseeCoreException { - Map<IRelationTypeSide, OrderData> data = new LinkedHashMap<IRelationTypeSide, OrderData>(); + Map<IRelationTypeSide, OrderData> data = new LinkedHashMap<>(); when(hasOrderData.iterator()).thenReturn(data.entrySet().iterator()); String actual = parser.toXml(hasOrderData); @@ -228,7 +228,7 @@ public class OrderParserTest { @Test public void testToXmlEmptyList() throws OseeCoreException { - Map<IRelationTypeSide, OrderData> data = new LinkedHashMap<IRelationTypeSide, OrderData>(); + Map<IRelationTypeSide, OrderData> data = new LinkedHashMap<>(); add(data, REL_TYPE_1_ID, REL_TYPE_2_NAME, RelationSide.SIDE_A, RelationOrderBaseTypes.LEXICOGRAPHICAL_DESC); when(hasOrderData.iterator()).thenReturn(data.entrySet().iterator()); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/sorter/SorterTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/sorter/SorterTest.java index 6e34450a2ba..40364c329b5 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/sorter/SorterTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/relation/sorter/SorterTest.java @@ -60,7 +60,7 @@ public class SorterTest { @Test public void testSort() { - List<Identifiable<String>> actualToOrder = new ArrayList<Identifiable<String>>(); + List<Identifiable<String>> actualToOrder = new ArrayList<>(); actualToOrder.addAll(itemsToOrder); sorter.sort(actualToOrder, currentItems); @@ -72,7 +72,7 @@ public class SorterTest { @Parameters public static Collection<Object[]> data() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); data.add(createUnorderedSortTest("4", "2", "1", "5")); data.add(createUnorderedSortTest("$", "a", "!", "2")); data.add(createUserDefinedTest("1", "2", "3", "4")); @@ -137,7 +137,7 @@ public class SorterTest { List<Identifiable<String>> itemsToOrder = Arrays.asList(art2, art1, art3, art4); List<Identifiable<String>> expectedOrder = Arrays.asList(art1, art2, art3, art4); - List<String> relatives = new ArrayList<String>(); + List<String> relatives = new ArrayList<>(); for (Identifiable<String> item : Arrays.asList(art1, art2, art3, art4)) { relatives.add(item.getGuid()); } diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandlerTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandlerTest.java index 8f9c8912add..1914d3c7d5d 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandlerTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandlerTest.java @@ -80,7 +80,7 @@ public class ExcelOutputHandlerTest { public void setup() { MockitoAnnotations.initMocks(this); - top = new LinkedHashMap<String, Object>(); + top = new LinkedHashMap<>(); resultBuffer = new StringWriter(); when(context.getAttribute(OUTPUT_DEBUG)).thenAnswer(answer("true")); @@ -173,10 +173,10 @@ public class ExcelOutputHandlerTest { private Object[] buildSetData() { Object[] data = new Object[values.length]; for (int i = 0; i < values.length; ++i) { - Map<String, Object> element = new LinkedHashMap<String, Object>(); + Map<String, Object> element = new LinkedHashMap<>(); element.put("data", values[i]); element.put(innerName[0], innerName[1]); - Set<Map<String, Object>> dataset = new LinkedHashSet<Map<String, Object>>(); + Set<Map<String, Object>> dataset = new LinkedHashSet<>(); dataset.add(element); data[i] = dataset; } @@ -186,7 +186,7 @@ public class ExcelOutputHandlerTest { private Object[] buildBadSetData() { Object[] data = new Object[values.length]; for (int i = 0; i < values.length; ++i) { - Set<String> dataset = new LinkedHashSet<String>(); + Set<String> dataset = new LinkedHashSet<>(); dataset.add(values[i]); data[i] = dataset; } @@ -205,12 +205,12 @@ public class ExcelOutputHandlerTest { } private void buildTestStructure(Object[] data, boolean deeper) { - Map<String, Object> groupContainer = new LinkedHashMap<String, Object>(); + Map<String, Object> groupContainer = new LinkedHashMap<>(); for (int j = groups.length - 1; j >= 0; --j) { - Map<String, Object> inner = new LinkedHashMap<String, Object>(); + Map<String, Object> inner = new LinkedHashMap<>(); for (int i = headings.length - 1; i >= 0; --i) { if (i == 2 && deeper) { - Map<String, Object> bottom = new LinkedHashMap<String, Object>(); + Map<String, Object> bottom = new LinkedHashMap<>(); bottom.put(innerName[0], data[i]); inner.put(headings[i], bottom); } else { diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/search/SearchCriteriaTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/search/SearchCriteriaTest.java index b14d8da6bc9..b767b64747e 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/search/SearchCriteriaTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/search/SearchCriteriaTest.java @@ -71,7 +71,7 @@ public class SearchCriteriaTest { when(cache.isTaggable(CoreAttributeTypes.FavoriteBranch)).thenReturn(false); - ArrayList<IAttributeType> types = new ArrayList<IAttributeType>(); + ArrayList<IAttributeType> types = new ArrayList<>(); types.add(CoreAttributeTypes.Active); types.add(CoreAttributeTypes.FavoriteBranch); diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java index 8cc74422b45..43005bbf893 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/types/OrcsTypesTest.java @@ -119,7 +119,7 @@ public class OrcsTypesTest { module.start(session); orcsTypes = module.createOrcsTypes(session); - resources = new ArrayList<InputSupplier<? extends InputStream>>(); + resources = new ArrayList<>(); URI uri = new URI("osee:/types.test.data.osee"); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DynamicData.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DynamicData.java index 7a228fff4e5..86ccc4a1643 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DynamicData.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DynamicData.java @@ -71,7 +71,7 @@ public class DynamicData extends BaseIdentity<String> implements Named { public void put(String key, Object value) { if (properties == null) { - properties = new LinkedHashMap<String, Object>(); + properties = new LinkedHashMap<>(); } properties.put(key, value); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DynamicObject.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DynamicObject.java index 9497fba9e88..56cd739065a 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DynamicObject.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/DynamicObject.java @@ -18,7 +18,7 @@ import org.eclipse.osee.framework.jdk.core.util.Conditions; */ public class DynamicObject extends DynamicData { - private final ArrayList<DynamicData> children = new ArrayList<DynamicData>(); + private final ArrayList<DynamicData> children = new ArrayList<>(); public DynamicObject(String uid, String alias) { super(uid, alias); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/Options.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/Options.java index dcefa66071d..0104804153f 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/Options.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/Options.java @@ -22,7 +22,7 @@ import java.util.Set; public class Options implements Cloneable { private static final String EXCEPTION_MESSAGE = "No setting found for key: [%s]"; - private final Map<String, Object> data = new HashMap<String, Object>(); + private final Map<String, Object> data = new HashMap<>(); protected Options() { super(); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/QueryData.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/QueryData.java index 9f4cde4cbb1..683cdaddd81 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/QueryData.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/QueryData.java @@ -40,7 +40,7 @@ public class QueryData implements HasOptions, Cloneable { } public List<Criteria> getAllCriteria() { - List<Criteria> allCriterias = new ArrayList<Criteria>(); + List<Criteria> allCriterias = new ArrayList<>(); for (CriteriaSet set : criterias) { allCriterias.addAll(set.getCriterias()); } @@ -108,7 +108,7 @@ public class QueryData implements HasOptions, Cloneable { @Override public QueryData clone() { - List<CriteriaSet> newCriterias = new ArrayList<CriteriaSet>(criterias.size()); + List<CriteriaSet> newCriterias = new ArrayList<>(criterias.size()); for (CriteriaSet criteriaSet : criterias) { newCriterias.add(criteriaSet.clone()); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/SelectData.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/SelectData.java index 681de078604..10240eca784 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/SelectData.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/SelectData.java @@ -22,7 +22,7 @@ public class SelectData implements Cloneable { private final List<SelectSet> selects; public SelectData() { - this.selects = new ArrayList<SelectSet>(); + this.selects = new ArrayList<>(); this.selects.add(new SelectSet()); } @@ -66,7 +66,7 @@ public class SelectData implements Cloneable { @Override public SelectData clone() { - List<SelectSet> cloned = new ArrayList<SelectSet>(selects.size()); + List<SelectSet> cloned = new ArrayList<>(selects.size()); for (SelectSet select : selects) { cloned.add(select.clone()); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaArtifactGuids.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaArtifactGuids.java index 7d5ee7af01c..c9cc091c440 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaArtifactGuids.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaArtifactGuids.java @@ -34,7 +34,7 @@ public class CriteriaArtifactGuids extends Criteria { @Override public void checkValid(Options options) throws OseeCoreException { Conditions.checkNotNullOrEmpty(artifactGuids, "artifact guids"); - List<String> invalids = new ArrayList<String>(); + List<String> invalids = new ArrayList<>(); for (String guid : artifactGuids) { if (!GUID.isValid(guid)) { invalids.add(guid); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaArtifactType.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaArtifactType.java index aa226c92465..73b4925d405 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaArtifactType.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaArtifactType.java @@ -47,7 +47,7 @@ public class CriteriaArtifactType extends Criteria { public Collection<? extends IArtifactType> getTypes() throws OseeCoreException { Collection<? extends IArtifactType> toReturn; if (includeTypeInheritance) { - Collection<IArtifactType> typesToUse = new LinkedHashSet<IArtifactType>(); + Collection<IArtifactType> typesToUse = new LinkedHashSet<>(); for (IArtifactType type : getOriginalTypes()) { for (IArtifactType descendant : artTypeCache.getAllDescendantTypes(type)) { typesToUse.add(descendant); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaAttributeKeywords.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaAttributeKeywords.java index 60672c8d0c2..7880a68c800 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaAttributeKeywords.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaAttributeKeywords.java @@ -85,7 +85,7 @@ public class CriteriaAttributeKeywords extends Criteria { public void checkNotTaggable() throws OseeCoreException { if (!includeAllTypes) { - ArrayList<String> notTaggable = new ArrayList<String>(); + ArrayList<String> notTaggable = new ArrayList<>(); if (attributeTypeCache != null) { for (IAttributeType type : attributeType) { if (!attributeTypeCache.isTaggable(type)) { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaTxArtifactGuids.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaTxArtifactGuids.java index cae8f95ea9b..2936a2a8a06 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaTxArtifactGuids.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/criteria/CriteriaTxArtifactGuids.java @@ -34,7 +34,7 @@ public class CriteriaTxArtifactGuids extends Criteria implements TxCriteria { @Override public void checkValid(Options options) throws OseeCoreException { Conditions.checkNotNullOrEmpty(artifactGuids, "artifact guids"); - List<String> invalids = new ArrayList<String>(); + List<String> invalids = new ArrayList<>(); for (String guid : artifactGuids) { if (!GUID.isValid(guid)) { invalids.add(guid); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/SystemPreferencesImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/SystemPreferencesImpl.java index 2fed19217b5..c0a8e922f2d 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/SystemPreferencesImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/SystemPreferencesImpl.java @@ -33,7 +33,7 @@ public class SystemPreferencesImpl implements SystemPreferences { } public void start() { - cache = new ConcurrentHashMap<String, Pair<Long, String>>(); + cache = new ConcurrentHashMap<>(); } public void stop() { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactory.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactory.java index eea171c0d8a..cb37c782f4e 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactory.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/artifact/ArtifactFactory.java @@ -137,7 +137,7 @@ public class ArtifactFactory { } private Collection<? extends IAttributeType> getAllowedTypes(Artifact destination, Collection<? extends IAttributeType> types) throws OseeCoreException { - Set<IAttributeType> toReturn = new HashSet<IAttributeType>(); + Set<IAttributeType> toReturn = new HashSet<>(); for (IAttributeType type : types) { if (!CoreAttributeTypes.RelationOrder.equals(type)) { if (destination.isAttributeTypeValid(type)) { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeFactory.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeFactory.java index 46ee2bc4048..0d477c17c75 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeFactory.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeFactory.java @@ -59,7 +59,7 @@ public class AttributeFactory { ResourceNameResolver resolver = createResolver(attribute); proxy.setResolver(resolver); - Reference<AttributeContainer> artifactRef = new WeakReference<AttributeContainer>(container); + Reference<AttributeContainer> artifactRef = new WeakReference<>(container); attribute.internalInitialize(cache, artifactRef, data, isDirty, createWithDefaults); container.add(type, attribute); @@ -86,7 +86,7 @@ public class AttributeFactory { if (source.getVersion().isInStorage()) { try { destinationAttribute = destination.getAttributeById(source, DeletionFlag.INCLUDE_DELETED); - Reference<AttributeContainer> artifactRef = new WeakReference<AttributeContainer>(destination); + Reference<AttributeContainer> artifactRef = new WeakReference<>(destination); destinationAttribute.internalInitialize(cache, artifactRef, attributeData, true, false); } catch (AttributeDoesNotExist ex) { destinationAttribute = createAttribute(destination, attributeData); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeManagerImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeManagerImpl.java index 56e9948cd2f..337e2833870 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeManagerImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeManagerImpl.java @@ -170,7 +170,7 @@ public abstract class AttributeManagerImpl extends BaseIdentity<String> implemen public <T> List<T> getAttributeValues(IAttributeType attributeType) throws OseeCoreException { List<Attribute<T>> attributes = getAttributesExcludeDeleted(attributeType); - List<T> values = new LinkedList<T>(); + List<T> values = new LinkedList<>(); for (Attribute<T> attribute : attributes) { T value = attribute.getValue(); if (value != null) { @@ -286,7 +286,7 @@ public abstract class AttributeManagerImpl extends BaseIdentity<String> implemen @Override public <T> void setAttributesFromValues(IAttributeType attributeType, Collection<T> values) throws OseeCoreException { - AttributeSetHelper<T, T> setter = new TypedValueAttributeSetHelper<T>(attributes, this); + AttributeSetHelper<T, T> setter = new TypedValueAttributeSetHelper<>(attributes, this); setAttributesFromValuesHelper(setter, attributeType, values); } @@ -413,9 +413,9 @@ public abstract class AttributeManagerImpl extends BaseIdentity<String> implemen private <A, T> void setAttributesFromValuesHelper(AttributeSetHelper<A, T> helper, IAttributeType attributeType, Collection<T> values) throws OseeCoreException { ensureAttributesLoaded(); - Set<T> uniqueItems = new LinkedHashSet<T>(values); + Set<T> uniqueItems = new LinkedHashSet<>(values); List<Attribute<A>> remainingAttributes = getAttributesExcludeDeleted(attributeType); - List<T> remainingNewValues = new ArrayList<T>(uniqueItems.size()); + List<T> remainingNewValues = new ArrayList<>(uniqueItems.size()); // all existing attributes matching a new value will be left untouched for (T newValue : uniqueItems) { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/primitives/PrimitiveAttributeClassProvider.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/primitives/PrimitiveAttributeClassProvider.java index 0fcbe00b402..1efe7526367 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/primitives/PrimitiveAttributeClassProvider.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/attribute/primitives/PrimitiveAttributeClassProvider.java @@ -22,7 +22,7 @@ public class PrimitiveAttributeClassProvider implements AttributeClassProvider { @Override public List<Class<? extends Attribute<?>>> getClasses() { - List<Class<? extends Attribute<?>>> clazzes = new ArrayList<Class<? extends Attribute<?>>>(); + List<Class<? extends Attribute<?>>> clazzes = new ArrayList<>(); clazzes.add(BooleanAttribute.class); clazzes.add(IntegerAttribute.class); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/PurgeBranchCallable.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/PurgeBranchCallable.java index 7ea84c0397b..9a07f60c906 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/PurgeBranchCallable.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/PurgeBranchCallable.java @@ -53,7 +53,7 @@ public class PurgeBranchCallable extends AbstractBranchCallable<List<IOseeBranch ResultSet<BranchReadable> branches = branchQuery.getResults(); - List<IOseeBranch> purged = new LinkedList<IOseeBranch>(); + List<IOseeBranch> purged = new LinkedList<>(); List<BranchReadable> orderedBranches = BranchUtil.orderByParentReadable(queryFactory, branches); for (BranchReadable aBranch : orderedBranches) { checkForCancelled(); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/provider/DeletedBranchProvider.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/provider/DeletedBranchProvider.java index e11c26647f9..a7e8d92ec50 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/provider/DeletedBranchProvider.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/provider/DeletedBranchProvider.java @@ -40,7 +40,7 @@ public final class DeletedBranchProvider implements BranchProvider { branchFilter.setNegatedBranchTypes(BranchType.BASELINE); List<Branch> branches = branchCache.getBranches(branchFilter); - Collection<Branch> branchesToReturn = new LinkedHashSet<Branch>(); + Collection<Branch> branchesToReturn = new LinkedHashSet<>(); branchesToReturn.addAll(branches); for (Branch branch : branches) { branch.getChildBranches(branchesToReturn, true, branchFilter); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/provider/MultiBranchProvider.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/provider/MultiBranchProvider.java index 298755b99ae..2816b4c006e 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/provider/MultiBranchProvider.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/branch/provider/MultiBranchProvider.java @@ -34,7 +34,7 @@ public class MultiBranchProvider implements BranchProvider { } private Collection<Branch> getChildBranches(Branch branch) throws OseeCoreException { - Set<Branch> children = new HashSet<Branch>(); + Set<Branch> children = new HashSet<>(); branch.getChildBranches(children, true, filter); if (filter.matches(branch)) { @@ -48,7 +48,7 @@ public class MultiBranchProvider implements BranchProvider { Conditions.checkNotNull(branches, "seeds"); Set<Branch> result = branches; if (recursive) { - result = new HashSet<Branch>(branches); + result = new HashSet<>(branches); for (Branch b : branches) { result.addAll(getChildBranches(b)); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchCommand.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchCommand.java index 750a1a04fe9..9d475ae859d 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchCommand.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchCommand.java @@ -92,7 +92,7 @@ public final class BranchCommand implements ConsoleCommand { private BranchType[] toBranchType(String[] types, boolean alllIfEmpty) { BranchType[] toReturn = new BranchType[0]; if (types != null && types.length > 0) { - Set<BranchType> data = new HashSet<BranchType>(); + Set<BranchType> data = new HashSet<>(); for (String type : types) { BranchType typeEnum = BranchType.valueOf(type.toUpperCase()); data.add(typeEnum); @@ -109,7 +109,7 @@ public final class BranchCommand implements ConsoleCommand { private BranchState[] toBranchState(String[] types, boolean alllIfEmpty) { BranchState[] toReturn = new BranchState[0]; if (types != null && types.length > 0) { - Set<BranchState> data = new HashSet<BranchState>(); + Set<BranchState> data = new HashSet<>(); for (String type : types) { BranchState typeEnum = BranchState.valueOf(type.toUpperCase()); data.add(typeEnum); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchExportCommand.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchExportCommand.java index 0273d7f5496..59e8ca2f3cf 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchExportCommand.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchExportCommand.java @@ -107,7 +107,7 @@ public final class BranchExportCommand implements ConsoleCommand { } private List<IOseeBranch> getBranchesToExport() throws OseeCoreException { - List<IOseeBranch> branches = new LinkedList<IOseeBranch>(); + List<IOseeBranch> branches = new LinkedList<>(); BranchQuery branchQuery = orcsApi.getQueryFactory().branchQuery(); if (includeBranchIds.isEmpty()) { ResultSet<BranchReadable> branchReadables = null; diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchImportCommand.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchImportCommand.java index fa2c7068b9e..b8a480590ef 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchImportCommand.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchImportCommand.java @@ -104,7 +104,7 @@ public final class BranchImportCommand implements ConsoleCommand { throw new OseeArgumentException("Files to import were not specified"); } - List<IOseeBranch> branches = new LinkedList<IOseeBranch>(); + List<IOseeBranch> branches = new LinkedList<>(); for (String branchUuidString : branchUuids) { IOseeBranch branch = branchQuery.andUuids(Long.valueOf(branchUuidString)).getResults().getExactlyOne(); branches.add(branch); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchPurgeCommand.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchPurgeCommand.java index c739f10a9f6..dc598e27f45 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchPurgeCommand.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchPurgeCommand.java @@ -86,7 +86,7 @@ public final class BranchPurgeCommand implements ConsoleCommand { @Override public Callable<?> createCallable(Console console, ConsoleParameters params) { - List<Long> branchUuids = new ArrayList<Long>(); + List<Long> branchUuids = new ArrayList<>(); for (String uuid : params.getArray("branchUuids")) { if (Strings.isNumeric(uuid)) { branchUuids.add(Long.parseLong(uuid)); @@ -150,7 +150,7 @@ public final class BranchPurgeCommand implements ConsoleCommand { } private Collection<BranchReadable> getBranchesToPurge() throws OseeCoreException { - Set<BranchReadable> specifiedBranches = new HashSet<BranchReadable>(); + Set<BranchReadable> specifiedBranches = new HashSet<>(); for (Long uuid : branchUuids) { if (uuid <= 0) { console.writeln("UUID listed %s is not a valid UUID", uuid); @@ -195,7 +195,7 @@ public final class BranchPurgeCommand implements ConsoleCommand { branchQuery.andStateIs(BranchState.DELETED); } - Set<BranchReadable> results = new HashSet<BranchReadable>(); + Set<BranchReadable> results = new HashSet<>(); for (BranchReadable parent : branches) { for (BranchReadable branch : branchQuery.andIsChildOf(parent).getResults()) { if (includeUnarchived || branch.getArchiveState() == BranchArchivedState.ARCHIVED) { @@ -224,7 +224,7 @@ public final class BranchPurgeCommand implements ConsoleCommand { console.writeln("Branch [%s] guid [%s] will be purged!", toPurge.getName(), toPurge.getGuid()); } - List<IOseeBranch> purged = new LinkedList<IOseeBranch>(); + List<IOseeBranch> purged = new LinkedList<>(); if (runPurge) { int size = orderedBranches.size(); int count = 0; diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/IndexStatusDisplayCollector.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/IndexStatusDisplayCollector.java index 3e19c290181..48eb4f60b4f 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/IndexStatusDisplayCollector.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/IndexStatusDisplayCollector.java @@ -22,7 +22,7 @@ import org.eclipse.osee.orcs.search.IndexerCollectorAdapter; public final class IndexStatusDisplayCollector extends IndexerCollectorAdapter { private final int DEFAULT_STATS_PRINT_FREQUENCY = 1000; - private final List<Integer> taskIds = new CopyOnWriteArrayList<Integer>(); + private final List<Integer> taskIds = new CopyOnWriteArrayList<>(); private int attributesProcessed; private int queriesProcessed; private final long startTime; diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/IndexerCommand.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/IndexerCommand.java index 672feb9288e..cad474596dc 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/IndexerCommand.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/IndexerCommand.java @@ -106,7 +106,7 @@ public class IndexerCommand implements ConsoleCommand { long startTime = System.currentTimeMillis(); boolean indexOnlyMissingitems = false; - Set<BranchReadable> branches = new HashSet<BranchReadable>(); + Set<BranchReadable> branches = new HashSet<>(); String[] uuids = params.getArray("branchUuids"); if (uuids != null & uuids.length > 0) { for (String uuid : uuids) { @@ -136,7 +136,7 @@ public class IndexerCommand implements ConsoleCommand { break; case ITEM_IDS: boolean printTags = params.getBoolean("debug"); - Set<Long> ids = new LinkedHashSet<Long>(); + Set<Long> ids = new LinkedHashSet<>(); for (String value : params.getArray("ids")) { ids.add(Long.parseLong(value)); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PerformanceInfoCommand.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PerformanceInfoCommand.java index c7aa20929a7..580451418a8 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PerformanceInfoCommand.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PerformanceInfoCommand.java @@ -60,7 +60,7 @@ public class PerformanceInfoCommand implements ConsoleCommand { } private Collection<StatsType> toStatusTypes(String[] stats) { - Collection<StatsType> statsType = new HashSet<StatsType>(); + Collection<StatsType> statsType = new HashSet<>(); boolean addAllStatTypes = false; if (stats != null && stats.length > 0) { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeArtifactTypeCommand.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeArtifactTypeCommand.java index 45edf5d73cc..b28ae7414ab 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeArtifactTypeCommand.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeArtifactTypeCommand.java @@ -79,7 +79,7 @@ public class PurgeArtifactTypeCommand implements ConsoleCommand { private Set<IArtifactType> getTypes(String[] typesToPurge) throws OseeCoreException { ArtifactTypes artifactTypes = orcsTypes.getArtifactTypes(); - Set<IArtifactType> toReturn = new HashSet<IArtifactType>(); + Set<IArtifactType> toReturn = new HashSet<>(); for (String uuid : typesToPurge) { try { Long typeId = HexUtil.toLong(uuid); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeAttributeTypeCommand.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeAttributeTypeCommand.java index f7a2a74432d..13ce72e3e6e 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeAttributeTypeCommand.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeAttributeTypeCommand.java @@ -86,7 +86,7 @@ public class PurgeAttributeTypeCommand implements ConsoleCommand { private Set<IAttributeType> getTypes(String[] typesToPurge) throws OseeCoreException { AttributeTypes attributeTypes = orcsTypes.getAttributeTypes(); - Set<IAttributeType> toReturn = new HashSet<IAttributeType>(); + Set<IAttributeType> toReturn = new HashSet<>(); for (String uuid : typesToPurge) { try { Long typeId = -1L; diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeRelationTypeCommand.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeRelationTypeCommand.java index f0568e4b52c..aaa6723954c 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeRelationTypeCommand.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeRelationTypeCommand.java @@ -79,7 +79,7 @@ public class PurgeRelationTypeCommand implements ConsoleCommand { private Set<IRelationType> getTypes(String[] typesToPurge) throws OseeCoreException { RelationTypes relationTypes = orcsTypes.getRelationTypes(); - Set<IRelationType> toReturn = new HashSet<IRelationType>(); + Set<IRelationType> toReturn = new HashSet<>(); for (String uuid : typesToPurge) { try { Long typeId = HexUtil.toLong(uuid); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeTransactionCommand.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeTransactionCommand.java index 3a78833c63e..5478c5a557a 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeTransactionCommand.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/PurgeTransactionCommand.java @@ -60,7 +60,7 @@ public class PurgeTransactionCommand implements ConsoleCommand { @Override public Object call() throws Exception { String[] stringIds = params.getArray("txIds"); - final List<ITransaction> transactions = new ArrayList<ITransaction>(); + final List<ITransaction> transactions = new ArrayList<>(); for (String arg : stringIds) { ITransaction tx = TokenFactory.createTransaction(Integer.parseInt(arg)); transactions.add(tx); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/graph/impl/GraphBuilderImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/graph/impl/GraphBuilderImpl.java index d93340f1b73..eb137563da0 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/graph/impl/GraphBuilderImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/graph/impl/GraphBuilderImpl.java @@ -43,7 +43,7 @@ public class GraphBuilderImpl extends LoadDataHandlerAdapter implements GraphBui private final RelationFactory relationFactory; private final GraphProvider graphProvider; - private final Set<Artifact> updated = new LinkedHashSet<Artifact>(); + private final Set<Artifact> updated = new LinkedHashSet<>(); private GraphData graph; public GraphBuilderImpl(Log logger, ArtifactFactory artifactFactory, AttributeFactory attributeFactory, RelationFactory relationFactory, GraphProvider graphProvider) { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/graph/impl/GraphDataImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/graph/impl/GraphDataImpl.java index f5e18704492..c0068b6ce4a 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/graph/impl/GraphDataImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/graph/impl/GraphDataImpl.java @@ -26,8 +26,8 @@ import org.eclipse.osee.orcs.core.internal.graph.GraphNode; */ public class GraphDataImpl implements GraphData { - private final Map<Integer, GraphNode> nodesById = new ConcurrentHashMap<Integer, GraphNode>(); - private final Map<Integer, GraphAdjacencies> adjacenciesById = new ConcurrentHashMap<Integer, GraphAdjacencies>(); + private final Map<Integer, GraphNode> nodesById = new ConcurrentHashMap<>(); + private final Map<Integer, GraphAdjacencies> adjacenciesById = new ConcurrentHashMap<>(); private final IOseeBranch branch; private final int txId; diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java index a0dafa16ad9..685ed6d62dd 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java @@ -224,7 +224,7 @@ public class ArtifactReadOnlyImpl extends AbstractProxied<Artifact>implements Ar @Override public List<ArtifactReadable> getDescendants() throws OseeCoreException { - List<ArtifactReadable> descendants = new LinkedList<ArtifactReadable>(); + List<ArtifactReadable> descendants = new LinkedList<>(); getDescendants(descendants); return descendants; } @@ -239,7 +239,7 @@ public class ArtifactReadOnlyImpl extends AbstractProxied<Artifact>implements Ar @Override public List<ArtifactReadable> getAncestors() throws OseeCoreException { - List<ArtifactReadable> ancestors = new ArrayList<ArtifactReadable>(); + List<ArtifactReadable> ancestors = new ArrayList<>(); for (ArtifactReadable parent = getParent(); parent != null; parent = parent.getParent()) { ancestors.add(parent); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/RelationTypeValidity.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/RelationTypeValidity.java index 45daf9b6982..94d5d3608fe 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/RelationTypeValidity.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/RelationTypeValidity.java @@ -103,7 +103,7 @@ public class RelationTypeValidity { public List<IRelationType> getValidRelationTypes(IArtifactType artifactType) throws OseeCoreException { Conditions.checkNotNull(artifactType, "artifactType"); Collection<? extends IRelationType> types = relationTypes.getAll(); - List<IRelationType> toReturn = new ArrayList<IRelationType>(); + List<IRelationType> toReturn = new ArrayList<>(); for (IRelationType relationType : types) { if (isTypeAllowed(artifactType, relationType)) { toReturn.add(relationType); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java index c673fb10eba..110bbc43f51 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java @@ -298,7 +298,7 @@ public class RelationManagerImpl implements RelationManager { resolver.resolve(session, graph, relations, otherSide); boolean modified = false; - Set<RelationNode> otherNodes = new LinkedHashSet<RelationNode>(); + Set<RelationNode> otherNodes = new LinkedHashSet<>(); for (Relation relation : relations) { relation.delete(); Integer artId = relation.getLocalIdForSide(otherSide); @@ -333,7 +333,7 @@ public class RelationManagerImpl implements RelationManager { node.delete(); if (relations != null && !relations.isEmpty()) { - Map<IRelationType, RelationSide> typesToRemove = new HashMap<IRelationType, RelationSide>(); + Map<IRelationType, RelationSide> typesToRemove = new HashMap<>(); for (Relation relation : relations) { relation.delete(); IRelationType type = relation.getRelationType(); @@ -435,7 +435,7 @@ public class RelationManagerImpl implements RelationManager { List<Identifiable<String>> relatives = Collections.emptyList(); if (RelationOrderBaseTypes.USER_DEFINED == sorterIdToUse) { ResultSet<RelationNode> arts = getRelated(session, type, node1, side); - relatives = new LinkedList<Identifiable<String>>(); + relatives = new LinkedList<>(); for (RelationNode art : arts) { relatives.add(art); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationResolverImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationResolverImpl.java index 28f56c52464..c6c1dd590c2 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationResolverImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationResolverImpl.java @@ -47,14 +47,14 @@ public class RelationResolverImpl implements RelationResolver { List<T> toReturn = Collections.emptyList(); if (!links.isEmpty()) { Set<Integer> toLoad = null; - LinkedHashMap<Integer, T> items = new LinkedHashMap<Integer, T>(); + LinkedHashMap<Integer, T> items = new LinkedHashMap<>(); for (Relation relation : links) { for (RelationSide side : sides) { int localId = relation.getLocalIdForSide(side); RelationNode node = graph.getNode(localId); if (node == null) { if (toLoad == null) { - toLoad = new LinkedHashSet<Integer>(); + toLoad = new LinkedHashSet<>(); } toLoad.add(localId); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderEntryComparator.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderEntryComparator.java index 650af7ac9a9..3cfdbaecfdb 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderEntryComparator.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderEntryComparator.java @@ -37,8 +37,8 @@ public class OrderEntryComparator implements Comparator<Entry<IRelationTypeSide, result = orderData1.getSorterId().getGuid().compareTo(orderData2.getSorterId().getGuid()); } if (result == 0) { - List<String> guids1 = new ArrayList<String>(orderData1.getOrderIds()); - List<String> guids2 = new ArrayList<String>(orderData2.getOrderIds()); + List<String> guids1 = new ArrayList<>(orderData1.getOrderIds()); + List<String> guids2 = new ArrayList<>(orderData2.getOrderIds()); result = guids1.size() - guids2.size(); if (result == 0) { Collections.sort(guids1); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderManager.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderManager.java index 338753ef2d8..5263d80f162 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderManager.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderManager.java @@ -35,7 +35,7 @@ public class OrderManager implements HasOrderData { private static final OrderEntryComparator ENTRY_COMPARATOR = new OrderEntryComparator(); - private final Map<IRelationTypeSide, OrderData> orderDataMap = new ConcurrentHashMap<IRelationTypeSide, OrderData>(); + private final Map<IRelationTypeSide, OrderData> orderDataMap = new ConcurrentHashMap<>(); private final OrderAccessor accessor; private final SorterProvider sorterProvider; @@ -140,7 +140,7 @@ public class OrderManager implements HasOrderData { public void setOrder(IRelationTypeSide typeAndSide, IRelationSorterId sorterId, List<? extends Identifiable<String>> relativeSequence) throws OseeCoreException { List<String> sequence; if (!relativeSequence.isEmpty()) { - sequence = new ArrayList<String>(); + sequence = new ArrayList<>(); for (Identifiable<String> item : relativeSequence) { sequence.add(item.getGuid()); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParser.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParser.java index de6ec87cf67..0a1f6e14b75 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParser.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderParser.java @@ -105,7 +105,7 @@ public class OrderParser { if (relationTypeName != null && orderType != null && relationSide != null) { List<String> list = Collections.emptyList(); if (rawList != null) { - list = new ArrayList<String>(); + list = new ArrayList<>(); StringTokenizer tokenizer = new StringTokenizer(rawList, ","); while (tokenizer.hasMoreTokens()) { list.add(tokenizer.nextToken()); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/sorter/SorterProvider.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/sorter/SorterProvider.java index 07ea868d834..47f13cf9889 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/sorter/SorterProvider.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/sorter/SorterProvider.java @@ -32,8 +32,8 @@ import org.eclipse.osee.orcs.utility.SortOrder; */ public class SorterProvider { - private final Map<IRelationSorterId, Sorter> orderMap = new HashMap<IRelationSorterId, Sorter>(); - private final List<IRelationSorterId> ids = new ArrayList<IRelationSorterId>(); + private final Map<IRelationSorterId, Sorter> orderMap = new HashMap<>(); + private final List<IRelationSorterId> ids = new ArrayList<>(); private final RelationTypes typeCache; diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/sorter/UserDefinedComparator.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/sorter/UserDefinedComparator.java index 7d8d0dbae16..199a0189506 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/sorter/UserDefinedComparator.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/sorter/UserDefinedComparator.java @@ -24,7 +24,7 @@ public class UserDefinedComparator implements Comparator<Identifiable<String>> { private final Map<String, Integer> value; public UserDefinedComparator(List<String> guidOrder) { - value = new HashMap<String, Integer>(guidOrder.size()); + value = new HashMap<>(guidOrder.size()); for (int i = 0; i < guidOrder.size(); i++) { value.put(guidOrder.get(i), i); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/OrcsScriptEngineFactory.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/OrcsScriptEngineFactory.java index 3ca594736cf..ca8fbf2565f 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/OrcsScriptEngineFactory.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/OrcsScriptEngineFactory.java @@ -35,7 +35,7 @@ public class OrcsScriptEngineFactory implements ScriptEngineFactory { private static List<String> mimeTypes; private static List<String> aliases; static { - List<String> names = new ArrayList<String>(6); + List<String> names = new ArrayList<>(6); names.add("orcs"); names.add("OrcsScript"); names.add(SCRIPT_NAME); @@ -43,12 +43,12 @@ public class OrcsScriptEngineFactory implements ScriptEngineFactory { names.add("orcsdsl"); aliases = Collections.unmodifiableList(names); - List<String> mimeTypes = new ArrayList<String>(4); + List<String> mimeTypes = new ArrayList<>(4); mimeTypes.add("application/orcsscript"); mimeTypes.add("text/orcsscript"); OrcsScriptEngineFactory.mimeTypes = Collections.unmodifiableList(mimeTypes); - List<String> extensions = new ArrayList<String>(1); + List<String> extensions = new ArrayList<>(1); extensions.add("orcs"); OrcsScriptEngineFactory.extensions = Collections.unmodifiableList(extensions); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandler.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandler.java index 416a35fd497..6376be95c00 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandler.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandler.java @@ -63,7 +63,7 @@ public class ExcelOutputHandler extends OrcsScriptOutputHandler { private int numSheets; private int querySheetNum; private final HeaderCollector headers = new HeaderCollector(); - private final List<Map<String, Object>> providedData = new LinkedList<Map<String, Object>>(); + private final List<Map<String, Object>> providedData = new LinkedList<>(); public ExcelOutputHandler(ScriptContext context) { super(); @@ -106,7 +106,7 @@ public class ExcelOutputHandler extends OrcsScriptOutputHandler { @Override public void onError(Throwable th) { if (errors == null) { - errors = new ArrayList<Throwable>(); + errors = new ArrayList<>(); } errors.add(th); } @@ -463,8 +463,8 @@ public class ExcelOutputHandler extends OrcsScriptOutputHandler { private static final class DebugInfo { public String scriptVersion; - public final List<LoadDescription> descriptions = new ArrayList<LoadDescription>(); - private final List<QueryData> queries = new ArrayList<QueryData>(); + public final List<LoadDescription> descriptions = new ArrayList<>(); + private final List<QueryData> queries = new ArrayList<>(); public void setScriptVersion(String version) { this.scriptVersion = version; @@ -493,7 +493,7 @@ public class ExcelOutputHandler extends OrcsScriptOutputHandler { private static final class HeaderCollector { - private final List<List<String>> columnGroups = new ArrayList<List<String>>(); + private final List<List<String>> columnGroups = new ArrayList<>(); private volatile int totalSize = -1; public void clear() { @@ -510,7 +510,7 @@ public class ExcelOutputHandler extends OrcsScriptOutputHandler { private void processHelper(Map<String, Object> data, int index) { List<String> columns; if (index >= columnGroups.size()) { - columns = new ArrayList<String>(data.keySet()); + columns = new ArrayList<>(data.keySet()); columnGroups.add(columns); } else { columns = columnGroups.get(index); @@ -545,7 +545,7 @@ public class ExcelOutputHandler extends OrcsScriptOutputHandler { } public Iterable<String> getHeaders() { - List<String> headings = new ArrayList<String>(); + List<String> headings = new ArrayList<>(); for (Collection<String> attributes : columnGroups) { for (String value : attributes) { headings.add(value); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/JsonOutputHandler.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/JsonOutputHandler.java index cbdc2bafb8a..45155e4ff02 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/JsonOutputHandler.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/JsonOutputHandler.java @@ -122,7 +122,7 @@ public class JsonOutputHandler extends OrcsScriptOutputHandler { @Override public void onError(Throwable th) { if (errors == null) { - errors = new ArrayList<Throwable>(); + errors = new ArrayList<>(); } errors.add(th); } @@ -371,8 +371,8 @@ public class JsonOutputHandler extends OrcsScriptOutputHandler { private static final class DebugInfo { public String scriptVersion; - public final List<LoadDescription> descriptions = new ArrayList<LoadDescription>(); - private final List<QueryData> queries = new ArrayList<QueryData>(); + public final List<LoadDescription> descriptions = new ArrayList<>(); + private final List<QueryData> queries = new ArrayList<>(); public void setScriptVersion(String version) { this.scriptVersion = version; diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/JsonOutputMath.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/JsonOutputMath.java index 9284b151347..984949bb186 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/JsonOutputMath.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/JsonOutputMath.java @@ -52,7 +52,7 @@ public class JsonOutputMath { doMax = Boolean.parseBoolean(String.valueOf(max)); Object min = context.getAttribute(OUTPUT_MIN); doMin = Boolean.parseBoolean(String.valueOf(min)); - attributeValues = new LinkedList<Double>(); + attributeValues = new LinkedList<>(); } public boolean isUsed() { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptAssemblerImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptAssemblerImpl.java index 685922cec1c..886cd5037c0 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptAssemblerImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptAssemblerImpl.java @@ -53,7 +53,7 @@ public class OrcsScriptAssemblerImpl implements OrcsScriptAssembler, OrcsScriptE private final BranchCriteriaFactory factory2; private final CriteriaFactory factory3; - private final LinkedList<QueryData> queries = new LinkedList<QueryData>(); + private final LinkedList<QueryData> queries = new LinkedList<>(); private String version; private TxQueryBuilderImpl<?> txQuery; private ArtifactQueryBuilderImpl<?> artQuery; @@ -102,7 +102,7 @@ public class OrcsScriptAssemblerImpl implements OrcsScriptAssembler, OrcsScriptE OptionsUtil.setIncludeDeletedAttributes(options, false); OptionsUtil.setIncludeDeletedRelations(options, false); - List<CriteriaSet> criterias = new ArrayList<CriteriaSet>(); + List<CriteriaSet> criterias = new ArrayList<>(); criterias.add(new CriteriaSet()); queries.add(new QueryData(options, criterias, new SelectData())); } @@ -121,19 +121,19 @@ public class OrcsScriptAssemblerImpl implements OrcsScriptAssembler, OrcsScriptE @Override public TxQueryBuilder<?> newTxQuery() { - this.txQuery = new TxQueryBuilderImpl<TxQueryBuilder<?>>(factory1, getLastQuery()); + this.txQuery = new TxQueryBuilderImpl<>(factory1, getLastQuery()); return txQuery; } @Override public BranchQueryBuilder<?> newBranchQuery() { - this.branchQuery = new BranchQueryBuilderImpl<BranchQueryBuilder<?>>(factory2, getLastQuery()); + this.branchQuery = new BranchQueryBuilderImpl<>(factory2, getLastQuery()); return branchQuery; } @Override public ArtifactQueryBuilder<?> newArtifactQuery() { - this.artQuery = new ArtifactQueryBuilderImpl<ArtifactQueryBuilder<?>>(factory3, getLastQuery()); + this.artQuery = new ArtifactQueryBuilderImpl<>(factory3, getLastQuery()); return artQuery; } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptCompilerImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptCompilerImpl.java index 5130fcc9205..4916a216cb3 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptCompilerImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptCompilerImpl.java @@ -159,7 +159,7 @@ public class OrcsScriptCompilerImpl implements OrcsScriptCompiler { } private Map<String, Object> asMap(ScriptContext context) { - Map<String, Object> data = new LinkedHashMap<String, Object>(); + Map<String, Object> data = new LinkedHashMap<>(); for (Integer scope : context.getScopes()) { Bindings bindings = context.getBindings(scope); if (bindings != null) { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterImpl.java index d4eaf08ba03..b721690ae1d 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/OrcsScriptInterpreterImpl.java @@ -638,7 +638,7 @@ public class OrcsScriptInterpreterImpl implements OrcsScriptInterpreter { ////////////////////////////// Call handler to get actual types ?; private Collection<IArtifactType> asArtifactTypes(List<OsExpression> expressions) { - Set<IArtifactType> toReturn = new LinkedHashSet<IArtifactType>(); + Set<IArtifactType> toReturn = new LinkedHashSet<>(); List<Class<?>> resolvedTypes = resolver.resolveTypes(expressions); for (int index = 0; index < resolvedTypes.size(); index++) { @@ -656,7 +656,7 @@ public class OrcsScriptInterpreterImpl implements OrcsScriptInterpreter { } private Collection<IAttributeType> asAttributeTypes(List<OsExpression> expressions) { - Set<IAttributeType> toReturn = new LinkedHashSet<IAttributeType>(); + Set<IAttributeType> toReturn = new LinkedHashSet<>(); List<Class<?>> resolvedTypes = resolver.resolveTypes(expressions); for (int index = 0; index < resolvedTypes.size(); index++) { Class<?> clazz = resolvedTypes.get(index); @@ -721,7 +721,7 @@ public class OrcsScriptInterpreterImpl implements OrcsScriptInterpreter { } private TransactionDetailsType[] asTxTypes(List<OsTxType> values) { - Set<TransactionDetailsType> toReturn = new LinkedHashSet<TransactionDetailsType>(); + Set<TransactionDetailsType> toReturn = new LinkedHashSet<>(); for (OsTxType value : values) { TransactionDetailsType type = TransactionDetailsType.Baselined; if (OsTxType.NON_BASELINE == value) { @@ -733,7 +733,7 @@ public class OrcsScriptInterpreterImpl implements OrcsScriptInterpreter { } private BranchState[] asStates(List<OsBranchState> values) { - Set<BranchState> toReturn = new LinkedHashSet<BranchState>(); + Set<BranchState> toReturn = new LinkedHashSet<>(); for (OsBranchState value : values) { BranchState state = BranchState.valueOf(value.getName()); toReturn.add(state); @@ -742,7 +742,7 @@ public class OrcsScriptInterpreterImpl implements OrcsScriptInterpreter { } private BranchType[] asBranchTypes(List<OsBranchType> values) { - Set<BranchType> toReturn = new LinkedHashSet<BranchType>(); + Set<BranchType> toReturn = new LinkedHashSet<>(); for (OsBranchType value : values) { BranchType type = BranchType.valueOf(value.getName()); toReturn.add(type); @@ -751,7 +751,7 @@ public class OrcsScriptInterpreterImpl implements OrcsScriptInterpreter { } private QueryOption[] asQueryOptions(List<OsQueryOption> options) { - Set<QueryOption> toReturn = new LinkedHashSet<QueryOption>(); + Set<QueryOption> toReturn = new LinkedHashSet<>(); for (OsQueryOption op : options) { if (OsQueryOption.CONTAINS == op) { toReturn.add(QueryOption.CASE__IGNORE); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/ArtifactMatchDataHandler.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/ArtifactMatchDataHandler.java index 38fc96b4211..12f17f79288 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/ArtifactMatchDataHandler.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/ArtifactMatchDataHandler.java @@ -58,7 +58,7 @@ public class ArtifactMatchDataHandler extends LoadDataHandlerDecorator { @Override public void onLoadStart() throws OseeCoreException { super.onLoadStart(); - matches = new HashMap<Integer, ArtifactMatch>(); + matches = new HashMap<>(); results = null; } @@ -104,7 +104,7 @@ public class ArtifactMatchDataHandler extends LoadDataHandlerDecorator { } private static <K, V> ListMultimap<K, V> newLinkedHashListMultimap() { - Map<K, Collection<V>> map = new LinkedHashMap<K, Collection<V>>(); + Map<K, Collection<V>> map = new LinkedHashMap<>(); return Multimaps.newListMultimap(map, new Supplier<List<V>>() { @Override public List<V> get() { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/ArtifactQueryBuilderImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/ArtifactQueryBuilderImpl.java index 41190298556..4221c559bc5 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/ArtifactQueryBuilderImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/ArtifactQueryBuilderImpl.java @@ -144,7 +144,7 @@ public class ArtifactQueryBuilderImpl<T> implements ArtifactQueryBuilder<T> { @Override public T andUuid(long... uuids) throws OseeCoreException { - List<Long> ids = new ArrayList<Long>(uuids.length); + List<Long> ids = new ArrayList<>(uuids.length); for (long id : uuids) { ids.add(id); } @@ -165,8 +165,8 @@ public class ArtifactQueryBuilderImpl<T> implements ArtifactQueryBuilder<T> { @SuppressWarnings("unchecked") @Override public T andGuids(Collection<String> ids) throws OseeCoreException { - Set<String> guids = new HashSet<String>(); - Set<String> invalids = new HashSet<String>(); + Set<String> guids = new HashSet<>(); + Set<String> invalids = new HashSet<>(); for (String id : ids) { if (GUID.isValid(id)) { guids.add(id); @@ -279,7 +279,7 @@ public class ArtifactQueryBuilderImpl<T> implements ArtifactQueryBuilder<T> { @Override public T andIds(Collection<? extends Identifiable<String>> ids) throws OseeCoreException { - Set<String> guids = new HashSet<String>(); + Set<String> guids = new HashSet<>(); for (Identity<String> id : ids) { guids.add(id.getGuid()); } @@ -293,7 +293,7 @@ public class ArtifactQueryBuilderImpl<T> implements ArtifactQueryBuilder<T> { @Override public T andRelatedTo(IRelationTypeSide relationTypeSide, Collection<? extends ArtifactReadable> artifacts) throws OseeCoreException { - Set<Integer> ids = new HashSet<Integer>(); + Set<Integer> ids = new HashSet<>(); for (HasLocalId<Integer> token : artifacts) { ids.add(token.getLocalId()); } @@ -302,7 +302,7 @@ public class ArtifactQueryBuilderImpl<T> implements ArtifactQueryBuilder<T> { @Override public T andRelatedToLocalIds(IRelationTypeSide relationTypeSide, int... artifactIds) throws OseeCoreException { - Set<Integer> ids = new HashSet<Integer>(); + Set<Integer> ids = new HashSet<>(); for (Integer id : artifactIds) { ids.add(id); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchCallableQueryFactory.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchCallableQueryFactory.java index 9ec6507b734..55368561e45 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchCallableQueryFactory.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchCallableQueryFactory.java @@ -111,13 +111,13 @@ public class BranchCallableQueryFactory { @Override public void onLoadStart() throws OseeCoreException { super.onLoadStart(); - branchMap = new LinkedHashMap<Long, T>(); + branchMap = new LinkedHashMap<>(); } @Override public void onLoadEnd() throws OseeCoreException { super.onLoadEnd(); - results = new LinkedList<T>(branchMap.values()); + results = new LinkedList<>(branchMap.values()); branchMap.clear(); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchQueryBuilderImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchQueryBuilderImpl.java index 17acd50fd1d..e0b86973215 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchQueryBuilderImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/BranchQueryBuilderImpl.java @@ -101,7 +101,7 @@ public class BranchQueryBuilderImpl<T> implements BranchQueryBuilder<T> { @Override public T andUuids(long... uuids) throws OseeCoreException { - Set<Long> allUuids = new HashSet<Long>(); + Set<Long> allUuids = new HashSet<>(); for (Long uuid : uuids) { allUuids.add(uuid); } @@ -121,7 +121,7 @@ public class BranchQueryBuilderImpl<T> implements BranchQueryBuilder<T> { @Override public T andIds(Collection<? extends IOseeBranch> ids) throws OseeCoreException { - Set<Long> allIds = new HashSet<Long>(); + Set<Long> allIds = new HashSet<>(); for (IOseeBranch token : ids) { allIds.add(token.getUuid()); } @@ -202,7 +202,7 @@ public class BranchQueryBuilderImpl<T> implements BranchQueryBuilder<T> { addAndCheck(queryData, criteriaFactory.createBranchArchivedCriteria(states)); } if (!areDeletedIncluded()) { - Collection<BranchState> states = new ArrayList<BranchState>(); + Collection<BranchState> states = new ArrayList<>(); for (BranchState state : BranchState.values()) { if (state != DELETE_IN_PROGRESS && state != DELETED && state != PURGE_IN_PROGRESS && state != PURGED) { states.add(state); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/CallableQueryFactory.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/CallableQueryFactory.java index 5b073d093b7..424dbe3e6bb 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/CallableQueryFactory.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/CallableQueryFactory.java @@ -74,7 +74,7 @@ public class CallableQueryFactory { @Override protected ResultSet<HasLocalId<Integer>> innerCall() throws Exception { - final List<HasLocalId<Integer>> results = new LinkedList<HasLocalId<Integer>>(); + final List<HasLocalId<Integer>> results = new LinkedList<>(); LoadDataHandlerAdapter handler = new LoadDataHandlerAdapter() { @Override public void onData(ArtifactData data) { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/CriteriaFactory.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/CriteriaFactory.java index be63cb8671e..b3c7ad45ca1 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/CriteriaFactory.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/CriteriaFactory.java @@ -53,7 +53,7 @@ public class CriteriaFactory { private Collection<? extends IAttributeType> checkForAnyType(Collection<? extends IAttributeType> attributeTypes) throws OseeCoreException { Collection<? extends IAttributeType> toReturn; if (attributeTypes.contains(ArtifactQueryBuilder.ANY_ATTRIBUTE_TYPE)) { - Collection<IAttributeType> temp = new LinkedList<IAttributeType>(); + Collection<IAttributeType> temp = new LinkedList<>(); temp.addAll(attributeTypeCache.getAll()); toReturn = temp; } else { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/QueryFactoryImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/QueryFactoryImpl.java index 94bdeef3bcd..876e087e658 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/QueryFactoryImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/QueryFactoryImpl.java @@ -92,7 +92,7 @@ public class QueryFactoryImpl implements QueryFactory { Conditions.checkNotNullOrEmpty(artifacts, "artifacts"); ArtifactReadable artifact = artifacts.iterator().next(); IOseeBranch branch = artifact.getBranch(); - Set<String> guids = new HashSet<String>(); + Set<String> guids = new HashSet<>(); for (ArtifactReadable art : artifacts) { guids.add(art.getGuid()); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TransactionCallableQueryFactory.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TransactionCallableQueryFactory.java index 3b80dadcc02..0121c2b8a35 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TransactionCallableQueryFactory.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TransactionCallableQueryFactory.java @@ -87,7 +87,7 @@ public class TransactionCallableQueryFactory { @Override protected ResultSet<Integer> innerCall() throws Exception { - final Set<Integer> txs = new LinkedHashSet<Integer>(); + final Set<Integer> txs = new LinkedHashSet<>(); LoadDataHandler handler = new LoadDataHandlerAdapter() { @Override public void onData(TxOrcsData data) { @@ -109,7 +109,7 @@ public class TransactionCallableQueryFactory { @Override public void onLoadStart() throws OseeCoreException { super.onLoadStart(); - dataMap = new LinkedHashMap<Integer, T>(); + dataMap = new LinkedHashMap<>(); } @Override diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TransactionCriteriaFactory.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TransactionCriteriaFactory.java index 5a2febae2fb..e02627dcbf3 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TransactionCriteriaFactory.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TransactionCriteriaFactory.java @@ -78,7 +78,7 @@ public class TransactionCriteriaFactory { } public Criteria newByArtifactId(Collection<ArtifactId> ids) { - ArrayList<String> theGuids = new ArrayList<String>(ids.size()); + ArrayList<String> theGuids = new ArrayList<>(ids.size()); for (ArtifactId id : ids) { theGuids.add(id.getGuid()); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TxQueryBuilderImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TxQueryBuilderImpl.java index cad7f67c952..101a01073c5 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TxQueryBuilderImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/search/TxQueryBuilderImpl.java @@ -49,7 +49,7 @@ public class TxQueryBuilderImpl<T> implements TxQueryBuilder<T> { @Override public T andTxId(int... ids) throws OseeCoreException { - Set<Integer> values = new LinkedHashSet<Integer>(); + Set<Integer> values = new LinkedHashSet<>(); for (int value : ids) { values.add(value); } @@ -104,7 +104,7 @@ public class TxQueryBuilderImpl<T> implements TxQueryBuilder<T> { @Override public T andBranch(Collection<? extends IOseeBranch> ids) throws OseeCoreException { - Set<Long> values = new LinkedHashSet<Long>(); + Set<Long> values = new LinkedHashSet<>(); for (IOseeBranch value : ids) { values.add(value.getUuid()); } @@ -114,7 +114,7 @@ public class TxQueryBuilderImpl<T> implements TxQueryBuilder<T> { @Override public T andBranchIds(long... ids) throws OseeCoreException { - Set<Long> values = new LinkedHashSet<Long>(); + Set<Long> values = new LinkedHashSet<>(); for (long value : ids) { values.add(value); } @@ -152,7 +152,7 @@ public class TxQueryBuilderImpl<T> implements TxQueryBuilder<T> { @Override public T andAuthorIds(int... id) throws OseeCoreException { - ArrayList<Integer> theList = new ArrayList<Integer>(); + ArrayList<Integer> theList = new ArrayList<>(); for (int i = 0; i < id.length; i++) { theList.add(new Integer(id[i])); } @@ -172,7 +172,7 @@ public class TxQueryBuilderImpl<T> implements TxQueryBuilder<T> { @Override public T andNullCommitId() throws OseeCoreException { - Collection<Integer> aNull = new ArrayList<Integer>(); + Collection<Integer> aNull = new ArrayList<>(); aNull.add(null); return andCommitIds(aNull); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/OrcsTransactionUtil.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/OrcsTransactionUtil.java index 78c20551435..e8765eac082 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/OrcsTransactionUtil.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/OrcsTransactionUtil.java @@ -26,7 +26,7 @@ public class OrcsTransactionUtil { List<Integer> toReturn; if (Strings.isValid(rawValue)) { String[] entries = rawValue.split(","); - toReturn = new ArrayList<Integer>(); + toReturn = new ArrayList<>(); for (String entry : entries) { Integer value = Integer.parseInt(entry.trim()); toReturn.add(value); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionFactoryImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionFactoryImpl.java index 52a46317ccd..98f54517650 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionFactoryImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TransactionFactoryImpl.java @@ -169,7 +169,7 @@ public class TransactionFactoryImpl implements TransactionFactory { private void checkAllTxsFound(String opName, List<Integer> txIds, ResultSet<TransactionReadable> result) { if (txIds.size() != result.size()) { - Set<Integer> found = new HashSet<Integer>(); + Set<Integer> found = new HashSet<>(); for (TransactionReadable tx : result) { found.add(tx.getGuid()); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxData.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxData.java index cd3eb57b7dc..7f4a14ee4e5 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxData.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxData.java @@ -35,8 +35,8 @@ public class TxData implements HasSession { private final OrcsSession session; private final GraphData graph; - private final Map<String, Artifact> writeables = new HashMap<String, Artifact>(); - private final Map<String, ArtifactReadable> readables = new HashMap<String, ArtifactReadable>(); + private final Map<String, Artifact> writeables = new HashMap<>(); + private final Map<String, ArtifactReadable> readables = new HashMap<>(); private ArtifactReadable author; private String comment; diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataLoaderImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataLoaderImpl.java index 6e7beb7c894..f12f462b25f 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataLoaderImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataLoaderImpl.java @@ -56,7 +56,7 @@ public class TxDataLoaderImpl implements TxDataLoader { } private DataLoader createLoader(OrcsSession session, IOseeBranch branch, Collection<ArtifactId> artifactIds) throws OseeCoreException { - Set<String> ids = new LinkedHashSet<String>(); + Set<String> ids = new LinkedHashSet<>(); for (ArtifactId artifactId : artifactIds) { ids.add(artifactId.getGuid()); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataManager.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataManager.java index 3b52ce0b08f..6423baea19d 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataManager.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/transaction/TxDataManager.java @@ -105,9 +105,9 @@ public class TxDataManager { public Iterable<Artifact> getForWrite(TxData txData, Iterable<? extends ArtifactId> ids) throws OseeCoreException { checkChangesAllowed(txData); - Set<ArtifactId> toLoad = new LinkedHashSet<ArtifactId>(); + Set<ArtifactId> toLoad = new LinkedHashSet<>(); - LinkedHashMap<String, Artifact> items = new LinkedHashMap<String, Artifact>(); + LinkedHashMap<String, Artifact> items = new LinkedHashMap<>(); for (ArtifactId artifactId : ids) { Artifact node = findArtifactLocallyForWrite(txData, artifactId); if (node == null) { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/AttributeTypeIndex.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/AttributeTypeIndex.java index a5ddf64a013..c1ad47218b3 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/AttributeTypeIndex.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/AttributeTypeIndex.java @@ -22,7 +22,7 @@ import org.eclipse.osee.framework.jdk.core.util.Strings; */ public class AttributeTypeIndex extends TokenTypeIndex<Long, IAttributeType, XAttributeType> { - private final Set<IAttributeType> taggables = new HashSet<IAttributeType>(); + private final Set<IAttributeType> taggables = new HashSet<>(); @Override public void put(IAttributeType token, XAttributeType dslType) { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/EnumTypeImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/EnumTypeImpl.java index 2041947066c..4007b36db79 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/EnumTypeImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/EnumTypeImpl.java @@ -61,7 +61,7 @@ public final class EnumTypeImpl extends FullyNamedIdentity<Long> implements Enum @Override public Set<String> valuesAsOrderedStringSet() { - Set<String> values = new LinkedHashSet<String>(); + Set<String> values = new LinkedHashSet<>(); for (EnumEntry oseeEnumEntry : values()) { values.add(oseeEnumEntry.getName()); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexer.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexer.java index f163e39a980..266eb211f8b 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexer.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexer.java @@ -210,7 +210,7 @@ public class OrcsTypesIndexer { private EnumType createEnumType(XOseeEnumType dslType) throws OseeCoreException { int lastOrdinal = 0; - List<EnumEntry> entries = new LinkedList<EnumEntry>(); + List<EnumEntry> entries = new LinkedList<>(); for (XOseeEnumEntry entry : dslType.getEnumEntries()) { String ordinal = entry.getOrdinal(); if (Strings.isValid(ordinal)) { @@ -262,7 +262,7 @@ public class OrcsTypesIndexer { public Void caseRemoveAttribute(RemoveAttribute removeOption) { XAttributeType attribute = removeOption.getAttribute(); String guidToMatch = attribute.getUuid(); - List<XAttributeTypeRef> toRemove = new LinkedList<XAttributeTypeRef>(); + List<XAttributeTypeRef> toRemove = new LinkedList<>(); for (XAttributeTypeRef xAttributeTypeRef : validAttributeTypes) { String itemGuid = xAttributeTypeRef.getValidAttributeType().getUuid(); if (guidToMatch.equals(itemGuid)) { @@ -277,7 +277,7 @@ public class OrcsTypesIndexer { public Void caseUpdateAttribute(UpdateAttribute updateAttribute) { XAttributeTypeRef refToUpdate = updateAttribute.getAttribute(); String guidToMatch = refToUpdate.getValidAttributeType().getUuid(); - List<XAttributeTypeRef> toRemove = new LinkedList<XAttributeTypeRef>(); + List<XAttributeTypeRef> toRemove = new LinkedList<>(); for (XAttributeTypeRef xAttributeTypeRef : validAttributeTypes) { String itemGuid = xAttributeTypeRef.getValidAttributeType().getUuid(); if (guidToMatch.equals(itemGuid)) { @@ -322,7 +322,7 @@ public class OrcsTypesIndexer { public Void caseRemoveEnum(RemoveEnum removeEnum) { XOseeEnumEntry enumEntry = removeEnum.getEnumEntry(); String nameToMatch = enumEntry.getName(); - List<XOseeEnumEntry> toRemove = new LinkedList<XOseeEnumEntry>(); + List<XOseeEnumEntry> toRemove = new LinkedList<>(); for (XOseeEnumEntry item : enumEntries) { String toMatch = item.getName(); if (nameToMatch.equals(toMatch)) { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/util/AbstractTypeCollection.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/util/AbstractTypeCollection.java index 0e129a4b66a..a45dd2cbcff 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/util/AbstractTypeCollection.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/util/AbstractTypeCollection.java @@ -38,7 +38,7 @@ public abstract class AbstractTypeCollection<TYPE, MATCH_DATA extends OrcsWritea protected abstract TYPE getType(DATA data) throws OseeCoreException; public Collection<? extends TYPE> getExistingTypes(DeletionFlag includeDeleted) throws OseeCoreException { - Set<TYPE> toReturn = new LinkedHashSet<TYPE>(); + Set<TYPE> toReturn = new LinkedHashSet<>(); for (DATA data : getList(includeDeleted)) { if (isValid(data)) { toReturn.add(getType(data)); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/util/FilterableCollection.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/util/FilterableCollection.java index e9df410ec06..cf9dfdb6a0e 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/util/FilterableCollection.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/util/FilterableCollection.java @@ -93,7 +93,7 @@ public abstract class FilterableCollection<MATCH_DATA, KEY, DATA> { private <T extends DATA> List<T> getListByFilter(Collection<DATA> source, Predicate<MATCH_DATA> matcher) throws OseeCoreException { List<T> toReturn; if (source != null && !source.isEmpty()) { - toReturn = new LinkedList<T>(); + toReturn = new LinkedList<>(); for (Iterator<DATA> iterator = source.iterator(); iterator.hasNext();) { DATA data = iterator.next(); if (isValid(data)) { diff --git a/plugins/org.eclipse.osee.orcs.db.mock/src/org/eclipse/osee/orcs/db/mock/internal/TestDatabase.java b/plugins/org.eclipse.osee.orcs.db.mock/src/org/eclipse/osee/orcs/db/mock/internal/TestDatabase.java index ed260a82b5f..76505c51191 100644 --- a/plugins/org.eclipse.osee.orcs.db.mock/src/org/eclipse/osee/orcs/db/mock/internal/TestDatabase.java +++ b/plugins/org.eclipse.osee.orcs.db.mock/src/org/eclipse/osee/orcs/db/mock/internal/TestDatabase.java @@ -95,7 +95,7 @@ public class TestDatabase { } private Dictionary<String, Object> newConfig(String dbPath) { - Map<String, Object> config = new LinkedHashMap<String, Object>(); + Map<String, Object> config = new LinkedHashMap<>(); config.put(JdbcConstants.JDBC_SERVICE__ID, Lib.generateUuid()); config.put(JdbcConstants.JDBC_SERVER__DB_DATA_PATH, dbPath); config.put(JdbcConstants.JDBC_SERVER__USE_RANDOM_PORT, true); @@ -103,7 +103,7 @@ public class TestDatabase { config.put(JdbcConstants.JDBC_POOL__MAX_ACTIVE_CONNECTIONS, 100); config.put(JdbcConstants.JDBC_POOL__MAX_IDLE_CONNECTIONS, 100); - Set<String> bindings = new HashSet<String>(); + Set<String> bindings = new HashSet<>(); for (String binding : osgiBindings) { bindings.add(binding); } @@ -115,7 +115,7 @@ public class TestDatabase { } catch (JSONException ex) { throw new OseeCoreException(ex); } - Hashtable<String, Object> data = new Hashtable<String, Object>(); + Hashtable<String, Object> data = new Hashtable<>(); data.put("serviceId", "org.eclipse.osee.jdbc.internal.osgi.JdbcComponentFactory"); data.put(JdbcConstants.JDBC_SERVICE__CONFIGS, jsonArray.toString()); return data; diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/intergration/PurgeAttributeTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/intergration/PurgeAttributeTest.java index 232c5041503..d9612a2c206 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/intergration/PurgeAttributeTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/intergration/PurgeAttributeTest.java @@ -50,7 +50,7 @@ public class PurgeAttributeTest { int prePurgeTxsCount = getCount(jdbcClient, "osee_txs"); stmt.runPreparedQuery("select attr_id from osee_attribute where value = 'Software Requirements'"); - List<Long> toPurge = new LinkedList<Long>(); + List<Long> toPurge = new LinkedList<>(); while (stmt.next()) { toPurge.add(stmt.getLong("attr_id")); } diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeItemConflictTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeItemConflictTest.java index bea7678a7d0..4d60fe72078 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeItemConflictTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeItemConflictTest.java @@ -99,7 +99,7 @@ public class ChangeItemConflictTest { @Parameters public static List<Object[]> getData() { - List<Object[]> data = new LinkedList<Object[]>(); + List<Object[]> data = new LinkedList<>(); addArtifactTestCases(data); addAttributeTestCases(data); diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ComputeNetChangeTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ComputeNetChangeTest.java index b3e6c774ce7..6d8ccbcac9a 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ComputeNetChangeTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ComputeNetChangeTest.java @@ -35,7 +35,7 @@ import org.junit.Test; public class ComputeNetChangeTest { public List<TestData> getTestData() { - List<TestData> data = new ArrayList<TestData>(); + List<TestData> data = new ArrayList<>(); // New Or Introduced data.add(createTest(1, entry(3L, NEW), entry(4L, NEW), entry(5L, MODIFIED), null, entry(5L, NEW), false)); @@ -96,7 +96,7 @@ public class ComputeNetChangeTest { @Test public void testNetChange() throws Exception { List<TestData> data = getTestData(); - List<ChangeItem> items = new ArrayList<ChangeItem>(); + List<ChangeItem> items = new ArrayList<>(); for (TestData testData : data) { items.add(testData.getItem()); } @@ -121,7 +121,7 @@ public class ComputeNetChangeTest { @Test(expected = OseeStateException.class) @Ignore public void testErrorStates() throws Exception { - List<ChangeItem> items = new ArrayList<ChangeItem>(); + List<ChangeItem> items = new ArrayList<>(); // Source to Non-Parent commit items.add(ChangeTestUtility.createItem(3, entry(10L, MODIFIED), null, entry(11L, MODIFIED), null, null)); diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java index 7658816a58b..e29d2204f8f 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java @@ -76,7 +76,7 @@ public class MissingChangeItemFactoryTest { @Parameters public static Collection<Object[]> data() { - List<Object[]> params = new LinkedList<Object[]>(); + List<Object[]> params = new LinkedList<>(); params.add(testCase_missingAttribute()); params.add(testCase_missingRelation()); params.add(testCase_deletedAttribute()); @@ -175,7 +175,7 @@ public class MissingChangeItemFactoryTest { * This tests when a modified attribute causes its artifact and non-modified attribute to be introduced */ private static Object[] testCase_missingAttribute() { - List<ChangeItem> changes = new LinkedList<ChangeItem>(); + List<ChangeItem> changes = new LinkedList<>(); final int ci1AttrId = 1; final int artId = 3; final long missingGamma = 9L; @@ -185,17 +185,17 @@ public class MissingChangeItemFactoryTest { ChangeItemUtil.newAttributeChange(ci1AttrId, 2, artId, 4L, ModificationType.MODIFIED, Strings.EMPTY_STRING); changes.add(ci1); - List<AttributeData> attrDatas = new LinkedList<AttributeData>(); + List<AttributeData> attrDatas = new LinkedList<>(); AttributeData attrData1 = createAttributeData(artId, ci1AttrId, 1L, ModificationType.MODIFIED); AttributeData attrData2 = createAttributeData(artId, ci1AttrId + 1, missingGamma, ModificationType.INTRODUCED); attrDatas.add(attrData1); attrDatas.add(attrData2); - List<ArtifactData> artData = new LinkedList<ArtifactData>(); + List<ArtifactData> artData = new LinkedList<>(); ArtifactData artData1 = createArtifactData(artId, artGamma, ModificationType.NEW); artData.add(artData1); - List<ChangeItem> expected = new LinkedList<ChangeItem>(); + List<ChangeItem> expected = new LinkedList<>(); expected.add(createExpected(attrData2)); expected.add(createExpected(artData1)); @@ -206,7 +206,7 @@ public class MissingChangeItemFactoryTest { * create a relation change item who's artifact and other attributes and relations need to be introduced */ private static Object[] testCase_missingRelation() { - List<ChangeItem> changes = new LinkedList<ChangeItem>(); + List<ChangeItem> changes = new LinkedList<>(); final int ci1AttrId = 22; final long missingGamma = 9L; long artGamma = 7L; @@ -218,25 +218,25 @@ public class MissingChangeItemFactoryTest { ChangeItem ci1 = ChangeItemUtil.newRelationChange(relId, 0, srcGamma, ModificationType.NEW, artA, artB, ""); changes.add(ci1); - List<AttributeData> attrDatas = new LinkedList<AttributeData>(); + List<AttributeData> attrDatas = new LinkedList<>(); AttributeData attrData1 = createAttributeData(artA, ci1AttrId, 1L, ModificationType.MODIFIED); AttributeData attrData2 = createAttributeData(artA, ci1AttrId + 1, missingGamma, ModificationType.INTRODUCED); attrDatas.add(attrData1); attrDatas.add(attrData2); - List<ArtifactData> artData = new LinkedList<ArtifactData>(); + List<ArtifactData> artData = new LinkedList<>(); ArtifactData artData1 = createArtifactData(artA, artGamma, ModificationType.NEW); artData.add(artData1); - List<RelationData> relDatas = new LinkedList<RelationData>(); + List<RelationData> relDatas = new LinkedList<>(); RelationData relData1 = createRelationData(11, artA, artB + 1, 88, ModificationType.NEW); relDatas.add(relData1); - List<ArtifactData> destArtData = new LinkedList<ArtifactData>(); + List<ArtifactData> destArtData = new LinkedList<>(); ArtifactData destArt = createArtifactData(artB + 1, 99, ModificationType.NEW); destArtData.add(destArt); - List<ChangeItem> expected = new LinkedList<ChangeItem>(); + List<ChangeItem> expected = new LinkedList<>(); expected.add(createExpected(attrData1)); expected.add(createExpected(attrData2)); expected.add(createExpected(artData1)); @@ -249,24 +249,24 @@ public class MissingChangeItemFactoryTest { * create a deleted attribute who's artifact needs to be introduced */ private static Object[] testCase_deletedAttribute() { - List<ChangeItem> changes = new LinkedList<ChangeItem>(); + List<ChangeItem> changes = new LinkedList<>(); final int artId = 3; ChangeItem ci1 = ChangeItemUtil.newAttributeChange(22, 2, artId, 4L, ModificationType.DELETED, Strings.EMPTY_STRING); changes.add(ci1); - List<AttributeData> attrDatas = new LinkedList<AttributeData>(); + List<AttributeData> attrDatas = new LinkedList<>(); AttributeData attrData1 = createAttributeData(artId, 33, 1L, ModificationType.MODIFIED); AttributeData attrData2 = createAttributeData(artId, 44 + 1, 67L, ModificationType.NEW); attrDatas.add(attrData1); attrDatas.add(attrData2); - List<ArtifactData> artData = new LinkedList<ArtifactData>(); + List<ArtifactData> artData = new LinkedList<>(); ArtifactData artData1 = createArtifactData(artId, 89L, ModificationType.NEW); artData.add(artData1); - List<ChangeItem> expected = new LinkedList<ChangeItem>(); + List<ChangeItem> expected = new LinkedList<>(); expected.add(createExpected(attrData1)); expected.add(createExpected(attrData2)); expected.add(createExpected(artData1)); @@ -278,24 +278,24 @@ public class MissingChangeItemFactoryTest { * create an artifact_deleted attribute who's artifact needs to be introduced deleted */ private static Object[] testCase_artifactDeletedAttribute() { - List<ChangeItem> changes = new LinkedList<ChangeItem>(); + List<ChangeItem> changes = new LinkedList<>(); final int artId = 3; ChangeItem ci1 = ChangeItemUtil.newAttributeChange(22, 2, artId, 4L, ModificationType.ARTIFACT_DELETED, Strings.EMPTY_STRING); changes.add(ci1); - List<AttributeData> attrDatas = new LinkedList<AttributeData>(); + List<AttributeData> attrDatas = new LinkedList<>(); AttributeData attrData1 = createAttributeData(artId, 33, 1L, ModificationType.ARTIFACT_DELETED); AttributeData attrData2 = createAttributeData(artId, 44 + 1, 67L, ModificationType.ARTIFACT_DELETED); attrDatas.add(attrData1); attrDatas.add(attrData2); - List<ArtifactData> artData = new LinkedList<ArtifactData>(); + List<ArtifactData> artData = new LinkedList<>(); ArtifactData artData1 = createArtifactData(artId, 89L, ModificationType.DELETED); artData.add(artData1); - List<ChangeItem> expected = new LinkedList<ChangeItem>(); + List<ChangeItem> expected = new LinkedList<>(); expected.add(createExpected(attrData1)); expected.add(createExpected(attrData2)); expected.add(createExpected(artData1)); diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImplTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImplTest.java index c66caa497ca..5d2e9912743 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImplTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImplTest.java @@ -857,7 +857,7 @@ public class DataLoaderFactoryImplTest { assertFalse(queryId.equals(-1)); assertEquals(joinCaptor.getValue().getQueryId(), queryId); - List<Object> queryIdsToMatch = new ArrayList<Object>(); + List<Object> queryIdsToMatch = new ArrayList<>(); for (Object param : params) { if (param.equals(JQID)) { queryIdsToMatch.add(iterator.next()); diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/LoaderSqlHandlerFactoryUtilTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/LoaderSqlHandlerFactoryUtilTest.java index a1a79a8abf6..cced8473335 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/LoaderSqlHandlerFactoryUtilTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/LoaderSqlHandlerFactoryUtilTest.java @@ -58,7 +58,7 @@ public class LoaderSqlHandlerFactoryUtilTest { @Test public void testQueryModuleFactory() throws Exception { - List<Criteria> criteria = new ArrayList<Criteria>(); + List<Criteria> criteria = new ArrayList<>(); criteria.add(new CriteriaArtifact()); criteria.add(new CriteriaAttribute(null, null)); criteria.add(new CriteriaRelation(null, null)); diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/DataResourceTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/DataResourceTest.java index 2cd9328f1bb..d4fd77f11a1 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/DataResourceTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/DataResourceTest.java @@ -128,7 +128,7 @@ public class DataResourceTest { @Parameters public static Collection<Object[]> data() { - Collection<Object[]> data = new ArrayList<Object[]>(); + Collection<Object[]> data = new ArrayList<>(); data.add(new Object[] {"application/zip", "ISO-8859-1", ".zip", "http://hello.com"}); data.add(new Object[] {"txt/plain", "UTF-8", ".txt", "attr://123/1123/1231/hello.txt"}); diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/resource/AttributeLocatorProviderTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/resource/AttributeLocatorProviderTest.java index 1d6208a231a..1ea067b6d16 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/resource/AttributeLocatorProviderTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/resource/AttributeLocatorProviderTest.java @@ -42,7 +42,7 @@ public class AttributeLocatorProviderTest { } private List<TestData> getTestGenerateLocatorData() { - List<TestData> cases = new ArrayList<TestData>(); + List<TestData> cases = new ArrayList<>(); cases.add(new TestData("1", "", null, true, null)); cases.add(new TestData("2", null, null, true, null)); cases.add(new TestData("3", null, "", true, null)); @@ -72,7 +72,7 @@ public class AttributeLocatorProviderTest { } private List<TestData> getTestGetResourceLocatorData() { - List<TestData> cases = new ArrayList<TestData>(); + List<TestData> cases = new ArrayList<>(); cases.add(new TestData("1", "", true, null)); cases.add(new TestData("2", null, true, null)); cases.add(new TestData("3", "$%#", true, null)); diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/SearchAsserts.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/SearchAsserts.java index 61a2b7d37b1..67fae7711ce 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/SearchAsserts.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/SearchAsserts.java @@ -57,7 +57,7 @@ public final class SearchAsserts { } public static List<Pair<String, Long>> asTags(String word, long... entries) { - List<Pair<String, Long>> data = new ArrayList<Pair<String, Long>>(); + List<Pair<String, Long>> data = new ArrayList<>(); for (int index = 0; index < entries.length; index++) { data.add(new Pair<String, Long>(word, entries[index])); } @@ -65,7 +65,7 @@ public final class SearchAsserts { } public static List<MatchLocation> asLocations(int... data) { - List<MatchLocation> locations = new ArrayList<MatchLocation>(); + List<MatchLocation> locations = new ArrayList<>(); if (data != null && data.length > 0) { for (int index = 0; index < data.length; index++) { locations.add(new MatchLocation(data[index], data[++index])); diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/handlers/SqlHandlerFactoryUtilTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/handlers/SqlHandlerFactoryUtilTest.java index 03ffdef98ac..482e4ed751b 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/handlers/SqlHandlerFactoryUtilTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/handlers/SqlHandlerFactoryUtilTest.java @@ -65,7 +65,7 @@ public class SqlHandlerFactoryUtilTest { @Test public void testQueryModuleFactory() throws Exception { - List<Criteria> criteria = new ArrayList<Criteria>(); + List<Criteria> criteria = new ArrayList<>(); criteria.add(new CriteriaArtifactGuids(null)); criteria.add(new CriteriaArtifactIds(null)); criteria.add(new CriteriaRelationTypeFollow(null)); diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallableTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallableTest.java index 46114ff1941..6de289dc3dc 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallableTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallableTest.java @@ -74,7 +74,7 @@ public class IndexingTaskDatabaseTxCallableTest { @Test public void testTagging() throws Exception { - ArrayList<IndexedResource> sources = new ArrayList<IndexedResource>(); + ArrayList<IndexedResource> sources = new ArrayList<>(); sources.add(resource1); sources.add(resource2); when(resource1.getTypeUuid()).thenReturn(CoreAttributeTypes.Name.getGuid()); diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/language/EnglishLanguageTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/language/EnglishLanguageTest.java index d4755c30c01..ef3ce99b6bf 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/language/EnglishLanguageTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/language/EnglishLanguageTest.java @@ -42,7 +42,7 @@ public class EnglishLanguageTest { } private Map<String, String> getSingularToPluralData() { - Map<String, String> testMap = new LinkedHashMap<String, String>(); + Map<String, String> testMap = new LinkedHashMap<>(); testMap.put("tries", "try"); testMap.put("volcanoes", "volcano"); testMap.put("geese", "goose"); diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagEncoderTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagEncoderTest.java index 3f6f8e3238e..ecb04500355 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagEncoderTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagEncoderTest.java @@ -41,14 +41,14 @@ public class TagEncoderTest { @Test public void testTagEncoder() { - List<Pair<String, Long>> actualTags = new ArrayList<Pair<String, Long>>(); + List<Pair<String, Long>> actualTags = new ArrayList<>(); encoder.encode(toEncode, new MockTagCollector(actualTags)); SearchAsserts.assertTagsEqual(expected, actualTags); } @Parameters public static Collection<Object[]> data() { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); data.add(new Object[] {"hello", SearchAsserts.asTags("hello", 1520625)}); data.add(new Object[] { "what happens when we have a long string", diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagProcessorTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagProcessorTest.java index 8b775f56ac3..4365d705d1f 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagProcessorTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagProcessorTest.java @@ -52,7 +52,7 @@ public class TagProcessorTest { @Test public void testCollectFromString() { - List<Pair<String, Long>> actual = new ArrayList<Pair<String, Long>>(); + List<Pair<String, Long>> actual = new ArrayList<>(); TagCollector tagCollector = new MockTagCollector(actual); tagProcessor.collectFromString(expectedParsed, tagCollector); SearchAsserts.assertTagsEqual(expected, actual); @@ -63,7 +63,7 @@ public class TagProcessorTest { InputStream inputStream = null; try { inputStream = new XmlTextInputStream(rawData); - List<Pair<String, Long>> actual = new ArrayList<Pair<String, Long>>(); + List<Pair<String, Long>> actual = new ArrayList<>(); TagCollector tagCollector = new MockTagCollector(actual); tagProcessor.collectFromInputStream(inputStream, tagCollector); SearchAsserts.assertTagsEqual(expected, actual); @@ -77,7 +77,7 @@ public class TagProcessorTest { Scanner sourceScanner = null; try { sourceScanner = new Scanner(new XmlTextInputStream(rawData), "UTF-8"); - List<Pair<String, Long>> actual = new ArrayList<Pair<String, Long>>(); + List<Pair<String, Long>> actual = new ArrayList<>(); TagCollector tagCollector = new MockTagCollector(actual); tagProcessor.collectFromScanner(sourceScanner, tagCollector); SearchAsserts.assertTagsEqual(expected, actual); @@ -90,7 +90,7 @@ public class TagProcessorTest { @Parameters public static Collection<Object[]> data() throws Exception { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); TagProcessor tagProcess = new TagProcessor(new EnglishLanguage(new MockLog()), new TagEncoder()); for (int index = 1; index <= 9; index++) { @@ -104,7 +104,7 @@ public class TagProcessorTest { } private static List<Pair<String, Long>> loadExpected(String resourceName) throws IOException { - List<Pair<String, Long>> data = new ArrayList<Pair<String, Long>>(); + List<Pair<String, Long>> data = new ArrayList<>(); String rawData = getResource(resourceName); String[] entries = rawData.split("\r?\n"); for (String entry : entries) { diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassMatcherTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassMatcherTest.java index b5745dae8fd..41cce4ccb97 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassMatcherTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassMatcherTest.java @@ -63,7 +63,7 @@ public class SecondPassMatcherTest { @Parameters public static Collection<Object[]> data() { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); StreamMatcher matcher = MatcherFactory.createMatcher(); diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassScannerTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassScannerTest.java index 8f724733c9c..9a58f157078 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassScannerTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassScannerTest.java @@ -60,7 +60,7 @@ public class SecondPassScannerTest { @Parameters public static Collection<Object[]> data() { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); data.add(new Object[] { "What->does] .this. mean", @@ -91,10 +91,10 @@ public class SecondPassScannerTest { } private static List<Pair<String, MatchLocation>> getExpected(List<String> tokens, int... locations) { - List<Pair<String, MatchLocation>> toReturn = new LinkedList<Pair<String, MatchLocation>>(); + List<Pair<String, MatchLocation>> toReturn = new LinkedList<>(); List<MatchLocation> matchLocs = SearchAsserts.asLocations(locations); for (int i = 0; i < tokens.size(); i++) { - Pair<String, MatchLocation> pair = new Pair<String, MatchLocation>(tokens.get(i), matchLocs.get(i)); + Pair<String, MatchLocation> pair = new Pair<>(tokens.get(i), matchLocs.get(i)); toReturn.add(pair); } return toReturn; diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/WordsUtilTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/WordsUtilTest.java index 9606c837986..27eda1117e6 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/WordsUtilTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/WordsUtilTest.java @@ -114,7 +114,7 @@ public class WordsUtilTest { @Parameters public static Collection<Object[]> data() { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); //***WORD*** String dataWithSpecial = getSpecial(169, 174, 87, 79, 82, 68, 96, 8220, 34); data.add(new Object[] {dataWithSpecial, 5, true, new String[] {"WORD"}}); diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriterTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriterTest.java index 4b814942c4c..5725d15d404 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriterTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriterTest.java @@ -91,7 +91,7 @@ public class TransactionWriterTest { stores = Arrays.asList(dao1, dao2); - final Map<SqlOrderEnum, IdJoinQuery> joins = new LinkedHashMap<SqlOrderEnum, IdJoinQuery>(); + final Map<SqlOrderEnum, IdJoinQuery> joins = new LinkedHashMap<>(); joins.put(SqlOrderEnum.ARTIFACTS, join1); joins.put(SqlOrderEnum.ATTRIBUTES, join2); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DataProxyFactoryProviderImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DataProxyFactoryProviderImpl.java index bffbb7318f1..2aa3fcdcda7 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DataProxyFactoryProviderImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DataProxyFactoryProviderImpl.java @@ -27,7 +27,7 @@ import org.osgi.framework.ServiceReference; */ public class DataProxyFactoryProviderImpl implements DataProxyFactoryProvider { - private final Map<String, DataProxyFactory> proxyClassMap = new ConcurrentHashMap<String, DataProxyFactory>(); + private final Map<String, DataProxyFactory> proxyClassMap = new ConcurrentHashMap<>(); private final List<ServiceReference<DataProxyFactory>> pending = new CopyOnWriteArrayList<ServiceReference<DataProxyFactory>>(); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/DatabaseConflictAccessor.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/DatabaseConflictAccessor.java index 729f05ec149..e7710d54a0b 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/DatabaseConflictAccessor.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/DatabaseConflictAccessor.java @@ -66,9 +66,9 @@ public class DatabaseConflictAccessor { } public void store(Collection<Conflict> conflicts) throws OseeCoreException { - List<Object[]> insertData = new ArrayList<Object[]>(); - List<Object[]> updateData = new ArrayList<Object[]>(); - List<Object[]> deleteData = new ArrayList<Object[]>(); + List<Object[]> insertData = new ArrayList<>(); + List<Object[]> updateData = new ArrayList<>(); + List<Object[]> deleteData = new ArrayList<>(); for (Conflict conflict : conflicts) { if (conflict.isDirty()) { switch (conflict.getStorageState()) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/OseeInfoDataAccessor.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/OseeInfoDataAccessor.java index 48509f86dbe..9b21961a93e 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/OseeInfoDataAccessor.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/OseeInfoDataAccessor.java @@ -162,7 +162,7 @@ public class OseeInfoDataAccessor implements KeyValueDataAccessor { @Override public Set<String> getKeys() throws OseeCoreException { - Set<String> keys = new HashSet<String>(); + Set<String> keys = new HashSet<>(); JdbcStatement chStmt = jdbcClient.getStatement(); try { chStmt.runPreparedQuery(GET_KEYS_SQL); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/UpdatePreviousTxCurrent.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/UpdatePreviousTxCurrent.java index 099ff7fcafe..4402e955d85 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/UpdatePreviousTxCurrent.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/accessor/UpdatePreviousTxCurrent.java @@ -94,7 +94,7 @@ public class UpdatePreviousTxCurrent { private void updateNoLongerCurrentGammas(String tableName, String columnName, int queryId) throws OseeCoreException { String query = String.format(SELECT_TXS_AND_GAMMAS, tableName, columnName); - List<Object[]> updateData = new ArrayList<Object[]>(); + List<Object[]> updateData = new ArrayList<>(); JdbcStatement chStmt = jdbcClient.getStatement(connection); try { chStmt.runPreparedQuery(JdbcConstants.JDBC__MAX_FETCH_SIZE, query, queryId, branchUuid, @@ -110,7 +110,7 @@ public class UpdatePreviousTxCurrent { } public void updateTxNotCurrentsFromTx(int transaction_id) throws OseeCoreException { - List<Object[]> updateData = new ArrayList<Object[]>(); + List<Object[]> updateData = new ArrayList<>(); JdbcStatement chStmt = jdbcClient.getStatement(connection); try { chStmt.runPreparedQuery(JdbcConstants.JDBC__MAX_FETCH_SIZE, SELECT_TXS_AND_GAMMAS_FROM_TXS, branchUuid, diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/BranchCopyTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/BranchCopyTxCallable.java index e79e4257554..d078e049d50 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/BranchCopyTxCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/BranchCopyTxCallable.java @@ -85,8 +85,8 @@ public final class BranchCopyTxCallable extends JdbcTransaction { } private void populateTransaction(double workAmount, JdbcConnection connection, int intoTx, Long parentBranch, int copyTxId) throws OseeCoreException { - List<Object[]> data = new ArrayList<Object[]>(); - HashSet<Integer> gammas = new HashSet<Integer>(100000); + List<Object[]> data = new ArrayList<>(); + HashSet<Integer> gammas = new HashSet<>(100000); long parentBranchId = RelationalConstants.BRANCH_SENTINEL; if (parentBranch != null) { parentBranchId = parentBranch; diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CheckBranchExchangeIntegrityCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CheckBranchExchangeIntegrityCallable.java index 3fbb097e036..c0a41510eb9 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CheckBranchExchangeIntegrityCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CheckBranchExchangeIntegrityCallable.java @@ -66,7 +66,7 @@ public class CheckBranchExchangeIntegrityCallable extends AbstractDatastoreCalla @Override public URI call() throws Exception { - List<ReferentialIntegrityConstraint> constraints = new ArrayList<ReferentialIntegrityConstraint>(); + List<ReferentialIntegrityConstraint> constraints = new ArrayList<>(); long startTime = System.currentTimeMillis(); IResourceLocator resourceLocator = findResourceToCheck(fileToCheck); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseTxCallable.java index 79dfa29d7e5..1f7d03b9e66 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseTxCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CommitBranchDatabaseTxCallable.java @@ -154,7 +154,7 @@ public class CommitBranchDatabaseTxCallable extends AbstractDatastoreTxCallable< } private void insertCommitAddressing(Integer newTx, JdbcConnection connection) throws OseeCoreException { - List<Object[]> insertData = new ArrayList<Object[]>(); + List<Object[]> insertData = new ArrayList<>(); for (ChangeItem change : changes) { ModificationType modType = change.getNetChange().getModType(); insertData.add(new Object[] { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ConsolidateArtifactVersionDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ConsolidateArtifactVersionDatabaseTxCallable.java index 2cd704adf2e..f388cf2f379 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ConsolidateArtifactVersionDatabaseTxCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ConsolidateArtifactVersionDatabaseTxCallable.java @@ -62,10 +62,10 @@ public class ConsolidateArtifactVersionDatabaseTxCallable extends AbstractDatast "update osee_txs%s set mod_type = ?, tx_current = ? where transaction_id = ? and gamma_id = ?"; private List<Object[]> deleteArtifactVersionData; - private final List<Long> obsoleteGammas = new ArrayList<Long>(); - private final List<Object[]> addressingToDelete = new ArrayList<Object[]>(13000); - private final List<Object[]> updateAddressingData = new ArrayList<Object[]>(5000); - private final List<Object[]> updateTxsCurrentModData = new ArrayList<Object[]>(5000); + private final List<Long> obsoleteGammas = new ArrayList<>(); + private final List<Object[]> addressingToDelete = new ArrayList<>(13000); + private final List<Object[]> updateAddressingData = new ArrayList<>(5000); + private final List<Object[]> updateTxsCurrentModData = new ArrayList<>(5000); private ExportImportJoinQuery gammaJoin; private JdbcConnection connection; private int previousArtifactId; @@ -87,7 +87,7 @@ public class ConsolidateArtifactVersionDatabaseTxCallable extends AbstractDatast } private void init() throws OseeCoreException { - deleteArtifactVersionData = new ArrayList<Object[]>(14000); + deleteArtifactVersionData = new ArrayList<>(14000); obsoleteGammas.clear(); updateAddressingData.clear(); addressingToDelete.clear(); @@ -115,7 +115,7 @@ public class ConsolidateArtifactVersionDatabaseTxCallable extends AbstractDatast private void findArtifactMods() throws OseeCoreException { ArtifactJoinQuery artifactJoinQuery = populateJoinTableWithArtifacts(); - List<Address> mods = new ArrayList<Address>(); + List<Address> mods = new ArrayList<>(); try { chStmt.runPreparedQuery(JdbcConstants.JDBC__MAX_FETCH_SIZE, FIND_ARTIFACT_MODS, artifactJoinQuery.getQueryId()); while (chStmt.next()) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ConsolidateRelationsDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ConsolidateRelationsDatabaseTxCallable.java index d3c6732a0d7..eb70643e690 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ConsolidateRelationsDatabaseTxCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ConsolidateRelationsDatabaseTxCallable.java @@ -45,11 +45,11 @@ public class ConsolidateRelationsDatabaseTxCallable extends AbstractDatastoreTxC private static final String DELETE_RELATIONS = "delete from osee_relation_link where gamma_id = ?"; - private final List<Object[]> relationDeleteData = new ArrayList<Object[]>(14000); - private final List<Long> obsoleteGammas = new ArrayList<Long>(); + private final List<Object[]> relationDeleteData = new ArrayList<>(14000); + private final List<Long> obsoleteGammas = new ArrayList<>(); private final StringBuilder addressingBackup = new StringBuilder(100000); - private final List<Object[]> addressingToDelete = new ArrayList<Object[]>(13000); - private final List<Object[]> updateAddressingData = new ArrayList<Object[]>(5000); + private final List<Object[]> addressingToDelete = new ArrayList<>(13000); + private final List<Object[]> updateAddressingData = new ArrayList<>(5000); private ExportImportJoinQuery gammaJoin; private JdbcConnection connection; private long previousRelationTypeId; diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseTxCallable.java index b5b7ca409d8..40993eb72bc 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseTxCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/CreateBranchDatabaseTxCallable.java @@ -232,7 +232,7 @@ public class CreateBranchDatabaseTxCallable extends JdbcTransaction { private void populateBaseTransaction(double workAmount, JdbcConnection connection, int baseTxId, int sourceTxId) throws OseeCoreException { if (newBranchData.getBranchType() != BranchType.SYSTEM_ROOT) { - HashSet<Integer> gammas = new HashSet<Integer>(100000); + HashSet<Integer> gammas = new HashSet<>(100000); long parentBranchId = -1; OseePreparedStatement addressing = jdbcClient.getBatchStatement(connection, INSERT_ADDRESSING); @@ -276,7 +276,7 @@ public class CreateBranchDatabaseTxCallable extends JdbcTransaction { int owner = PermissionEnum.OWNER.getPermId(); int deny = PermissionEnum.DENY.getPermId(); - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); JdbcStatement chStmt = jdbcClient.getStatement(connection); try { chStmt.runPreparedQuery(JdbcConstants.JDBC__MAX_FETCH_SIZE, GET_BRANCH_ACCESS_CONTROL_LIST, parentBranch); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ExportBranchDatabaseCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ExportBranchDatabaseCallable.java index 44a0357fc96..def9a2657eb 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ExportBranchDatabaseCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/ExportBranchDatabaseCallable.java @@ -163,8 +163,8 @@ public class ExportBranchDatabaseCallable extends AbstractDatastoreCallable<URI> } private void executeTasks(List<AbstractExportItem> taskList) throws Exception { - final List<Throwable> throwables = new LinkedList<Throwable>(); - final List<Future<?>> futures = new CopyOnWriteArrayList<Future<?>>(); + final List<Throwable> throwables = new LinkedList<>(); + final List<Future<?>> futures = new CopyOnWriteArrayList<>(); ExecutorAdmin executor = getExecutorAdmin(); for (AbstractExportItem exportItem : taskList) { @@ -191,7 +191,7 @@ public class ExportBranchDatabaseCallable extends AbstractDatastoreCallable<URI> } if (!throwables.isEmpty()) { - List<StackTraceElement> trace = new LinkedList<StackTraceElement>(); + List<StackTraceElement> trace = new LinkedList<>(); for (Throwable th : throwables) { for (StackTraceElement element : th.getStackTrace()) { trace.add(element); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/FetchDatastoreInfoCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/FetchDatastoreInfoCallable.java index 9a6afe2480c..7f478003d38 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/FetchDatastoreInfoCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/FetchDatastoreInfoCallable.java @@ -50,13 +50,13 @@ public class FetchDatastoreInfoCallable extends AbstractDatastoreCallable<DataSt public DataStoreInfo call() throws Exception { DataStoreInfoImpl dataStoreInfo = new DataStoreInfoImpl(); - Map<String, String> props = new HashMap<String, String>(); + Map<String, String> props = new HashMap<>(); addInfoProperties(props); addDbMetaData(props); dataStoreInfo.setProperties(props); - Set<URL> configResources = new HashSet<URL>(); + Set<URL> configResources = new HashSet<>(); dataStoreInfo.setConfigurationResources(configResources); for (JdbcMigrationResource resource : schemaProvider.get()) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InitializeDatastoreCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InitializeDatastoreCallable.java index 1c73f0fa5e5..34119889c7e 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InitializeDatastoreCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InitializeDatastoreCallable.java @@ -85,7 +85,7 @@ public class InitializeDatastoreCallable extends AbstractDatastoreCallable<DataS } private void addDefaultPermissions() throws OseeCoreException { - List<Object[]> data = new LinkedList<Object[]>(); + List<Object[]> data = new LinkedList<>(); for (PermissionEnum permission : PermissionEnum.values()) { data.add(new Object[] {permission.getPermId(), permission.getName()}); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InvalidTxCurrentsAndModTypesCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InvalidTxCurrentsAndModTypesCallable.java index 6c24907d4cc..5d8b083fcf9 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InvalidTxCurrentsAndModTypesCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/InvalidTxCurrentsAndModTypesCallable.java @@ -36,10 +36,10 @@ public class InvalidTxCurrentsAndModTypesCallable extends AbstractDatastoreTxCal private static final String UPDATE_ADDRESS = "update osee_txs%s set tx_current = ? where transaction_id = ? and gamma_id = ? and branch_id = ?"; - private final List<Address> addresses = new ArrayList<Address>(); + private final List<Address> addresses = new ArrayList<>(); - private final List<Object[]> purgeData = new ArrayList<Object[]>(); - private final List<Object[]> currentData = new ArrayList<Object[]>(); + private final List<Object[]> purgeData = new ArrayList<>(); + private final List<Object[]> currentData = new ArrayList<>(); private final String tableName; private final String columnName; private final boolean isFixOperationEnabled; diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/OrcsTypeLoaderCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/OrcsTypeLoaderCallable.java index 4be46352275..6d896441dd3 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/OrcsTypeLoaderCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/OrcsTypeLoaderCallable.java @@ -60,7 +60,7 @@ public class OrcsTypeLoaderCallable extends AbstractDatastoreCallable<IResource> } private Collection<String> findOseeTypeData() throws OseeCoreException { - Collection<String> paths = new LinkedHashSet<String>(); + Collection<String> paths = new LinkedHashSet<>(); Long artifactTypeId = CoreArtifactTypes.OseeTypeDefinition.getGuid(); Long attributeTypeId = CoreAttributeTypes.UriGeneralStringData.getGuid(); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeAttributeTypeDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeAttributeTypeDatabaseTxCallable.java index f794c0f4d0a..21093d5e575 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeAttributeTypeDatabaseTxCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeAttributeTypeDatabaseTxCallable.java @@ -64,7 +64,7 @@ public final class PurgeAttributeTypeDatabaseTxCallable extends AbstractDatastor } private List<Object[]> retrieveGammaIds(JdbcConnection connection, Collection<? extends IAttributeType> types) throws OseeCoreException { - List<Object[]> gammas = new LinkedList<Object[]>(); + List<Object[]> gammas = new LinkedList<>(); JdbcStatement chStmt = getJdbcClient().getStatement(connection); IdJoinQuery joinQuery = joinFactory.createIdJoinQuery(); try { @@ -88,7 +88,7 @@ public final class PurgeAttributeTypeDatabaseTxCallable extends AbstractDatastor } private List<Object[]> retrieveBranchAndGammaIds(JdbcConnection connection, Collection<? extends IAttributeType> types) throws OseeCoreException { - List<Object[]> gammasAndBranchIds = new LinkedList<Object[]>(); + List<Object[]> gammasAndBranchIds = new LinkedList<>(); JdbcStatement chStmt = getJdbcClient().getStatement(connection); IdJoinQuery joinQuery = joinFactory.createIdJoinQuery(); try { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeBranchDatabaseCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeBranchDatabaseCallable.java index 194190139c4..5b5bb033179 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeBranchDatabaseCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeBranchDatabaseCallable.java @@ -67,7 +67,7 @@ public class PurgeBranchDatabaseCallable extends AbstractDatastoreTxCallable<Voi } private List<Pair<Long, Boolean>> findMergeBranches(JdbcConnection connection) { - List<Pair<Long, Boolean>> toReturn = new LinkedList<Pair<Long, Boolean>>(); + List<Pair<Long, Boolean>> toReturn = new LinkedList<>(); JdbcStatement stmt = getJdbcClient().getStatement(connection); stmt.runPreparedQuery(SELECT_MERGE_BRANCHES, toDelete.getUuid(), toDelete.getUuid()); while (stmt.next()) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeRelationTypeDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeRelationTypeDatabaseTxCallable.java index f917bc288f8..fe5330df007 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeRelationTypeDatabaseTxCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeRelationTypeDatabaseTxCallable.java @@ -58,7 +58,7 @@ public final class PurgeRelationTypeDatabaseTxCallable extends AbstractDatastore } private List<Object[]> retrieveGammaIds(JdbcConnection connection, Collection<? extends IRelationType> types) throws OseeCoreException { - List<Object[]> gammas = new ArrayList<Object[]>(50000); + List<Object[]> gammas = new ArrayList<>(50000); JdbcStatement chStmt = getJdbcClient().getStatement(connection); try { for (IRelationType type : types) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeTransactionTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeTransactionTxCallable.java index 58e8fa1040e..ff5087792b8 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeTransactionTxCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeTransactionTxCallable.java @@ -71,7 +71,7 @@ public class PurgeTransactionTxCallable extends AbstractDatastoreTxCallable<Inte } private List<ITransaction> sortTxs(Collection<? extends ITransaction> txIdsToDelete) { - List<ITransaction> txs = new ArrayList<ITransaction>(txIdsToDelete); + List<ITransaction> txs = new ArrayList<>(txIdsToDelete); if (txs.size() > 1) { Collections.sort(txs, new Comparator<ITransaction>() { @@ -95,7 +95,7 @@ public class PurgeTransactionTxCallable extends AbstractDatastoreTxCallable<Inte Integer txIdToDelete = tx.getGuid(); getLogger().info("Purging Transaction: [%s]", txIdToDelete); - List<Object[]> txsToDelete = new ArrayList<Object[]>(); + List<Object[]> txsToDelete = new ArrayList<>(); long txBranchId = getJdbcClient().runPreparedQueryFetchObject(RelationalConstants.BRANCH_SENTINEL, @@ -127,7 +127,7 @@ public class PurgeTransactionTxCallable extends AbstractDatastoreTxCallable<Inte getJdbcClient().runBatchUpdate(connection, DELETE_TXS, txsToDelete); //Updating Previous txs to Current - List<Object[]> updateData = new ArrayList<Object[]>(); + List<Object[]> updateData = new ArrayList<>(); computeNewTxCurrents(connection, updateData, "art_id", "osee_artifact", arts); computeNewTxCurrents(connection, updateData, "attr_id", "osee_attribute", attrs); computeNewTxCurrents(connection, updateData, "rel_link_id", "osee_relation_link", rels); @@ -173,7 +173,7 @@ public class PurgeTransactionTxCallable extends AbstractDatastoreTxCallable<Inte } private Map<Long, IdJoinQuery> findAffectedItems(JdbcConnection connection, String itemId, String itemTable, List<Object[]> bindDataList) throws OseeCoreException { - Map<Long, IdJoinQuery> items = new HashMap<Long, IdJoinQuery>(); + Map<Long, IdJoinQuery> items = new HashMap<>(); JdbcStatement statement = getJdbcClient().getStatement(connection); try { @@ -198,7 +198,7 @@ public class PurgeTransactionTxCallable extends AbstractDatastoreTxCallable<Inte } private void setChildBranchBaselineTxs(JdbcConnection connection, int toDeleteTransactionId, int previousTransactionId) throws OseeCoreException { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); if (RelationalConstants.TRANSACTION_SENTINEL != previousTransactionId) { data.add(new Object[] { String.valueOf(toDeleteTransactionId), diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/AddArtifactChangeDataCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/AddArtifactChangeDataCallable.java index fc0f40ee680..6d8b7c5540a 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/AddArtifactChangeDataCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/AddArtifactChangeDataCallable.java @@ -29,15 +29,15 @@ public class AddArtifactChangeDataCallable extends CancellableCallable<List<Chan @Override public List<ChangeItem> call() throws Exception { - Map<Integer, ChangeItem> artifactChanges = new HashMap<Integer, ChangeItem>(); + Map<Integer, ChangeItem> artifactChanges = new HashMap<>(); for (ChangeItem item : changeItems) { if (item.getChangeType().isArtifactChange()) { artifactChanges.put(item.getArtId(), item); } } - List<ChangeItem> attrItems = new ArrayList<ChangeItem>(); - Map<Integer, ChangeItem> syntheticArtifactChanges = new HashMap<Integer, ChangeItem>(); + List<ChangeItem> attrItems = new ArrayList<>(); + Map<Integer, ChangeItem> syntheticArtifactChanges = new HashMap<>(); for (ChangeItem item : changeItems) { if (item.getChangeType().isAttributeChange()) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java index 95fcc3ed3c1..9ff123c91e4 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java @@ -45,7 +45,7 @@ public class LoadDeltasBetweenBranches extends AbstractDatastoreCallable<List<Ch private static final String SELECT_BASE_TRANSACTION = "select baseline_transaction_id from osee_branch where branch_id = ?"; - private final HashMap<Long, ModificationType> changeByGammaId = new HashMap<Long, ModificationType>(); + private final HashMap<Long, ModificationType> changeByGammaId = new HashMap<>(); private final Long sourceBranchId, destinationBranchId, mergeBranchId; private final Integer destinationHeadTxId, mergeTxId; @@ -74,7 +74,7 @@ public class LoadDeltasBetweenBranches extends AbstractDatastoreCallable<List<Ch @Override public List<ChangeItem> call() throws Exception { - List<ChangeItem> changeData = new LinkedList<ChangeItem>(); + List<ChangeItem> changeData = new LinkedList<>(); Conditions.checkExpressionFailOnTrue(sourceBranchId.equals(destinationBranchId), "Unable to compute deltas between transactions on the same branch [%s]", sourceBranchId); @@ -119,7 +119,7 @@ public class LoadDeltasBetweenBranches extends AbstractDatastoreCallable<List<Ch } private void loadByItemId(Collection<ChangeItem> changeData, int txJoinId, ChangeItemFactory factory, int sourceBaselineTxId) throws OseeCoreException { - HashMap<Integer, ChangeItem> changesByItemId = new HashMap<Integer, ChangeItem>(); + HashMap<Integer, ChangeItem> changesByItemId = new HashMap<>(); IdJoinQuery idJoin = joinFactory.createIdJoinQuery(); try { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenTxsOnTheSameBranch.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenTxsOnTheSameBranch.java index 9259f1f1080..c45042b7d61 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenTxsOnTheSameBranch.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenTxsOnTheSameBranch.java @@ -42,7 +42,7 @@ public class LoadDeltasBetweenTxsOnTheSameBranch extends AbstractDatastoreCallab private static final String SELECT_CHANGES_BETWEEN_TRANSACTIONS = "select gamma_id, mod_type from osee_txs where branch_id = ? and transaction_id > ? and transaction_id <= ?"; - private final HashMap<Long, ModificationType> changeByGammaId = new HashMap<Long, ModificationType>(); + private final HashMap<Long, ModificationType> changeByGammaId = new HashMap<>(); private final SqlJoinFactory joinFactory; private final TransactionReadableDelta txDelta; @@ -69,7 +69,7 @@ public class LoadDeltasBetweenTxsOnTheSameBranch extends AbstractDatastoreCallab @Override public List<ChangeItem> call() throws Exception { - List<ChangeItem> changeData = new LinkedList<ChangeItem>(); + List<ChangeItem> changeData = new LinkedList<>(); Conditions.checkExpressionFailOnTrue(!txDelta.areOnTheSameBranch(), "Unable to compute deltas between transactions on different branches [%s]", txDelta); @@ -116,7 +116,7 @@ public class LoadDeltasBetweenTxsOnTheSameBranch extends AbstractDatastoreCallab IdJoinQuery idJoin = joinFactory.createIdJoinQuery(); - HashMap<Integer, ChangeItem> changesByItemId = new HashMap<Integer, ChangeItem>(); + HashMap<Integer, ChangeItem> changesByItemId = new HashMap<>(); changeItemLoader.loadItemIdsBasedOnGammas(factory, txJoinId, changesByItemId, idJoin); idJoin.store(); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryImpl.java index 2853f4138ce..1012e137055 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryImpl.java @@ -52,7 +52,7 @@ public class MissingChangeItemFactoryImpl implements MissingChangeItemFactory { @Override public Collection<ChangeItem> createMissingChanges(HasCancellation cancellation, OrcsSession session, List<ChangeItem> changes, TransactionReadable sourceTx, TransactionReadable destTx) throws OseeCoreException { if (changes != null && !changes.isEmpty()) { - Set<Integer> modifiedArtIds = new HashSet<Integer>(); + Set<Integer> modifiedArtIds = new HashSet<>(); Multimap<Integer, Integer> modifiedAttrIds = LinkedListMultimap.create(); Multimap<Integer, Integer> modifiedRels = LinkedListMultimap.create(); @@ -75,7 +75,7 @@ public class MissingChangeItemFactoryImpl implements MissingChangeItemFactory { } } - Set<Integer> allArtIds = new HashSet<Integer>(modifiedArtIds); + Set<Integer> allArtIds = new HashSet<>(modifiedArtIds); allArtIds.addAll(modifiedAttrIds.keySet()); allArtIds.addAll(modifiedRels.keySet()); @@ -91,7 +91,7 @@ public class MissingChangeItemFactoryImpl implements MissingChangeItemFactory { private Set<Integer> determineWhichArtifactsNotOnDestination(HasCancellation cancellation, OrcsSession session, Set<Integer> artIds, TransactionReadable destTx) throws OseeCoreException { DataLoader loader = dataLoaderFactory.newDataLoaderFromIds(session, getBranch(destTx), artIds); - final Set<Integer> missingArtIds = new LinkedHashSet<Integer>(artIds); + final Set<Integer> missingArtIds = new LinkedHashSet<>(artIds); loader.includeDeletedArtifacts(); loader.fromTransaction(destTx.getGuid()); @@ -106,8 +106,8 @@ public class MissingChangeItemFactoryImpl implements MissingChangeItemFactory { } private Collection<ChangeItem> createMissingChangeItems(HasCancellation cancellation, OrcsSession session, TransactionReadable sourceTx, TransactionReadable destTx, final Set<Integer> modifiedArtIds, final Multimap<Integer, Integer> modifiedAttrIds, final Multimap<Integer, Integer> modifiedRels, final Set<Integer> missingArtIds, final Set<Integer> allArtIds) throws OseeCoreException { - final Set<ChangeItem> toReturn = new LinkedHashSet<ChangeItem>(); - final Set<RelationData> relations = new LinkedHashSet<RelationData>(); + final Set<ChangeItem> toReturn = new LinkedHashSet<>(); + final Set<RelationData> relations = new LinkedHashSet<>(); DataLoader loader = dataLoaderFactory.newDataLoaderFromIds(session, getBranch(sourceTx), missingArtIds); loader.withLoadLevel(LoadLevel.ALL); @@ -168,7 +168,7 @@ public class MissingChangeItemFactoryImpl implements MissingChangeItemFactory { } private Set<ChangeItem> createExistingRelations(HasCancellation cancellation, OrcsSession session, TransactionReadable destTx, final Multimap<Integer, RelationData> relationChangesToAdd) throws OseeCoreException { - final Set<ChangeItem> toReturn = new LinkedHashSet<ChangeItem>(); + final Set<ChangeItem> toReturn = new LinkedHashSet<>(); DataLoader loader = dataLoaderFactory.newDataLoaderFromIds(session, getBranch(destTx), relationChangesToAdd.keySet()); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/console/PurgeAttributeCommand.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/console/PurgeAttributeCommand.java index 1423a6e0a7e..c55e5e2eaee 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/console/PurgeAttributeCommand.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/console/PurgeAttributeCommand.java @@ -49,7 +49,7 @@ public class PurgeAttributeCommand extends AbstractDatastoreConsoleCommand { @Override public Callable<Void> createCallable(final Console console, final ConsoleParameters params) { String[] attrIds = params.getArray("attr_id"); - Set<Long> longIds = new HashSet<Long>(); + Set<Long> longIds = new HashSet<>(); for (String id : attrIds) { longIds.add(Long.parseLong(id)); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExchangeDb.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExchangeDb.java index a7acbfd915d..19f419be690 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExchangeDb.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExchangeDb.java @@ -66,24 +66,24 @@ public final class ExchangeDb { private static final String[] GAMMA_ID_ALIASES; private static final String[] TRANSACTION_ID_ALIASES; static { - Set<String> artIdAliases = new HashSet<String>(); + Set<String> artIdAliases = new HashSet<>(); artIdAliases.add(ARTIFACT_ID); artIdAliases.addAll(Arrays.asList(ARTIFACT_ID_REG_ALIASES)); artIdAliases.addAll(Arrays.asList(ARTIFACT_ID_NEG_ONE_ALIASES)); ARTIFACT_ID_ALIASES = artIdAliases.toArray(new String[artIdAliases.size()]); - Set<String> branchUuidAliases = new HashSet<String>(); + Set<String> branchUuidAliases = new HashSet<>(); branchUuidAliases.add(BRANCH_ID); branchUuidAliases.addAll(Arrays.asList(BRANCH_ID_REG_ALIASES)); branchUuidAliases.addAll(Arrays.asList(BRANCH_ID_NEG_ONE_ALIASES)); BRANCH_ID_ALIASES = branchUuidAliases.toArray(new String[branchUuidAliases.size()]); - Set<String> gammaIdAliases = new HashSet<String>(); + Set<String> gammaIdAliases = new HashSet<>(); gammaIdAliases.add(GAMMA_ID); gammaIdAliases.addAll(Arrays.asList(GAMMA_ID_REG_ALIASES)); GAMMA_ID_ALIASES = gammaIdAliases.toArray(new String[gammaIdAliases.size()]); - Set<String> txIdAliases = new HashSet<String>(); + Set<String> txIdAliases = new HashSet<>(); txIdAliases.add(TRANSACTION_ID); txIdAliases.addAll(Arrays.asList(TRANSACTION_ID_REG_ALIASES)); txIdAliases.addAll(Arrays.asList(TRANSACTION_ID_NEG_ONE_ALIASES)); @@ -91,7 +91,7 @@ public final class ExchangeDb { } static List<IndexCollector> createCheckList() { - List<IndexCollector> items = new ArrayList<IndexCollector>(); + List<IndexCollector> items = new ArrayList<>(); items.add(new IndexCollector(ExportItem.OSEE_TXS_DATA, GAMMA_ID, GAMMA_ID_REG_ALIASES)); items.add(new IndexCollector(ExportItem.OSEE_TXS_ARCHIVED_DATA, GAMMA_ID, GAMMA_ID_REG_ALIASES)); items.add(new IndexCollector(ExportItem.OSEE_TX_DETAILS_DATA, TRANSACTION_ID, TRANSACTION_ID_REG_ALIASES, @@ -106,7 +106,7 @@ public final class ExchangeDb { } static List<IdTranslator> createTranslators(JdbcClient service) { - List<IdTranslator> translators = new ArrayList<IdTranslator>(); + List<IdTranslator> translators = new ArrayList<>(); translators.add(new IdTranslator(service, IdentityManager.GAMMA_ID_SEQ, GAMMA_ID_ALIASES)); translators.add(new IdTranslator(service, IdentityManager.TRANSACTION_ID_SEQ, TRANSACTION_ID_ALIASES)); translators.add(new IdTranslator(service, IdentityManager.BRANCH_ID_SEQ, BRANCH_ID_ALIASES)); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExportItemFactory.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExportItemFactory.java index a9a469757a1..e6bd5f6466c 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExportItemFactory.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExportItemFactory.java @@ -97,7 +97,7 @@ public class ExportItemFactory { } public List<AbstractExportItem> createTaskList(int joinId, PropertyStore options) throws OseeCoreException { - List<AbstractExportItem> items = new ArrayList<AbstractExportItem>(); + List<AbstractExportItem> items = new ArrayList<>(); processTxOptions(options); @@ -137,7 +137,7 @@ public class ExportItemFactory { } private int createGammaJoin(JdbcClient jdbcClient, int exportJoinId, PropertyStore options) throws OseeCoreException { - List<Object> bindList = new ArrayList<Object>(); + List<Object> bindList = new ArrayList<>(); int gammaJoinId = new Random().nextInt(); StringBuilder sql = new StringBuilder( @@ -159,7 +159,7 @@ public class ExportItemFactory { } private static Object[] prepareQuery(ExportItem exportItem, StringBuilder query, PropertyStore options, int exportJoinId, int gammaJionId) throws OseeCoreException { - List<Object> bindData = new ArrayList<Object>(); + List<Object> bindData = new ArrayList<>(); if (exportItem.matches(ExportItem.OSEE_ARTIFACT_DATA, ExportItem.OSEE_ATTRIBUTE_DATA, ExportItem.OSEE_RELATION_LINK_DATA)) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/IdTranslator.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/IdTranslator.java index c85485d8465..703e0656f85 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/IdTranslator.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/IdTranslator.java @@ -42,9 +42,9 @@ public class IdTranslator { IdTranslator(JdbcClient jdbcClient, String sequenceName, String... aliases) { this.jdbcClient = jdbcClient; this.sequenceName = sequenceName; - this.originalToMapped = new HashMap<Long, Long>(); - this.newIds = new ArrayList<Long>(); - this.aliases = new HashSet<String>(); + this.originalToMapped = new HashMap<>(); + this.newIds = new ArrayList<>(); + this.aliases = new HashSet<>(); if (aliases != null && aliases.length > 0) { for (String alias : aliases) { this.aliases.add(alias.toLowerCase()); @@ -146,7 +146,7 @@ public class IdTranslator { public void store(JdbcConnection connection, int sequenceId) throws OseeCoreException { if (hasItemsToStore()) { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); for (Long original : newIds) { Long mapped = originalToMapped.get(original); data.add(new Object[] {sequenceId, original, mapped}); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/IndexCollector.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/IndexCollector.java index 2f55ccaf797..493a7fa811c 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/IndexCollector.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/IndexCollector.java @@ -36,7 +36,7 @@ public final class IndexCollector { this.source = source; this.primaryKey = primaryKey.toLowerCase(); this.ids = java.util.Collections.synchronizedSet(new HashSet<Long>()); - this.aliases = new HashSet<String>(); + this.aliases = new HashSet<>(); if (aliases != null && aliases.length > 0) { for (String alias : aliases) { this.aliases.add(alias.toLowerCase()); @@ -44,7 +44,7 @@ public final class IndexCollector { } this.aliases.add(this.primaryKey); - this.negativeOneAliases = new HashSet<String>(); + this.negativeOneAliases = new HashSet<>(); if (negativeOneAliases != null && negativeOneAliases.length > 0) { for (String alias : negativeOneAliases) { this.negativeOneAliases.add(alias.toLowerCase()); @@ -100,7 +100,7 @@ public final class IndexCollector { protected void removeFalsePositives() { if (!notFound.isEmpty()) { - List<String> keysToRemove = new ArrayList<String>(); + List<String> keysToRemove = new ArrayList<>(); for (String key : notFound.keySet()) { Collection<Long> values = notFound.get(key); if (values != null && !values.isEmpty()) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/PrimaryKeyCollector.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/PrimaryKeyCollector.java index 1adbb44cbc9..c401dc0012f 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/PrimaryKeyCollector.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/PrimaryKeyCollector.java @@ -25,8 +25,8 @@ import org.eclipse.osee.orcs.db.internal.exchange.handler.BaseDbSaxHandler; */ public class PrimaryKeyCollector extends BaseDbSaxHandler { private String primaryKey; - private final Map<Long, Boolean> primaryKeys = new HashMap<Long, Boolean>(50000); - private final HashCollection<String, Long> missingPrimaryKeys = new HashCollection<String, Long>(); + private final Map<Long, Boolean> primaryKeys = new HashMap<>(50000); + private final HashCollection<String, Long> missingPrimaryKeys = new HashCollection<>(); public void setPrimaryKey(String primaryKey) { this.primaryKey = primaryKey; @@ -55,7 +55,7 @@ public class PrimaryKeyCollector extends BaseDbSaxHandler { } public Set<Long> getUnreferencedPrimaryKeys() { - Set<Long> unreferenced = new HashSet<Long>(); + Set<Long> unreferenced = new HashSet<>(); for (Entry<Long, Boolean> entry : primaryKeys.entrySet()) { if (!entry.getValue()) { unreferenced.add(entry.getKey()); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ReferentialIntegrityConstraint.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ReferentialIntegrityConstraint.java index 8c9633f9e0a..5bf83be5bd6 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ReferentialIntegrityConstraint.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ReferentialIntegrityConstraint.java @@ -26,10 +26,10 @@ import org.eclipse.osee.orcs.db.internal.exchange.transform.ExchangeDataProcesso * @author Ryan D. Brooks */ public class ReferentialIntegrityConstraint { - private final List<IExportItem> primaryItems = new ArrayList<IExportItem>(); - private final List<String> primaryKeys = new ArrayList<String>(); - private final List<IExportItem> foreignItems = new ArrayList<IExportItem>(); - private final List<String[]> foreignKeys = new ArrayList<String[]>(); + private final List<IExportItem> primaryItems = new ArrayList<>(); + private final List<String> primaryKeys = new ArrayList<>(); + private final List<IExportItem> foreignItems = new ArrayList<>(); + private final List<String[]> foreignKeys = new ArrayList<>(); private PrimaryKeyCollector collector; private Iterator<String> primaryKeyIterator; private Iterator<String[]> foreignKeyIterator; @@ -54,7 +54,7 @@ public class ReferentialIntegrityConstraint { } public String getPrimaryKeyListing() { - List<String> primaryKeys = new ArrayList<String>(primaryItems.size()); + List<String> primaryKeys = new ArrayList<>(primaryItems.size()); for (IExportItem primaryTable : getPrimaryItems()) { primaryKeys.add(primaryTable + "." + getPrimaryKey()); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/SavePointManager.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/SavePointManager.java index a4d4cf9bc3d..0abd7e13e27 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/SavePointManager.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/SavePointManager.java @@ -39,7 +39,7 @@ public class SavePointManager { private static final String QUERY_SAVE_POINTS_FROM_IMPORT_MAP = "SELECT save_point_name from osee_import_save_point oisp, osee_import_source ois WHERE ois.import_id = oisp.import_id AND oisp.status = 1 AND ois.db_source_guid = ? AND ois.source_export_date = ?"; - private final Map<String, SavePoint> savePoints = new LinkedHashMap<String, SavePoint>(); + private final Map<String, SavePoint> savePoints = new LinkedHashMap<>(); private final JdbcClient jdbcClient; @@ -54,7 +54,7 @@ public class SavePointManager { } public void storeSavePoints(JdbcConnection connection, int importIdIndex) throws OseeCoreException { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); for (SavePoint savePoint : savePoints.values()) { int status = 1; String comment = ""; @@ -158,7 +158,7 @@ public class SavePointManager { public void addError(Throwable ex) { if (errors == null) { - errors = new ArrayList<Throwable>(); + errors = new ArrayList<>(); } if (!errors.contains(ex)) { errors.add(ex); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/TranslationManager.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/TranslationManager.java index b2b1198eee0..67920df4a7a 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/TranslationManager.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/TranslationManager.java @@ -36,7 +36,7 @@ public class TranslationManager { this.jdbcClient = jdbcClient; this.useOriginalIds = true; this.translators = ExchangeDb.createTranslators(jdbcClient); - this.translatorMap = new HashMap<String, IdTranslator>(); + this.translatorMap = new HashMap<>(); for (IdTranslator translator : translators) { for (String alias : translator.getAliases()) { translatorMap.put(alias, translator); @@ -57,7 +57,7 @@ public class TranslationManager { } public List<String> getSequenceNames() { - List<String> toReturn = new ArrayList<String>(); + List<String> toReturn = new ArrayList<>(); for (IdTranslator translatedIdMap : translators) { toReturn.add(translatedIdMap.getSequenceName()); } @@ -65,7 +65,7 @@ public class TranslationManager { } public void store(JdbcConnection connection, int importIdIndex) throws OseeCoreException { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); for (IdTranslator translatedIdMap : translators) { if (translatedIdMap.hasItemsToStore()) { int importSeqId = (int) jdbcClient.getNextSequence(IMPORT_MAPPED_INDEX_SEQ); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/export/MetadataExportItem.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/export/MetadataExportItem.java index 255090e3e05..1af6e8611f9 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/export/MetadataExportItem.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/export/MetadataExportItem.java @@ -73,7 +73,7 @@ public class MetadataExportItem extends AbstractXmlExportItem { } private String[] getTypes(DatabaseMetaData metaData) throws SQLException { - List<String> toReturn = new ArrayList<String>(); + List<String> toReturn = new ArrayList<>(); ResultSet resultSet = null; try { resultSet = metaData.getTableTypes(); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BaseDbSaxHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BaseDbSaxHandler.java index 3981ca66fce..25d9d97c495 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BaseDbSaxHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BaseDbSaxHandler.java @@ -50,7 +50,7 @@ public abstract class BaseDbSaxHandler extends BaseExportImportSaxHandler { this.metadata = null; this.isCacheAll = isCacheAll; this.cacheLimit = cacheLimit; - this.data = new ArrayList<Object[]>(); + this.data = new ArrayList<>(); } protected Log getLogger() { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BaseExportImportSaxHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BaseExportImportSaxHandler.java index 6cd5c76b331..b36b3aea6a6 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BaseExportImportSaxHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BaseExportImportSaxHandler.java @@ -30,7 +30,7 @@ public abstract class BaseExportImportSaxHandler extends AbstractSaxHandler { protected BaseExportImportSaxHandler() { super(); - this.dataMap = new HashMap<String, String>(); + this.dataMap = new HashMap<>(); } @SuppressWarnings("unused") diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BranchData.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BranchData.java index 1d046495332..4544bc0d313 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BranchData.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BranchData.java @@ -32,7 +32,7 @@ public final class BranchData implements Cloneable { private final Map<String, Object> backingData; BranchData() { - this.backingData = new HashMap<String, Object>(); + this.backingData = new HashMap<>(); } void setData(String key, Object object) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BranchDataSaxHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BranchDataSaxHandler.java index 22e70c3956e..61a0a6e1ab0 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BranchDataSaxHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/BranchDataSaxHandler.java @@ -49,7 +49,7 @@ public class BranchDataSaxHandler extends BaseDbSaxHandler { private BranchDataSaxHandler(Log logger, JdbcClient service, boolean isCacheAll, int cacheLimit) { super(logger, service, isCacheAll, cacheLimit); - this.idToImportFileBranchData = new HashMap<Long, BranchData>(); + this.idToImportFileBranchData = new HashMap<>(); this.connection = null; } @@ -77,7 +77,7 @@ public class BranchDataSaxHandler extends BaseDbSaxHandler { public boolean areAvailable(long... branchUuids) { boolean toReturn = false; if (branchUuids != null && branchUuids.length > 0) { - Set<Long> toCheck = new HashSet<Long>(); + Set<Long> toCheck = new HashSet<>(); for (long entry : branchUuids) { toCheck.add(entry); } @@ -91,7 +91,7 @@ public class BranchDataSaxHandler extends BaseDbSaxHandler { } private List<BranchData> getSelectedBranchesToImport(long... branchesToImport) { - List<BranchData> toReturn = new ArrayList<BranchData>(); + List<BranchData> toReturn = new ArrayList<>(); if (branchesToImport != null && branchesToImport.length > 0) { for (long branchUuid : branchesToImport) { BranchData data = this.idToImportFileBranchData.get(branchUuid); @@ -152,7 +152,7 @@ public class BranchDataSaxHandler extends BaseDbSaxHandler { public void updateBaselineAndParentTransactionId(long[] branchesStored) throws OseeCoreException { List<BranchData> branches = getSelectedBranchesToImport(branchesStored); - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); for (BranchData branchData : branches) { long branchUuid = branchData.getId(); int parentTransactionId = translateIntId(ExchangeDb.TRANSACTION_ID, branchData.getParentTransactionId()); @@ -191,7 +191,7 @@ public class BranchDataSaxHandler extends BaseDbSaxHandler { } private Collection<BranchData> checkTargetDbBranches(JdbcConnection connection, Collection<BranchData> selectedBranches) throws OseeCoreException { - Map<Long, BranchData> idToBranchData = new HashMap<Long, BranchData>(); + Map<Long, BranchData> idToBranchData = new HashMap<>(); for (BranchData data : selectedBranches) { idToBranchData.put(data.getId(), data); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/DbTableSaxHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/DbTableSaxHandler.java index a17910ac69d..291e3740b90 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/DbTableSaxHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/DbTableSaxHandler.java @@ -55,8 +55,8 @@ public class DbTableSaxHandler extends BaseDbSaxHandler { super(logger, jdbcClient, isCacheAll, cacheLimit); this.resourceManager = resourceManager; this.identityService = identityService; - this.branchesToImport = new HashSet<Long>(); - this.transferredBinaryContent = new ArrayList<IResourceLocator>(); + this.branchesToImport = new HashSet<>(); + this.transferredBinaryContent = new ArrayList<>(); this.exportDataProvider = exportDataProvider; } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/ManifestSaxHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/ManifestSaxHandler.java index e535b948aa8..4a9dd8e6fb4 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/ManifestSaxHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/ManifestSaxHandler.java @@ -36,7 +36,7 @@ public class ManifestSaxHandler extends BaseExportImportSaxHandler { public ManifestSaxHandler() { super(); - this.filesToImport = new ArrayList<IExportItem>(); + this.filesToImport = new ArrayList<>(); this.typeModelFile = null; this.metadataFile = null; this.branchFile = null; diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/MetaData.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/MetaData.java index f9ef7dcd4a0..6b12ea42039 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/MetaData.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/MetaData.java @@ -24,7 +24,7 @@ public class MetaData { private String query; MetaData(String tableName) { - this.dataConversionMap = new LinkedHashMap<String, SQL3DataType>(); + this.dataConversionMap = new LinkedHashMap<>(); this.tableTarget = tableName; this.query = null; } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/MetaDataSaxHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/MetaDataSaxHandler.java index a1cd30e424b..e251544cb3f 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/MetaDataSaxHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/handler/MetaDataSaxHandler.java @@ -39,8 +39,8 @@ public class MetaDataSaxHandler extends AbstractSaxHandler { public MetaDataSaxHandler(JdbcClient service) { this.service = service; - this.importMetadataMap = new HashMap<String, MetaData>(); - this.targetMetadataMap = new HashMap<String, MetaData>(); + this.importMetadataMap = new HashMap<>(); + this.targetMetadataMap = new HashMap<>(); } public MetaData getMetadata(String source) { @@ -97,7 +97,7 @@ public class MetaDataSaxHandler extends AbstractSaxHandler { } private Map<String, MetaData> getTargetDbMetadata() throws SQLException, OseeCoreException { - Map<String, MetaData> targetDbMetadata = new HashMap<String, MetaData>(); + Map<String, MetaData> targetDbMetadata = new HashMap<>(); JdbcConnection connection = service.getConnection(); try { DatabaseMetaData dbMetaData = connection.getMetaData(); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/DbSchemaRuleAddColumn.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/DbSchemaRuleAddColumn.java index 2f7a175d8de..ade869a2d84 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/DbSchemaRuleAddColumn.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/DbSchemaRuleAddColumn.java @@ -33,7 +33,7 @@ public class DbSchemaRuleAddColumn extends Rule { } private static HashCollection<String, String> wrap(String tableName, String column) { - HashCollection<String, String> tableToColumns = new HashCollection<String, String>(); + HashCollection<String, String> tableToColumns = new HashCollection<>(); tableToColumns.put(tableName, column); return tableToColumns; } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/ExchangeTransformProvider.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/ExchangeTransformProvider.java index 03c3222dbb6..e792e629d0b 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/ExchangeTransformProvider.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/ExchangeTransformProvider.java @@ -19,7 +19,7 @@ public class ExchangeTransformProvider implements IExchangeTransformProvider { @Override public Collection<IOseeExchangeVersionTransformer> getApplicableTransformers(Version versionToCheck) { - List<IOseeExchangeVersionTransformer> toReturn = new ArrayList<IOseeExchangeVersionTransformer>(); + List<IOseeExchangeVersionTransformer> toReturn = new ArrayList<>(); IOseeExchangeVersionTransformer[] transforms = new IOseeExchangeVersionTransformer[] {new V0_9_2Transformer(), new V0_9_4Transformer()}; diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2ArtifactVersionHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2ArtifactVersionHandler.java index 28fc60388d4..70b7a391830 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2ArtifactVersionHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2ArtifactVersionHandler.java @@ -20,8 +20,8 @@ import org.xml.sax.Attributes; * @author Ryan D. Brooks */ public class V0_9_2ArtifactVersionHandler extends AbstractSaxHandler { - private final Map<Integer, Long> artIdToNetGammaId = new HashMap<Integer, Long>(14000); - private final Map<Long, Long> artifactGammaToNetGammaId = new HashMap<Long, Long>(14000); + private final Map<Integer, Long> artIdToNetGammaId = new HashMap<>(14000); + private final Map<Long, Long> artifactGammaToNetGammaId = new HashMap<>(14000); @Override public void endElementFound(String uri, String localName, String qName) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2Transformer.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2Transformer.java index 2d844f5f36f..28f103f4790 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2Transformer.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2Transformer.java @@ -65,7 +65,7 @@ public class V0_9_2Transformer implements IOseeExchangeVersionTransformer { Map<Long, Long> artifactGammaToNetGammaId = convertArtifactAndConflicts(processor); consolidateTxsAddressing(processor, ExportItem.OSEE_TXS_DATA, branchUuids, artifactGammaToNetGammaId); - HashCollection<String, String> tableToColumns = new HashCollection<String, String>(); + HashCollection<String, String> tableToColumns = new HashCollection<>(); tableToColumns.put("osee_artifact", "<column id=\"gamma_id\" type=\"NUMERIC\" />\n"); tableToColumns.put("osee_branch", "<column id=\"baseline_transaction_id\" type=\"INTEGER\" />\n"); processor.transform(ExportItem.EXPORT_DB_SCHEMA, new DbSchemaRuleAddColumn(tableToColumns)); @@ -92,7 +92,7 @@ public class V0_9_2Transformer implements IOseeExchangeVersionTransformer { } private List<Long> convertBranchTable(ExchangeDataProcessor processor) throws OseeCoreException { - Map<Long, Integer> branchToBaseTx = new HashMap<Long, Integer>(10000); + Map<Long, Integer> branchToBaseTx = new HashMap<>(10000); processor.parse(ExportItem.OSEE_TX_DETAILS_DATA, new V0_9_2TxDetailsHandler(branchToBaseTx)); processor.transform(ExportItem.OSEE_BRANCH_DATA, new V0_9_2BranchTransformer(branchToBaseTx)); return new ArrayList<Long>(branchToBaseTx.keySet()); @@ -114,7 +114,7 @@ public class V0_9_2Transformer implements IOseeExchangeVersionTransformer { File targetFile = processor.getDataProvider().getFile(exportItem); File tempFile = new File(Lib.changeExtension(targetFile.getPath(), "temp")); Writer fileWriter = null; - HashCollection<Long, Address> addressMap = new HashCollection<Long, Address>(false, TreeSet.class); + HashCollection<Long, Address> addressMap = new HashCollection<>(false, TreeSet.class); V0_9_2TxsConsolidateParser transformer = new V0_9_2TxsConsolidateParser(artifactGammaToNetGammaId, addressMap); try { fileWriter = processor.startTransform(targetFile, tempFile, transformer); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderImpl.java index 746fe8f4612..5f64d9d5256 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderImpl.java @@ -40,11 +40,11 @@ import org.eclipse.osee.orcs.db.internal.sql.join.SqlJoinFactory; public class DataLoaderImpl implements DataLoader { - private final Collection<Integer> attributeIds = new HashSet<Integer>(); - private final Collection<IAttributeType> attributeTypes = new HashSet<IAttributeType>(); + private final Collection<Integer> attributeIds = new HashSet<>(); + private final Collection<IAttributeType> attributeTypes = new HashSet<>(); - private final Collection<Integer> relationIds = new HashSet<Integer>(); - private final Collection<IRelationType> relationTypes = new HashSet<IRelationType>(); + private final Collection<Integer> relationIds = new HashSet<>(); + private final Collection<IRelationType> relationTypes = new HashSet<>(); private final Log logger; private AbstractLoadExecutor loadExecutor; @@ -245,7 +245,7 @@ public class DataLoaderImpl implements DataLoader { } private Collection<Integer> toCollection(int... ids) { - Set<Integer> toReturn = new HashSet<Integer>(); + Set<Integer> toReturn = new HashSet<>(); for (Integer id : ids) { toReturn.add(id); } @@ -253,7 +253,7 @@ public class DataLoaderImpl implements DataLoader { } private <T> Collection<T> copy(Collection<T> source) { - Collection<T> toReturn = new HashSet<T>(); + Collection<T> toReturn = new HashSet<>(); for (T item : source) { toReturn.add(item); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/AttributeSqlHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/AttributeSqlHandler.java index 527874436c9..b39bb0ea675 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/AttributeSqlHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/AttributeSqlHandler.java @@ -69,7 +69,7 @@ public class AttributeSqlHandler extends SqlHandler<CriteriaAttribute> { } private Collection<Long> getLocalTypeIds() throws OseeCoreException { - Collection<Long> toReturn = new HashSet<Long>(); + Collection<Long> toReturn = new HashSet<>(); for (Identity<Long> type : criteria.getTypes()) { toReturn.add(type.getGuid()); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/RelationSqlHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/RelationSqlHandler.java index ba88c4a7051..337ede0cc87 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/RelationSqlHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/RelationSqlHandler.java @@ -69,7 +69,7 @@ public class RelationSqlHandler extends SqlHandler<CriteriaRelation> { } private Collection<Long> getLocalTypeIds() throws OseeCoreException { - Collection<Long> toReturn = new HashSet<Long>(); + Collection<Long> toReturn = new HashSet<>(); for (Identity<Long> type : criteria.getTypes()) { toReturn.add(type.getGuid()); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/DynamicObjectBuilder.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/DynamicObjectBuilder.java index 584f3f69efe..03816ebdebf 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/DynamicObjectBuilder.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/processor/DynamicObjectBuilder.java @@ -45,7 +45,7 @@ public class DynamicObjectBuilder { private final Log logger; private final OrcsTypes orcsTypes; private final Options options; - private final Stack<ObjectMap> stack = new Stack<ObjectMap>(); + private final Stack<ObjectMap> stack = new Stack<>(); private DynamicDataHandler handler; private Iterable<? extends DynamicData> descriptors; @@ -145,7 +145,7 @@ public class DynamicObjectBuilder { private final class ObjectMap { private DynamicObject descriptor; private Long hash = 37L; - private final Map<String, Object> data = new LinkedHashMap<String, Object>(); + private final Map<String, Object> data = new LinkedHashMap<>(); private Map<Long, ObjectMap> children; private Long typeId; @@ -235,7 +235,7 @@ public class DynamicObjectBuilder { byTypeName.put(typeName, child.asMap()); } - Map<String, Object> toReturn = new LinkedHashMap<String, Object>(); + Map<String, Object> toReturn = new LinkedHashMap<>(); for (Entry<String, Collection<Map<String, Object>>> entry : byTypeName.asMap().entrySet()) { Collection<Map<String, Object>> collection = entry.getValue(); if (collection.size() == 1) { @@ -258,7 +258,7 @@ public class DynamicObjectBuilder { } private Set<Map<String, Object>> asSetMap(Collection<ObjectMap> values) { - Set<Map<String, Object>> toReturn = new LinkedHashSet<Map<String, Object>>(); + Set<Map<String, Object>> toReturn = new LinkedHashSet<>(); for (ObjectMap child : values) { toReturn.add(child.asMap()); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/Engines.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/Engines.java index 4c25c436b61..815f2ef616a 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/Engines.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/Engines.java @@ -126,7 +126,7 @@ public final class Engines { public static TaggingEngine newTaggingEngine(Log logger) { TagProcessor tagProcessor = new TagProcessor(new EnglishLanguage(logger), new TagEncoder()); - Map<String, Tagger> taggers = new HashMap<String, Tagger>(); + Map<String, Tagger> taggers = new HashMap<>(); StreamMatcher matcher = MatcherFactory.createMatcher(); taggers.put("DefaultAttributeTaggerProvider", new TextStreamTagger(tagProcessor, matcher)); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ObjectQuerySqlWriter.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ObjectQuerySqlWriter.java index 4b3874d98ed..1093e4dfe09 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ObjectQuerySqlWriter.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ObjectQuerySqlWriter.java @@ -280,9 +280,9 @@ public class ObjectQuerySqlWriter extends AbstractSqlWriter { } private void computeTxFilterClause(Iterable<SqlHandler<?>> handlers) { - List<SqlHandler<?>> branchHandlers = new ArrayList<SqlHandler<?>>(); - List<SqlHandler<?>> txHandlers = new ArrayList<SqlHandler<?>>(); - List<SqlHandler<?>> artHandlers = new ArrayList<SqlHandler<?>>(); + List<SqlHandler<?>> branchHandlers = new ArrayList<>(); + List<SqlHandler<?>> txHandlers = new ArrayList<>(); + List<SqlHandler<?>> artHandlers = new ArrayList<>(); for (SqlHandler<?> handler : handlers) { if (handler.getPriority() <= SqlHandlerPriority.ALL_BRANCHES.ordinal()) { @@ -333,8 +333,8 @@ public class ObjectQuerySqlWriter extends AbstractSqlWriter { } private List<SqlHandler<?>> getFieldResolvers(Iterable<DynamicData> datas) { - List<SqlHandler<?>> toReturn = new ArrayList<SqlHandler<?>>(); - Set<String> created = new HashSet<String>(); + List<SqlHandler<?>> toReturn = new ArrayList<>(); + Set<String> created = new HashSet<>(); for (DynamicData data : datas) { int level = data.getLevel(); ObjectField objectField = getObjectField(data); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/QueryFilterFactoryImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/QueryFilterFactoryImpl.java index 9f8e465872b..2b4c948416f 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/QueryFilterFactoryImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/QueryFilterFactoryImpl.java @@ -111,7 +111,7 @@ public class QueryFilterFactoryImpl implements QueryFilterFactory { private final AtomicBoolean executorStarted = new AtomicBoolean(); - private final LinkedBlockingQueue<AttributeData> dataToProcess = new LinkedBlockingQueue<AttributeData>(); + private final LinkedBlockingQueue<AttributeData> dataToProcess = new LinkedBlockingQueue<>(); private Future<?> future; public ConsumerImpl(HasCancellation cancellation, Set<CriteriaAttributeKeywords> criterias) { @@ -168,7 +168,7 @@ public class QueryFilterFactoryImpl implements QueryFilterFactory { public Void call() throws Exception { boolean isEndOfQueue = false; while (!isEndOfQueue) { - Set<AttributeData> toProcess = new HashSet<AttributeData>(); + Set<AttributeData> toProcess = new HashSet<>(); AttributeData entry = dataToProcess.take(); dataToProcess.drainTo(toProcess); toProcess.add(entry); @@ -235,7 +235,7 @@ public class QueryFilterFactoryImpl implements QueryFilterFactory { private final Consumer consumer; - private final Set<Integer> acceptedArtIds = new ConcurrentSkipListSet<Integer>(); + private final Set<Integer> acceptedArtIds = new ConcurrentSkipListSet<>(); public AttributeDataProducer(LoadDataBuffer buffer, LoadDataHandler handler, Consumer consumer) { super(handler, buffer); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/ArtifactTypeSqlHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/ArtifactTypeSqlHandler.java index ab020634434..4fe8bb7ade2 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/ArtifactTypeSqlHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/ArtifactTypeSqlHandler.java @@ -65,7 +65,7 @@ public class ArtifactTypeSqlHandler extends SqlHandler<CriteriaArtifactType> { private Collection<Long> getLocalTypeIds() throws OseeCoreException { Collection<? extends IArtifactType> types = criteria.getTypes(); - Collection<Long> toReturn = new HashSet<Long>(); + Collection<Long> toReturn = new HashSet<>(); for (IArtifactType type : types) { toReturn.add(type.getGuid()); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/AttributeTokenSqlHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/AttributeTokenSqlHandler.java index 84b8140bda7..7b327a8be35 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/AttributeTokenSqlHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/AttributeTokenSqlHandler.java @@ -70,7 +70,7 @@ public class AttributeTokenSqlHandler extends SqlHandler<CriteriaAttributeKeywor AbstractJoinQuery joinQuery = null; String jIdAlias = null; if (!criteria.isIncludeAllTypes() && types.size() > 1) { - Set<Long> typeIds = new HashSet<Long>(); + Set<Long> typeIds = new HashSet<>(); for (IAttributeType type : types) { typeIds.add(type.getGuid()); } @@ -82,7 +82,7 @@ public class AttributeTokenSqlHandler extends SqlHandler<CriteriaAttributeKeywor int valueCount = values.size(); int valueIdx = 0; for (String value : values) { - List<Long> tags = new ArrayList<Long>(); + List<Long> tags = new ArrayList<>(); tokenize(value, tags); int tagsSize = tags.size(); gammaSb.append(" ( \n"); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/AttributeTypeExistsSqlHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/AttributeTypeExistsSqlHandler.java index 0bc023fb8d1..a644a0a66b8 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/AttributeTypeExistsSqlHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/AttributeTypeExistsSqlHandler.java @@ -65,7 +65,7 @@ public class AttributeTypeExistsSqlHandler extends SqlHandler<CriteriaAttributeT } sb.append(" WHERE txs.gamma_id = attr.gamma_id\n"); if (types.size() > 1) { - Set<Long> typeIds = new HashSet<Long>(); + Set<Long> typeIds = new HashSet<>(); for (IAttributeType type : types) { typeIds.add(type.getGuid()); } @@ -115,7 +115,7 @@ public class AttributeTypeExistsSqlHandler extends SqlHandler<CriteriaAttributeT Collection<? extends IAttributeType> types = criteria.getTypes(); if (types.size() > 1) { - Set<Long> typeIds = new HashSet<Long>(); + Set<Long> typeIds = new HashSet<>(); for (IAttributeType type : types) { typeIds.add(type.getGuid()); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/BranchArchivedSqlHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/BranchArchivedSqlHandler.java index 8c854564a41..ba313914f10 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/BranchArchivedSqlHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/BranchArchivedSqlHandler.java @@ -54,7 +54,7 @@ public class BranchArchivedSqlHandler extends SqlHandler<CriteriaBranchArchived> public boolean addPredicates(AbstractSqlWriter writer) throws OseeCoreException { Collection<BranchArchivedState> states = criteria.getStates(); if (states.size() > 1) { - Set<Integer> ids = new HashSet<Integer>(); + Set<Integer> ids = new HashSet<>(); for (BranchArchivedState state : states) { ids.add(state.getValue()); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/BranchStateSqlHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/BranchStateSqlHandler.java index 070674b08fa..24b1ff87fdc 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/BranchStateSqlHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/BranchStateSqlHandler.java @@ -54,7 +54,7 @@ public class BranchStateSqlHandler extends SqlHandler<CriteriaBranchState> { public boolean addPredicates(AbstractSqlWriter writer) throws OseeCoreException { Collection<BranchState> types = criteria.getStates(); if (types.size() > 1) { - Set<Integer> ids = new HashSet<Integer>(); + Set<Integer> ids = new HashSet<>(); for (BranchState type : types) { ids.add(type.getValue()); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/BranchTypesSqlHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/BranchTypesSqlHandler.java index f4e3f09acea..208250917a3 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/BranchTypesSqlHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/BranchTypesSqlHandler.java @@ -54,7 +54,7 @@ public class BranchTypesSqlHandler extends SqlHandler<CriteriaBranchType> { public boolean addPredicates(AbstractSqlWriter writer) throws OseeCoreException { Collection<BranchType> types = criteria.getTypes(); if (types.size() > 1) { - Set<Integer> ids = new HashSet<Integer>(); + Set<Integer> ids = new HashSet<>(); for (BranchType type : types) { ids.add(type.getValue()); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/TxTypesSqlHandler.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/TxTypesSqlHandler.java index c3c106050ce..f76357c3e89 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/TxTypesSqlHandler.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/TxTypesSqlHandler.java @@ -54,7 +54,7 @@ public class TxTypesSqlHandler extends SqlHandler<CriteriaTxType> { public boolean addPredicates(AbstractSqlWriter writer) throws OseeCoreException { Collection<TransactionDetailsType> types = criteria.getTypes(); if (types.size() > 1) { - Set<Integer> ids = new HashSet<Integer>(); + Set<Integer> ids = new HashSet<>(); for (TransactionDetailsType type : types) { ids.add(type.getId()); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/IndexerCollectorNotifier.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/IndexerCollectorNotifier.java index 09baf6d78b9..d5e68cf55e4 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/IndexerCollectorNotifier.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/IndexerCollectorNotifier.java @@ -20,7 +20,7 @@ import org.eclipse.osee.orcs.search.IndexerCollector; */ public class IndexerCollectorNotifier implements IndexerCollector { - private final Set<IndexerCollector> listeners = new CopyOnWriteArraySet<IndexerCollector>(); + private final Set<IndexerCollector> listeners = new CopyOnWriteArraySet<>(); private final Log logger; diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/IndexingTaskConsumerImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/IndexingTaskConsumerImpl.java index 6e536d22612..62bc635eea6 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/IndexingTaskConsumerImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/IndexingTaskConsumerImpl.java @@ -26,7 +26,7 @@ import org.eclipse.osee.orcs.search.IndexerCollector; */ public class IndexingTaskConsumerImpl implements IndexingTaskConsumer { - private final Map<Integer, Future<?>> futureTasks = new ConcurrentHashMap<Integer, Future<?>>(); + private final Map<Integer, Future<?>> futureTasks = new ConcurrentHashMap<>(); private final IndexerCallableFactory factory; private final ExecutorAdmin executorAdmin; diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/DeleteTagSetDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/DeleteTagSetDatabaseTxCallable.java index ad5f68c6855..3cdcc897ea5 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/DeleteTagSetDatabaseTxCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/DeleteTagSetDatabaseTxCallable.java @@ -43,7 +43,7 @@ public final class DeleteTagSetDatabaseTxCallable extends AbstractDatastoreTxCal JdbcStatement chStmt = getJdbcClient().getStatement(connection); try { chStmt.runPreparedQuery(SELECT_GAMMAS_FROM_TX_JOIN, queryId); - List<Object[]> datas = new ArrayList<Object[]>(); + List<Object[]> datas = new ArrayList<>(); while (chStmt.next()) { datas.add(new Object[] {chStmt.getLong("gamma_id")}); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallable.java index cb363bd8ad2..11b379bfedc 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallable.java @@ -90,7 +90,7 @@ public final class IndexingTaskDatabaseTxCallable extends AbstractDatastoreTxCal getLogger().debug("Tagging: [%s]", getTagQueueQueryId()); long totalTags = -1; try { - Collection<IndexedResource> sources = new LinkedHashSet<IndexedResource>(); + Collection<IndexedResource> sources = new LinkedHashSet<>(); OrcsDataHandler<IndexedResource> handler = createCollector(sources); loader.loadSource(handler, getTagQueueQueryId()); @@ -119,14 +119,14 @@ public final class IndexingTaskDatabaseTxCallable extends AbstractDatastoreTxCal private long createTags(JdbcConnection connection, Collection<IndexedResource> sources) throws OseeCoreException { SearchTagCollector tagCollector = new SearchTagCollector(); - Set<Long> processed = new HashSet<Long>(); + Set<Long> processed = new HashSet<>(); - Map<Long, Collection<Long>> toStore = new HashMap<Long, Collection<Long>>(); + Map<Long, Collection<Long>> toStore = new HashMap<>(); for (IndexedResource source : sources) { long startItemTime = System.currentTimeMillis(); Long gamma = source.getGammaId(); if (processed.add(gamma)) { - Set<Long> tags = new HashSet<Long>(); + Set<Long> tags = new HashSet<>(); toStore.put(gamma, tags); tagCollector.setCurrentTag(gamma, tags); try { @@ -203,7 +203,7 @@ public final class IndexingTaskDatabaseTxCallable extends AbstractDatastoreTxCal public int deleteTags(JdbcConnection connection, Collection<IndexedResource> sources) throws OseeCoreException { int numberDeleted = 0; if (!sources.isEmpty()) { - List<Object[]> datas = new ArrayList<Object[]>(); + List<Object[]> datas = new ArrayList<>(); for (IndexedResource source : sources) { datas.add(new Object[] {source.getGammaId()}); } @@ -215,7 +215,7 @@ public final class IndexingTaskDatabaseTxCallable extends AbstractDatastoreTxCal private int storeTags(JdbcConnection connection, Map<Long, Collection<Long>> toStore) throws OseeCoreException { int updated = 0; if (!toStore.isEmpty()) { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); for (Entry<Long, Collection<Long>> entry : toStore.entrySet()) { Long gammaId = entry.getKey(); for (Long codedTag : entry.getValue()) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/producer/AbstractIndexerTxDatabaseCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/producer/AbstractIndexerTxDatabaseCallable.java index 197826c3069..8103198c755 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/producer/AbstractIndexerTxDatabaseCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/producer/AbstractIndexerTxDatabaseCallable.java @@ -53,7 +53,7 @@ public abstract class AbstractIndexerTxDatabaseCallable extends AbstractDatastor this.collector = collector; this.cacheLimit = cacheLimit; this.isCacheAll = isCacheAll; - this.queryIds = new ArrayList<Integer>(); + this.queryIds = new ArrayList<>(); this.isOkToDispatch = false; this.currentJoinQuery = null; } @@ -72,7 +72,7 @@ public abstract class AbstractIndexerTxDatabaseCallable extends AbstractDatastor collector.onIndexTotalTaskItems(totalGammas); } isOkToDispatch = true; - futures = new LinkedList<Future<?>>(); + futures = new LinkedList<>(); return futures; } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/producer/IndexBranchesDatabaseCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/producer/IndexBranchesDatabaseCallable.java index 1e3d475f3d7..df0744a15de 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/producer/IndexBranchesDatabaseCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/producer/IndexBranchesDatabaseCallable.java @@ -80,7 +80,7 @@ public final class IndexBranchesDatabaseCallable extends AbstractDatastoreCallab public Integer call() throws Exception { getLogger().info(getParamInfo()); - Set<Long> branchUuids = new HashSet<Long>(); + Set<Long> branchUuids = new HashSet<>(); for (BranchReadable branch : branches) { branchUuids.add(branch.getUuid()); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/AnyTokenOrderProcessor.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/AnyTokenOrderProcessor.java index 44ea2b9a5b7..9b8296db3b2 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/AnyTokenOrderProcessor.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/AnyTokenOrderProcessor.java @@ -27,7 +27,7 @@ public class AnyTokenOrderProcessor implements TokenOrderProcessor { private int numTokensToMatch = 0; public AnyTokenOrderProcessor() { - locations = new LinkedList<MatchLocation>(); + locations = new LinkedList<>(); trackingSet = new TrackingMap(); } @@ -66,7 +66,7 @@ public class AnyTokenOrderProcessor implements TokenOrderProcessor { private static final class TrackingMap { - private final Map<String, MutableInteger> map = new LinkedHashMap<String, MutableInteger>(); + private final Map<String, MutableInteger> map = new LinkedHashMap<>(); private int total = 0; public void add(String value) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/LoadDataBuffer.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/LoadDataBuffer.java index cfc95e90d36..d9d8a79209b 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/LoadDataBuffer.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/LoadDataBuffer.java @@ -33,7 +33,7 @@ public class LoadDataBuffer { private final Multimap<Integer, RelationData> relations; public LoadDataBuffer(int initialSize) { - artifacts = new LinkedHashMap<Integer, ArtifactData>(initialSize); + artifacts = new LinkedHashMap<>(initialSize); attributes = newLinkedHashListMultimap(initialSize); relations = newLinkedHashListMultimap(initialSize); } @@ -88,7 +88,7 @@ public class LoadDataBuffer { } private static <K, V> ListMultimap<K, V> newLinkedHashListMultimap(int fetchSize) { - Map<K, Collection<V>> map = new LinkedHashMap<K, Collection<V>>(fetchSize); + Map<K, Collection<V>> map = new LinkedHashMap<>(fetchSize); return Multimaps.newListMultimap(map, new Supplier<List<V>>() { @Override public List<V> get() { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/MatchTokenOrderProcessor.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/MatchTokenOrderProcessor.java index 67f5c709107..a1c0c38df9c 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/MatchTokenOrderProcessor.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/MatchTokenOrderProcessor.java @@ -28,8 +28,8 @@ public class MatchTokenOrderProcessor implements TokenOrderProcessor { public MatchTokenOrderProcessor() { super(); - locations = new LinkedList<MatchLocation>(); - tokensToSearch = new ArrayList<String>(); + locations = new LinkedList<>(); + tokensToSearch = new ArrayList<>(); } @Override diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/WordsUtil.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/WordsUtil.java index f2cd8b9eedb..815ed15f596 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/WordsUtil.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/util/WordsUtil.java @@ -62,7 +62,7 @@ public class WordsUtil { private static char[] PUNCTUATION = null; static { - Set<Character> combined = new HashSet<Character>(); + Set<Character> combined = new HashSet<>(); combined.addAll(Arrays.asList(DEFAULT_PUNCTUACTION)); combined.addAll(ReservedCharacters.getChars()); combined.remove('\''); @@ -76,7 +76,7 @@ public class WordsUtil { } public static String[] splitOnPunctuation(String original) { - List<String> toReturn = new ArrayList<String>(); + List<String> toReturn = new ArrayList<>(); StringBuffer buffer = new StringBuffer(); for (int index = 0; index < original.length(); index++) { char c = original.charAt(index); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/AbstractSqlWriter.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/AbstractSqlWriter.java index 8a139854a89..852512306ca 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/AbstractSqlWriter.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/AbstractSqlWriter.java @@ -38,8 +38,8 @@ public abstract class AbstractSqlWriter implements HasOptions { protected static final String AND_WITH_NEWLINES = "\n AND \n"; private final StringBuilder output = new StringBuilder(); - private final List<String> tableEntries = new ArrayList<String>(); - private final List<WithClause> withClauses = new ArrayList<WithClause>(); + private final List<String> tableEntries = new ArrayList<>(); + private final List<WithClause> withClauses = new ArrayList<>(); private final SqlAliasManager aliasManager = new SqlAliasManager(); private final Log logger; diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/ObjectField.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/ObjectField.java index cce68235764..dd9f13dc8bb 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/ObjectField.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/ObjectField.java @@ -192,7 +192,7 @@ public enum ObjectField { public static ObjectField fromString(String value) { if (FIELD_BY_NAME == null) { - Map<String, ObjectField> fieldByName = new HashMap<String, ObjectField>(); + Map<String, ObjectField> fieldByName = new HashMap<>(); for (ObjectField field : ObjectField.values()) { fieldByName.put(field.name(), field); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlAliasManager.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlAliasManager.java index 204f842536e..b120b9a9b4d 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlAliasManager.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlAliasManager.java @@ -29,8 +29,8 @@ import com.google.common.collect.Multimaps; */ public class SqlAliasManager { - private final HashMap<String, Alias> aliasCounter = new HashMap<String, Alias>(); - private final List<AliasSet> usedAliases = new ArrayList<AliasSet>(); + private final HashMap<String, Alias> aliasCounter = new HashMap<>(); + private final List<AliasSet> usedAliases = new ArrayList<>(); private int level = 0; public int getLevel() { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlContextImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlContextImpl.java index 985e51d3f3d..54591c89448 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlContextImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlContextImpl.java @@ -25,8 +25,8 @@ public class SqlContextImpl implements SqlContext { private String sql; private ResultObjectDescription data; - private final List<Object> parameters = new ArrayList<Object>(); - private final List<AbstractJoinQuery> joinTables = new ArrayList<AbstractJoinQuery>(); + private final List<Object> parameters = new ArrayList<>(); + private final List<AbstractJoinQuery> joinTables = new ArrayList<>(); private final OrcsSession session; private final Options options; diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlFieldResolver.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlFieldResolver.java index 294c9c48095..b2280154931 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlFieldResolver.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlFieldResolver.java @@ -37,8 +37,8 @@ import com.google.common.collect.Sets.SetView; public final class SqlFieldResolver { private final SqlAliasManager aliasManager; - private final List<DynamicData> unresolved = new ArrayList<DynamicData>(); - private final CountingMap<String> counter = new CountingMap<String>(); + private final List<DynamicData> unresolved = new ArrayList<>(); + private final CountingMap<String> counter = new CountingMap<>(); private final Iterable<SelectSet> selectSets; private boolean selectsProcessed; @@ -62,7 +62,7 @@ public final class SqlFieldResolver { } public Iterable<String> getSortFields() { - Map<ObjectField, String> fieldToColumn = new LinkedHashMap<ObjectField, String>(); + Map<ObjectField, String> fieldToColumn = new LinkedHashMap<>(); for (SelectSet selectSet : selectSets) { DynamicData data = selectSet.getData(); if (data != null) { @@ -70,8 +70,8 @@ public final class SqlFieldResolver { } } - List<String> toReturn = new ArrayList<String>(); - Set<Family> processed = new HashSet<Family>(); + List<String> toReturn = new ArrayList<>(); + Set<Family> processed = new HashSet<>(); for (Entry<ObjectField, String> entry : fieldToColumn.entrySet()) { ObjectField key = entry.getKey(); Family family = key.getFamily(); @@ -101,7 +101,7 @@ public final class SqlFieldResolver { } public ResultObjectDescription getResult() { - final List<DynamicData> datas = new ArrayList<DynamicData>(); + final List<DynamicData> datas = new ArrayList<>(); for (SelectSet selectSet : selectSets) { DynamicData data = selectSet.getData(); if (data != null) { @@ -154,7 +154,7 @@ public final class SqlFieldResolver { private void addRequiredFields(DynamicObject object) { Family family = null; int level = object.getLevel(); - Set<ObjectField> fields = new HashSet<ObjectField>(); + Set<ObjectField> fields = new HashSet<>(); for (DynamicData child : object.getChildren()) { String fieldId = child.getGuid(); if (fieldId != null) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlHandlerFactoryImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlHandlerFactoryImpl.java index 964d17e75c3..1921e3ca183 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlHandlerFactoryImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlHandlerFactoryImpl.java @@ -51,7 +51,7 @@ public class SqlHandlerFactoryImpl implements SqlHandlerFactory { @Override public List<SqlHandler<?>> createHandlers(Iterable<CriteriaSet> criteriaSets) throws OseeCoreException { - List<SqlHandler<?>> handlers = new ArrayList<SqlHandler<?>>(); + List<SqlHandler<?>> handlers = new ArrayList<>(); int level = 0; for (CriteriaSet criteriaSet : criteriaSets) { addHandlers(handlers, level, criteriaSet); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/StaticSqlProvider.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/StaticSqlProvider.java index 3837d7332e7..b162cf9e76d 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/StaticSqlProvider.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/StaticSqlProvider.java @@ -24,7 +24,7 @@ import org.eclipse.osee.orcs.db.internal.SqlProvider; */ public class StaticSqlProvider implements SqlProvider { - private final Map<String, String> sqlMap = new HashMap<String, String>(); + private final Map<String, String> sqlMap = new HashMap<>(); private Log logger; private SystemPreferences preferences; diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/join/AbstractJoinQuery.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/join/AbstractJoinQuery.java index 0a298db11c4..a459d69f82c 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/join/AbstractJoinQuery.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/join/AbstractJoinQuery.java @@ -36,7 +36,7 @@ public abstract class AbstractJoinQuery { private final Long expiresIn; private final int queryId; - protected final Set<IJoinRow> entries = new HashSet<IJoinRow>(); + protected final Set<IJoinRow> entries = new HashSet<>(); private boolean wasStored; private int storedSize; @@ -72,7 +72,7 @@ public abstract class AbstractJoinQuery { public void store(JdbcConnection connection) throws OseeCoreException { if (!this.wasStored) { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); for (IJoinRow joinArray : entries) { data.add(joinArray.toArray()); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/join/DatabaseJoinAccessor.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/join/DatabaseJoinAccessor.java index 670d7028e8a..5131250cc5d 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/join/DatabaseJoinAccessor.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/join/DatabaseJoinAccessor.java @@ -110,7 +110,7 @@ public class DatabaseJoinAccessor implements IJoinAccessor { @Override public Collection<Integer> getAllQueryIds(JdbcConnection connection, JoinItem joinItem) throws OseeCoreException { - Collection<Integer> queryIds = new ArrayList<Integer>(); + Collection<Integer> queryIds = new ArrayList<>(); JdbcStatement chStmt = jdbcClient.getStatement(connection); try { String query = String.format(SELECT_QUERY_IDS, joinItem.getJoinTableName()); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/ComodificationCheck.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/ComodificationCheck.java index 4a5238f7c4a..028989066b2 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/ComodificationCheck.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/ComodificationCheck.java @@ -56,9 +56,9 @@ public class ComodificationCheck implements TransactionProcessor { private final class OnLoadChecker extends LoadDataHandlerAdapter implements OrcsVisitor { - private final Map<Integer, ArtifactData> artifacts = new HashMap<Integer, ArtifactData>(); - private final Map<Integer, AttributeData> attributes = new HashMap<Integer, AttributeData>(); - private final Map<Integer, RelationData> relations = new HashMap<Integer, RelationData>(); + private final Map<Integer, ArtifactData> artifacts = new HashMap<>(); + private final Map<Integer, AttributeData> attributes = new HashMap<>(); + private final Map<Integer, RelationData> relations = new HashMap<>(); public Collection<Integer> getArtifactIds() { return artifacts.keySet(); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionIndexer.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionIndexer.java index d4779dabe4d..5889d128ced 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionIndexer.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionIndexer.java @@ -43,7 +43,7 @@ public class TransactionIndexer implements TransactionProcessor { @Override public void process(final HasCancellation cancellation, OrcsSession session, TransactionData txData) { try { - final Set<Long> datas = new LinkedHashSet<Long>(); + final Set<Long> datas = new LinkedHashSet<>(); txData.getChangeSet().accept(new OrcsVisitorAdapter() { @Override public void visit(AttributeData data) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionProcessorProviderImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionProcessorProviderImpl.java index d9d6971d7cb..c3d2ca0a8fa 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionProcessorProviderImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionProcessorProviderImpl.java @@ -41,7 +41,7 @@ public class TransactionProcessorProviderImpl implements TransactionProcessorPro } private static <K, V> ListMultimap<K, V> newLinkedHashListMultimap() { - Map<K, Collection<V>> map = new LinkedHashMap<K, Collection<V>>(); + Map<K, Collection<V>> map = new LinkedHashMap<>(); return Multimaps.newListMultimap(map, new Supplier<List<V>>() { @Override public List<V> get() { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriter.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriter.java index 2861496c777..7e9f102306d 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriter.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriter.java @@ -125,7 +125,7 @@ public class TransactionWriter { sqlBuilder.updateAfterBinaryStorePersist(); long branchUuid = tx.getBranchId(); - List<Object[]> txNotCurrentData = new ArrayList<Object[]>(); + List<Object[]> txNotCurrentData = new ArrayList<>(); for (Entry<SqlOrderEnum, ? extends AbstractJoinQuery> entry : sqlBuilder.getTxNotCurrents()) { fetchTxNotCurrent(connection, branchUuid, txNotCurrentData, entry.getKey().getTxsNotCurrentQuery(), entry.getValue()); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TxSqlBuilderImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TxSqlBuilderImpl.java index 65d9f2af81b..b977c0779a1 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TxSqlBuilderImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/transaction/TxSqlBuilderImpl.java @@ -86,9 +86,9 @@ public class TxSqlBuilderImpl implements OrcsVisitor, TxSqlBuilder { @Override public void accept(TransactionReadable tx, OrcsChangeSet changeSet) throws OseeCoreException { txId = tx.getGuid(); - binaryStores = new ArrayList<DaoToSql>(); - dataItemInserts = new HashCollection<SqlOrderEnum, Object[]>(); - txNotCurrentsJoin = new HashMap<SqlOrderEnum, IdJoinQuery>(); + binaryStores = new ArrayList<>(); + dataItemInserts = new HashCollection<>(); + txNotCurrentsJoin = new HashMap<>(); addRow(SqlOrderEnum.TXS_DETAIL, txId, tx.getComment(), tx.getDate(), tx.getAuthorId(), tx.getBranchId(), tx.getTxType().getId()); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/DataStoreInfoImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/DataStoreInfoImpl.java index 22659cffa28..595c8ec8b23 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/DataStoreInfoImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/DataStoreInfoImpl.java @@ -22,7 +22,7 @@ import org.eclipse.osee.orcs.core.ds.DataStoreInfo; */ public class DataStoreInfoImpl implements DataStoreInfo { - private Map<String, String> configProperties = new HashMap<String, String>(); + private Map<String, String> configProperties = new HashMap<>(); private Set<URL> configResources; @Override diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/DynamicSchemaResourceProvider.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/DynamicSchemaResourceProvider.java index 4073a21a951..ecf33bcbef8 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/DynamicSchemaResourceProvider.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/util/DynamicSchemaResourceProvider.java @@ -36,7 +36,7 @@ public class DynamicSchemaResourceProvider implements Supplier<Iterable<JdbcMigr @Override public Iterable<JdbcMigrationResource> get() { - List<JdbcMigrationResource> resources = new ArrayList<JdbcMigrationResource>(); + List<JdbcMigrationResource> resources = new ArrayList<>(); Bundle bundle = FrameworkUtil.getBundle(this.getClass()); BundleContext context = bundle.getBundleContext(); diff --git a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OseeClientImpl.java b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OseeClientImpl.java index 7cf577aafa3..ac961c9ea8d 100644 --- a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OseeClientImpl.java +++ b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/OseeClientImpl.java @@ -93,7 +93,7 @@ public class OseeClientImpl implements OseeClient, QueryExecutor { @Override public QueryBuilder createQueryBuilder(IOseeBranch branch) { QueryOptions options = new QueryOptions(); - List<Predicate> predicates = new ArrayList<Predicate>(); + List<Predicate> predicates = new ArrayList<>(); return new QueryBuilderImpl(branch, predicates, options, predicateFactory, this); } diff --git a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/PredicateFactoryImpl.java b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/PredicateFactoryImpl.java index d426106d831..72e6376a525 100644 --- a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/PredicateFactoryImpl.java +++ b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/PredicateFactoryImpl.java @@ -40,13 +40,13 @@ public class PredicateFactoryImpl implements PredicateFactory { @Override public Predicate createUuidSearch(Collection<String> ids) { - List<String> strIds = new LinkedList<String>(ids); + List<String> strIds = new LinkedList<>(ids); return createIdsSearch(SearchMethod.GUIDS, strIds); } @Override public Predicate createLocalIdsSearch(Collection<Integer> ids) { - List<String> strIds = new LinkedList<String>(); + List<String> strIds = new LinkedList<>(); for (Integer value : ids) { strIds.add(String.valueOf(value)); } @@ -55,7 +55,7 @@ public class PredicateFactoryImpl implements PredicateFactory { @Override public Predicate createIdSearch(Collection<? extends Identity<String>> ids) { - List<String> values = new LinkedList<String>(); + List<String> values = new LinkedList<>(); for (Identity<String> token : ids) { values.add(token.getGuid()); } @@ -128,7 +128,7 @@ public class PredicateFactoryImpl implements PredicateFactory { @Override public Predicate createRelatedToSearch(IRelationTypeSide relationTypeSide, Collection<?> ids) { - List<String> values = new LinkedList<String>(); + List<String> values = new LinkedList<>(); String side = relationTypeSide.getSide().isSideA() ? "A" : "B"; for (Object id : ids) { if (id instanceof IArtifactToken) { @@ -141,7 +141,7 @@ public class PredicateFactoryImpl implements PredicateFactory { } private List<String> getLongIds(Collection<? extends Identity<Long>> types) { - List<String> toReturn = new LinkedList<String>(); + List<String> toReturn = new LinkedList<>(); for (Identity<Long> type : types) { Long value = type.getGuid(); toReturn.add(String.valueOf(value)); diff --git a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryBuilderImpl.java b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryBuilderImpl.java index f460d697765..bd5370bebf9 100644 --- a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryBuilderImpl.java +++ b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/QueryBuilderImpl.java @@ -93,7 +93,7 @@ public class QueryBuilderImpl implements QueryBuilder { @Override public QueryBuilder andLocalId(int... artifactId) { - Collection<Integer> ids = new LinkedList<Integer>(); + Collection<Integer> ids = new LinkedList<>(); for (int id : artifactId) { ids.add(id); } @@ -225,7 +225,7 @@ public class QueryBuilderImpl implements QueryBuilder { @Override public QueryBuilder andRelatedToLocalIds(IRelationTypeSide relationTypeSide, int... artifactIds) { - Collection<Integer> ids = new LinkedList<Integer>(); + Collection<Integer> ids = new LinkedList<>(); for (int id : artifactIds) { ids.add(id); } diff --git a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/IdeVersion.java b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/IdeVersion.java index bf976d423f2..30510415fcd 100644 --- a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/IdeVersion.java +++ b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/IdeVersion.java @@ -25,7 +25,7 @@ public class IdeVersion { public List<String> getVersions() { if (versions == null) { - versions = new ArrayList<String>(); + versions = new ArrayList<>(); } return versions; } diff --git a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/search/artifact/SearchResponse.java b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/search/artifact/SearchResponse.java index 2625d1ee639..a4e668c5b20 100644 --- a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/search/artifact/SearchResponse.java +++ b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/search/artifact/SearchResponse.java @@ -30,10 +30,10 @@ public class SearchResponse implements SearchResult { private SearchRequest searchRequest; @XmlTransient - private List<Integer> ids = new LinkedList<Integer>(); + private List<Integer> ids = new LinkedList<>(); @XmlTransient - private List<SearchMatch> searchMatches = new LinkedList<SearchMatch>(); + private List<SearchMatch> searchMatches = new LinkedList<>(); public void setSearchRequest(SearchRequest searchRequest) { this.searchRequest = searchRequest; @@ -75,7 +75,7 @@ public class SearchResponse implements SearchResult { @XmlElement(name = "id") public List<Integer> getIds() { if (ids == null) { - ids = new LinkedList<Integer>(); + ids = new LinkedList<>(); } return ids; } diff --git a/plugins/org.eclipse.osee.orcs.rest.test/src/org/eclipse/osee/orcs/rest/internal/search/dsl/SearchDslTest.java b/plugins/org.eclipse.osee.orcs.rest.test/src/org/eclipse/osee/orcs/rest/internal/search/dsl/SearchDslTest.java index 7369a2092bf..612806207f3 100644 --- a/plugins/org.eclipse.osee.orcs.rest.test/src/org/eclipse/osee/orcs/rest/internal/search/dsl/SearchDslTest.java +++ b/plugins/org.eclipse.osee.orcs.rest.test/src/org/eclipse/osee/orcs/rest/internal/search/dsl/SearchDslTest.java @@ -54,7 +54,7 @@ public class SearchDslTest { public void setup() { MockitoAnnotations.initMocks(this); - Map<SearchMethod, PredicateHandler> handlers = new HashMap<SearchMethod, PredicateHandler>(); + Map<SearchMethod, PredicateHandler> handlers = new HashMap<>(); handlers.put(SearchMethod.ATTRIBUTE_TYPE, handler); dsl = new SearchQueryBuilder(handlers); diff --git a/plugins/org.eclipse.osee.orcs.rest.test/src/org/eclipse/osee/orcs/rest/internal/search/predicate/ExistenceTypePredicateHandlerTest.java b/plugins/org.eclipse.osee.orcs.rest.test/src/org/eclipse/osee/orcs/rest/internal/search/predicate/ExistenceTypePredicateHandlerTest.java index 5b3675a2c5a..66a95936794 100644 --- a/plugins/org.eclipse.osee.orcs.rest.test/src/org/eclipse/osee/orcs/rest/internal/search/predicate/ExistenceTypePredicateHandlerTest.java +++ b/plugins/org.eclipse.osee.orcs.rest.test/src/org/eclipse/osee/orcs/rest/internal/search/predicate/ExistenceTypePredicateHandlerTest.java @@ -117,7 +117,7 @@ public class ExistenceTypePredicateHandlerTest { handler.handle(builder, testPredicate); verify(builder).andExists(attrTypeSideCaptor.capture()); Assert.assertEquals(1, attrTypeSideCaptor.getAllValues().size()); - List<IAttributeType> attrTypes = new ArrayList<IAttributeType>(attrTypeSideCaptor.getValue()); + List<IAttributeType> attrTypes = new ArrayList<>(attrTypeSideCaptor.getValue()); Assert.assertTrue(12345L == attrTypes.get(0).getGuid()); } diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/BranchEndpointImpl.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/BranchEndpointImpl.java index 0d05441708b..22e4a5c6739 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/BranchEndpointImpl.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/BranchEndpointImpl.java @@ -165,7 +165,7 @@ public class BranchEndpointImpl implements BranchEndpoint { public List<Branch> getBranches(String branchUuids, String branchTypes, String branchStates, boolean deleted, boolean archived, String nameEquals, String namePattern, Long childOf, Long ancestorOf) { BranchQueryData options = new BranchQueryData(); if (Strings.isValid(branchUuids)) { - List<Long> branchUuidVals = new LinkedList<Long>(); + List<Long> branchUuidVals = new LinkedList<>(); for (String branchUuid : branchUuids.split(",")) { branchUuidVals.add(Long.parseLong(branchUuid)); } @@ -173,7 +173,7 @@ public class BranchEndpointImpl implements BranchEndpoint { } if (Strings.isValid(branchTypes)) { - List<BranchType> branchTypeVals = new LinkedList<BranchType>(); + List<BranchType> branchTypeVals = new LinkedList<>(); for (String branchType : branchTypes.split(",")) { branchTypeVals.add(BranchType.valueOf(branchType.toUpperCase())); } @@ -181,7 +181,7 @@ public class BranchEndpointImpl implements BranchEndpoint { } if (Strings.isValid(branchStates)) { - List<BranchState> branchStateVals = new LinkedList<BranchState>(); + List<BranchState> branchStateVals = new LinkedList<>(); for (String branchState : branchStates.split(",")) { branchStateVals.add(BranchState.valueOf(branchState.toUpperCase())); } @@ -635,7 +635,7 @@ public class BranchEndpointImpl implements BranchEndpoint { private void checkAllTxFoundAreOnBranch(String opName, long branchUuid, List<Integer> txIds, ResultSet<TransactionReadable> result) { if (txIds.size() != result.size()) { - Set<Integer> found = new HashSet<Integer>(); + Set<Integer> found = new HashSet<>(); for (TransactionReadable tx : result) { found.add(tx.getGuid()); } diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/DatastoreEndpointImpl.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/DatastoreEndpointImpl.java index 2adda2be010..3b71805c9c6 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/DatastoreEndpointImpl.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/DatastoreEndpointImpl.java @@ -68,7 +68,7 @@ public class DatastoreEndpointImpl implements DatastoreEndpoint { activityLog.setEnabled(false); OrcsAdmin adminOps = getOrcsAdmin(); - Map<String, String> parameters = new HashMap<String, String>(); + Map<String, String> parameters = new HashMap<>(); parameters.put("schema.table.data.namespace", options.getTableDataSpace()); parameters.put("schema.index.data.namespace", options.getIndexDataSpace()); parameters.put("schema.user.file.specified.schema.names", Boolean.toString(options.isUseFileSpecifiedSchemas())); diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/HtmlWriter.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/HtmlWriter.java index 53fc3908ece..34cadcc6981 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/HtmlWriter.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/HtmlWriter.java @@ -52,7 +52,7 @@ public class HtmlWriter { TransactionReadable tx = (TransactionReadable) object; addTable(builder, toData(tx)); } else { - Map<String, Object> unhandled = new LinkedHashMap<String, Object>(); + Map<String, Object> unhandled = new LinkedHashMap<>(); unhandled.put("Class", object.getClass().getSimpleName()); unhandled.put("Data", object.toString()); addTable(builder, unhandled); @@ -64,7 +64,7 @@ public class HtmlWriter { } private Map<String, Object> toData(AttributeReadable<?> attribute) throws OseeCoreException { - Map<String, Object> data = new LinkedHashMap<String, Object>(); + Map<String, Object> data = new LinkedHashMap<>(); data.put("Name", attribute.getAttributeType().getName()); int attrId = attribute.getLocalId(); @@ -74,7 +74,7 @@ public class HtmlWriter { } private Map<String, Object> toData(ArtifactReadable artifact) throws OseeCoreException { - Map<String, Object> data = new LinkedHashMap<String, Object>(); + Map<String, Object> data = new LinkedHashMap<>(); data.put("Name", artifact.getName()); data.put("Uuid", artifact.getGuid()); data.put("Tx Id", artifact.getTransaction()); @@ -113,7 +113,7 @@ public class HtmlWriter { } private Map<String, Object> toData(BranchReadable branch) throws OseeCoreException { - Map<String, Object> data = new LinkedHashMap<String, Object>(); + Map<String, Object> data = new LinkedHashMap<>(); data.put("Name", branch.getName()); data.put("Uuid", branch.getUuid()); data.put("Local Id", branch.getLocalId()); @@ -151,7 +151,7 @@ public class HtmlWriter { } public Map<String, Object> toData(TransactionReadable txRecord) throws OseeCoreException { - Map<String, Object> data = new LinkedHashMap<String, Object>(); + Map<String, Object> data = new LinkedHashMap<>(); data.put("TxId", txRecord.getLocalId()); data.put("TxType", txRecord.getTxType()); data.put("Date", txRecord.getDate()); diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/OrcsApplication.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/OrcsApplication.java index d6605fce144..b545e9a7367 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/OrcsApplication.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/OrcsApplication.java @@ -28,8 +28,8 @@ import org.eclipse.osee.orcs.rest.internal.writer.OrcsWriterEndpointImpl; @ApplicationPath("orcs") public class OrcsApplication extends Application { - private final Set<Object> resources = new HashSet<Object>(); - private final Set<Class<?>> classes = new HashSet<Class<?>>(); + private final Set<Object> resources = new HashSet<>(); + private final Set<Class<?>> classes = new HashSet<>(); private static OrcsApi orcsApi; private IResourceManager resourceManager; diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/OrcsRestUtil.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/OrcsRestUtil.java index 2e5d9cd7638..496aed030c4 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/OrcsRestUtil.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/OrcsRestUtil.java @@ -56,7 +56,7 @@ public final class OrcsRestUtil { } public static List<Transaction> asTransactions(ResultSet<? extends TransactionReadable> results) { - List<Transaction> toReturn = new ArrayList<Transaction>(results.size()); + List<Transaction> toReturn = new ArrayList<>(results.size()); for (TransactionReadable data : results) { toReturn.add(asTransaction(data)); } @@ -64,7 +64,7 @@ public final class OrcsRestUtil { } public static List<Branch> asBranches(ResultSet<? extends BranchReadable> results) { - List<Branch> toReturn = new ArrayList<Branch>(results.size()); + List<Branch> toReturn = new ArrayList<>(results.size()); for (BranchReadable data : results) { toReturn.add(asBranch(data)); } @@ -102,7 +102,7 @@ public final class OrcsRestUtil { List<Integer> toReturn; if (Strings.isValid(rawValue)) { String[] entries = rawValue.split(","); - toReturn = new ArrayList<Integer>(); + toReturn = new ArrayList<>(); for (String entry : entries) { Integer value = Integer.parseInt(entry.trim()); toReturn.add(value); @@ -117,7 +117,7 @@ public final class OrcsRestUtil { List<Long> toReturn; if (Strings.isValid(rawValue)) { String[] entries = rawValue.split(","); - toReturn = new ArrayList<Long>(); + toReturn = new ArrayList<>(); for (String entry : entries) { Long value = Long.parseLong(entry.trim()); toReturn.add(value); diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/ArtifactSearch_V1.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/ArtifactSearch_V1.java index 314cda43d9b..b24b1765537 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/ArtifactSearch_V1.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/ArtifactSearch_V1.java @@ -73,7 +73,7 @@ public class ArtifactSearch_V1 extends ArtifactSearch { SearchResponse result = new SearchResponse(); RequestType request = params.getRequestType(); if (request != null) { - List<Integer> localIds = new LinkedList<Integer>(); + List<Integer> localIds = new LinkedList<>(); switch (request) { case COUNT: int total = builder.getCount(); @@ -88,7 +88,7 @@ public class ArtifactSearch_V1 extends ArtifactSearch { break; case MATCHES: ResultSet<Match<ArtifactReadable, AttributeReadable<?>>> matches = builder.getMatches(); - List<SearchMatch> searchMatches = new LinkedList<SearchMatch>(); + List<SearchMatch> searchMatches = new LinkedList<>(); for (Match<ArtifactReadable, AttributeReadable<?>> match : matches) { int artId = match.getItem().getLocalId(); localIds.add(artId); diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/dsl/DslFactory.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/dsl/DslFactory.java index f9cc2072488..eb02ed9fbeb 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/dsl/DslFactory.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/dsl/DslFactory.java @@ -38,7 +38,7 @@ public class DslFactory { } public static Map<SearchMethod, PredicateHandler> getHandlers() { - Map<SearchMethod, PredicateHandler> handlers = new HashMap<SearchMethod, PredicateHandler>(); + Map<SearchMethod, PredicateHandler> handlers = new HashMap<>(); handlers.put(SearchMethod.IDS, new IdsPredicateHandler()); handlers.put(SearchMethod.GUIDS, new GuidsPredicateHandler()); handlers.put(SearchMethod.IS_OF_TYPE, new IsOfTypePredicateHandler()); diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/IdsPredicateHandler.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/IdsPredicateHandler.java index 2238e0f8ecb..cf0bee2a84d 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/IdsPredicateHandler.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/IdsPredicateHandler.java @@ -35,7 +35,7 @@ public class IdsPredicateHandler implements PredicateHandler { Conditions.checkNotNull(values, "values"); - Collection<Long> rawIds = new HashSet<Long>(); + Collection<Long> rawIds = new HashSet<>(); for (String value : values) { if (value.matches("\\d+")) { rawIds.add(Long.parseLong(value)); diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/PredicateHandlerUtil.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/PredicateHandlerUtil.java index 8e8e3796bf8..8b5127ed046 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/PredicateHandlerUtil.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/PredicateHandlerUtil.java @@ -28,7 +28,7 @@ import org.eclipse.osee.framework.jdk.core.util.HexUtil; public class PredicateHandlerUtil { public static Collection<IAttributeType> getIAttributeTypes(Collection<String> types) throws OseeCoreException { - Collection<IAttributeType> attrTypes = new LinkedHashSet<IAttributeType>(); + Collection<IAttributeType> attrTypes = new LinkedHashSet<>(); for (String value : types) { long uuid = parseUuid(value); if (uuid != -1L) { @@ -39,7 +39,7 @@ public class PredicateHandlerUtil { } public static Collection<IArtifactType> getIArtifactTypes(Collection<String> types) throws OseeCoreException { - Collection<IArtifactType> artTypes = new LinkedHashSet<IArtifactType>(); + Collection<IArtifactType> artTypes = new LinkedHashSet<>(); for (String value : types) { long uuid = parseUuid(value); if (uuid != -1L) { @@ -50,7 +50,7 @@ public class PredicateHandlerUtil { } public static Collection<IRelationType> getIRelationTypes(Collection<String> rels) throws OseeCoreException { - Collection<IRelationType> types = new LinkedHashSet<IRelationType>(); + Collection<IRelationType> types = new LinkedHashSet<>(); for (String value : rels) { long longUuid = parseUuid(value); if (longUuid != -1L) { @@ -61,7 +61,7 @@ public class PredicateHandlerUtil { } public static Collection<IRelationTypeSide> getIRelationTypeSides(Collection<String> rels) throws OseeCoreException { - Collection<IRelationTypeSide> relSides = new LinkedHashSet<IRelationTypeSide>(); + Collection<IRelationTypeSide> relSides = new LinkedHashSet<>(); for (String value : rels) { char sideChar = value.charAt(0); String uuid = value.substring(1); diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/RelatedToPredicateHandler.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/RelatedToPredicateHandler.java index e228a3214be..b3aff3b2e01 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/RelatedToPredicateHandler.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/search/artifact/predicate/RelatedToPredicateHandler.java @@ -40,7 +40,7 @@ public class RelatedToPredicateHandler implements PredicateHandler { Conditions.checkNotNull(values, "values"); Collection<IRelationTypeSide> types = PredicateHandlerUtil.getIRelationTypeSides(typeParameters); - Collection<Integer> localIds = new LinkedList<Integer>(); + Collection<Integer> localIds = new LinkedList<>(); for (String value : values) { if (GUID.isValid(value)) { diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writer/OrcsWriterCollectorGenerator.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writer/OrcsWriterCollectorGenerator.java index efeb6cec02c..5b750f16513 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writer/OrcsWriterCollectorGenerator.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writer/OrcsWriterCollectorGenerator.java @@ -156,7 +156,7 @@ public class OrcsWriterCollectorGenerator { } private void createArtifactTypeSheet() { - Map<String, IArtifactType> types = new HashMap<String, IArtifactType>(100); + Map<String, IArtifactType> types = new HashMap<>(100); if (config == null) { for (IArtifactType type : orcsApi.getOrcsTypes().getArtifactTypes().getAll()) { types.put(type.getName(), type); @@ -169,7 +169,7 @@ public class OrcsWriterCollectorGenerator { } } } - List<String> typeNames = new ArrayList<String>(); + List<String> typeNames = new ArrayList<>(); typeNames.addAll(types.keySet()); Collections.sort(typeNames); for (String typeName : typeNames) { @@ -180,12 +180,12 @@ public class OrcsWriterCollectorGenerator { } private void createBranchSheet() { - Map<String, IOseeBranch> branches = new HashMap<String, IOseeBranch>(500); + Map<String, IOseeBranch> branches = new HashMap<>(500); for (IOseeBranch branch : orcsApi.getQueryFactory().branchQuery().getResults()) { branches.put(branch.getName(), branch); } - List<String> branchNames = new ArrayList<String>(); + List<String> branchNames = new ArrayList<>(); branchNames.addAll(branches.keySet()); Collections.sort(branchNames); for (String branchName : branchNames) { @@ -196,7 +196,7 @@ public class OrcsWriterCollectorGenerator { } private void createAttributeTypeSheet() { - Map<String, IAttributeType> types = new HashMap<String, IAttributeType>(100); + Map<String, IAttributeType> types = new HashMap<>(100); if (config == null) { for (IAttributeType type : orcsApi.getOrcsTypes().getAttributeTypes().getAll()) { types.put(type.getName(), type); @@ -211,7 +211,7 @@ public class OrcsWriterCollectorGenerator { } - List<String> typeNames = new ArrayList<String>(); + List<String> typeNames = new ArrayList<>(); typeNames.addAll(types.keySet()); Collections.sort(typeNames); for (String typeName : typeNames) { @@ -222,7 +222,7 @@ public class OrcsWriterCollectorGenerator { } private void createRelationTypeSheet() { - Map<String, IRelationType> types = new HashMap<String, IRelationType>(100); + Map<String, IRelationType> types = new HashMap<>(100); if (config == null) { for (IRelationType type : orcsApi.getOrcsTypes().getRelationTypes().getAll()) { types.put(type.getName(), type); @@ -237,7 +237,7 @@ public class OrcsWriterCollectorGenerator { } } - List<String> typeNames = new ArrayList<String>(); + List<String> typeNames = new ArrayList<>(); typeNames.addAll(types.keySet()); Collections.sort(typeNames); for (String typeName : typeNames) { diff --git a/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/OrcsScriptDslBindingTest.java b/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/OrcsScriptDslBindingTest.java index d5e05f4038a..1496cf3e69e 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/OrcsScriptDslBindingTest.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/OrcsScriptDslBindingTest.java @@ -48,7 +48,7 @@ public class OrcsScriptDslBindingTest { OrcsScript model = resource.getModel(); - Map<String, Object> binding = new HashMap<String, Object>(); + Map<String, Object> binding = new HashMap<>(); binding.put("key-1", "hello"); OrcsScriptUtil.bind(model, binding); diff --git a/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/ParserVerification.java b/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/ParserVerification.java index e6613f851dc..8e5816337d1 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/ParserVerification.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl.tests/src/org/eclipse/osee/orcs/script/dsl/tests/ParserVerification.java @@ -87,8 +87,8 @@ public final class ParserVerification { public void checkRuleErrors(Class<? extends EObject> rule, String textToParse, String... expectedErrorSubstrings) { List<SyntaxErrorMessage> errors = checkRule(rule, textToParse, true); - Set<String> matchingSubstrings = new HashSet<String>(); - Set<String> assertedErrors = new HashSet<String>(); + Set<String> matchingSubstrings = new HashSet<>(); + Set<String> assertedErrors = new HashSet<>(); boolean hadError = false; for (final SyntaxErrorMessage err : errors) { diff --git a/plugins/org.eclipse.osee.orcs.script.dsl.ui/src/org/eclipse/osee/orcs/script/dsl/ui/internal/DefaultOrcsObjectProvider.java b/plugins/org.eclipse.osee.orcs.script.dsl.ui/src/org/eclipse/osee/orcs/script/dsl/ui/internal/DefaultOrcsObjectProvider.java index 18ac4e36141..a92ab470e62 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl.ui/src/org/eclipse/osee/orcs/script/dsl/ui/internal/DefaultOrcsObjectProvider.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl.ui/src/org/eclipse/osee/orcs/script/dsl/ui/internal/DefaultOrcsObjectProvider.java @@ -31,7 +31,7 @@ public class DefaultOrcsObjectProvider implements IOrcsObjectProvider { @Override public Iterable<? extends Identifiable<Long>> getBranches() { - List<Identifiable<Long>> toReturn = new ArrayList<Identifiable<Long>>(); + List<Identifiable<Long>> toReturn = new ArrayList<>(); for (IOrcsObjectProvider provider : getProviders()) { Iterables.addAll(toReturn, provider.getBranches()); } @@ -40,7 +40,7 @@ public class DefaultOrcsObjectProvider implements IOrcsObjectProvider { @Override public Iterable<? extends Identifiable<Long>> getArtifactTypes() { - List<Identifiable<Long>> toReturn = new ArrayList<Identifiable<Long>>(); + List<Identifiable<Long>> toReturn = new ArrayList<>(); for (IOrcsObjectProvider provider : getProviders()) { Iterables.addAll(toReturn, provider.getArtifactTypes()); } @@ -49,7 +49,7 @@ public class DefaultOrcsObjectProvider implements IOrcsObjectProvider { @Override public Iterable<? extends Identifiable<Long>> getAttributeTypes() { - List<Identifiable<Long>> toReturn = new ArrayList<Identifiable<Long>>(); + List<Identifiable<Long>> toReturn = new ArrayList<>(); for (IOrcsObjectProvider provider : getProviders()) { Iterables.addAll(toReturn, provider.getAttributeTypes()); } @@ -58,7 +58,7 @@ public class DefaultOrcsObjectProvider implements IOrcsObjectProvider { @Override public Iterable<? extends Identifiable<Long>> getRelationTypes() { - List<Identifiable<Long>> toReturn = new ArrayList<Identifiable<Long>>(); + List<Identifiable<Long>> toReturn = new ArrayList<>(); for (IOrcsObjectProvider provider : getProviders()) { Iterables.addAll(toReturn, provider.getRelationTypes()); } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OrcsScriptImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OrcsScriptImpl.java index 49e8fce504d..241794f78ba 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OrcsScriptImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OrcsScriptImpl.java @@ -137,7 +137,7 @@ public class OrcsScriptImpl extends MinimalEObjectImpl.Container implements Orcs { if (statements == null) { - statements = new EObjectContainmentEList<ScriptStatement>(ScriptStatement.class, this, OrcsScriptDslPackage.ORCS_SCRIPT__STATEMENTS); + statements = new EObjectContainmentEList<>(ScriptStatement.class, this, OrcsScriptDslPackage.ORCS_SCRIPT__STATEMENTS); } return statements; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactGuidCriteriaImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactGuidCriteriaImpl.java index 079afc8ce7b..d9533858757 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactGuidCriteriaImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactGuidCriteriaImpl.java @@ -73,7 +73,7 @@ public class OsArtifactGuidCriteriaImpl extends OsArtifactCriteriaImpl implement { if (ids == null) { - ids = new EObjectContainmentEList<OsExpression>(OsExpression.class, this, OrcsScriptDslPackage.OS_ARTIFACT_GUID_CRITERIA__IDS); + ids = new EObjectContainmentEList<>(OsExpression.class, this, OrcsScriptDslPackage.OS_ARTIFACT_GUID_CRITERIA__IDS); } return ids; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactIdCriteriaImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactIdCriteriaImpl.java index 6afefe7c1a4..ecc6bb2e8c6 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactIdCriteriaImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactIdCriteriaImpl.java @@ -73,7 +73,7 @@ public class OsArtifactIdCriteriaImpl extends OsArtifactCriteriaImpl implements { if (ids == null) { - ids = new EObjectContainmentEList<OsExpression>(OsExpression.class, this, OrcsScriptDslPackage.OS_ARTIFACT_ID_CRITERIA__IDS); + ids = new EObjectContainmentEList<>(OsExpression.class, this, OrcsScriptDslPackage.OS_ARTIFACT_ID_CRITERIA__IDS); } return ids; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactQueryByPredicateImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactQueryByPredicateImpl.java index 69e23d709f9..5d7f12e67d3 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactQueryByPredicateImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactQueryByPredicateImpl.java @@ -73,7 +73,7 @@ public class OsArtifactQueryByPredicateImpl extends OsArtifactQueryImpl implemen { if (criteria == null) { - criteria = new EObjectContainmentEList<OsItemCriteria>(OsItemCriteria.class, this, OrcsScriptDslPackage.OS_ARTIFACT_QUERY_BY_PREDICATE__CRITERIA); + criteria = new EObjectContainmentEList<>(OsItemCriteria.class, this, OrcsScriptDslPackage.OS_ARTIFACT_QUERY_BY_PREDICATE__CRITERIA); } return criteria; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactTypeClauseImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactTypeClauseImpl.java index f5871006928..af41c0d0bfb 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactTypeClauseImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsArtifactTypeClauseImpl.java @@ -121,7 +121,7 @@ public class OsArtifactTypeClauseImpl extends MinimalEObjectImpl.Container imple { if (types == null) { - types = new EObjectContainmentEList<OsExpression>(OsExpression.class, this, OrcsScriptDslPackage.OS_ARTIFACT_TYPE_CLAUSE__TYPES); + types = new EObjectContainmentEList<>(OsExpression.class, this, OrcsScriptDslPackage.OS_ARTIFACT_TYPE_CLAUSE__TYPES); } return types; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsAttributeClauseImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsAttributeClauseImpl.java index f4bd469cdb2..e1d6e3b10dd 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsAttributeClauseImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsAttributeClauseImpl.java @@ -98,7 +98,7 @@ public class OsAttributeClauseImpl extends MinimalEObjectImpl.Container implemen { if (types == null) { - types = new EObjectContainmentEList<OsExpression>(OsExpression.class, this, OrcsScriptDslPackage.OS_ATTRIBUTE_CLAUSE__TYPES); + types = new EObjectContainmentEList<>(OsExpression.class, this, OrcsScriptDslPackage.OS_ATTRIBUTE_CLAUSE__TYPES); } return types; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchIdCriteriaImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchIdCriteriaImpl.java index 10933e4cca8..0b02c162640 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchIdCriteriaImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchIdCriteriaImpl.java @@ -73,7 +73,7 @@ public class OsBranchIdCriteriaImpl extends OsBranchCriteriaImpl implements OsBr { if (ids == null) { - ids = new EObjectContainmentEList<OsExpression>(OsExpression.class, this, OrcsScriptDslPackage.OS_BRANCH_ID_CRITERIA__IDS); + ids = new EObjectContainmentEList<>(OsExpression.class, this, OrcsScriptDslPackage.OS_BRANCH_ID_CRITERIA__IDS); } return ids; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchQueryByPredicateImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchQueryByPredicateImpl.java index 79edc73b1af..c6eeba3a9de 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchQueryByPredicateImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchQueryByPredicateImpl.java @@ -120,7 +120,7 @@ public class OsBranchQueryByPredicateImpl extends OsBranchQueryImpl implements O { if (criteria == null) { - criteria = new EObjectContainmentEList<OsBranchCriteria>(OsBranchCriteria.class, this, OrcsScriptDslPackage.OS_BRANCH_QUERY_BY_PREDICATE__CRITERIA); + criteria = new EObjectContainmentEList<>(OsBranchCriteria.class, this, OrcsScriptDslPackage.OS_BRANCH_QUERY_BY_PREDICATE__CRITERIA); } return criteria; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchStateCriteriaImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchStateCriteriaImpl.java index 5ca5a9c8fb6..3741a781c2c 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchStateCriteriaImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchStateCriteriaImpl.java @@ -69,7 +69,7 @@ public class OsBranchStateCriteriaImpl extends OsBranchCriteriaImpl implements O { if (states == null) { - states = new EDataTypeEList<OsBranchState>(OsBranchState.class, this, OrcsScriptDslPackage.OS_BRANCH_STATE_CRITERIA__STATES); + states = new EDataTypeEList<>(OsBranchState.class, this, OrcsScriptDslPackage.OS_BRANCH_STATE_CRITERIA__STATES); } return states; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchTypeCriteriaImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchTypeCriteriaImpl.java index 0e11de84565..2c20b533fb4 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchTypeCriteriaImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsBranchTypeCriteriaImpl.java @@ -69,7 +69,7 @@ public class OsBranchTypeCriteriaImpl extends OsBranchCriteriaImpl implements Os { if (types == null) { - types = new EDataTypeEList<OsBranchType>(OsBranchType.class, this, OrcsScriptDslPackage.OS_BRANCH_TYPE_CRITERIA__TYPES); + types = new EDataTypeEList<>(OsBranchType.class, this, OrcsScriptDslPackage.OS_BRANCH_TYPE_CRITERIA__TYPES); } return types; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsCollectObjectExpressionImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsCollectObjectExpressionImpl.java index 9f26279c818..f6b4668696b 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsCollectObjectExpressionImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsCollectObjectExpressionImpl.java @@ -136,7 +136,7 @@ public class OsCollectObjectExpressionImpl extends OsCollectExpressionImpl imple { if (expressions == null) { - expressions = new EObjectContainmentEList<OsCollectExpression>(OsCollectExpression.class, this, OrcsScriptDslPackage.OS_COLLECT_OBJECT_EXPRESSION__EXPRESSIONS); + expressions = new EObjectContainmentEList<>(OsCollectExpression.class, this, OrcsScriptDslPackage.OS_COLLECT_OBJECT_EXPRESSION__EXPRESSIONS); } return expressions; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsFollowRelationTypeImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsFollowRelationTypeImpl.java index 3c25381e8ee..5275f42204b 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsFollowRelationTypeImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsFollowRelationTypeImpl.java @@ -237,7 +237,7 @@ public class OsFollowRelationTypeImpl extends OsFollowStatementImpl implements O { if (criteria == null) { - criteria = new EObjectContainmentEList<OsItemCriteria>(OsItemCriteria.class, this, OrcsScriptDslPackage.OS_FOLLOW_RELATION_TYPE__CRITERIA); + criteria = new EObjectContainmentEList<>(OsItemCriteria.class, this, OrcsScriptDslPackage.OS_FOLLOW_RELATION_TYPE__CRITERIA); } return criteria; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsListLiteralImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsListLiteralImpl.java index a171b131f2f..5e35c3c2748 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsListLiteralImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsListLiteralImpl.java @@ -73,7 +73,7 @@ public class OsListLiteralImpl extends OsCollectionLiteralImpl implements OsList { if (elements == null) { - elements = new EObjectContainmentEList<OsExpression>(OsExpression.class, this, OrcsScriptDslPackage.OS_LIST_LITERAL__ELEMENTS); + elements = new EObjectContainmentEList<>(OsExpression.class, this, OrcsScriptDslPackage.OS_LIST_LITERAL__ELEMENTS); } return elements; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsQueryExpressionImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsQueryExpressionImpl.java index f38936482a6..67f717a2833 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsQueryExpressionImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsQueryExpressionImpl.java @@ -180,7 +180,7 @@ public class OsQueryExpressionImpl extends OsExpressionImpl implements OsQueryEx { if (clause == null) { - clause = new EObjectContainmentEList<OsClause>(OsClause.class, this, OrcsScriptDslPackage.OS_QUERY_EXPRESSION__CLAUSE); + clause = new EObjectContainmentEList<>(OsClause.class, this, OrcsScriptDslPackage.OS_QUERY_EXPRESSION__CLAUSE); } return clause; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsRelatedToClauseImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsRelatedToClauseImpl.java index 9083d192338..c80541d2e03 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsRelatedToClauseImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsRelatedToClauseImpl.java @@ -73,7 +73,7 @@ public class OsRelatedToClauseImpl extends OsRelationClauseImpl implements OsRel { if (ids == null) { - ids = new EObjectContainmentEList<OsExpression>(OsExpression.class, this, OrcsScriptDslPackage.OS_RELATED_TO_CLAUSE__IDS); + ids = new EObjectContainmentEList<>(OsExpression.class, this, OrcsScriptDslPackage.OS_RELATED_TO_CLAUSE__IDS); } return ids; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxAuthorIdCriteriaImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxAuthorIdCriteriaImpl.java index 48891ae2e12..420ba6441bb 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxAuthorIdCriteriaImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxAuthorIdCriteriaImpl.java @@ -73,7 +73,7 @@ public class OsTxAuthorIdCriteriaImpl extends OsTxCriteriaImpl implements OsTxAu { if (ids == null) { - ids = new EObjectContainmentEList<OsExpression>(OsExpression.class, this, OrcsScriptDslPackage.OS_TX_AUTHOR_ID_CRITERIA__IDS); + ids = new EObjectContainmentEList<>(OsExpression.class, this, OrcsScriptDslPackage.OS_TX_AUTHOR_ID_CRITERIA__IDS); } return ids; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxBranchIdCriteriaImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxBranchIdCriteriaImpl.java index 14372b7ad79..a674dea9fdb 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxBranchIdCriteriaImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxBranchIdCriteriaImpl.java @@ -73,7 +73,7 @@ public class OsTxBranchIdCriteriaImpl extends OsTxCriteriaImpl implements OsTxBr { if (ids == null) { - ids = new EObjectContainmentEList<OsExpression>(OsExpression.class, this, OrcsScriptDslPackage.OS_TX_BRANCH_ID_CRITERIA__IDS); + ids = new EObjectContainmentEList<>(OsExpression.class, this, OrcsScriptDslPackage.OS_TX_BRANCH_ID_CRITERIA__IDS); } return ids; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxCommitIdEqualsClauseImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxCommitIdEqualsClauseImpl.java index 47b0731f52e..2eaa523b42e 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxCommitIdEqualsClauseImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxCommitIdEqualsClauseImpl.java @@ -73,7 +73,7 @@ public class OsTxCommitIdEqualsClauseImpl extends OsTxCommitIdClauseImpl impleme { if (ids == null) { - ids = new EObjectContainmentEList<OsExpression>(OsExpression.class, this, OrcsScriptDslPackage.OS_TX_COMMIT_ID_EQUALS_CLAUSE__IDS); + ids = new EObjectContainmentEList<>(OsExpression.class, this, OrcsScriptDslPackage.OS_TX_COMMIT_ID_EQUALS_CLAUSE__IDS); } return ids; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxIdEqualsClauseImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxIdEqualsClauseImpl.java index 00d2a879373..b3b38206706 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxIdEqualsClauseImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxIdEqualsClauseImpl.java @@ -120,7 +120,7 @@ public class OsTxIdEqualsClauseImpl extends OsTxIdClauseImpl implements OsTxIdEq { if (ids == null) { - ids = new EObjectContainmentEList<OsExpression>(OsExpression.class, this, OrcsScriptDslPackage.OS_TX_ID_EQUALS_CLAUSE__IDS); + ids = new EObjectContainmentEList<>(OsExpression.class, this, OrcsScriptDslPackage.OS_TX_ID_EQUALS_CLAUSE__IDS); } return ids; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxQueryByPredicateImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxQueryByPredicateImpl.java index 7249bdd67b8..911d396eb39 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxQueryByPredicateImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxQueryByPredicateImpl.java @@ -120,7 +120,7 @@ public class OsTxQueryByPredicateImpl extends OsTxQueryImpl implements OsTxQuery { if (criteria == null) { - criteria = new EObjectContainmentEList<OsTxCriteria>(OsTxCriteria.class, this, OrcsScriptDslPackage.OS_TX_QUERY_BY_PREDICATE__CRITERIA); + criteria = new EObjectContainmentEList<>(OsTxCriteria.class, this, OrcsScriptDslPackage.OS_TX_QUERY_BY_PREDICATE__CRITERIA); } return criteria; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxTypeCriteriaImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxTypeCriteriaImpl.java index 9276a422248..c3d2ea15e98 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxTypeCriteriaImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsTxTypeCriteriaImpl.java @@ -69,7 +69,7 @@ public class OsTxTypeCriteriaImpl extends OsTxCriteriaImpl implements OsTxTypeCr { if (types == null) { - types = new EDataTypeEList<OsTxType>(OsTxType.class, this, OrcsScriptDslPackage.OS_TX_TYPE_CRITERIA__TYPES); + types = new EDataTypeEList<>(OsTxType.class, this, OrcsScriptDslPackage.OS_TX_TYPE_CRITERIA__TYPES); } return types; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsVariableDeclarationImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsVariableDeclarationImpl.java index 8f5900f70e8..c4b1da3b525 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsVariableDeclarationImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OsVariableDeclarationImpl.java @@ -73,7 +73,7 @@ public class OsVariableDeclarationImpl extends OsExpressionImpl implements OsVar { if (elements == null) { - elements = new EObjectContainmentEList<OsExpression>(OsExpression.class, this, OrcsScriptDslPackage.OS_VARIABLE_DECLARATION__ELEMENTS); + elements = new EObjectContainmentEList<>(OsExpression.class, this, OrcsScriptDslPackage.OS_VARIABLE_DECLARATION__ELEMENTS); } return elements; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OseAttributeOpClauseImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OseAttributeOpClauseImpl.java index cd0dd7e72f6..61262adce5c 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OseAttributeOpClauseImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/orcsScriptDsl/impl/OseAttributeOpClauseImpl.java @@ -86,7 +86,7 @@ public class OseAttributeOpClauseImpl extends OsAttributeClauseImpl implements O { if (options == null) { - options = new EDataTypeEList<OsQueryOption>(OsQueryOption.class, this, OrcsScriptDslPackage.OSE_ATTRIBUTE_OP_CLAUSE__OPTIONS); + options = new EDataTypeEList<>(OsQueryOption.class, this, OrcsScriptDslPackage.OSE_ATTRIBUTE_OP_CLAUSE__OPTIONS); } return options; } @@ -100,7 +100,7 @@ public class OseAttributeOpClauseImpl extends OsAttributeClauseImpl implements O { if (values == null) { - values = new EObjectContainmentEList<OsExpression>(OsExpression.class, this, OrcsScriptDslPackage.OSE_ATTRIBUTE_OP_CLAUSE__VALUES); + values = new EObjectContainmentEList<>(OsExpression.class, this, OrcsScriptDslPackage.OSE_ATTRIBUTE_OP_CLAUSE__VALUES); } return values; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/validation/AbstractOrcsScriptDslJavaValidator.java b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/validation/AbstractOrcsScriptDslJavaValidator.java index 4c243e4b7ac..236bed1215c 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/validation/AbstractOrcsScriptDslJavaValidator.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src-gen/org/eclipse/osee/orcs/script/dsl/validation/AbstractOrcsScriptDslJavaValidator.java @@ -12,7 +12,7 @@ public class AbstractOrcsScriptDslJavaValidator extends org.eclipse.xtext.valida @Override protected List<EPackage> getEPackages() { - List<EPackage> result = new ArrayList<EPackage>(); + List<EPackage> result = new ArrayList<>(); result.add(org.eclipse.osee.orcs.script.dsl.orcsScriptDsl.OrcsScriptDslPackage.eINSTANCE); return result; } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/fields/OsFieldResolverImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/fields/OsFieldResolverImpl.java index 35d7254a82d..1e1793788a0 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/fields/OsFieldResolverImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/fields/OsFieldResolverImpl.java @@ -184,7 +184,7 @@ public class OsFieldResolverImpl implements IFieldResolver { @Override public Set<OsCollectType> getAllowedCollectTypes(EObject object) { - Set<OsCollectType> toReturn = new TreeSet<OsCollectType>(); + Set<OsCollectType> toReturn = new TreeSet<>(); if (object instanceof OsCollectClause) { EObject container = getCollectContainer(object); if (container instanceof OsBranchQueryStatement) { @@ -200,14 +200,14 @@ public class OsFieldResolverImpl implements IFieldResolver { @Override public Set<? extends OsField> getDeclaredFields(EObject object) { - Set<OsField> toReturn = new LinkedHashSet<OsField>(); + Set<OsField> toReturn = new LinkedHashSet<>(); OsCollectObjectExpression container = EcoreUtil2.getContainerOfType(object, OsCollectObjectExpression.class); if (container != null) { String collectName = container.getName(); OsCollectType type = OsCollectType.fromString(collectName); if (type != null) { Set<? extends OsField> allowed = getAllowedFieldsByType(object, type); - Map<String, OsField> fieldMap = new HashMap<String, OsField>(); + Map<String, OsField> fieldMap = new HashMap<>(); for (OsField item : allowed) { fieldMap.put(item.getLiteral(), item); } diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/resource/OrcsScriptResourceImpl.java b/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/resource/OrcsScriptResourceImpl.java index 8caa8127267..4500c401639 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/resource/OrcsScriptResourceImpl.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/resource/OrcsScriptResourceImpl.java @@ -57,7 +57,7 @@ public class OrcsScriptResourceImpl implements OrcsScriptDslResource { String error = builder.toString(); if (Strings.isValid(error)) { if (additionalErrors == null) { - additionalErrors = new ArrayList<String>(); + additionalErrors = new ArrayList<>(); } additionalErrors.add(error); } @@ -67,11 +67,11 @@ public class OrcsScriptResourceImpl implements OrcsScriptDslResource { public Collection<String> getErrors() { List<String> errors = null; if (additionalErrors != null && !additionalErrors.isEmpty()) { - errors = new LinkedList<String>(additionalErrors); + errors = new LinkedList<>(additionalErrors); } if (resource != null) { if (errors == null) { - errors = new LinkedList<String>(); + errors = new LinkedList<>(); } for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : resource.getErrors()) { errors.add(diagnostic.toString()); diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/ExpressionTypeResolver.java b/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/ExpressionTypeResolver.java index f4c8a6f6201..7fe0056769a 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/ExpressionTypeResolver.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/ExpressionTypeResolver.java @@ -72,7 +72,7 @@ public class ExpressionTypeResolver<R> extends OrcsScriptDslSwitch<Object> { boolean result = false; if (isCycleProtected) { if (visited == null) { - visited = new HashSet<EObject>(); + visited = new HashSet<>(); } result = !visited.add(object); } @@ -102,7 +102,7 @@ public class ExpressionTypeResolver<R> extends OrcsScriptDslSwitch<Object> { @Override public Object caseOsVariableDeclaration(OsVariableDeclaration object) { - List<Object> values = new ArrayList<Object>(); + List<Object> values = new ArrayList<>(); List<OsExpression> elements = object.getElements(); for (OsExpression variable : elements) { values.add(doSwitch(variable)); @@ -112,7 +112,7 @@ public class ExpressionTypeResolver<R> extends OrcsScriptDslSwitch<Object> { @Override public Object caseOsListLiteral(OsListLiteral object) { - List<Object> values = new ArrayList<Object>(); + List<Object> values = new ArrayList<>(); List<OsExpression> elements = object.getElements(); for (OsExpression expression : elements) { values.add(doSwitch(expression)); diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/ExpressionValueResolver.java b/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/ExpressionValueResolver.java index c435f46940e..4586c8bbcdb 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/ExpressionValueResolver.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/ExpressionValueResolver.java @@ -82,7 +82,7 @@ public class ExpressionValueResolver<R> extends OrcsScriptDslSwitch<Object> { boolean result = false; if (isCycleProtected) { if (visited == null) { - visited = new HashSet<EObject>(); + visited = new HashSet<>(); } result = !visited.add(object); } @@ -112,7 +112,7 @@ public class ExpressionValueResolver<R> extends OrcsScriptDslSwitch<Object> { @Override public Object caseOsVariableDeclaration(OsVariableDeclaration object) { - List<Object> values = new ArrayList<Object>(); + List<Object> values = new ArrayList<>(); List<OsExpression> elements = object.getElements(); for (OsExpression variable : elements) { values.add(doSwitch(variable)); @@ -122,7 +122,7 @@ public class ExpressionValueResolver<R> extends OrcsScriptDslSwitch<Object> { @Override public Object caseOsListLiteral(OsListLiteral object) { - List<Object> values = new ArrayList<Object>(); + List<Object> values = new ArrayList<>(); List<OsExpression> elements = object.getElements(); for (OsExpression expression : elements) { values.add(doSwitch(expression)); diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/OsExpressionResolver.java b/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/OsExpressionResolver.java index 1e06d068462..7e9bf302b76 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/OsExpressionResolver.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/OsExpressionResolver.java @@ -48,7 +48,7 @@ public class OsExpressionResolver implements IExpressionResolver { @Override public <T> List<T> resolve(Class<T> clazz, List<OsExpression> expressions) { - List<T> toReturn = new ArrayList<T>(); + List<T> toReturn = new ArrayList<>(); for (OsExpression expression : expressions) { List<T> resolved = resolve(clazz, expression); toReturn.addAll(resolved); @@ -58,7 +58,7 @@ public class OsExpressionResolver implements IExpressionResolver { @Override public List<Class<?>> resolveType(OsExpression expression) { - ExpressionTypeResolver<Class<?>> resolver = new ExpressionTypeResolver<Class<?>>(tsConverter, isCycleProtected()); + ExpressionTypeResolver<Class<?>> resolver = new ExpressionTypeResolver<>(tsConverter, isCycleProtected()); List<Class<?>> resolved = resolver.resolve(expression); return resolved != null ? resolved : Collections.<Class<?>> emptyList(); } @@ -71,7 +71,7 @@ public class OsExpressionResolver implements IExpressionResolver { @Override public List<Class<?>> resolveTypes(List<OsExpression> expressions) { - List<Class<?>> toReturn = new ArrayList<Class<?>>(); + List<Class<?>> toReturn = new ArrayList<>(); for (OsExpression expression : expressions) { List<Class<?>> resolved = resolveType(expression); toReturn.addAll(resolved); diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/validation/OrcsScriptDslJavaValidator.java b/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/validation/OrcsScriptDslJavaValidator.java index 53071c9d722..6e8762ad667 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/validation/OrcsScriptDslJavaValidator.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/validation/OrcsScriptDslJavaValidator.java @@ -112,8 +112,8 @@ public class OrcsScriptDslJavaValidator extends org.eclipse.osee.orcs.script.dsl */ @Check public void checkOsCollectClause(OsCollectClause clause) { - Set<String> aliases = new HashSet<String>(); - Set<String> collisions = new HashSet<String>(); + Set<String> aliases = new HashSet<>(); + Set<String> collisions = new HashSet<>(); OsCollectExpression expression = clause.getExpression(); collectAliasHelper(expression, aliases, collisions); diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsAttributeLoadingTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsAttributeLoadingTest.java index 381f7e4046b..58512218b64 100644 --- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsAttributeLoadingTest.java +++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsAttributeLoadingTest.java @@ -85,7 +85,7 @@ public class OrcsAttributeLoadingTest { } private Map<Integer, ArtifactReadable> createLookup(Iterable<ArtifactReadable> arts) { - Map<Integer, ArtifactReadable> lookup = new HashMap<Integer, ArtifactReadable>(); + Map<Integer, ArtifactReadable> lookup = new HashMap<>(); for (ArtifactReadable artifact : arts) { lookup.put(artifact.getLocalId(), artifact); } diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsQueryTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsQueryTest.java index ed458d366c0..7c2de65cb9f 100644 --- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsQueryTest.java +++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsQueryTest.java @@ -479,7 +479,7 @@ public class OrcsQueryTest { } private Set<String> getNames(ResultSet<ArtifactReadable> results) { - Set<String> names = new TreeSet<String>(); + Set<String> names = new TreeSet<>(); for (ArtifactReadable art : results) { names.add(art.getName()); } diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsRelationLoadingTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsRelationLoadingTest.java index 23b4e049c8f..54e376baabf 100644 --- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsRelationLoadingTest.java +++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsRelationLoadingTest.java @@ -106,7 +106,7 @@ public class OrcsRelationLoadingTest { } private Map<Integer, ArtifactReadable> createLookup(Iterable<ArtifactReadable> arts) { - Map<Integer, ArtifactReadable> lookup = new HashMap<Integer, ArtifactReadable>(); + Map<Integer, ArtifactReadable> lookup = new HashMap<>(); for (ArtifactReadable artifact : arts) { lookup.put(artifact.getLocalId(), artifact); } diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsScriptTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsScriptTest.java index 980a701fba2..78a35d9587f 100644 --- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsScriptTest.java +++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsScriptTest.java @@ -66,7 +66,7 @@ public class OrcsScriptTest { @Parameters public static Iterable<Object[]> data() { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); add(data, "start from branch 570 collect branches {*}", // "{\n" + // diff --git a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTxQueryTest.java b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTxQueryTest.java index bff6d38d3ca..902ec0cad7c 100644 --- a/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTxQueryTest.java +++ b/plugins/org.eclipse.osee.orcs.test/src/org/eclipse/osee/orcs/api/OrcsTxQueryTest.java @@ -467,7 +467,7 @@ public class OrcsTxQueryTest { //@formatter:on query = factory.transactionQuery(); - ArrayList<Integer> list = new ArrayList<Integer>(2); + ArrayList<Integer> list = new ArrayList<>(2); list.add(-1); list.add(17); query.andAuthorIds(list); @@ -530,7 +530,7 @@ public class OrcsTxQueryTest { assertEquals(0, query.getCount()); query = factory.transactionQuery(); - ArrayList<Integer> list = new ArrayList<Integer>(2); + ArrayList<Integer> list = new ArrayList<>(2); list.add(1); list.add(2); query.andAuthorIds(list); diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/utility/RestUtil.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/utility/RestUtil.java index 5f63e238671..7b6c43bb3a8 100644 --- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/utility/RestUtil.java +++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/utility/RestUtil.java @@ -101,7 +101,7 @@ public class RestUtil { if (!attributeVals.isEmpty()) { if (art.isAttributeTypeValid(attrType) && orcsApi.getOrcsTypes().getAttributeTypes().getMaxOccurrences( attrType) > 1) { - List<String> attributeValues = new ArrayList<String>(); + List<String> attributeValues = new ArrayList<>(); for (AttributeReadable<?> attrRead : attributeVals) { String valueStr = String.valueOf(attrRead.getValue()); attributeValues.add(valueStr); diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/writer/model/reader/OwAttribute.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/writer/model/reader/OwAttribute.java index 5c3a988250e..bde0f9ae60b 100644 --- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/writer/model/reader/OwAttribute.java +++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/writer/model/reader/OwAttribute.java @@ -34,7 +34,7 @@ public class OwAttribute { public List<Object> getValues() { if (values == null) { - values = new LinkedList<Object>(); + values = new LinkedList<>(); } return values; } diff --git a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/writer/model/reader/OwCollector.java b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/writer/model/reader/OwCollector.java index 03c617d0064..2cec537a0d4 100644 --- a/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/writer/model/reader/OwCollector.java +++ b/plugins/org.eclipse.osee.orcs/src/org/eclipse/osee/orcs/writer/model/reader/OwCollector.java @@ -40,7 +40,7 @@ public class OwCollector { public List<OwArtifact> getCreate() { if (create == null) { - create = new LinkedList<OwArtifact>(); + create = new LinkedList<>(); } return create; } @@ -95,7 +95,7 @@ public class OwCollector { public List<OwArtifact> getUpdate() { if (update == null) { - update = new LinkedList<OwArtifact>(); + update = new LinkedList<>(); } return update; } diff --git a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/db/MessageInstance.java b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/db/MessageInstance.java index eb55af0df85..062cdd848e5 100644 --- a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/db/MessageInstance.java +++ b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/db/MessageInstance.java @@ -36,7 +36,7 @@ public class MessageInstance { private int refcount = 0; private boolean supported = true; private volatile boolean connected = false; - private HashSet<DataType> availableTypes = new HashSet<DataType>(); + private HashSet<DataType> availableTypes = new HashSet<>(); public MessageInstance(Message msg, MessageMode mode, DataType type) { this.msg = msg; diff --git a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/ChannelProcessor.java b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/ChannelProcessor.java index 2dab8817da0..a09f096ff18 100644 --- a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/ChannelProcessor.java +++ b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/ChannelProcessor.java @@ -75,7 +75,7 @@ final public class ChannelProcessor { } public ChannelProcessor(int depth, int bufferSize, ExecutorService threadPool, AbstractMessageDataBase msgDb, DataType memType) { - this.queue = new ArrayBlockingQueue<Task>(depth); + this.queue = new ArrayBlockingQueue<>(depth); try { // fill the queue with pre-allocated tasks for (int i = 0; i < depth; i++) { diff --git a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/MessageDatabase.java b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/MessageDatabase.java index 54aacc4fb49..0bc23d357e8 100644 --- a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/MessageDatabase.java +++ b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/MessageDatabase.java @@ -35,7 +35,7 @@ public class MessageDatabase extends AbstractMessageDataBase { @Override protected Message createMessage(Class<? extends Message> msgClass) throws Exception { Message msg = msgClass.newInstance(); - LinkedList<MessageData> source = new LinkedList<MessageData>(); + LinkedList<MessageData> source = new LinkedList<>(); Map<DataType, Class<? extends Message>[]> messages = msg.getAssociatedMessages(); Set<Entry<DataType, Class<? extends Message>[]>> entrySet = messages.entrySet(); for (Entry<DataType, Class<? extends Message>[]> entry : entrySet) { diff --git a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/MessageSubscription.java b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/MessageSubscription.java index 07c849fabd9..8b579397385 100644 --- a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/MessageSubscription.java +++ b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/MessageSubscription.java @@ -32,7 +32,7 @@ public class MessageSubscription implements IMessageSubscription { private ISubscriptionState currentState = null; private final MessageSubscriptionService msgService; - private final CopyOnWriteArraySet<ISubscriptionListener> listeners = new CopyOnWriteArraySet<ISubscriptionListener>(); + private final CopyOnWriteArraySet<ISubscriptionListener> listeners = new CopyOnWriteArraySet<>(); private String requestedDataType; diff --git a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/MessageSubscriptionService.java b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/MessageSubscriptionService.java index 3871ac0ec96..e7d57bad92b 100644 --- a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/MessageSubscriptionService.java +++ b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/MessageSubscriptionService.java @@ -59,7 +59,7 @@ public class MessageSubscriptionService implements IOteMessageService, ITestConn private static final int MAX_CONCURRENT_WORKER_THREADS = Math.min(Runtime.getRuntime().availableProcessors() + 1, 4); private final InetAddress localAddress; - private final List<MessageSubscription> subscriptions = new CopyOnWriteArrayList<MessageSubscription>(); + private final List<MessageSubscription> subscriptions = new CopyOnWriteArrayList<>(); private volatile AbstractMessageDataBase msgDatabase; private UdpFileTransferHandler fileTransferHandler; private volatile boolean connected = false; diff --git a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/UpdateDispatcher.java b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/UpdateDispatcher.java index a27aab64398..489dda19b73 100644 --- a/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/UpdateDispatcher.java +++ b/plugins/org.eclipse.osee.ote.client.msg/src/org/eclipse/osee/ote/client/msg/core/internal/UpdateDispatcher.java @@ -35,7 +35,7 @@ public final class UpdateDispatcher { private static final int RECEIVE_BUFFER_SIZE = 1024 * 512; /** * Class Instance Fields ** */ - private final Map<DataType, DatagramChannel> channelMap = new HashMap<DataType, DatagramChannel>(); + private final Map<DataType, DatagramChannel> channelMap = new HashMap<>(); private final InetSocketAddress remoteAddress; private final Object gate = new Object(); diff --git a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/JmsToJiniBridgeConnector.java b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/JmsToJiniBridgeConnector.java index faf3abdd158..3db200f255f 100644 --- a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/JmsToJiniBridgeConnector.java +++ b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/JmsToJiniBridgeConnector.java @@ -49,7 +49,7 @@ public class JmsToJiniBridgeConnector implements IServiceConnector { } private EnhancedProperties properties; - private final HashMap<Object, ExportInfo> exports = new HashMap<Object, ExportInfo>(); + private final HashMap<Object, ExportInfo> exports = new HashMap<>(); private final ExportClassLoader exportClassLoader; private final Object service; private final List<IServicePropertyChangeListener> propertyChangeListeners = diff --git a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/JmsToJiniBridgeConnectorLite.java b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/JmsToJiniBridgeConnectorLite.java index 375492cc6b1..270e0b722b0 100644 --- a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/JmsToJiniBridgeConnectorLite.java +++ b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/JmsToJiniBridgeConnectorLite.java @@ -66,7 +66,7 @@ public class JmsToJiniBridgeConnectorLite implements IServiceConnector, OseeMess private MessageService messageService; private OteServiceRequestHandler myOteServiceRequestHandler = new OteServiceRequestHandler(); private EnhancedProperties properties; - private final HashMap<Object, ExportInfo> exports = new HashMap<Object, ExportInfo>(); + private final HashMap<Object, ExportInfo> exports = new HashMap<>(); private final ExportClassLoader exportClassLoader; private final List<IServicePropertyChangeListener> propertyChangeListeners = new CopyOnWriteArrayList<IServicePropertyChangeListener>(); diff --git a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestClientServiceImpl.java b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestClientServiceImpl.java index 442c658b100..917f7029946 100644 --- a/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestClientServiceImpl.java +++ b/plugins/org.eclipse.osee.ote.client/src/org/eclipse/osee/ote/service/core/TestClientServiceImpl.java @@ -47,7 +47,7 @@ public class TestClientServiceImpl implements IOteClientService, IConnectorListe private static final String NO_USER_MSG = "a user has not been set"; private final IConnectionService connectionService; - private final HashMap<String, IServiceConnector> testHosts = new HashMap<String, IServiceConnector>(); + private final HashMap<String, IServiceConnector> testHosts = new HashMap<>(); private final ListenerNotifier listenerNotifier = new ListenerNotifier(); private final HashSet<ITestEnvironmentAvailibilityListener> hostAvailabilityListeners = new HashSet<ITestEnvironmentAvailibilityListener>(); @@ -75,7 +75,7 @@ public class TestClientServiceImpl implements IOteClientService, IConnectorListe final Set<Entry<String, IServiceConnector>> entrySet; synchronized (this) { if (hostAvailabilityListeners.add(listener)) { - entrySet = new HashSet<Entry<String,IServiceConnector>>(testHosts.entrySet()); + entrySet = new HashSet<>(testHosts.entrySet()); } else { entrySet = Collections.emptySet(); } @@ -317,7 +317,7 @@ public class TestClientServiceImpl implements IOteClientService, IConnectorListe @Override public synchronized List<IServiceConnector> getAvailableTestHosts() { - List<IServiceConnector> envs = new ArrayList<IServiceConnector>(); + List<IServiceConnector> envs = new ArrayList<>(); for (IServiceConnector conn : testHosts.values()) { envs.add(conn); } diff --git a/plugins/org.eclipse.osee.ote.connection.jini/src/org/eclipse/osee/ote/connection/jini/JiniConnector.java b/plugins/org.eclipse.osee.ote.connection.jini/src/org/eclipse/osee/ote/connection/jini/JiniConnector.java index e9b7b2f7251..276d77edea6 100644 --- a/plugins/org.eclipse.osee.ote.connection.jini/src/org/eclipse/osee/ote/connection/jini/JiniConnector.java +++ b/plugins/org.eclipse.osee.ote.connection.jini/src/org/eclipse/osee/ote/connection/jini/JiniConnector.java @@ -34,7 +34,7 @@ import org.eclipse.osee.framework.jdk.core.util.Network; */ public abstract class JiniConnector implements IServiceConnector { protected final static String LINK_PROPERTY = "JINI_CONNECTOR_LINK"; - private final HashMap<Object, ExportInfo> exports = new HashMap<Object, ExportInfo>(); + private final HashMap<Object, ExportInfo> exports = new HashMap<>(); private final EnhancedProperties properties; private final HashSet<IServicePropertyChangeListener> propertyChangeListeners = new HashSet<IServicePropertyChangeListener>(); @@ -101,7 +101,7 @@ public abstract class JiniConnector implements IServiceConnector { } protected Entry[] createEntries() { - LinkedList<Entry> entries = new LinkedList<Entry>(); + LinkedList<Entry> entries = new LinkedList<>(); return entries.toArray(new Entry[entries.size()]); } diff --git a/plugins/org.eclipse.osee.ote.connection.service/src/org/eclipse/osee/connection/service/internal/ConnectionServiceImpl.java b/plugins/org.eclipse.osee.ote.connection.service/src/org/eclipse/osee/connection/service/internal/ConnectionServiceImpl.java index baa594168bc..bb6c43d4093 100644 --- a/plugins/org.eclipse.osee.ote.connection.service/src/org/eclipse/osee/connection/service/internal/ConnectionServiceImpl.java +++ b/plugins/org.eclipse.osee.ote.connection.service/src/org/eclipse/osee/connection/service/internal/ConnectionServiceImpl.java @@ -23,7 +23,7 @@ import org.eclipse.osee.connection.service.IServiceConnector; class ConnectionServiceImpl implements IConnectionService { - private final HashSet<IServiceConnector> connectors = new HashSet<IServiceConnector>(); + private final HashSet<IServiceConnector> connectors = new HashSet<>(); private final EventNotifier eventNotifier = new EventNotifier(); private boolean isStopped = false; @@ -50,7 +50,7 @@ class ConnectionServiceImpl implements IConnectionService { @Override public synchronized List<IServiceConnector> findConnectors(IConnectorFilter[] filterChain) { checkState(); - ArrayList<IServiceConnector> matchingConnectors = new ArrayList<IServiceConnector>(); + ArrayList<IServiceConnector> matchingConnectors = new ArrayList<>(); for (IServiceConnector connector : connectors) { boolean accepted = true; for (IConnectorFilter filter : filterChain) { diff --git a/plugins/org.eclipse.osee.ote.connection.service/src/org/eclipse/osee/connection/service/internal/EventNotifier.java b/plugins/org.eclipse.osee.ote.connection.service/src/org/eclipse/osee/connection/service/internal/EventNotifier.java index 6100740d878..474d578e42c 100644 --- a/plugins/org.eclipse.osee.ote.connection.service/src/org/eclipse/osee/connection/service/internal/EventNotifier.java +++ b/plugins/org.eclipse.osee.ote.connection.service/src/org/eclipse/osee/connection/service/internal/EventNotifier.java @@ -29,7 +29,7 @@ public class EventNotifier { void notifyConnectorsAdded(final Collection<IServiceConnector> connectors) { executorService.submit(new Runnable() { // copy the collection of new connectors - final ArrayList<IServiceConnector> newConnectors = new ArrayList<IServiceConnector>(connectors); + final ArrayList<IServiceConnector> newConnectors = new ArrayList<>(connectors); @Override public void run() { diff --git a/plugins/org.eclipse.osee.ote.container/src/org/eclipse/osee/ote/container/LibraryChangeProvider.java b/plugins/org.eclipse.osee.ote.container/src/org/eclipse/osee/ote/container/LibraryChangeProvider.java index a0fc0063521..4384a90bd17 100644 --- a/plugins/org.eclipse.osee.ote.container/src/org/eclipse/osee/ote/container/LibraryChangeProvider.java +++ b/plugins/org.eclipse.osee.ote.container/src/org/eclipse/osee/ote/container/LibraryChangeProvider.java @@ -20,7 +20,7 @@ public class LibraryChangeProvider<T extends JarCollectionNature> { private final List<IUserLibListener> listeners; public LibraryChangeProvider() { - listeners = new ArrayList<IUserLibListener>(); + listeners = new ArrayList<>(); } public void addListener(IUserLibListener listener) { diff --git a/plugins/org.eclipse.osee.ote.container/src/org/eclipse/osee/ote/container/OteClasspathContainer.java b/plugins/org.eclipse.osee.ote.container/src/org/eclipse/osee/ote/container/OteClasspathContainer.java index c0ed7b81faf..2f0ae41d7e0 100644 --- a/plugins/org.eclipse.osee.ote.container/src/org/eclipse/osee/ote/container/OteClasspathContainer.java +++ b/plugins/org.eclipse.osee.ote.container/src/org/eclipse/osee/ote/container/OteClasspathContainer.java @@ -101,12 +101,12 @@ public class OteClasspathContainer implements IClasspathContainer, IUserLibListe @Override public IClasspathEntry[] getClasspathEntries() { - List<IClasspathEntry> entries = new ArrayList<IClasspathEntry>(); + List<IClasspathEntry> entries = new ArrayList<>(); Collection<BundleInfo> runtimeLibUrls; try { runtimeLibUrls = locator.getRuntimeLibs(); - classPaths = new ArrayList<ClassPathDescription>(); - betterPaths = new ArrayList<BundleInfo>(); + classPaths = new ArrayList<>(); + betterPaths = new ArrayList<>(); for (BundleInfo info : runtimeLibUrls) { String binaryFilePath = info.getSystemLocation().getFile(); diff --git a/plugins/org.eclipse.osee.ote.container/src/org/eclipse/osee/ote/container/OteContainerActivator.java b/plugins/org.eclipse.osee.ote.container/src/org/eclipse/osee/ote/container/OteContainerActivator.java index d076db78b6a..c449a72811a 100644 --- a/plugins/org.eclipse.osee.ote.container/src/org/eclipse/osee/ote/container/OteContainerActivator.java +++ b/plugins/org.eclipse.osee.ote.container/src/org/eclipse/osee/ote/container/OteContainerActivator.java @@ -43,7 +43,7 @@ public class OteContainerActivator implements BundleActivator { public void start(BundleContext context) throws Exception { plugin = this; this.context = context; - userLibListener = new LibraryChangeProvider<OteUserLibsNature>(); + userLibListener = new LibraryChangeProvider<>(); this.userLibResourceListener = new JarChangeResourceListener<OteUserLibsNature>(OteUserLibsNature.NATURE_ID, userLibListener); diff --git a/plugins/org.eclipse.osee.ote.core.test/src/org/eclipse/osee/ote/OTEApiTest.java b/plugins/org.eclipse.osee.ote.core.test/src/org/eclipse/osee/ote/OTEApiTest.java index e313c0d1be5..7662b3e70a5 100644 --- a/plugins/org.eclipse.osee.ote.core.test/src/org/eclipse/osee/ote/OTEApiTest.java +++ b/plugins/org.eclipse.osee.ote.core.test/src/org/eclipse/osee/ote/OTEApiTest.java @@ -47,7 +47,7 @@ public class OTEApiTest { validConfiguration.addItem(config2); validConfiguration.addItem(config3); - OTEStatusCallback<ConfigurationStatus> callable = new OTEStatusCallbackForTests<ConfigurationStatus>(); + OTEStatusCallback<ConfigurationStatus> callable = new OTEStatusCallbackForTests<>(); Future<ConfigurationStatus> statusFuture = oteApi.loadConfiguration(validConfiguration, callable); ConfigurationStatus status = statusFuture.get(); @@ -123,7 +123,7 @@ public class OTEApiTest { validConfiguration.addItem(config2); validConfiguration.addItem(config3); - OTEStatusCallback<ConfigurationStatus> callable = new OTEStatusCallbackForTests<ConfigurationStatus>(); + OTEStatusCallback<ConfigurationStatus> callable = new OTEStatusCallbackForTests<>(); Future<ConfigurationStatus> statusFuture = oteApi.downloadConfigurationJars(validConfiguration, callable); ConfigurationStatus status = statusFuture.get(); diff --git a/plugins/org.eclipse.osee.ote.core.test/src/org/eclipse/osee/ote/message/mock/TestMessage.java b/plugins/org.eclipse.osee.ote.core.test/src/org/eclipse/osee/ote/message/mock/TestMessage.java index 8ae1a9cf56a..7172e89b55d 100644 --- a/plugins/org.eclipse.osee.ote.core.test/src/org/eclipse/osee/ote/message/mock/TestMessage.java +++ b/plugins/org.eclipse.osee.ote.core.test/src/org/eclipse/osee/ote/message/mock/TestMessage.java @@ -39,7 +39,7 @@ public class TestMessage extends Message<UnitTestAccessor, TestMessageData, Test setDefaultMessageData(ethData); INT_ELEMENT_1 = new IntegerElement(this, "INT_ELEMENT_1", ethData, 0, 0, 15); STRING_ELEMENT_1 = new StringElement(this, "STRING_ELEMENT_1", ethData, 2, 0, 159); - ENUM_ELEMENT_1 = new EnumeratedElement<TestEnum>(this, "ENUM_ELEMENT_1", TestEnum.class, ethData, 22, 0, 7); + ENUM_ELEMENT_1 = new EnumeratedElement<>(this, "ENUM_ELEMENT_1", TestEnum.class, ethData, 22, 0, 7); FLOAT32_ELEMENT_1 = new Float32Element(this, "FLOAT32_ELEMENT_1", ethData, 23, 0, 31); RECORD_MAP_1 = new RecordMap<TestRecordElement>(this, ethData, "RECORD_MAP_1", 2, new RECORD_MAP_1_factory(ethData)); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/Configuration.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/Configuration.java index 9b2d60ccf79..e92606ed5dc 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/Configuration.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/Configuration.java @@ -17,7 +17,7 @@ public class Configuration implements Serializable { private ArrayList<ConfigurationItem> items; public Configuration() { - items = new ArrayList<ConfigurationItem>(); + items = new ArrayList<>(); } public List<ConfigurationItem> getItems() { diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/OTETestEnvironmentClient.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/OTETestEnvironmentClient.java index b134063ccb1..550d2a777e9 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/OTETestEnvironmentClient.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/OTETestEnvironmentClient.java @@ -192,7 +192,7 @@ public class OTETestEnvironmentClient { HeadlessClassServer classServer = null; Configuration localConfiguration = new Configuration(); try{ - List<File> bundlesToSend = new ArrayList<File>(); + List<File> bundlesToSend = new ArrayList<>(); bundlesToSend.add(oteBuilderRootFolder); classServer = new HeadlessClassServer(PortUtil.getInstance().getValidPort(), InetAddress.getLocalHost(), bundlesToSend); File[] jars = oteBuilderRootFolder.listFiles(new FilenameFilter(){ diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/ClassServer.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/ClassServer.java index 7ce0a6fb490..10d605f916a 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/ClassServer.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/ClassServer.java @@ -59,7 +59,7 @@ public class ClassServer extends Thread { hostName = new URL("http://" + address.getHostAddress() + ":" + server.getLocalPort() + "/"); } this.setName("OSEE ClassServer"); - this.resourceFinders = new ArrayList<ResourceFinder>(); + this.resourceFinders = new ArrayList<>(); } public void addResourceFinder(ResourceFinder finder) { diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/ClassServerPermissions.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/ClassServerPermissions.java index 6864208d6a9..3047dc666db 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/ClassServerPermissions.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/ClassServerPermissions.java @@ -24,7 +24,7 @@ public class ClassServerPermissions extends PermissionCollection { private final ArrayList<Permission> list; public ClassServerPermissions() { - list = new ArrayList<Permission>(); + list = new ArrayList<>(); } @Override diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/HeadlessClassServer.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/HeadlessClassServer.java index 7b11ae13ea3..2988e3f8227 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/HeadlessClassServer.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/HeadlessClassServer.java @@ -21,7 +21,7 @@ public class HeadlessClassServer { public HeadlessClassServer(int port, InetAddress address, List<File> bundleFolders) throws IOException{ // Thread.currentThread().setName("BundleClassServer"); classServer = new ClassServer(port, address); - jars = new ArrayList<BundleInfo>(); + jars = new ArrayList<>(); for(File dir:bundleFolders){ if(dir.exists() && dir.isDirectory()){ findJarFiles(dir, jars); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/PathResourceFinder.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/PathResourceFinder.java index 1c402fbe38c..31b8dc22756 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/PathResourceFinder.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/classserver/PathResourceFinder.java @@ -31,9 +31,9 @@ import org.eclipse.osee.framework.logging.OseeLog; public class PathResourceFinder extends ResourceFinder { - private final HashSet<JarFile> jars = new HashSet<JarFile>(128); - private final HashSet<String> dirs = new HashSet<String>(128); - private final HashMap<String, JarFile[]> map = new HashMap<String, JarFile[]>(128); + private final HashSet<JarFile> jars = new HashSet<>(128); + private final HashSet<String> dirs = new HashSet<>(128); + private final HashMap<String, JarFile[]> map = new HashMap<>(128); private final boolean trees; private final ClassServerPermissions perm; private static final int NUMBER_OF_FILE_READ_ATTEMPTS = 20; @@ -144,7 +144,7 @@ public class PathResourceFinder extends ResourceFinder { for (int j = 0; j < files.length; j++) { String jar = files[j]; if (jar.endsWith(".jar") || jar.endsWith(".zip")) { - ArrayList<JarFile> jfs = new ArrayList<JarFile>(10); + ArrayList<JarFile> jfs = new ArrayList<>(10); try { addJar(jar, jfs, base); map.put(jar.substring(0, jar.length() - 4), jfs.toArray(new JarFile[jfs.size()])); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/collections/ObjectPool.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/collections/ObjectPool.java index 5cbd4f6475b..e16ba417410 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/collections/ObjectPool.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/collections/ObjectPool.java @@ -9,7 +9,7 @@ public class ObjectPool<T> { public ObjectPool(ObjectPoolConfiguration<T> config) { this.config = config; - objs = new ArrayBlockingQueue<T>(config.getMaxSize()); + objs = new ArrayBlockingQueue<>(config.getMaxSize()); if(config.preallocate()){ for(int i = 0; i < config.getMaxSize(); i++){ objs.offer(config.make()); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/CopyOnWriteNoIteratorList.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/CopyOnWriteNoIteratorList.java index 871270afba8..d5c0a6f992e 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/CopyOnWriteNoIteratorList.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/CopyOnWriteNoIteratorList.java @@ -17,7 +17,7 @@ import java.util.concurrent.locks.ReentrantLock; public class CopyOnWriteNoIteratorList<E> { private ReentrantLock lock = new ReentrantLock(); - private AtomicReference<E[]> data = new AtomicReference<E[]>(); + private AtomicReference<E[]> data = new AtomicReference<>(); private Class<E> type; public CopyOnWriteNoIteratorList(Class<E> type){ diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/GCHelper.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/GCHelper.java index 5018c997953..14205dd57d2 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/GCHelper.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/GCHelper.java @@ -32,7 +32,7 @@ public class GCHelper { public GCHelper() { super(); - map = new ConcurrentHashMap<String, WeakReference<Object>>(1024); + map = new ConcurrentHashMap<>(1024); } public static GCHelper getGCHelper() { @@ -60,7 +60,7 @@ public class GCHelper { } public void writeGCResults(StringBuilder builder) { - TreeSet<String> live = new TreeSet<String>(); + TreeSet<String> live = new TreeSet<>(); System.gc(); for (Map.Entry<String, WeakReference<Object>> entry : map.entrySet()) { if (entry.getValue().get() != null) { @@ -78,7 +78,7 @@ public class GCHelper { } public List getInstancesOfType(Class type) { - List<Object> listOfObjects = new ArrayList<Object>(); + List<Object> listOfObjects = new ArrayList<>(); System.gc(); for (Map.Entry<String, WeakReference<Object>> entry : map.entrySet()) { if (entry.getValue().get() != null) { diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/MethodFormatter.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/MethodFormatter.java index 133bbdaca1c..58d7c314351 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/MethodFormatter.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/MethodFormatter.java @@ -30,7 +30,7 @@ import org.w3c.dom.Element; * @author Robert A. Fisher */ public class MethodFormatter implements Xmlizable, XmlizableStream { - private final Collection<Argument> arguments = new ArrayList<Argument>(); + private final Collection<Argument> arguments = new ArrayList<>(); public final class Argument { public final String Class; diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/OseeTestThread.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/OseeTestThread.java index 02d229d237b..e444d94cb47 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/OseeTestThread.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/OseeTestThread.java @@ -30,7 +30,7 @@ public abstract class OseeTestThread { private static final Logger logger = Logger.getLogger("osee.test.core.OseeTestThread"); private final Thread thread; private final WeakReference<TestEnvironment> env; - private static final HashSet<OseeTestThread> threadList = new HashSet<OseeTestThread>(32); + private static final HashSet<OseeTestThread> threadList = new HashSet<>(32); private volatile Throwable causeOfDeath = null; private volatile Date timeOfDeath = null; @@ -57,7 +57,7 @@ public abstract class OseeTestThread { */ public OseeTestThread(String name, boolean isDaemon, ThreadGroup group, TestEnvironment env) { GCHelper.getGCHelper().addRefWatch(this); - this.env = new WeakReference<TestEnvironment>(env); + this.env = new WeakReference<>(env); thread = new Thread(group, name) { @Override diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/TestCase.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/TestCase.java index 9303058fdab..fef03f98621 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/TestCase.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/TestCase.java @@ -103,7 +103,7 @@ public abstract class TestCase implements ITestEnvironmentAccessor, Xmlizable, X private final TestDescriptionRecord testDescription; @JsonProperty public int number; - protected List<RequirementRecord> traceability = new ArrayList<RequirementRecord>(); + protected List<RequirementRecord> traceability = new ArrayList<>(); /** * TestCase Constructor. @@ -129,7 +129,7 @@ public abstract class TestCase implements ITestEnvironmentAccessor, Xmlizable, X if (addToRunList) { this.number = testScript.addTestCase(this); } - this.testScript = new WeakReference<TestScript>(testScript); + this.testScript = new WeakReference<>(testScript); this.environment = testScript.getTestEnvironment(); GCHelper.getGCHelper().addRefWatch(this); } @@ -140,7 +140,7 @@ public abstract class TestCase implements ITestEnvironmentAccessor, Xmlizable, X // TODO we have two different traceability tags here.... we need to combine these or get rid // of them all together since define and the artifact framework specifies traceability // this.tracability = new ArrayList(); - this.traceability = new ArrayList<RequirementRecord>(); + this.traceability = new ArrayList<>(); this.standAlone = false; ; diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/TestException.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/TestException.java index e1191c2264c..bd54922cdd8 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/TestException.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/TestException.java @@ -21,7 +21,7 @@ public class TestException extends RuntimeException { private final String threadCauseName; private final Level level; - private List<IHealthStatus> status = new ArrayList<IHealthStatus>(); + private List<IHealthStatus> status = new ArrayList<>(); public TestException(String message, Level level) { this(message, level, null); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/TestScript.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/TestScript.java index 22a98f36899..0d92ceccda8 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/TestScript.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/TestScript.java @@ -160,9 +160,9 @@ public abstract class TestScript implements ITimeout { private final boolean isMpLevel; private IScriptInitializer scriptInitializer; private final ScriptTypeEnum scriptType; - private final ArrayList<TestCase> selectiveRunList = new ArrayList<TestCase>(32); + private final ArrayList<TestCase> selectiveRunList = new ArrayList<>(32); private Date startTime; - private final ArrayList<TestCase> testCases = new ArrayList<TestCase>(32); + private final ArrayList<TestCase> testCases = new ArrayList<>(32); private final ITestPointTally testPointTally; protected CommandEndedStatusEnum status; private Throwable rootCause; @@ -240,7 +240,7 @@ public abstract class TestScript implements ITimeout { * @return reference to arrayList testCases. */ public/* TestCase */List<TestCase> getTestCases() { - ArrayList<TestCase> testCaseList = new ArrayList<TestCase>(); + ArrayList<TestCase> testCaseList = new ArrayList<>(); testCaseList.add(getSetupTestCase()); testCaseList.addAll(testCases); testCaseList.add(getTearDownTestCase()); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/AsynchRemoteJobs.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/AsynchRemoteJobs.java index 836f35f5a9d..20621c0f813 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/AsynchRemoteJobs.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/AsynchRemoteJobs.java @@ -18,7 +18,7 @@ import org.eclipse.osee.framework.logging.OseeLog; public class AsynchRemoteJobs implements Runnable { private final LinkedList<Runnable> jobs; - private static WeakHashMap<Object, AsynchRemoteJobs> map = new WeakHashMap<Object, AsynchRemoteJobs>(); + private static WeakHashMap<Object, AsynchRemoteJobs> map = new WeakHashMap<>(); public static AsynchRemoteJobs getInstance(Object obj) { AsynchRemoteJobs asynchRemoteJobs = null; @@ -31,7 +31,7 @@ public class AsynchRemoteJobs implements Runnable { } public AsynchRemoteJobs() { - jobs = new LinkedList<Runnable>(); + jobs = new LinkedList<>(); Thread th = new Thread(this); th.setName("AsynchRemoteJobs[Test Environment]"); th.start(); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/ReportDataControl.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/ReportDataControl.java index 8342a827f17..53b4c3efa60 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/ReportDataControl.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/ReportDataControl.java @@ -27,8 +27,8 @@ public class ReportDataControl implements IReportData { private final ArrayList<ReportDataListener> queueListeners; public ReportDataControl() { - this.queueListeners = new ArrayList<ReportDataListener>(); - ArrayList<String> queueHeaders = new ArrayList<String>(); + this.queueListeners = new ArrayList<>(); + ArrayList<String> queueHeaders = new ArrayList<>(); queueHeaders.add("User"); queueHeaders.add("Script"); this.queueData = new ReportData(queueHeaders); @@ -69,7 +69,7 @@ public class ReportDataControl implements IReportData { ArrayList<String> values; for (int i = 0; i < cmds.size(); i++) { TestEnvironmentCommand cmd = cmds.get(i); - values = new ArrayList<String>(); + values = new ArrayList<>(); values.add(cmd.getDescription().getDescription()); queueData.addItem(cmd.getDescription().getGuid(), values); } diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/TestEnvironment.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/TestEnvironment.java index 48ecdca956e..6ed89e0afce 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/TestEnvironment.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/TestEnvironment.java @@ -76,13 +76,13 @@ import org.osgi.util.tracker.ServiceTrackerCustomizer; */ public abstract class TestEnvironment implements TestEnvironmentInterface, ITestEnvironmentAccessor, ITestContext { - private final List<ITestEnvironmentListener> envListeners = new ArrayList<ITestEnvironmentListener>(32); + private final List<ITestEnvironmentListener> envListeners = new ArrayList<>(32); private IExecutionUnitManagement executionUnitManagement; private File outDir = null; private final ITestStation testStation; private boolean batchMode = false; - private final HashMap<String, Remote> controlInterfaces = new HashMap<String, Remote>(); + private final HashMap<String, Remote> controlInterfaces = new HashMap<>(); private final IEnvironmentFactory factory; private IServiceConnector connector; private final IRuntimeLibraryManager runtimeManager; @@ -94,9 +94,9 @@ public abstract class TestEnvironment implements TestEnvironmentInterface, ITest @Deprecated private boolean isEnvSetup = false; @Deprecated - private final List<IScriptCompleteEvent> scriptCompleteListeners = new ArrayList<IScriptCompleteEvent>(); + private final List<IScriptCompleteEvent> scriptCompleteListeners = new ArrayList<>(); @Deprecated - private final List<IScriptSetupEvent> scriptSetupListeners = new ArrayList<IScriptSetupEvent>(); + private final List<IScriptSetupEvent> scriptSetupListeners = new ArrayList<>(); private OteServerSideEndprointRecieve oteServerSideEndpointRecieve; private OteServerSideEndpointSender oteServerSideEndpointSender; @@ -117,8 +117,8 @@ public abstract class TestEnvironment implements TestEnvironmentInterface, ITest this.testStation = factory.getTestStation(); this.runtimeManager = factory.getRuntimeManager(); - this.associatedObjectListeners = new HashMap<Class<?>, ArrayList<IAssociatedObjectListener>>(); - this.associatedObjects = new HashMap<Class<?>, Object>(100); + this.associatedObjectListeners = new HashMap<>(); + this.associatedObjects = new HashMap<>(100); this.batchMode = OteProperties.isOseeOteInBatchModeEnabled(); messagingServiceTracker = setupOteMessagingSenderAndReceiver(); @@ -231,7 +231,7 @@ public abstract class TestEnvironment implements TestEnvironmentInterface, ITest @Override public List<String> getQueueLabels() { - List<String> list = new ArrayList<String>(); + List<String> list = new ArrayList<>(); list.add("Description"); return list; } diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/console/ConsoleCommandManager.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/console/ConsoleCommandManager.java index 6fa4c732bc6..3a360c9002e 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/console/ConsoleCommandManager.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/console/ConsoleCommandManager.java @@ -15,7 +15,7 @@ import java.util.Hashtable; public class ConsoleCommandManager implements ICommandManager { - private final Hashtable<String, ConsoleCommand> cmdMap = new Hashtable<String, ConsoleCommand>(64); + private final Hashtable<String, ConsoleCommand> cmdMap = new Hashtable<>(64); private boolean isShutdown = false; diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/console/ConsoleShell.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/console/ConsoleShell.java index c2d146ef6c3..1025085ae6a 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/console/ConsoleShell.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/environment/console/ConsoleShell.java @@ -24,7 +24,7 @@ public abstract class ConsoleShell { private boolean saveLastCmdFlag = true; public ConsoleShell(ICommandManager manager) { - this.manager = new WeakReference<ICommandManager>(manager); + this.manager = new WeakReference<>(manager); } public abstract void println(String string); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/BaseTestLifecycleListenerProvider.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/BaseTestLifecycleListenerProvider.java index ffd82453f59..2a85d0357f7 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/BaseTestLifecycleListenerProvider.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/BaseTestLifecycleListenerProvider.java @@ -29,7 +29,7 @@ public class BaseTestLifecycleListenerProvider implements ITestLifecycleListener public BaseTestLifecycleListenerProvider(IEventDataProvider eventProvider) { this.eventProvider = eventProvider; - listeners = new CopyOnWriteArrayList<ITestLifecycleListener>(); + listeners = new CopyOnWriteArrayList<>(); } @Override diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/MethodResultImpl.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/MethodResultImpl.java index 859827db41c..7b13317a55c 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/MethodResultImpl.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/MethodResultImpl.java @@ -31,7 +31,7 @@ public class MethodResultImpl implements IMethodResult { private ReturnCode returnCode; public MethodResultImpl(ReturnCode returnCode) { - statuses = new ArrayList<IHealthStatus>(); + statuses = new ArrayList<>(); this.returnCode = returnCode; } diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/command/BaseCommandManager.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/command/BaseCommandManager.java index fec44b1f644..1f9e984a189 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/command/BaseCommandManager.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/command/BaseCommandManager.java @@ -33,7 +33,7 @@ public class BaseCommandManager implements ICommandManager { OteThreadManager threadManager = OteThreadManager.getInstance(); commands = Executors.newSingleThreadExecutor(threadManager.createNewFactory("ote.command")); commandResponse = Executors.newSingleThreadExecutor(threadManager.createNewFactory("ote.command.response")); - cmdMap = new ConcurrentHashMap<ITestServerCommand, Future<ITestCommandResult>>(); + cmdMap = new ConcurrentHashMap<>(); } @Override diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/saxparse/ElementHandlers.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/saxparse/ElementHandlers.java index d22ac77cad6..d7efe949e88 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/saxparse/ElementHandlers.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/saxparse/ElementHandlers.java @@ -21,7 +21,7 @@ import org.xml.sax.SAXException; public abstract class ElementHandlers { private final String name; - private final List<IBaseSaxElementListener> listeners = new ArrayList<IBaseSaxElementListener>(); + private final List<IBaseSaxElementListener> listeners = new ArrayList<>(); public ElementHandlers(String name) { this.name = name; diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/saxparse/OteSaxHandler.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/saxparse/OteSaxHandler.java index 034062181e9..856a7732ced 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/saxparse/OteSaxHandler.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/saxparse/OteSaxHandler.java @@ -92,7 +92,7 @@ public class OteSaxHandler extends AbstractSaxHandler { Map<String, ElementHandlers> handlers; public OteSaxHandler() throws Exception { - handlers = new HashMap<String, ElementHandlers>(); + handlers = new HashMap<>(); addHandlers(new Global()); addHandlers(new AdditionalInfo()); addHandlers(new Actual()); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/testrun/BaseTestRunListenerProvider.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/testrun/BaseTestRunListenerProvider.java index a0f29c738a3..7f93cde3206 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/testrun/BaseTestRunListenerProvider.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/testrun/BaseTestRunListenerProvider.java @@ -25,7 +25,7 @@ public class BaseTestRunListenerProvider implements ITestRunListenerProvider { List<ITestRunListener> listeners; public BaseTestRunListenerProvider() { - listeners = new CopyOnWriteArrayList<ITestRunListener>(); + listeners = new CopyOnWriteArrayList<>(); } @Override diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/thread/OteThreadFactory.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/thread/OteThreadFactory.java index 2c64664f4f7..ba82b5eb314 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/thread/OteThreadFactory.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/thread/OteThreadFactory.java @@ -26,7 +26,7 @@ public class OteThreadFactory implements ThreadFactory { protected OteThreadFactory(String threadName) { this.threadName = threadName; - this.threads = new CopyOnWriteArrayList<WeakReference<OteThread>>(); + this.threads = new CopyOnWriteArrayList<>(); } @Override @@ -37,7 +37,7 @@ public class OteThreadFactory implements ThreadFactory { } public List<OteThread> getThreads() { - List<OteThread> toReturn = new ArrayList<OteThread>(); + List<OteThread> toReturn = new ArrayList<>(); for (WeakReference<OteThread> weak : threads) { OteThread thread = weak.get(); if (thread != null) { diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/thread/OteThreadManager.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/thread/OteThreadManager.java index 09e7242cb22..d5c4f7af2de 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/thread/OteThreadManager.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/framework/thread/OteThreadManager.java @@ -26,7 +26,7 @@ public class OteThreadManager { private final Map<String, OteThreadFactory> factories; private OteThreadManager() { - this.factories = new HashMap<String, OteThreadFactory>(); + this.factories = new HashMap<>(); } public static OteThreadManager getInstance() { diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/internal/OTESessionManagerImpl.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/internal/OTESessionManagerImpl.java index c21cf949bac..7476b892fd5 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/internal/OTESessionManagerImpl.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/internal/OTESessionManagerImpl.java @@ -14,7 +14,7 @@ public class OTESessionManagerImpl implements OTESessionManager { private UUID activeUserId; public OTESessionManagerImpl(){ - userMap = new ConcurrentHashMap<UUID, IUserSession>(); + userMap = new ConcurrentHashMap<>(); } @Override diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/ScriptLogHandler.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/ScriptLogHandler.java index 13691a9dbcd..d6c51d959f1 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/ScriptLogHandler.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/ScriptLogHandler.java @@ -75,7 +75,7 @@ public class ScriptLogHandler extends Handler { document.createProcessingInstruction("xml-stylesheet", "type=\"text/xsl\" href=\"" + getXSLTransformName() + "\""); document.appendChild(processingInstruction); - records = new ArrayList<LogRecord>(); + records = new ArrayList<>(); document.appendChild(document.createComment("OUTFILE_COMMNET")); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/ParentLogRecord.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/ParentLogRecord.java index 1aeef2540ee..e12af0dc309 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/ParentLogRecord.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/ParentLogRecord.java @@ -10,7 +10,7 @@ import org.codehaus.jackson.annotate.JsonProperty; public class ParentLogRecord extends LogRecord { private static final long serialVersionUID = 684361479587503820L; - private Collection<LogRecord> records = new ArrayList<LogRecord>(); + private Collection<LogRecord> records = new ArrayList<>(); public ParentLogRecord() { super(Level.OFF, ""); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/PropertyStoreRecord.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/PropertyStoreRecord.java index 6e1bd0c4660..30576b63d65 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/PropertyStoreRecord.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/PropertyStoreRecord.java @@ -48,7 +48,7 @@ public class PropertyStoreRecord extends TestRecord { @JsonProperty public Map<String, String> getProperties() { - Map<String, String> result = new HashMap<String, String>(); + Map<String, String> result = new HashMap<>(); if (store != null && !store.isEmpty()) { for (String key : store.keySet()) { if (nonEmptyString(store.get(key)) != null) { diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/ScriptResultRecord.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/ScriptResultRecord.java index be80face194..bd2ca9351fa 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/ScriptResultRecord.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/ScriptResultRecord.java @@ -46,8 +46,8 @@ public class ScriptResultRecord extends TestRecord { */ public ScriptResultRecord(TestScript script) { super(script.getTestEnvironment(), TestLevel.TEST_POINT, script.getClass().getName(), false); - childElements = new ArrayList<Xmlizable>(1000); - childStreamElements = new ArrayList<XmlizableStream>(100); + childElements = new ArrayList<>(1000); + childStreamElements = new ArrayList<>(100); } public void addChildElement(Xmlizable xml) { diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TestRecord.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TestRecord.java index 97bd9652ba7..fce46266cd6 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TestRecord.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TestRecord.java @@ -41,11 +41,11 @@ import org.w3c.dom.Element; */ public abstract class TestRecord extends LogRecord implements Xmlizable, XmlizableStream { private static final long serialVersionUID = 2663140700880844240L; - private static final ArrayList<Pattern> stacktraceExcludes = new ArrayList<Pattern>(32); - private static final ArrayList<Pattern> stacktraceIncludes = new ArrayList<Pattern>(32); + private static final ArrayList<Pattern> stacktraceExcludes = new ArrayList<>(32); + private static final ArrayList<Pattern> stacktraceIncludes = new ArrayList<>(32); private static boolean filterTheStacktrace = true; private static boolean locationLogginOn = true; - private List<LogRecord> children = new ArrayList<LogRecord>(); + private List<LogRecord> children = new ArrayList<>(); public static void setLocationLoggingOn(boolean on) { locationLogginOn = on; @@ -239,7 +239,7 @@ public abstract class TestRecord extends LogRecord implements Xmlizable, Xmlizab @JsonProperty public List<String> getLocation() { - List<String> result = new ArrayList<String>(); + List<String> result = new ArrayList<>(); if (TestRecord.getLocationLoggingOn()) { StackTraceElement[] stackTrace = this.throwable.getStackTrace(); result.addAll(filterStackTrace(stackTrace)); @@ -255,7 +255,7 @@ public abstract class TestRecord extends LogRecord implements Xmlizable, Xmlizab // include everything if not filtered, otherwise ... // default is to include unless explicitly excluded, but only if not // explicitly included ... yuck - List<String> result = new ArrayList<String>(); + List<String> result = new ArrayList<>(); for (StackTraceElement stackElement : stackTrace) { final String className = stackElement.getClassName(); if (!filterTheStacktrace || included(className) || !excluded(className)) { diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TraceRecord.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TraceRecord.java index 2989a7a4a44..191bac898be 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TraceRecord.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TraceRecord.java @@ -57,8 +57,8 @@ public class TraceRecord extends TestRecord implements Xmlizable { this.objectName = objectName; this.methodName = methodName; this.methodArguments = methodArguments; - this.additionalElements = new ArrayList<Xmlizable>(); - this.additionalStreamElements = new ArrayList<XmlizableStream>(); + this.additionalElements = new ArrayList<>(); + this.additionalStreamElements = new ArrayList<>(); } public TraceRecord(ITestEnvironmentAccessor source, String objectName2, String methodName2, MethodFormatter methodArguments2) { diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TraceRecordEnd.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TraceRecordEnd.java index db430250c08..24b8a4aef2a 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TraceRecordEnd.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/log/record/TraceRecordEnd.java @@ -38,8 +38,8 @@ public class TraceRecordEnd extends TestRecord implements Xmlizable { public TraceRecordEnd(ITestEnvironmentAccessor source, ReturnFormatter returnFormatter) { super(source, TestLevel.TRACE, "", true); this.returnFormatter = returnFormatter; - this.additionalElements = new ArrayList<Xmlizable>(); - this.additionalStreamElements = new ArrayList<XmlizableStream>(); + this.additionalElements = new ArrayList<>(); + this.additionalStreamElements = new ArrayList<>(); } public void addAdditionalElement(Xmlizable object) { diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/testPoint/CheckGroup.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/testPoint/CheckGroup.java index c15197757e0..dee71128eb9 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/testPoint/CheckGroup.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/testPoint/CheckGroup.java @@ -43,7 +43,7 @@ public class CheckGroup implements ITestGroup { */ public CheckGroup(Operation operation, String groupName) { super(); - testPoints = new ArrayList<ITestPoint>(); + testPoints = new ArrayList<>(); // this.allTrue = allTrue; this.operation = operation; this.groupName = groupName; diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/testPoint/RetryGroup.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/testPoint/RetryGroup.java index 1693831914f..afba89e8a02 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/testPoint/RetryGroup.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/core/testPoint/RetryGroup.java @@ -32,8 +32,8 @@ public class RetryGroup extends CheckGroup { public RetryGroup(String groupName) { super(Operation.OR, groupName); - childElements = new ArrayList<Xmlizable>(); - childStreamElements = new ArrayList<XmlizableStream>(); + childElements = new ArrayList<>(); + childStreamElements = new ArrayList<>(); } @Override diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteEndpointReceiveRunnable.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteEndpointReceiveRunnable.java index 727034d0aff..1be29c1460c 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteEndpointReceiveRunnable.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteEndpointReceiveRunnable.java @@ -29,7 +29,7 @@ public class OteEndpointReceiveRunnable implements Runnable { private Class<OteEndpointReceiveRunnable> logger = OteEndpointReceiveRunnable.class; private final InetSocketAddress address; - private CopyOnWriteArrayList<EndpointDataProcessor> dataProcessors = new CopyOnWriteArrayList<EndpointDataProcessor>(); + private CopyOnWriteArrayList<EndpointDataProcessor> dataProcessors = new CopyOnWriteArrayList<>(); public OteEndpointReceiveRunnable(InetSocketAddress address){ this.address = address; diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteEndpointSendRunnable.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteEndpointSendRunnable.java index 281d062c94b..e3a9260c40c 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteEndpointSendRunnable.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteEndpointSendRunnable.java @@ -35,7 +35,7 @@ final class OteEndpointSendRunnable implements Runnable { try { threadChannel = openAndInitializeDatagramChannel(); boolean keepRunning = true; - final List<AddressBuffer> dataToSend = new ArrayList<AddressBuffer>(32); + final List<AddressBuffer> dataToSend = new ArrayList<>(32); System.setSecurityManager(null); while(keepRunning){ try{ diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteUdpEndpointSender.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteUdpEndpointSender.java index 8b28acb1f04..3ae2f4e789d 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteUdpEndpointSender.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteUdpEndpointSender.java @@ -31,7 +31,7 @@ public class OteUdpEndpointSender implements OteEndpointSender { private volatile Thread thread; public OteUdpEndpointSender(InetSocketAddress address){ - toSend = new ArrayBlockingQueue<AddressBuffer>(5000); + toSend = new ArrayBlockingQueue<>(5000); buffers = new ObjectPool<AddressBuffer>(new ObjectPoolConfiguration<AddressBuffer>(50,true) { @Override public AddressBuffer make() { diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/OTEBundleLoader.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/OTEBundleLoader.java index 59e7b1c66ea..93f10b3c8e9 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/OTEBundleLoader.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/OTEBundleLoader.java @@ -77,9 +77,9 @@ public class OTEBundleLoader implements IRuntimeLibraryManager{ public OTEBundleLoader() { this.context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - this.installedBundles = new LinkedList<Bundle>(); - this.runningBundles = new LinkedList<Bundle>(); - this.bundleNameToMd5Map = new HashMap<String, String>(); + this.installedBundles = new LinkedList<>(); + this.runningBundles = new LinkedList<>(); + this.bundleNameToMd5Map = new HashMap<>(); } @Override @@ -262,7 +262,7 @@ public class OTEBundleLoader implements IRuntimeLibraryManager{ @Override public void resetScriptLoader(Configuration oteConfiguration, String[] classPaths) throws Exception { - List<URL> urls = new ArrayList<URL>(); + List<URL> urls = new ArrayList<>(); if(oteConfiguration != null){ for(ConfigurationItem item:oteConfiguration.getItems()){ File file = serverRuntimeCache.get(item.getSymbolicName(), item.getMd5Digest()); @@ -303,7 +303,7 @@ public class OTEBundleLoader implements IRuntimeLibraryManager{ @JsonProperty public List<String> getBundleVersions() { Bundle[] bundles = ServiceUtility.getContext().getBundles(); - List<String> versions = new ArrayList<String>(); + List<String> versions = new ArrayList<>(); for(Bundle bundle: bundles ){ String version = bundle.getHeaders().get("Bundle-Version"); String implVersion = bundle.getHeaders().get("Implementation-Version"); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/RunTestListener.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/RunTestListener.java index 9816f6a665d..639962df7a6 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/RunTestListener.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/RunTestListener.java @@ -30,7 +30,7 @@ public class RunTestListener implements EventHandler { public RunTestListener(EventAdmin eventAdmin, OteUdpEndpoint oteEndpoint, OTEApi oteApi) { this.oteApi = oteApi; - handles = new ConcurrentHashMap<String, ICommandHandle>(); + handles = new ConcurrentHashMap<>(); } @Override diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/endpoint/EndpointComponent.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/endpoint/EndpointComponent.java index 8db478ce516..fe247740b09 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/endpoint/EndpointComponent.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/endpoint/EndpointComponent.java @@ -18,8 +18,8 @@ import org.eclipse.osee.ote.properties.OtePropertiesCore; public class EndpointComponent implements OteUdpEndpoint { private OteUdpEndpointReceiverImpl receiver; - private HashMap<InetSocketAddress, OteUdpEndpointSender> senders = new HashMap<InetSocketAddress, OteUdpEndpointSender>(); - private CopyOnWriteNoIteratorList<OteUdpEndpointSender> broadcastThreaded = new CopyOnWriteNoIteratorList<OteUdpEndpointSender>(OteUdpEndpointSender.class);//for backwards compatibility + private HashMap<InetSocketAddress, OteUdpEndpointSender> senders = new HashMap<>(); + private CopyOnWriteNoIteratorList<OteUdpEndpointSender> broadcastThreaded = new CopyOnWriteNoIteratorList<>(OteUdpEndpointSender.class);//for backwards compatibility private boolean debug = false; public EndpointComponent(){ diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/message/event/send/OteEventMessageFutureImpl.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/message/event/send/OteEventMessageFutureImpl.java index 482d799e5db..4d5a906d48d 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/message/event/send/OteEventMessageFutureImpl.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/internal/message/event/send/OteEventMessageFutureImpl.java @@ -61,7 +61,7 @@ public class OteEventMessageFutureImpl<T extends OteEventMessage, R extends OteE return th; } }); - timeoutRunnable = new TimeoutRunnable<T, R>(lock, condition, sentMessage, callable, this); + timeoutRunnable = new TimeoutRunnable<>(lock, condition, sentMessage, callable, this); wakeup = ex.schedule(timeoutRunnable, timeout, TimeUnit.MILLISECONDS); } diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/ElementPath.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/ElementPath.java index 19360586f1b..a6247f96d58 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/ElementPath.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/ElementPath.java @@ -26,7 +26,7 @@ public class ElementPath implements Serializable { private final boolean isHeaderElement; public static ElementPath decode(String encodedPath) { - List<Object> path = new LinkedList<Object>(); + List<Object> path = new LinkedList<>(); String[] components = encodedPath.split("\\+"); for (String component : components) { diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/IOInstrumentationDB.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/IOInstrumentationDB.java index d773119ba6e..5ea7b84f05f 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/IOInstrumentationDB.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/IOInstrumentationDB.java @@ -22,7 +22,7 @@ import org.eclipse.osee.ote.message.instrumentation.IOInstrumentation; */ public class IOInstrumentationDB { - private final Map<String, IOInstrumentation> ioInstrumentation = new ConcurrentHashMap<String, IOInstrumentation>();; + private final Map<String, IOInstrumentation> ioInstrumentation = new ConcurrentHashMap<>();; private final CopyOnWriteArraySet<IInstrumentationRegistrationListener> listeners = new CopyOnWriteArraySet<IInstrumentationRegistrationListener>(); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/Message.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/Message.java index 2b9541cdae2..c164caf72cf 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/Message.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/Message.java @@ -72,8 +72,8 @@ public abstract class Message<S extends ITestEnvironmentMessageSystemAccessor, T private boolean destroyed = false; private DataType currentMemType; - private final Map<DataType, ArrayList<U>> memTypeToMessageMap = new HashMap<DataType, ArrayList<U>>(); - private final Map<DataType, ArrayList<T>> memToDataMap = new HashMap<DataType, ArrayList<T>>(); + private final Map<DataType, ArrayList<U>> memTypeToMessageMap = new HashMap<>(); + private final Map<DataType, ArrayList<T>> memToDataMap = new HashMap<>(); private final int phase; protected double rate; protected final double defaultRate; @@ -84,15 +84,15 @@ public abstract class Message<S extends ITestEnvironmentMessageSystemAccessor, T @SuppressWarnings("rawtypes") private IMessageRequestor messageRequestor = null; private static final double doubleTolerance = 0.000001; - private final Set<DataType> memTypeActive = new HashSet<DataType>(); + private final Set<DataType> memTypeActive = new HashSet<>(); private T defaultMessageData; - private final List<IMemSourceChangeListener> preMemSourceChangeListeners = new CopyOnWriteArrayList<IMemSourceChangeListener>(); + private final List<IMemSourceChangeListener> preMemSourceChangeListeners = new CopyOnWriteArrayList<>(); private final List<IMemSourceChangeListener> postMemSourceChangeListeners = new CopyOnWriteArrayList<IMemSourceChangeListener>(); - private final List<IMessageDisposeListener> preMessageDisposeListeners = new CopyOnWriteArrayList<IMessageDisposeListener>(); - private final List<IMessageDisposeListener> postMessageDisposeListeners = new CopyOnWriteArrayList<IMessageDisposeListener>(); + private final List<IMessageDisposeListener> preMessageDisposeListeners = new CopyOnWriteArrayList<>(); + private final List<IMessageDisposeListener> postMessageDisposeListeners = new CopyOnWriteArrayList<>(); private final int defaultByteSize; private final int defaultOffset; @@ -105,7 +105,7 @@ public abstract class Message<S extends ITestEnvironmentMessageSystemAccessor, T this.name = name; this.defaultByteSize = defaultByteSize; this.defaultOffset = defaultOffset; - elementMap = new LinkedHashMap<String, Element>(20); + elementMap = new LinkedHashMap<>(20); this.phase = phase; this.rate = rate; this.defaultRate = rate; @@ -351,7 +351,7 @@ public abstract class Message<S extends ITestEnvironmentMessageSystemAccessor, T checkState(); ArrayList<U> list; if (!memTypeToMessageMap.containsKey(memType)) { - list = new ArrayList<U>(4); + list = new ArrayList<>(4); memTypeToMessageMap.put(memType, list); } else { list = memTypeToMessageMap.get(memType); @@ -387,7 +387,7 @@ public abstract class Message<S extends ITestEnvironmentMessageSystemAccessor, T final DataType type = data.getType(); final ArrayList<T> list; if (!memToDataMap.containsKey(type)) { - list = new ArrayList<T>(); + list = new ArrayList<>(); memToDataMap.put(type, list); } else { list = memToDataMap.get(type); @@ -454,7 +454,7 @@ public abstract class Message<S extends ITestEnvironmentMessageSystemAccessor, T */ public Collection<Element> getElements(DataType type) { checkState(); - LinkedList<Element> list = new LinkedList<Element>(); + LinkedList<Element> list = new LinkedList<>(); for (Element element : elementMap.values()) { Element e = element.switchMessages(getMessageTypeAssociation(type)); if (!e.isNonMappingElement()) { @@ -1325,12 +1325,12 @@ public abstract class Message<S extends ITestEnvironmentMessageSystemAccessor, T } public ListIterator<Element> getElementIterator() { - ArrayList<Element> list = new ArrayList<Element>(elementMap.values()); + ArrayList<Element> list = new ArrayList<>(elementMap.values()); return list.listIterator(); } public ListIterator<Element> getElementIterator(Element elemnt) { - ArrayList<Element> list = new ArrayList<Element>(elementMap.values()); + ArrayList<Element> list = new ArrayList<>(elementMap.values()); int index = list.indexOf(elemnt); if (index >= 0) { return list.listIterator(index); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/MessageProviderVersion.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/MessageProviderVersion.java index 6dbc2c6309d..e1880226596 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/MessageProviderVersion.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/MessageProviderVersion.java @@ -14,7 +14,7 @@ import java.util.Set; import java.util.concurrent.ConcurrentSkipListSet; public class MessageProviderVersion { - Set<String> versions = new ConcurrentSkipListSet<String>(); + Set<String> versions = new ConcurrentSkipListSet<>(); public synchronized void add(MessageDefinitionProvider provider){ versions.add(generateVersion(provider)); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/MessageState.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/MessageState.java index 9d25226f3e5..2b42104dcad 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/MessageState.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/MessageState.java @@ -36,7 +36,7 @@ public final class MessageState implements Serializable { this.currentMemType = currentMemType; this.data = data; - this.availableMemTypes = new HashSet<DataType>(availableMemTypes); + this.availableMemTypes = new HashSet<>(availableMemTypes); this.mode = mode; } diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/MessageSystemTestEnvironment.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/MessageSystemTestEnvironment.java index e883707397f..67326b83b08 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/MessageSystemTestEnvironment.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/MessageSystemTestEnvironment.java @@ -35,7 +35,7 @@ import org.eclipse.osee.ote.message.interfaces.ITestEnvironmentMessageSystemAcce */ public abstract class MessageSystemTestEnvironment extends TestEnvironment implements ITestEnvironmentMessageSystemAccessor, IMessageTestContext { protected URL[] clientClasses; - private final List<IPreScriptInstantiation> preInstantiation = new ArrayList<IPreScriptInstantiation>(); + private final List<IPreScriptInstantiation> preInstantiation = new ArrayList<>(); protected boolean promptResponse = false; private IOInstrumentationDB ioInstrumentation; diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/condition/ListCondition.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/condition/ListCondition.java index f2f27479e71..9d9788946f0 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/condition/ListCondition.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/condition/ListCondition.java @@ -27,14 +27,14 @@ public class ListCondition<T extends Comparable<T>> extends AbstractCondition im for (int i = 0; i < list.length; i++) { list[i] = element.elementMask(list[i]); } - this.set = new HashSet<T>(Arrays.asList(list)); + this.set = new HashSet<>(Arrays.asList(list)); } public ListCondition(DiscreteElement<T> element, boolean inList, Collection<T> list) { this.element = element; this.inList = inList; - this.set = new HashSet<T>(); + this.set = new HashSet<>(); for (T item : list) { set.add(element.elementMask(item)); } diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/condition/MultiMessageCondition.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/condition/MultiMessageCondition.java index 25207bb8426..6e9f1a2f37d 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/condition/MultiMessageCondition.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/condition/MultiMessageCondition.java @@ -52,8 +52,8 @@ public class MultiMessageCondition { private static final class Listener implements IOSEEMessageListener, ITimeout { private volatile boolean isTimedOut = false; private final Message[] messages; - private final HashSet<MessageData> messagesNotSeen = new HashSet<MessageData>(); - private final HashMap<MessageData, MessageCounter> hitCount = new HashMap<MessageData, MessageCounter>(); + private final HashSet<MessageData> messagesNotSeen = new HashSet<>(); + private final HashMap<MessageData, MessageCounter> hitCount = new HashMap<>(); private Listener(Message... messages) { this.messages = messages; @@ -208,7 +208,7 @@ public class MultiMessageCondition { mf.add(msg.getName()); } accessor.getLogger().methodCalledOnObject(accessor, "MultMessage", mf); - LinkedList<MessageCounter> msgsReceived = new LinkedList<MessageCounter>(); + LinkedList<MessageCounter> msgsReceived = new LinkedList<>(); MsgWaitResult result = waitForAnyTransmission(accessor, timeout, msgsReceived, messages); if (!result.isPassed()) { CheckPoint cp = @@ -233,7 +233,7 @@ public class MultiMessageCondition { mf.add(msg.getName()); } accessor.getLogger().methodCalledOnObject(accessor, "MultMessage", mf); - LinkedList<MessageCounter> msgsReceived = new LinkedList<MessageCounter>(); + LinkedList<MessageCounter> msgsReceived = new LinkedList<>(); MsgWaitResult result = waitForAnyTransmission(accessor, timeout, msgsReceived, messages); CheckPoint cp = new CheckPoint("MESSAGE_TRANSMISSION.ANY", "AT LEAST ONE", result.isPassed() ? "AT LEAST ONE" : "NONE", @@ -249,7 +249,7 @@ public class MultiMessageCondition { mf.add(msg.getName()); } accessor.getLogger().methodCalledOnObject(accessor, "MultMessage", mf); - LinkedList<MessageCounter> msgsReceived = new LinkedList<MessageCounter>(); + LinkedList<MessageCounter> msgsReceived = new LinkedList<>(); MsgWaitResult result = waitForAllTransmissions(accessor, timeout, msgsReceived, messages); if (result.isPassed()) { CheckPoint cp = diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/data/MessageData.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/data/MessageData.java index 3ebeb8cbac7..fc4afbde7bb 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/data/MessageData.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/data/MessageData.java @@ -67,8 +67,8 @@ public abstract class MessageData implements DataReaderListener, DataWriterListe private final MemoryResource mem; private final String typeName; private final String name; - private final CopyOnWriteNoIteratorList<Message> messages = new CopyOnWriteNoIteratorList<Message>(Message.class); - private final CopyOnWriteNoIteratorList<IMessageSendListener> messageSendListeners = new CopyOnWriteNoIteratorList<IMessageSendListener>(IMessageSendListener.class); + private final CopyOnWriteNoIteratorList<Message> messages = new CopyOnWriteNoIteratorList<>(Message.class); + private final CopyOnWriteNoIteratorList<IMessageSendListener> messageSendListeners = new CopyOnWriteNoIteratorList<>(IMessageSendListener.class); private final int defaultDataByteSize; private final DataType memType; private final boolean isEnabled = true; diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/DiscreteElement.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/DiscreteElement.java index add6b48ec16..3ef63f678c3 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/DiscreteElement.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/DiscreteElement.java @@ -164,7 +164,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i accessor.getLogger().methodCalledOnObject(accessor, this.getFullName(), new MethodFormatter().add(minValue).add(minInclusive).add(maxValue).add(maxInclusive), getMessage()); - InRangeCondition<T> c = new InRangeCondition<T>(this, minValue, minInclusive, maxValue, maxInclusive); + InRangeCondition<T> c = new InRangeCondition<>(this, minValue, minInclusive, maxValue, maxInclusive); boolean pass = c.check(); CheckPoint passFail = @@ -184,7 +184,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i checkAccessor(accessor); accessor.getLogger().methodCalledOnObject(accessor, this.getFullName(), new MethodFormatter().add(minValue).add(minInclusive).add(maxValue).add(maxInclusive), getMessage()); - InRangeCondition<T> c = new InRangeCondition<T>(this, minValue, minInclusive, maxValue, maxInclusive); + InRangeCondition<T> c = new InRangeCondition<>(this, minValue, minInclusive, maxValue, maxInclusive); boolean pass = c.check(); accessor.getLogger().methodEnded(accessor); return pass; @@ -194,7 +194,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i checkAccessor(accessor); accessor.getLogger().methodCalledOnObject(accessor, this.getFullName(), new MethodFormatter().add(minValue).add(minInclusive).add(maxValue).add(maxInclusive), getMessage()); - InRangeCondition<T> c = new InRangeCondition<T>(this, minValue, minInclusive, maxValue, maxInclusive); + InRangeCondition<T> c = new InRangeCondition<>(this, minValue, minInclusive, maxValue, maxInclusive); MsgWaitResult result = getMessage().waitForCondition(accessor, c, false, millis); accessor.getLogger().methodEnded(accessor); return result.isPassed(); @@ -389,7 +389,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i accessor.getLogger().methodCalledOnObject(accessor, this.getFullName(), new MethodFormatter().add(value).add(milliseconds), getMessage()); } - EqualsCondition<T> c = new EqualsCondition<T>(this, value); + EqualsCondition<T> c = new EqualsCondition<>(this, value); getMessage().waitForCondition(accessor, c, false, milliseconds); if (accessor != null) { accessor.getLogger().methodEnded(accessor); @@ -410,7 +410,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i accessor.getLogger().methodCalledOnObject(accessor, this.getFullName(), new MethodFormatter().add(value).add(milliseconds), getMessage()); } - EqualsCondition<T> c = new EqualsCondition<T>(this, true, value); + EqualsCondition<T> c = new EqualsCondition<>(this, true, value); getMessage().waitForCondition(accessor, c, false, milliseconds); if (accessor != null) { accessor.getLogger().methodEnded(accessor); @@ -435,7 +435,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i new MethodFormatter().add(minValue).add(minInclusive).add(maxValue).add(maxInclusive).add(milliseconds), getMessage()); } - InRangeCondition<T> c = new InRangeCondition<T>(this, minValue, minInclusive, maxValue, maxInclusive); + InRangeCondition<T> c = new InRangeCondition<>(this, minValue, minInclusive, maxValue, maxInclusive); getMessage().waitForCondition(accessor, c, false, milliseconds); if (accessor != null) { accessor.getLogger().methodEnded(accessor); @@ -475,7 +475,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i getMessage()); } - NotInRangeCondition<T> c = new NotInRangeCondition<T>(this, minValue, minInclusive, maxValue, maxInclusive); + NotInRangeCondition<T> c = new NotInRangeCondition<>(this, minValue, minInclusive, maxValue, maxInclusive); getMessage().waitForCondition(accessor, c, false, milliseconds); if (accessor != null) { @@ -527,7 +527,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i accessor.getLogger().methodCalledOnObject(accessor, getFullName(), new MethodFormatter().add(value).add(milliseconds), getMessage()); - EqualsCondition<T> c = new EqualsCondition<T>(this, value); + EqualsCondition<T> c = new EqualsCondition<>(this, value); CheckPoint cp = waitWithCheckPoint(accessor, checkGroup, toString(value), c, false, milliseconds); accessor.getLogger().methodEnded(accessor); @@ -558,7 +558,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i new MethodFormatter().add(minValue).add(minInclusive).add(maxValue).add(maxInclusive).add(milliseconds), getMessage()); - InRangeCondition<T> c = new InRangeCondition<T>(this, minValue, minInclusive, maxValue, maxInclusive); + InRangeCondition<T> c = new InRangeCondition<>(this, minValue, minInclusive, maxValue, maxInclusive); CheckPoint cp = waitWithCheckPoint(accessor, checkGroup, "In " + expectedRangeString(toString(minValue), minInclusive, toString(maxValue), maxInclusive), c, false, @@ -841,7 +841,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i checkAccessor(accessor); accessor.getLogger().methodCalledOnObject(accessor, getFullName(), new MethodFormatter().add(value).add(milliseconds), getMessage()); - EqualsCondition<T> c = new EqualsCondition<T>(this, value); + EqualsCondition<T> c = new EqualsCondition<>(this, value); waitWithCheckPoint(accessor, checkGroup, toString(value), c, true, milliseconds); accessor.getLogger().methodEnded(accessor); return c.getLastCheckValue(); @@ -851,7 +851,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i checkAccessor(accessor); accessor.getLogger().methodCalledOnObject(accessor, getFullName(), new MethodFormatter().add(value).add(milliseconds), getMessage()); - EqualsCondition<T> c = new EqualsCondition<T>(this, value); + EqualsCondition<T> c = new EqualsCondition<>(this, value); getMessage().waitForCondition(accessor, c, true, milliseconds); accessor.getLogger().methodEnded(accessor); return c.getLastCheckValue(); @@ -861,7 +861,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i checkAccessor(accessor); accessor.getLogger().methodCalledOnObject(accessor, getFullName(), new MethodFormatter().add(value).add(milliseconds), getMessage()); - EqualsCondition<T> c = new EqualsCondition<T>(this, true, value); + EqualsCondition<T> c = new EqualsCondition<>(this, true, value); getMessage().waitForCondition(accessor, c, true, milliseconds); accessor.getLogger().methodEnded(accessor); return c.getLastCheckValue(); @@ -895,7 +895,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i accessor.getLogger().methodCalledOnObject(accessor, getFullName(), new MethodFormatter().add(value).add(milliseconds), getMessage()); - EqualsCondition<T> c = new EqualsCondition<T>(this, true, value); + EqualsCondition<T> c = new EqualsCondition<>(this, true, value); waitWithCheckPoint(accessor, checkGroup, "Not " + toString(value), c, true, milliseconds); @@ -936,7 +936,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i new MethodFormatter().add(minValue).add(minInclusive).add(maxValue).add(maxInclusive).add(milliseconds), getMessage()); - InRangeCondition<T> c = new InRangeCondition<T>(this, minValue, minInclusive, maxValue, maxInclusive); + InRangeCondition<T> c = new InRangeCondition<>(this, minValue, minInclusive, maxValue, maxInclusive); waitWithCheckPoint(accessor, checkGroup, "In" + expectedRangeString(toString(minValue), minInclusive, toString(maxValue), maxInclusive), c, true, milliseconds); @@ -949,7 +949,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i accessor.getLogger().methodCalledOnObject(accessor, getFullName(), new MethodFormatter().add(minValue).add(minInclusive).add(maxValue).add(maxInclusive).add(milliseconds), getMessage()); - InRangeCondition<T> c = new InRangeCondition<T>(this, minValue, minInclusive, maxValue, maxInclusive); + InRangeCondition<T> c = new InRangeCondition<>(this, minValue, minInclusive, maxValue, maxInclusive); getMessage().waitForCondition(accessor, c, true, milliseconds); accessor.getLogger().methodEnded(accessor); return c.getLastCheckValue(); @@ -980,7 +980,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i new MethodFormatter().add(minValue).add(minInclusive).add(maxValue).add(maxInclusive).add(milliseconds), getMessage()); - NotInRangeCondition<T> c = new NotInRangeCondition<T>(this, minValue, minInclusive, maxValue, maxInclusive); + NotInRangeCondition<T> c = new NotInRangeCondition<>(this, minValue, minInclusive, maxValue, maxInclusive); waitWithCheckPoint(accessor, checkGroup, "Not In" + expectedRangeString(toString(minValue), minInclusive, toString(maxValue), maxInclusive), c, true, milliseconds); @@ -994,7 +994,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i new MethodFormatter().add(minValue).add(minInclusive).add(maxValue).add(maxInclusive).add(milliseconds), getMessage()); - NotInRangeCondition<T> c = new NotInRangeCondition<T>(this, minValue, minInclusive, maxValue, maxInclusive); + NotInRangeCondition<T> c = new NotInRangeCondition<>(this, minValue, minInclusive, maxValue, maxInclusive); getMessage().waitForCondition(accessor, c, true, milliseconds); accessor.getLogger().methodEnded(accessor); return c.getLastCheckValue(); @@ -1026,7 +1026,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i accessor.getLogger().methodCalledOnObject(accessor, getFullName(), new MethodFormatter().add(pulsedValue).add(nonPulsedValue).add(milliseconds), getMessage()); - final PulseCondition<T> c = new PulseCondition<T>(this, pulsedValue, nonPulsedValue, pulses); + final PulseCondition<T> c = new PulseCondition<>(this, pulsedValue, nonPulsedValue, pulses); MsgWaitResult result = getMessage().waitForCondition(accessor, c, false, milliseconds); CheckPoint passFail = @@ -1113,7 +1113,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i * @return if check passed */ public boolean checkList(ITestAccessor accessor, CheckGroup checkGroup, boolean isInList, T[] list, int milliseconds) throws InterruptedException { - ListCondition<T> c = new ListCondition<T>(this, isInList, list); + ListCondition<T> c = new ListCondition<>(this, isInList, list); if (accessor == null) { throw new NullPointerException("The parameter accessor is null"); @@ -1326,7 +1326,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i accessor.getLogger().methodCalledOnObject(accessor, this.getFullName(), new MethodFormatter().add(list).add(isInList).add(milliseconds), this.getMessage()); - ListCondition<T> c = new ListCondition<T>(this, isInList, list); + ListCondition<T> c = new ListCondition<>(this, isInList, list); getMessage().waitForCondition(accessor, c, false, milliseconds); accessor.getLogger().methodEnded(accessor); return c.getLastCheckValue(); @@ -1336,7 +1336,7 @@ public abstract class DiscreteElement<T extends Comparable<T>> extends Element i accessor.getLogger().methodCalledOnObject(accessor, this.getFullName(), new MethodFormatter().add(list).add(isInList).add(milliseconds), this.getMessage()); - ListCondition<T> c = new ListCondition<T>(this, isInList, list); + ListCondition<T> c = new ListCondition<>(this, isInList, list); MsgWaitResult result = getMessage().waitForCondition(accessor, c, true, milliseconds); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/Element.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/Element.java index 6223b61cb37..b031c5f3710 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/Element.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/Element.java @@ -43,7 +43,7 @@ public abstract class Element implements ITimeout { private String elementPathAsString; public Element(Message<?, ?, ?> msg, String elementName, MessageData messageData, int byteOffset, int msb, int lsb, int originalMsb, int originalLsb) { - this.msg = new WeakReference<Message<?,?,?>>(msg); + this.msg = new WeakReference<>(msg); this.elementName = elementName; this.messageData = messageData; this.byteOffset = byteOffset; @@ -51,7 +51,7 @@ public abstract class Element implements ITimeout { this.msb = msb; this.originalLsb = originalLsb; this.originalMsb = originalMsb; - elementPath = new ArrayList<Object>(); + elementPath = new ArrayList<>(); fullName = (msg != null ? msg.getName() : messageData.getName()) + "." + this.elementName; } diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/RecordElement.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/RecordElement.java index 2ee3ba96a8f..dd42ed10a2b 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/RecordElement.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/RecordElement.java @@ -38,7 +38,7 @@ public abstract class RecordElement extends Element { */ public RecordElement(Message<?, ?, ?> message, String elementName, int index, MessageData messageData, int firstRecordBitOffset, int recordBitSize) { super(message, elementName, messageData, firstRecordBitOffset + index * recordBitSize, recordBitSize); - elementMap = new LinkedHashMap<String, Element>(); + elementMap = new LinkedHashMap<>(); BIT_OFFSET = this.bitOffset = firstRecordBitOffset + index * recordBitSize; this.recordBitSize = recordBitSize; this.firstRecordBitOffset = firstRecordBitOffset; diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/RecordMap.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/RecordMap.java index 8994c0f1ce7..a887d541122 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/RecordMap.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/elements/RecordMap.java @@ -29,14 +29,14 @@ public class RecordMap<T extends RecordElement> extends RecordElement { public RecordMap(Message<?, ?, ?> message, MessageData messageData, String elementName, int numberOfRecords, IRecordFactory factory) { super(message, elementName, 1, messageData, 0, factory.getBitLength()); NUMBER_OF_RECORDS = numberOfRecords; - records = new HashMap<Integer, T>(numberOfRecords); + records = new HashMap<>(numberOfRecords); this.factory = factory; } public RecordMap(Message<?, ?, ?> message, MessageData messageData, int firstRecordByteOffset, int recordByteSize, int numberOfRecords) { super(message, "", 1, messageData, 0, 0); NUMBER_OF_RECORDS = numberOfRecords; - records = new HashMap<Integer, T>(numberOfRecords); + records = new HashMap<>(numberOfRecords); } @Override diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/enums/EmptyEnum.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/enums/EmptyEnum.java index 4cd23813001..ae5c1821c4b 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/enums/EmptyEnum.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/enums/EmptyEnum.java @@ -22,7 +22,7 @@ import org.eclipse.osee.framework.jdk.core.util.EnumBase; public class EmptyEnum extends EnumBase implements Comparable<EmptyEnum> { private static final long serialVersionUID = 1305742348409814145L; - private static final HashMap<Integer, EmptyEnum> valuesMap = new HashMap<Integer, EmptyEnum>(16); + private static final HashMap<Integer, EmptyEnum> valuesMap = new HashMap<>(16); private final int value; @@ -57,7 +57,7 @@ public class EmptyEnum extends EnumBase implements Comparable<EmptyEnum> { @Override protected String[] getStringTable() { - List<String> retVal = new LinkedList<String>(); + List<String> retVal = new LinkedList<>(); for (EmptyEnum current : valuesMap.values()) { retVal.add("EMPTY_ENUM_" + current.getValue()); } diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/OteEventMessage.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/OteEventMessage.java index 1975d60e486..ede78c1da64 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/OteEventMessage.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/OteEventMessage.java @@ -48,7 +48,7 @@ public class OteEventMessage extends Message<MessageSystemTestEnvironment, OteEv } protected <T extends Enum<T> & IEnumValue<T>> EnumeratedElement<T> createEnumeratedElement(String name, int size, Class<T> clazz) { - EnumeratedElement<T> el = new EnumeratedElement<T>(this, name, clazz, getDefaultMessageData(), currentOffset, 0, size*8-1); + EnumeratedElement<T> el = new EnumeratedElement<>(this, name, clazz, getDefaultMessageData(), currentOffset, 0, size*8-1); currentOffset+=size; return el; } diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/OteEventMessageUtil.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/OteEventMessageUtil.java index 44590b12312..f3e92137131 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/OteEventMessageUtil.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/OteEventMessageUtil.java @@ -50,7 +50,7 @@ public class OteEventMessageUtil { public static void sendEvent(OteEventMessage message, EventAdmin eventAdmin) { message.getHeader().UUID_HIGH.setNoLog((long) 0x0); message.getHeader().UUID_LOW.setNoLog((long) 0x0); - Map<String, Object> data = new HashMap<String, Object>(); + Map<String, Object> data = new HashMap<>(); data.put(BYTE_KEY, message.getData()); Event newevent = new Event(message.getHeader().TOPIC.getValue(), data); eventAdmin.sendEvent(newevent); @@ -59,7 +59,7 @@ public class OteEventMessageUtil { public static void postEvent(OteEventMessage message, EventAdmin eventAdmin) { message.getHeader().UUID_HIGH.setNoLog((long) 0x0); message.getHeader().UUID_LOW.setNoLog((long) 0x0); - Map<String, Object> data = new HashMap<String, Object>(); + Map<String, Object> data = new HashMap<>(); data.put(BYTE_KEY, message.getData()); Event newevent = new Event(message.getHeader().TOPIC.getValue(), data); eventAdmin.postEvent(newevent); @@ -131,7 +131,7 @@ public class OteEventMessageUtil { } public static ServiceRegistration<EventHandler> subscribe(String topic, EventHandler handler){ - Dictionary<String, String> props = new Hashtable<String, String>(); + Dictionary<String, String> props = new Hashtable<>(); props.put("event.topics", topic); return ServiceUtility.getContext().registerService(EventHandler.class, handler, props); } @@ -141,7 +141,7 @@ public class OteEventMessageUtil { if (context == null) { return null; } - Hashtable<String, Object> props = new Hashtable<String, Object>(); + Hashtable<String, Object> props = new Hashtable<>(); props.put("event.topics", signal.getHeader().TOPIC.getValue()); return context.registerService(EventHandler.class, eventHandler, props); } diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/SOCKET_ADDRESS_RECORD.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/SOCKET_ADDRESS_RECORD.java index 90ced956d01..27a5ec759bb 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/SOCKET_ADDRESS_RECORD.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/SOCKET_ADDRESS_RECORD.java @@ -20,7 +20,7 @@ public class SOCKET_ADDRESS_RECORD extends ArrayElement{ public SOCKET_ADDRESS_RECORD(Message<?, ?, ?> msg, String elementName, MessageData messageData, int byteOffset, int msb, int lsb) { super(msg, elementName, messageData, byteOffset, msb, lsb); - type = new EnumeratedElement<ADDRESS_TYPE>(msg, "type", ADDRESS_TYPE.class, messageData, byteOffset, 0, 7); + type = new EnumeratedElement<>(msg, "type", ADDRESS_TYPE.class, messageData, byteOffset, 0, 7); ipaddress = new ArrayElement(msg, "ipaddress", messageData, byteOffset + 1, 0, 8*16-1); port = new IntegerElement(msg, "port", messageData, ipaddress.getByteOffset() + 16, 0, 31); } diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/send/OteEndpointSendEventMessage.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/send/OteEndpointSendEventMessage.java index 53c00c5749a..cb12d805d2d 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/send/OteEndpointSendEventMessage.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/send/OteEndpointSendEventMessage.java @@ -61,7 +61,7 @@ public class OteEndpointSendEventMessage { public <T extends OteEventMessage, R extends OteEventMessage> OteEventMessageFuture<T, R> asynchSendAndResponse(Class<R> clazz, T message, OteEventMessageCallable<T, R> callable, long timeout){ int responseId = updateHeaderInfo(message); String responseTopic = message.getHeader().RESPONSE_TOPIC.getValue(); - OteEventMessageFutureImpl<T, R> response = new OteEventMessageFutureImpl<T, R>(clazz, callable, message, responseTopic, responseId, timeout); + OteEventMessageFutureImpl<T, R> response = new OteEventMessageFutureImpl<>(clazz, callable, message, responseTopic, responseId, timeout); endpoint.getOteEndpointThreadedSender(destination).send(message); return response; } @@ -82,7 +82,7 @@ public class OteEndpointSendEventMessage { public <T extends OteEventMessage, R extends OteEventMessage> OteEventMessageFuture<T, R> asynchSendAndMultipleResponse(Class<R> clazz, T message, OteEventMessageCallable<T, R> callable, long timeout){ int responseId = updateHeaderInfo(message); String responseTopic = message.getHeader().RESPONSE_TOPIC.getValue(); - OteEventMessageFutureImpl<T, R> response = new OteEventMessageFutureMultipleResponseImpl<T,R>(clazz, callable, message, responseTopic, responseId, timeout); + OteEventMessageFutureImpl<T, R> response = new OteEventMessageFutureMultipleResponseImpl<>(clazz, callable, message, responseTopic, responseId, timeout); endpoint.getOteEndpointThreadedSender(destination).send(message); return response; } @@ -95,7 +95,7 @@ public class OteEndpointSendEventMessage { * @return a future that you should cancel when done listening so resources can be cleaned up. */ public <R extends OteEventMessage> OteEventMessageResponseFuture<R> asynchResponse(Class<R> clazz, String topic, OteEventMessageResponseCallable<R> callable){ - OteEventMessageResponseFutureImpl<R> response = new OteEventMessageResponseFutureImpl<R>(clazz, callable, topic); + OteEventMessageResponseFutureImpl<R> response = new OteEventMessageResponseFutureImpl<>(clazz, callable, topic); return response; } @@ -114,7 +114,7 @@ public class OteEndpointSendEventMessage { try{ int responseId = updateHeaderInfo(message); message.getHeader().RESPONSE_TOPIC.setValue(responseTopic); - NotifyOnResponse<T> response = new NotifyOnResponse<T>(clazz, responseTopic, responseId, lock, responseReceived); + NotifyOnResponse<T> response = new NotifyOnResponse<>(clazz, responseTopic, responseId, lock, responseReceived); try{ endpoint.getOteEndpointThreadedSender(destination).send(message); long nanos = TimeUnit.MILLISECONDS.toNanos(timeout); @@ -149,7 +149,7 @@ public class OteEndpointSendEventMessage { try{ int responseId = updateHeaderInfo(sendMessage); sendMessage.getHeader().RESPONSE_TOPIC.setValue(responseMessage.getHeader().TOPIC.getValue()); - NotifyOnResponse<T> response = new NotifyOnResponse<T>(responseMessage, responseId, lock, responseReceived); + NotifyOnResponse<T> response = new NotifyOnResponse<>(responseMessage, responseId, lock, responseReceived); try{ endpoint.getOteEndpointThreadedSender(destination).send(sendMessage); long nanos = TimeUnit.MILLISECONDS.toNanos(timeout); @@ -205,7 +205,7 @@ public class OteEndpointSendEventMessage { try{ int responseId = updateHeaderInfo(sendMessage); sendMessage.getHeader().RESPONSE_TOPIC.setValue(responseMessage.getHeader().TOPIC.getValue()); - NotifyOnResponse<T> response = new NotifyOnResponse<T>(responseMessage, responseId, lock, responseReceived); + NotifyOnResponse<T> response = new NotifyOnResponse<>(responseMessage, responseId, lock, responseReceived); try{ endpoint.getOteEndpointInlineSender(destination).send(sendMessage); long nanos = TimeUnit.MILLISECONDS.toNanos(timeout); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/send/OteSendEventMessage.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/send/OteSendEventMessage.java index ed50926a27b..5a834ebb918 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/send/OteSendEventMessage.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/event/send/OteSendEventMessage.java @@ -58,7 +58,7 @@ public class OteSendEventMessage { public <T extends OteEventMessage, R extends OteEventMessage> OteEventMessageFuture<T, R> asynchSendAndResponse(Class<R> clazz, T message, OteEventMessageCallable<T, R> callable, long timeout){ int responseId = incrementSequenceNumber(message); String responseTopic = message.getHeader().RESPONSE_TOPIC.getValue(); - OteEventMessageFutureImpl<T, R> response = new OteEventMessageFutureImpl<T, R>(clazz, callable, message, responseTopic, responseId, timeout); + OteEventMessageFutureImpl<T, R> response = new OteEventMessageFutureImpl<>(clazz, callable, message, responseTopic, responseId, timeout); OteEventMessageUtil.postEvent(message, eventAdmin); return response; } @@ -71,7 +71,7 @@ public class OteSendEventMessage { * @return a future that you should cancel when done listening so resources can be cleaned up. */ public <R extends OteEventMessage> OteEventMessageResponseFuture<R> asynchResponse(Class<R> clazz, String topic, OteEventMessageResponseCallable<R> callable){ - OteEventMessageResponseFutureImpl<R> response = new OteEventMessageResponseFutureImpl<R>(clazz, callable, topic); + OteEventMessageResponseFutureImpl<R> response = new OteEventMessageResponseFutureImpl<>(clazz, callable, topic); return response; } @@ -90,7 +90,7 @@ public class OteSendEventMessage { try{ int responseId = incrementSequenceNumber(message); message.getHeader().RESPONSE_TOPIC.setValue(responseTopic); - NotifyOnResponse<T> response = new NotifyOnResponse<T>(clazz, responseTopic, responseId, lock, responseReceived); + NotifyOnResponse<T> response = new NotifyOnResponse<>(clazz, responseTopic, responseId, lock, responseReceived); try{ OteEventMessageUtil.postEvent(message, eventAdmin); long nanos = TimeUnit.MILLISECONDS.toNanos(timeout); @@ -125,7 +125,7 @@ public class OteSendEventMessage { try{ int responseId = incrementSequenceNumber(sendMessage); sendMessage.getHeader().RESPONSE_TOPIC.setValue(responseMessage.getHeader().TOPIC.getValue()); - NotifyOnResponse<T> response = new NotifyOnResponse<T>(responseMessage, responseId, lock, responseReceived); + NotifyOnResponse<T> response = new NotifyOnResponse<>(responseMessage, responseId, lock, responseReceived); try{ OteEventMessageUtil.postEvent(sendMessage, eventAdmin); long nanos = TimeUnit.MILLISECONDS.toNanos(timeout); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/instrumentation/BaseIOInstrumentation.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/instrumentation/BaseIOInstrumentation.java index c503f5adb4d..a40a41942ac 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/instrumentation/BaseIOInstrumentation.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/instrumentation/BaseIOInstrumentation.java @@ -30,7 +30,7 @@ public class BaseIOInstrumentation implements IOInstrumentation { private final DatagramChannel channel; public BaseIOInstrumentation() throws IOException { - addresses = new ArrayList<InetSocketAddress>(); + addresses = new ArrayList<>(); channel = DatagramChannel.open(); channel.configureBlocking(true); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/io/MessageIoManagementService.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/io/MessageIoManagementService.java index 28b3c8666e5..591f8690bc2 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/io/MessageIoManagementService.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/io/MessageIoManagementService.java @@ -20,7 +20,7 @@ import java.util.concurrent.locks.ReentrantLock; */ public class MessageIoManagementService implements IMessageIoManagementService { - private final HashSet<IMessageIoDriver> drivers = new HashSet<IMessageIoDriver>(); + private final HashSet<IMessageIoDriver> drivers = new HashSet<>(); private final Lock lock = new ReentrantLock(); private boolean ioStarted = false; @@ -47,7 +47,7 @@ public class MessageIoManagementService implements IMessageIoManagementService { lock.lock(); ioStarted = true; - Set<IMessageIoDriver> copiedDrivers = new HashSet<IMessageIoDriver>(drivers); + Set<IMessageIoDriver> copiedDrivers = new HashSet<>(drivers); lock.unlock(); for (IMessageIoDriver driver : copiedDrivers) { driver.start(); @@ -59,7 +59,7 @@ public class MessageIoManagementService implements IMessageIoManagementService { public void stopIO() { lock.lock(); ioStarted = false; - Set<IMessageIoDriver> copiedDrivers = new HashSet<IMessageIoDriver>(drivers); + Set<IMessageIoDriver> copiedDrivers = new HashSet<>(drivers); lock.unlock(); for (IMessageIoDriver driver : copiedDrivers) { driver.stop(); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/listener/MessageSystemListener.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/listener/MessageSystemListener.java index 817cd0dc8b7..07e8abb28ea 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/listener/MessageSystemListener.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/listener/MessageSystemListener.java @@ -72,8 +72,8 @@ public class MessageSystemListener implements IOSEEMessageReaderListener, IOSEEM private static final ThreadPoolExecutor threadPool = new ThreadPoolExecutor(5, Integer.MAX_VALUE, 60 * 30, TimeUnit.SECONDS, new SynchronousQueue<Runnable>()); - private final CopyOnWriteNoIteratorList<IOSEEMessageListener> fastListeners = new CopyOnWriteNoIteratorList<IOSEEMessageListener>(IOSEEMessageListener.class); - private final CopyOnWriteNoIteratorList<IOSEEMessageListener> slowListeners = new CopyOnWriteNoIteratorList<IOSEEMessageListener>(IOSEEMessageListener.class); + private final CopyOnWriteNoIteratorList<IOSEEMessageListener> fastListeners = new CopyOnWriteNoIteratorList<>(IOSEEMessageListener.class); + private final CopyOnWriteNoIteratorList<IOSEEMessageListener> slowListeners = new CopyOnWriteNoIteratorList<>(IOSEEMessageListener.class); private volatile boolean disposed = false; /** @@ -82,7 +82,7 @@ public class MessageSystemListener implements IOSEEMessageReaderListener, IOSEEM */ public MessageSystemListener(Message<?, ?, ?> msg) { super(); - this.message = new WeakReference<Message<?,?,?>>(msg); + this.message = new WeakReference<>(msg); } /** diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/timer/RealTime.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/timer/RealTime.java index 3d731ae6bd6..21c1b4b5313 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/timer/RealTime.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/timer/RealTime.java @@ -41,7 +41,7 @@ public class RealTime extends TimerControl { @Override public void addTask(final EnvironmentTask task, final TestEnvironment environment) { if (!handleMap.containsKey(task)) { - final WeakReference<TestEnvironment> te = new WeakReference<TestEnvironment>(environment); + final WeakReference<TestEnvironment> te = new WeakReference<>(environment); final ScheduledFuture<?> handle = schedulePeriodicTask(new Runnable() { final Benchmark bm = new Benchmark(task.getClass().getName() + ":" + task.getHzRate() + "Hz", (long) (1000000.0 / task.getHzRate())); diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/timer/SimulatedTime.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/timer/SimulatedTime.java index 15ee762d861..2c78d216dbd 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/timer/SimulatedTime.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/timer/SimulatedTime.java @@ -58,7 +58,7 @@ public class SimulatedTime extends TimerControl { private final Collection<CycleCountDown> scriptCycleCounters; private final IScriptControl scriptControl; private int cycleCount; - private final CopyOnWriteArrayList<Task> tasks = new CopyOnWriteArrayList<Task>(); + private final CopyOnWriteArrayList<Task> tasks = new CopyOnWriteArrayList<>(); private final long sysTime; @@ -68,8 +68,8 @@ public class SimulatedTime extends TimerControl { public SimulatedTime(IScriptControl scriptControl) throws IOException { super(3); this.scriptControl = scriptControl; - cycleCounters = new HashSet<CycleCountDown>(32); - scriptCycleCounters = new HashSet<CycleCountDown>(32); + cycleCounters = new HashSet<>(32); + scriptCycleCounters = new HashSet<>(32); cycleCount = 0; sysTime = System.currentTimeMillis(); } diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/tool/SubscriptionDetails.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/tool/SubscriptionDetails.java index 32ee14f8e62..fdbd070a9e6 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/tool/SubscriptionDetails.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/tool/SubscriptionDetails.java @@ -29,7 +29,7 @@ public class SubscriptionDetails implements Serializable { public SubscriptionDetails(SubscriptionKey key, byte[] currentData, Set<DataType> availableMemTypes) { this.key = key; this.currentData = currentData; - this.availableMemTypes = new HashSet<DataType>(availableMemTypes); + this.availableMemTypes = new HashSet<>(availableMemTypes); } public SubscriptionKey getKey() { diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/tool/UdpFileTransferHandler.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/tool/UdpFileTransferHandler.java index ed40b2bbcee..9b6db88c764 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/tool/UdpFileTransferHandler.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/tool/UdpFileTransferHandler.java @@ -41,7 +41,7 @@ public class UdpFileTransferHandler { private final Selector selector; private volatile boolean done = false; - private final HashMap<SelectionKey, Handle> handles = new HashMap<SelectionKey, Handle>(); + private final HashMap<SelectionKey, Handle> handles = new HashMap<>(); private final Object gate = new Object(); private final class Handle implements IFileTransferHandle { diff --git a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/tool/rec/MessageRecorder.java b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/tool/rec/MessageRecorder.java index 43480efe796..87e6a25b2ab 100644 --- a/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/tool/rec/MessageRecorder.java +++ b/plugins/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/message/tool/rec/MessageRecorder.java @@ -33,13 +33,13 @@ public class MessageRecorder { private static final int NUM_BUFFERS = 3; private WritableByteChannel channel; - private final ArrayList<IMessageEntry> msgsToRecord = new ArrayList<IMessageEntry>(64); + private final ArrayList<IMessageEntry> msgsToRecord = new ArrayList<>(64); private final Lock recLock = new ReentrantLock(); private volatile boolean isRecording = false; private final IMessageEntryFactory factory; private final ExecutorService taskHandler = Executors.newFixedThreadPool(2); - private final ArrayBlockingQueue<ByteBuffer> bufferQueue = new ArrayBlockingQueue<ByteBuffer>(NUM_BUFFERS); + private final ArrayBlockingQueue<ByteBuffer> bufferQueue = new ArrayBlockingQueue<>(NUM_BUFFERS); public MessageRecorder(IMessageEntryFactory factory) { this.factory = factory; diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/ArtifactTestRunOperator.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/ArtifactTestRunOperator.java index 68838712afe..89e38b3f91c 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/ArtifactTestRunOperator.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/ArtifactTestRunOperator.java @@ -35,10 +35,10 @@ import org.eclipse.osee.ote.define.AUTOGEN.OteAttributeTypes; * @author Roberto E. Escobar */ public class ArtifactTestRunOperator implements TestRunOperator { - private static final OteArtifactFetcher<Artifact> TEST_RUN_ARTIFACT_FETCHER = new OteArtifactFetcher<Artifact>( + private static final OteArtifactFetcher<Artifact> TEST_RUN_ARTIFACT_FETCHER = new OteArtifactFetcher<>( CoreArtifactTypes.TestRun); - private static final OteArtifactFetcher<Artifact> TEST_SCRIPT_ARTIFACT_FETCHER = new OteArtifactFetcher<Artifact>( + private static final OteArtifactFetcher<Artifact> TEST_SCRIPT_ARTIFACT_FETCHER = new OteArtifactFetcher<>( CoreArtifactTypes.TestCase); private final Artifact artifact; diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteArtifactFetcher.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteArtifactFetcher.java index aa5a5771f17..daa1c390744 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteArtifactFetcher.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteArtifactFetcher.java @@ -73,7 +73,7 @@ public class OteArtifactFetcher<T extends Artifact> { @SuppressWarnings("unchecked") public Set<T> getAllArtifacts(IOseeBranch branch) throws OseeArgumentException { checkForNull(branch); - Set<T> toReturn = new HashSet<T>(); + Set<T> toReturn = new HashSet<>(); try { Collection<Artifact> artifacts = ArtifactQuery.getArtifactListFromType(oteArtifactType, branch); for (Artifact artifact : artifacts) { @@ -94,7 +94,7 @@ public class OteArtifactFetcher<T extends Artifact> { * @return artifact instances indexed by descriptive name */ public Map<String, T> getAllArtifactsIndexedByName(Branch branch) throws OseeArgumentException { - Map<String, T> toReturn = new HashMap<String, T>(); + Map<String, T> toReturn = new HashMap<>(); Set<T> testScripts = getAllArtifacts(branch); for (T artifact : testScripts) { toReturn.put(artifact.getName(), artifact); diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteToAttributeMap.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteToAttributeMap.java index 04252d6949c..a4159ad789b 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteToAttributeMap.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/artifacts/OteToAttributeMap.java @@ -39,7 +39,7 @@ public class OteToAttributeMap { private static Map<TestRunField, IAttributeType> outfileFieldToAttributeMap; private OteToAttributeMap() { - outfileFieldToAttributeMap = new HashMap<TestRunField, IAttributeType>(); + outfileFieldToAttributeMap = new HashMap<>(); outfileFieldToAttributeMap.put(TestRunField.USER_ID, CoreAttributeTypes.UserId); diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/jobs/FindCommitableJob.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/jobs/FindCommitableJob.java index 4cbf101b51d..b299a29661c 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/jobs/FindCommitableJob.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/jobs/FindCommitableJob.java @@ -66,8 +66,8 @@ public class FindCommitableJob extends Job { public IStatus run(final IProgressMonitor monitor) { IStatus toReturn = Status.CANCEL_STATUS; monitor.beginTask(getName(), artifactsToSort.size()); - commitable = new ArrayList<Artifact>(); - nonCommitable = new ArrayList<Artifact>(); + commitable = new ArrayList<>(); + nonCommitable = new ArrayList<>(); ThreadedWorkerFactory<Object> outfileToArtifactFactory = new ThreadedWorkerFactory<Object>() { @@ -83,7 +83,7 @@ public class FindCommitableJob extends Job { }; - ThreadedWorkerExecutor<Object> executor = new ThreadedWorkerExecutor<Object>(outfileToArtifactFactory, false); + ThreadedWorkerExecutor<Object> executor = new ThreadedWorkerExecutor<>(outfileToArtifactFactory, false); try { executor.executeWorkersBlocking(); } catch (OseeCoreException ex) { diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/ImportOutfileOperation.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/ImportOutfileOperation.java index cbc643596e0..08eceaa66e2 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/ImportOutfileOperation.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/ImportOutfileOperation.java @@ -100,7 +100,7 @@ public class ImportOutfileOperation { } private String toString(Artifact[] artifacts) { - List<String> toReturn = new ArrayList<String>(); + List<String> toReturn = new ArrayList<>(); for (Artifact artifact : artifacts) { toReturn.add(artifact.getName()); } @@ -117,13 +117,13 @@ public class ImportOutfileOperation { } private Map<IOseeBranch, List<Artifact>> getArtifactsByBranch(Object[] items) { - Map<IOseeBranch, List<Artifact>> branchMap = new HashMap<IOseeBranch, List<Artifact>>(); + Map<IOseeBranch, List<Artifact>> branchMap = new HashMap<>(); for (Object object : items) { Artifact testRun = (Artifact) object; IOseeBranch branch = testRun.getBranch(); List<Artifact> artList = branchMap.get(branch); if (artList == null) { - artList = new ArrayList<Artifact>(); + artList = new ArrayList<>(); branchMap.put(branch, artList); } artList.add(testRun); diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/LinkTestRunToTestScriptOperation.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/LinkTestRunToTestScriptOperation.java index 9b30b4f97ca..55897e65f13 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/LinkTestRunToTestScriptOperation.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/LinkTestRunToTestScriptOperation.java @@ -33,8 +33,8 @@ public class LinkTestRunToTestScriptOperation { public LinkTestRunToTestScriptOperation(Artifact... artifacts) { this.artifacts = Arrays.asList(artifacts); - this.unlinked = new ArrayList<Artifact>(); - this.linked = new ArrayList<Artifact>(); + this.unlinked = new ArrayList<>(); + this.linked = new ArrayList<>(); } public void execute(final IProgressMonitor monitor) throws OseeCoreException { @@ -56,7 +56,7 @@ public class LinkTestRunToTestScriptOperation { }; - ThreadedWorkerExecutor<Object> executor = new ThreadedWorkerExecutor<Object>(outfileToArtifactFactory, true); + ThreadedWorkerExecutor<Object> executor = new ThreadedWorkerExecutor<>(outfileToArtifactFactory, true); executor.executeWorkersBlocking(); } diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/OutfileToArtifactOperation.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/OutfileToArtifactOperation.java index 9bd76b78400..411ce734475 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/OutfileToArtifactOperation.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/operations/OutfileToArtifactOperation.java @@ -46,8 +46,8 @@ public class OutfileToArtifactOperation { public OutfileToArtifactOperation(IOseeBranch branch, URI... filesToImport) { this.branch = branch; this.filesToImport = Arrays.asList(filesToImport); - this.results = new ArrayList<Artifact>(); - this.filesWithErrors = new ArrayList<URI>(); + this.results = new ArrayList<>(); + this.filesWithErrors = new ArrayList<>(); } public void execute(final IProgressMonitor monitor) throws Exception { @@ -69,7 +69,7 @@ public class OutfileToArtifactOperation { }; - ThreadedWorkerExecutor<Object> executor = new ThreadedWorkerExecutor<Object>(outfileToArtifactFactory, false); + ThreadedWorkerExecutor<Object> executor = new ThreadedWorkerExecutor<>(outfileToArtifactFactory, false); executor.executeWorkersBlocking(); } diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/BaseOutfileParser.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/BaseOutfileParser.java index edd937077a7..962e96240a1 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/BaseOutfileParser.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/BaseOutfileParser.java @@ -24,7 +24,7 @@ public abstract class BaseOutfileParser { private final Set<IDataListener> listeners; public BaseOutfileParser() { - this.listeners = new HashSet<IDataListener>(); + this.listeners = new HashSet<>(); } public void registerListener(IDataListener listener) { diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/CollectionParser.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/CollectionParser.java index 86a844f881b..e7dc1d747f2 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/CollectionParser.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/CollectionParser.java @@ -25,7 +25,7 @@ public class CollectionParser extends AbstractSaxHandler implements ICollectionS } public CollectionParser() { - collectors = new ArrayList<SaxChunkCollector>(); + collectors = new ArrayList<>(); } @Override diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/OteOutfileParser.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/OteOutfileParser.java index 951d50b71c8..7e6c8dea854 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/OteOutfileParser.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/OteOutfileParser.java @@ -36,7 +36,7 @@ public class OteOutfileParser extends BaseOutfileParser { public OteOutfileParser() { super(); - collectors = new ArrayList<SaxChunkCollector>(); + collectors = new ArrayList<>(); collectors.add(new SaxChunkCollector(new ConfigHandler(), "Config")); collectors.add(new SaxChunkCollector(new RuntimeVersionsHandler(), "RuntimeVersions")); collectors.add(new SaxChunkCollector(new SystemInfoHandler(), "SystemInfo")); diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/SaxChunkCollector.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/SaxChunkCollector.java index ebb7e0e5218..ded7bda1eb9 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/SaxChunkCollector.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/parser/SaxChunkCollector.java @@ -27,12 +27,12 @@ public class SaxChunkCollector { private String currentLocalName; public SaxChunkCollector(ISaxElementHandler handler, String... collect) { - this.collectionElement = new HashSet<String>(); + this.collectionElement = new HashSet<>(); for (String item : collect) { collectionElement.add(item); } this.handler = handler; - collectionChunks = new ArrayList<String>(); + collectionChunks = new ArrayList<>(); builder = new StringBuilder(5000); } diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/utilities/OutfileDataCollector.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/utilities/OutfileDataCollector.java index adcaa370f27..148b6dd92c7 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/utilities/OutfileDataCollector.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/utilities/OutfileDataCollector.java @@ -33,7 +33,7 @@ public class OutfileDataCollector implements IDataListener { protected final Map<String, String> collectedData; public OutfileDataCollector() { - this.collectedData = new HashMap<String, String>(); + this.collectedData = new HashMap<>(); } @Override diff --git a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/utilities/OutfileParserExtensionManager.java b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/utilities/OutfileParserExtensionManager.java index bb83bfee38a..ae01238038c 100644 --- a/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/utilities/OutfileParserExtensionManager.java +++ b/plugins/org.eclipse.osee.ote.define/src/org/eclipse/osee/ote/define/utilities/OutfileParserExtensionManager.java @@ -44,8 +44,8 @@ public class OutfileParserExtensionManager { private static OutfileParserExtensionManager instance = null; private OutfileParserExtensionManager() { - contributions = new HashMap<String, BaseOutfileParser>(); - extensionsToParsers = new HashCollection<String, BaseOutfileParser>(false, HashSet.class); + contributions = new HashMap<>(); + extensionsToParsers = new HashCollection<>(false, HashSet.class); } public static OutfileParserExtensionManager getInstance() { @@ -109,7 +109,7 @@ public class OutfileParserExtensionManager { } private Set<String> getSupportedExtensions(String rawExtensions) { - Set<String> toReturn = new HashSet<String>(); + Set<String> toReturn = new HashSet<>(); for (String value : rawExtensions.split(";")) { value = value.trim(); if (Strings.isValid(value)) { diff --git a/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/HelpContextTest.java b/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/HelpContextTest.java index b2aefa3ebee..0108f2c6eae 100644 --- a/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/HelpContextTest.java +++ b/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/HelpContextTest.java @@ -72,7 +72,7 @@ public class HelpContextTest { } private static Map<String, HelpContext> getContexts(Class<?> clazz) throws IllegalArgumentException, IllegalAccessException { - Map<String, HelpContext> contexts = new HashMap<String, HelpContext>(); + Map<String, HelpContext> contexts = new HashMap<>(); for (Field field : clazz.getFields()) { Object object = field.get(null); if (object instanceof HelpContext) { diff --git a/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/util/ContextParser.java b/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/util/ContextParser.java index 252886b1330..72a261049bd 100644 --- a/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/util/ContextParser.java +++ b/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/util/ContextParser.java @@ -36,7 +36,7 @@ public class ContextParser { private static final String HREF = "href"; private static final String ID_TAG = "id"; - public Map<String, ContextEntry> entries = new HashMap<String, ContextEntry>(); + public Map<String, ContextEntry> entries = new HashMap<>(); public String path; private String localName; @@ -121,7 +121,7 @@ public class ContextParser { public final class ContextEntry { private final String id; - private final Set<String> references = new LinkedHashSet<String>(); + private final Set<String> references = new LinkedHashSet<>(); public ContextEntry(String id) { super(); diff --git a/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/util/HtmlParser.java b/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/util/HtmlParser.java index f9e0c42a171..f912676a8d9 100644 --- a/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/util/HtmlParser.java +++ b/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/util/HtmlParser.java @@ -58,7 +58,7 @@ public class HtmlParser { } public Set<String> parse(URL url) throws Exception { - Set<String> entries = new HashSet<String>(); + Set<String> entries = new HashSet<>(); entries.clear(); String pathPrefix = getPath(url.toString()); diff --git a/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/util/TocParser.java b/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/util/TocParser.java index db79a07fd48..fed71088b11 100644 --- a/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/util/TocParser.java +++ b/plugins/org.eclipse.osee.ote.help.ui.test/src/org/eclipse/osee/ote/help/ui/util/TocParser.java @@ -32,7 +32,7 @@ public class TocParser { private static final String TOPIC = "topic"; private static final String HREF = "href"; - public Set<String> entries = new HashSet<String>(); + public Set<String> entries = new HashSet<>(); public String path; private String localName; diff --git a/plugins/org.eclipse.osee.ote.io/src/org/eclipse/osee/ote/io/internal/OTEFolderImpl.java b/plugins/org.eclipse.osee.ote.io/src/org/eclipse/osee/ote/io/internal/OTEFolderImpl.java index e9392812fa6..6955d0aa73a 100644 --- a/plugins/org.eclipse.osee.ote.io/src/org/eclipse/osee/ote/io/internal/OTEFolderImpl.java +++ b/plugins/org.eclipse.osee.ote.io/src/org/eclipse/osee/ote/io/internal/OTEFolderImpl.java @@ -277,7 +277,7 @@ public class OTEFolderImpl implements OTEServerFolder{ @Override public List<File> getRunningServerFolders() { - List<File> files = new ArrayList<File>(); + List<File> files = new ArrayList<>(); for(File serverDir:SERVERS.listFiles()){ File running = new File(serverDir, RUNNING_MARKER); if(running.exists()){ diff --git a/plugins/org.eclipse.osee.ote.io/src/org/eclipse/osee/ote/io/internal/SpecializedOutputStream.java b/plugins/org.eclipse.osee.ote.io/src/org/eclipse/osee/ote/io/internal/SpecializedOutputStream.java index 63ce67f50b8..5f4b6ac7864 100644 --- a/plugins/org.eclipse.osee.ote.io/src/org/eclipse/osee/ote/io/internal/SpecializedOutputStream.java +++ b/plugins/org.eclipse.osee.ote.io/src/org/eclipse/osee/ote/io/internal/SpecializedOutputStream.java @@ -11,7 +11,7 @@ public class SpecializedOutputStream extends OutputStream { private CopyOnWriteArrayList<SystemOutputListener> listeners; public SpecializedOutputStream() { - this.listeners = new CopyOnWriteArrayList<SystemOutputListener>(); + this.listeners = new CopyOnWriteArrayList<>(); } public void add(SystemOutputListener listener){ diff --git a/plugins/org.eclipse.osee.ote.jms/src/org/eclipse/osee/ote/jms/bridge/EventToJmsComponent.java b/plugins/org.eclipse.osee.ote.jms/src/org/eclipse/osee/ote/jms/bridge/EventToJmsComponent.java index 80bd15106c4..7e629e90f7a 100644 --- a/plugins/org.eclipse.osee.ote.jms/src/org/eclipse/osee/ote/jms/bridge/EventToJmsComponent.java +++ b/plugins/org.eclipse.osee.ote.jms/src/org/eclipse/osee/ote/jms/bridge/EventToJmsComponent.java @@ -36,7 +36,7 @@ public class EventToJmsComponent extends OseeMessagingListener implements EventH private final UUID MYID; public EventToJmsComponent(){ - eventQueue = new CopyOnWriteArrayList<Event>(); + eventQueue = new CopyOnWriteArrayList<>(); MYID = UUID.randomUUID(); } @@ -101,7 +101,7 @@ public class EventToJmsComponent extends OseeMessagingListener implements EventH UUID id = OteEventMessageUtil.getUUID(msg); if(!id.equals(MYID)){ OteEventMessageUtil.setUUID(msg, MYID); - Map<String, Object> data = new HashMap<String, Object>(); + Map<String, Object> data = new HashMap<>(); data.put(OteEventMessageUtil.BYTE_KEY, msg.getData()); Event newevent = new Event(msg.getHeader().TOPIC.getValue(), data); eventAdmin.sendEvent(newevent); diff --git a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/OTEMasterServerAvailableNodes.java b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/OTEMasterServerAvailableNodes.java index 1909e9ac103..f69f2eea100 100644 --- a/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/OTEMasterServerAvailableNodes.java +++ b/plugins/org.eclipse.osee.ote.master.rest.client/src/org/eclipse/osee/ote/master/rest/client/OTEMasterServerAvailableNodes.java @@ -10,7 +10,7 @@ public class OTEMasterServerAvailableNodes extends OTEMasterServerResult { private List<OTEServer> oteServers; public OTEMasterServerAvailableNodes(){ - oteServers = new ArrayList<OTEServer>(); + oteServers = new ArrayList<>(); } public List<OTEServer> getServers(){ diff --git a/plugins/org.eclipse.osee.ote.master.rest/src/org/eclipse/osee/ote/master/rest/internal/OTEAvailableServersResource.java b/plugins/org.eclipse.osee.ote.master.rest/src/org/eclipse/osee/ote/master/rest/internal/OTEAvailableServersResource.java index b0250b0ada9..a9777948ebf 100644 --- a/plugins/org.eclipse.osee.ote.master.rest/src/org/eclipse/osee/ote/master/rest/internal/OTEAvailableServersResource.java +++ b/plugins/org.eclipse.osee.ote.master.rest/src/org/eclipse/osee/ote/master/rest/internal/OTEAvailableServersResource.java @@ -38,7 +38,7 @@ public class OTEAvailableServersResource { public List<OTEServer> getOTEServers() throws MalformedURLException, IllegalArgumentException, UriBuilderException, InterruptedException, ExecutionException { OTELookup oteLookup = OTERestApplication.getOTELookup(); List<OTELookupServerEntry> availableServers = oteLookup.getAvailableServers(); - List<OTEServer> servers = new ArrayList<OTEServer>(); + List<OTEServer> servers = new ArrayList<>(); for (OTELookupServerEntry entry : availableServers) { servers.add(Util.convert(entry)); } diff --git a/plugins/org.eclipse.osee.ote.master.rest/src/org/eclipse/osee/ote/master/rest/internal/OTERestApplication.java b/plugins/org.eclipse.osee.ote.master.rest/src/org/eclipse/osee/ote/master/rest/internal/OTERestApplication.java index b735a1c6d39..2fc7b104e15 100644 --- a/plugins/org.eclipse.osee.ote.master.rest/src/org/eclipse/osee/ote/master/rest/internal/OTERestApplication.java +++ b/plugins/org.eclipse.osee.ote.master.rest/src/org/eclipse/osee/ote/master/rest/internal/OTERestApplication.java @@ -13,7 +13,7 @@ public class OTERestApplication extends Application { @Override public Set<Class<?>> getClasses() { - Set<Class<?>> classes = new HashSet<Class<?>>(); + Set<Class<?>> classes = new HashSet<>(); classes.add(OTEAvailableServersResource.class); return classes; } diff --git a/plugins/org.eclipse.osee.ote.master/src/org/eclipse/osee/ote/master/internal/LookupTimeoutMonitor.java b/plugins/org.eclipse.osee.ote.master/src/org/eclipse/osee/ote/master/internal/LookupTimeoutMonitor.java index 70c4c4a8bfe..17e62f24858 100644 --- a/plugins/org.eclipse.osee.ote.master/src/org/eclipse/osee/ote/master/internal/LookupTimeoutMonitor.java +++ b/plugins/org.eclipse.osee.ote.master/src/org/eclipse/osee/ote/master/internal/LookupTimeoutMonitor.java @@ -25,7 +25,7 @@ class LookupTimeoutMonitor implements Runnable { Calendar cal = Calendar.getInstance(); cal.setTime(new Date()); cal.add(Calendar.SECOND, timeoutSeconds*-1); - List<OTELookupServerEntry> toRemove = new ArrayList<OTELookupServerEntry>(); + List<OTELookupServerEntry> toRemove = new ArrayList<>(); for(OTELookupServerEntry entry: availableServers){ if(entry.getUpdateTime().before(cal.getTime())){ toRemove.add(entry); diff --git a/plugins/org.eclipse.osee.ote.master/src/org/eclipse/osee/ote/master/internal/OTELookupImpl.java b/plugins/org.eclipse.osee.ote.master/src/org/eclipse/osee/ote/master/internal/OTELookupImpl.java index 5807f9323dd..ac770975988 100644 --- a/plugins/org.eclipse.osee.ote.master/src/org/eclipse/osee/ote/master/internal/OTELookupImpl.java +++ b/plugins/org.eclipse.osee.ote.master/src/org/eclipse/osee/ote/master/internal/OTELookupImpl.java @@ -22,7 +22,7 @@ public class OTELookupImpl implements OTELookup { private int timeoutSeconds = 60*3; public OTELookupImpl() { - servers = new CopyOnWriteArrayList<OTELookupServerEntry>(); + servers = new CopyOnWriteArrayList<>(); } @Override diff --git a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/DataSample.java b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/DataSample.java index da5f404f84f..a80995e2746 100644 --- a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/DataSample.java +++ b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/DataSample.java @@ -27,7 +27,7 @@ public class DataSample { * Create a data sample that is used for propogating data through the system. */ public DataSample(Data data, SampleInfo sampleInfo) { - this.data = new WeakReference<Data>(data); + this.data = new WeakReference<>(data); this.sampleInfo = sampleInfo; } @@ -36,7 +36,7 @@ public class DataSample { */ public DataSample(Data data) { super(); - this.data = new WeakReference<Data>(data); + this.data = new WeakReference<>(data); this.sampleInfo = new SampleInfo(); } diff --git a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/DomainParticipant.java b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/DomainParticipant.java index 4b482a1f7c0..4968e9515f3 100644 --- a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/DomainParticipant.java +++ b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/DomainParticipant.java @@ -73,9 +73,9 @@ public class DomainParticipant extends Entity implements EntityFactory { super(enabled, listener, parentFactory); this.domainId = domainId; - this.publishers = new CopyOnWriteArrayList<Publisher>(); // Thread Safe - this.subscribers = new CopyOnWriteArrayList<Subscriber>(); // Thread Safe - this.topics = new CompositeKeyHashMap<String, String, Topic>(512, true); + this.publishers = new CopyOnWriteArrayList<>(); // Thread Safe + this.subscribers = new CopyOnWriteArrayList<>(); // Thread Safe + this.topics = new CompositeKeyHashMap<>(512, true); this.middlewarePublisher = null; this.typeRegistry = new TypeRegistry(typeCapacity, typeFactor); diff --git a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/Publisher.java b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/Publisher.java index 01f32682880..16fee90aae9 100644 --- a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/Publisher.java +++ b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/Publisher.java @@ -62,9 +62,9 @@ public class Publisher extends DomainEntity implements EntityFactory { this.participant = participant; publicationsAllowed = true; - dataWriters = new CopyOnWriteArrayList<DataWriter>(); - publicationQueue = new ArrayList<DataStoreItem>(); - pendingQueue = new ArrayList<DataStoreItem>(); + dataWriters = new CopyOnWriteArrayList<>(); + publicationQueue = new ArrayList<>(); + pendingQueue = new ArrayList<>(); } /** diff --git a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/Subscriber.java b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/Subscriber.java index f4fadc11d34..6cd64904769 100644 --- a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/Subscriber.java +++ b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/Subscriber.java @@ -128,7 +128,7 @@ public class Subscriber extends DomainEntity implements EntityFactory { if (dataReader != null) { CopyOnWriteArrayList<DataReader> readers = topicMap.get(topicDescription); if (readers == null) { - readers = new CopyOnWriteArrayList<DataReader>(); + readers = new CopyOnWriteArrayList<>(); topicMap.put(topicDescription, readers); } readers.add(dataReader); diff --git a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/Topic.java b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/Topic.java index 4063ab2af88..37beb79c382 100644 --- a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/Topic.java +++ b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/entity/Topic.java @@ -52,8 +52,8 @@ public class Topic extends DomainEntity implements TopicDescription { this.name = name; this.namespace = namespace; - dataReaders = new Vector<DataReader>(); - dataWriters = new Vector<DataWriter>(); + dataReaders = new Vector<>(); + dataWriters = new Vector<>(); count = 1; } diff --git a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/service/TypeSignature.java b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/service/TypeSignature.java index 17c76aafa2c..e79621048ab 100644 --- a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/service/TypeSignature.java +++ b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/service/TypeSignature.java @@ -41,10 +41,10 @@ public class TypeSignature { super(); this.typeName = typeName; this.typeDataSize = typeDataSize; - this.key = new WeakReference<Key>(key); + this.key = new WeakReference<>(key); this.readerName = readerName; this.writerName = writerName; - this.classLoader = new WeakReference<ClassLoader>(classLoader); + this.classLoader = new WeakReference<>(classLoader); } /** diff --git a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/status/OfferedIncompatibleQosStatus.java b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/status/OfferedIncompatibleQosStatus.java index 93226966f83..00e62f21025 100644 --- a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/status/OfferedIncompatibleQosStatus.java +++ b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/status/OfferedIncompatibleQosStatus.java @@ -39,7 +39,7 @@ public class OfferedIncompatibleQosStatus extends CountedStatus { public OfferedIncompatibleQosStatus(long totalCount, long totalCountChange, long lastPolicyId, Collection<QosPolicy> policies) { super(totalCount, totalCountChange); this.lastPolicyId = lastPolicyId; - this.policies = new ArrayList<QosPolicy>(policies); + this.policies = new ArrayList<>(policies); } /** diff --git a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/status/RequestedIncompatibleQosStatus.java b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/status/RequestedIncompatibleQosStatus.java index 1063d675d11..8cc5d075757 100644 --- a/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/status/RequestedIncompatibleQosStatus.java +++ b/plugins/org.eclipse.osee.ote.messaging.dds/src/org/eclipse/osee/ote/messaging/dds/status/RequestedIncompatibleQosStatus.java @@ -38,7 +38,7 @@ public class RequestedIncompatibleQosStatus extends CountedStatus { public RequestedIncompatibleQosStatus(long totalCount, long totalCountChange, long lastPolicyId, Collection<QosPolicy> policies) { super(totalCount, totalCountChange); this.lastPolicyId = lastPolicyId; - this.policies = new ArrayList<QosPolicy>(policies); + this.policies = new ArrayList<>(policies); } /** diff --git a/plugins/org.eclipse.osee.ote.rest.model/src/org/eclipse/osee/ote/rest/model/OTEConfiguration.java b/plugins/org.eclipse.osee.ote.rest.model/src/org/eclipse/osee/ote/rest/model/OTEConfiguration.java index a6a455d4fcb..483f5d44e31 100644 --- a/plugins/org.eclipse.osee.ote.rest.model/src/org/eclipse/osee/ote/rest/model/OTEConfiguration.java +++ b/plugins/org.eclipse.osee.ote.rest.model/src/org/eclipse/osee/ote/rest/model/OTEConfiguration.java @@ -30,7 +30,7 @@ public class OTEConfiguration { private boolean install; public OTEConfiguration(){ - items = new ArrayList<OTEConfigurationItem>(); + items = new ArrayList<>(); this.install = true; } diff --git a/plugins/org.eclipse.osee.ote.rest.model/src/org/eclipse/osee/ote/rest/model/OTETestRun.java b/plugins/org.eclipse.osee.ote.rest.model/src/org/eclipse/osee/ote/rest/model/OTETestRun.java index b19f694f91b..412a053225e 100644 --- a/plugins/org.eclipse.osee.ote.rest.model/src/org/eclipse/osee/ote/rest/model/OTETestRun.java +++ b/plugins/org.eclipse.osee.ote.rest.model/src/org/eclipse/osee/ote/rest/model/OTETestRun.java @@ -28,7 +28,7 @@ public class OTETestRun { private List<Properties> tests; public OTETestRun(){ - tests = new ArrayList<Properties>(); + tests = new ArrayList<>(); globalProperties = new Properties(); } diff --git a/plugins/org.eclipse.osee.ote.rest.model/src/org/eclipse/osee/ote/rest/model/Properties.java b/plugins/org.eclipse.osee.ote.rest.model/src/org/eclipse/osee/ote/rest/model/Properties.java index f2271049385..8a205ab6c30 100644 --- a/plugins/org.eclipse.osee.ote.rest.model/src/org/eclipse/osee/ote/rest/model/Properties.java +++ b/plugins/org.eclipse.osee.ote.rest.model/src/org/eclipse/osee/ote/rest/model/Properties.java @@ -27,7 +27,7 @@ public class Properties { private List<KeyValue> pairs; public Properties(){ - pairs = new ArrayList<KeyValue>(); + pairs = new ArrayList<>(); } public Properties(String simpleName) { diff --git a/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteBatchResource.java b/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteBatchResource.java index 0b29c826f28..eadbb7ed4cf 100644 --- a/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteBatchResource.java +++ b/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteBatchResource.java @@ -138,8 +138,8 @@ public class OteBatchResource { private List<TestResultSummary> getTestResults(File[] resultFiles, String[] runListArray) { - List<TestResultSummary> results = new ArrayList<TestResultSummary>(); - Map<String, TestResultSummary> resultsTemp = new HashMap<String, TestResultSummary>(); + List<TestResultSummary> results = new ArrayList<>(); + Map<String, TestResultSummary> resultsTemp = new HashMap<>(); for(File file:resultFiles){ String content = getFileContents(file); if(content.length() > 0){ diff --git a/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteJobStoreImpl.java b/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteJobStoreImpl.java index d163a4ed95a..b6cbd83e5a7 100644 --- a/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteJobStoreImpl.java +++ b/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteJobStoreImpl.java @@ -11,7 +11,7 @@ public class OteJobStoreImpl implements OteJobStore { ConcurrentHashMap<String, OteJob> jobs; public OteJobStoreImpl(){ - jobs = new ConcurrentHashMap<String, OteJob>(); + jobs = new ConcurrentHashMap<>(); } @Override diff --git a/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteRestApplication.java b/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteRestApplication.java index 4e191268497..ed12256e7a7 100644 --- a/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteRestApplication.java +++ b/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteRestApplication.java @@ -35,7 +35,7 @@ public class OteRestApplication extends Application { @Override public Set<Class<?>> getClasses() { - Set<Class<?>> classes = new HashSet<Class<?>>(); + Set<Class<?>> classes = new HashSet<>(); classes.add(OteRootResource.class); classes.add(OteConfigurationResource.class); classes.add(OteJobsResource.class); diff --git a/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteRunTestCommandsImpl.java b/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteRunTestCommandsImpl.java index 515cf0577fb..f6a4fce5f09 100644 --- a/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteRunTestCommandsImpl.java +++ b/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteRunTestCommandsImpl.java @@ -11,7 +11,7 @@ public class OteRunTestCommandsImpl implements OteRunTestCommands { private Map<String, WeakReference<RunTests>> tests; public OteRunTestCommandsImpl(){ - tests = new HashMap<String, WeakReference<RunTests>>(); + tests = new HashMap<>(); } @Override diff --git a/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteRunTestResource.java b/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteRunTestResource.java index cc6ed96f9a5..cb3583e8882 100644 --- a/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteRunTestResource.java +++ b/plugins/org.eclipse.osee.ote.rest/src/org/eclipse/osee/ote/rest/internal/OteRunTestResource.java @@ -103,7 +103,7 @@ public class OteRunTestResource { } public List<IPropertyStore> propertyStoreConversion(List<Properties> properties){ - List<IPropertyStore> stores = new ArrayList<IPropertyStore>(); + List<IPropertyStore> stores = new ArrayList<>(); for(Properties prop:properties){ stores.add(propertyStoreConversion(prop)); } diff --git a/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/JarListenerStub.java b/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/JarListenerStub.java index 30148cfa52c..6a5cd00da0d 100644 --- a/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/JarListenerStub.java +++ b/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/JarListenerStub.java @@ -34,9 +34,9 @@ public class JarListenerStub<T extends JarCollectionNature> implements IJarChang public JarListenerStub() { this.bundleSynchronizer = new Object(); - this.newBundles = new HashSet<String>(); - this.changedBundles = new HashSet<String>(); - this.removedBundles = new HashSet<String>(); + this.newBundles = new HashSet<>(); + this.changedBundles = new HashSet<>(); + this.removedBundles = new HashSet<>(); } @Override @@ -96,7 +96,7 @@ public class JarListenerStub<T extends JarCollectionNature> implements IJarChang private <S extends Object> Set<S> duplicateAndClear(Set<S> set) { synchronized (bundleSynchronizer) { - Set<S> returnBundles = new HashSet<S>(set); + Set<S> returnBundles = new HashSet<>(set); set.clear(); return returnBundles; } diff --git a/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/LibJarListener.java b/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/LibJarListener.java index 6910b1a3d4c..a743a38ea71 100644 --- a/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/LibJarListener.java +++ b/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/LibJarListener.java @@ -41,9 +41,9 @@ public class LibJarListener<T extends JarCollectionNature> implements IJarChange public LibJarListener() { this.bundleSynchronizer = new Object(); - this.newBundles = new HashSet<URL>(); - this.changedBundles = new HashSet<URL>(); - this.removedBundles = new HashSet<URL>(); + this.newBundles = new HashSet<>(); + this.changedBundles = new HashSet<>(); + this.removedBundles = new HashSet<>(); } @Override @@ -116,7 +116,7 @@ public class LibJarListener<T extends JarCollectionNature> implements IJarChange private <S extends Object> Set<S> duplicateAndClear(Set<S> set) { synchronized (bundleSynchronizer) { - Set<S> returnBundles = new HashSet<S>(set); + Set<S> returnBundles = new HashSet<>(set); set.clear(); return returnBundles; } diff --git a/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/SafeWorkspaceTracker.java b/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/SafeWorkspaceTracker.java index 02a85e5e504..f21b1c80c65 100644 --- a/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/SafeWorkspaceTracker.java +++ b/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/SafeWorkspaceTracker.java @@ -64,8 +64,8 @@ public class SafeWorkspaceTracker extends ServiceTracker implements OteBundleLoc @Override public Object addingService(ServiceReference reference) { - this.systemLibListener = new LibJarListener<OteSystemLibsNature>(); - this.userLibListener = new LibJarListener<OteUserLibsNature>(); + this.systemLibListener = new LibJarListener<>(); + this.userLibListener = new LibJarListener<>(); this.systemLibResourceListener = new JarChangeResourceListener<OteSystemLibsNature>(OteSystemLibsNature.NATURE_ID, systemLibListener); this.userLibResourceListener = @@ -154,8 +154,8 @@ public class SafeWorkspaceTracker extends ServiceTracker implements OteBundleLoc } private Collection<BundleInfo> getRuntimeLibs(Collection<URL> systemLibUrls, Collection<URL> userLibUrls) throws IOException { - Map<String, BundleInfo> runtimeMap = new HashMap<String, BundleInfo>(); - Collection<BundleInfo> runtimeInfos = new LinkedList<BundleInfo>(); + Map<String, BundleInfo> runtimeMap = new HashMap<>(); + Collection<BundleInfo> runtimeInfos = new LinkedList<>(); // First add all of the system libraries to the map for (URL url : systemLibUrls) { @@ -184,7 +184,7 @@ public class SafeWorkspaceTracker extends ServiceTracker implements OteBundleLoc * @return system library URL's */ public Collection<URL> getSystemLibUrls() throws CoreException { - Collection<URL> libs = new LinkedList<URL>(); + Collection<URL> libs = new LinkedList<>(); for (OteSystemLibsNature systemNature : OteSystemLibsNature.getWorkspaceProjects()) { libs.addAll(systemNature.getBundles()); } @@ -198,7 +198,7 @@ public class SafeWorkspaceTracker extends ServiceTracker implements OteBundleLoc * @return user library URL's */ public Collection<URL> getUserLibUrls() throws CoreException { - Collection<URL> libs = new LinkedList<URL>(); + Collection<URL> libs = new LinkedList<>(); for (OteUserLibsNature userNature : OteUserLibsNature.getWorkspaceProjects()) { libs.addAll(userNature.getBundles()); } @@ -224,7 +224,7 @@ public class SafeWorkspaceTracker extends ServiceTracker implements OteBundleLoc */ @Override public Collection<BundleInfo> consumeModifiedLibs() throws IOException { - // Collection<BundleInfo> modifiedLibs = new LinkedList<BundleInfo>(); + // Collection<BundleInfo> modifiedLibs = new LinkedList<>(); Set<URL> sysNewBundles = systemLibListener.consumeNewBundles(); Set<URL> sysChangedBundles = systemLibListener.consumeChangedBundles(); @@ -236,11 +236,11 @@ public class SafeWorkspaceTracker extends ServiceTracker implements OteBundleLoc // Set<URL> userRemovedBundles = userLibListener.consumeRemovedBundles(); - Collection<URL> sysNewModLibs = new ArrayList<URL>(sysNewBundles.size() + sysChangedBundles.size()); + Collection<URL> sysNewModLibs = new ArrayList<>(sysNewBundles.size() + sysChangedBundles.size()); sysNewModLibs.addAll(sysNewBundles); sysNewModLibs.addAll(sysChangedBundles); - Collection<URL> userNewModLibs = new ArrayList<URL>(userNewBundles.size() + userChangedBundles.size()); + Collection<URL> userNewModLibs = new ArrayList<>(userNewBundles.size() + userChangedBundles.size()); userNewModLibs.addAll(userNewBundles); userNewModLibs.addAll(userChangedBundles); diff --git a/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/container/OteClasspathContainer.java b/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/container/OteClasspathContainer.java index 933e747efd9..08f4a568b31 100644 --- a/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/container/OteClasspathContainer.java +++ b/plugins/org.eclipse.osee.ote.runtimeManager/src/org/eclipse/osee/ote/runtimemanager/container/OteClasspathContainer.java @@ -36,7 +36,7 @@ public class OteClasspathContainer implements IClasspathContainer { private final IJavaProject javaProject; private final IPath containerPath; - private static final List<OteClasspathContainer> activeContainers = new ArrayList<OteClasspathContainer>(); + private static final List<OteClasspathContainer> activeContainers = new ArrayList<>(); private static boolean classpathEnabled; static { @@ -94,7 +94,7 @@ public class OteClasspathContainer implements IClasspathContainer { @Override public IClasspathEntry[] getClasspathEntries() { - List<IClasspathEntry> entries = new ArrayList<IClasspathEntry>(); + List<IClasspathEntry> entries = new ArrayList<>(); Collection<BundleInfo> runtimeLibUrls; if (classpathEnabled) { try { diff --git a/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/OteClose.java b/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/OteClose.java index a1ac2d3dd2c..346365f5f17 100644 --- a/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/OteClose.java +++ b/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/OteClose.java @@ -24,7 +24,7 @@ public class OteClose { public void start(){ BundleContext context = FrameworkUtil.getBundle(getClass()).getBundleContext(); - Dictionary<String, Object> dict = new Hashtable<String, Object>(); + Dictionary<String, Object> dict = new Hashtable<>(); dict.put(CommandProcessor.COMMAND_SCOPE, "ote"); dict.put(CommandProcessor.COMMAND_FUNCTION, new String[]{"x"}); context.registerService(OteClose.class, this, dict); diff --git a/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteService.java b/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteService.java index 821509785ca..adc9eafc412 100644 --- a/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteService.java +++ b/plugins/org.eclipse.osee.ote.server/src/org/eclipse/osee/ote/server/internal/OteService.java @@ -151,7 +151,7 @@ public class OteService implements IHostTestEnvironment { } public void updateDynamicInfo() throws RemoteException { - Collection<OSEEPerson1_4> userList = new LinkedList<OSEEPerson1_4>(); + Collection<OSEEPerson1_4> userList = new LinkedList<>(); StringBuilder sb = new StringBuilder(); if (isEnvironmentAvailable()) { for(UUID sessionId:oteSessions.get()){ diff --git a/plugins/org.eclipse.osee.ote.ui.builder/src/org/eclipse/osee/ote/ui/builder/ArchiveBuilder.java b/plugins/org.eclipse.osee.ote.ui.builder/src/org/eclipse/osee/ote/ui/builder/ArchiveBuilder.java index d7a42288b4f..6c7d1187954 100644 --- a/plugins/org.eclipse.osee.ote.ui.builder/src/org/eclipse/osee/ote/ui/builder/ArchiveBuilder.java +++ b/plugins/org.eclipse.osee.ote.ui.builder/src/org/eclipse/osee/ote/ui/builder/ArchiveBuilder.java @@ -27,7 +27,7 @@ class ArchiveBuilder { public ArchiveBuilder(File workspaceArchiveHome, List<IPath> outputLocations) { this.workspaceArchiveHome = workspaceArchiveHome; this.outputLocations = outputLocations; - this.packages = new HashSet<IContainer>(); + this.packages = new HashSet<>(); } /** diff --git a/plugins/org.eclipse.osee.ote.ui.builder/src/org/eclipse/osee/ote/ui/builder/OTEPackagingBuilder.java b/plugins/org.eclipse.osee.ote.ui.builder/src/org/eclipse/osee/ote/ui/builder/OTEPackagingBuilder.java index 6c2cf0fc6bd..bc6b5fff8d8 100644 --- a/plugins/org.eclipse.osee.ote.ui.builder/src/org/eclipse/osee/ote/ui/builder/OTEPackagingBuilder.java +++ b/plugins/org.eclipse.osee.ote.ui.builder/src/org/eclipse/osee/ote/ui/builder/OTEPackagingBuilder.java @@ -144,7 +144,7 @@ public class OTEPackagingBuilder extends IncrementalProjectBuilder { } private List<IPath> getOutputLocations(IPath outputLocation, IClasspathEntry[] rawClasspath) { - List<IPath> outputLocations = new ArrayList<IPath>(); + List<IPath> outputLocations = new ArrayList<>(); outputLocations.add(outputLocation); for(IClasspathEntry classpathEntry:rawClasspath){ if(classpathEntry.getOutputLocation() != null){ diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java index 38527b84672..d7bc107d7f0 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/BranchComboDialog.java @@ -128,7 +128,7 @@ public class BranchComboDialog extends TitleAreaDialog implements Listener { if (branch != null && branch.hasParentBranch()) { String lastBranchSelected = Long.toString(branch.getUuid()); - List<String> history = new ArrayList<String>(Arrays.asList(branchUuids)); + List<String> history = new ArrayList<>(Arrays.asList(branchUuids)); history.remove(lastBranchSelected); history.add(0, lastBranchSelected); if (history.size() > COMBO_HISTORY_LENGTH) { diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java index 8f2e06f42c6..96fc12f9fd2 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java @@ -34,7 +34,7 @@ public class OverrideInvalidScriptRevisions implements IOverrideHandler { @Override public Set<Object> getOverridableFromUnselectable(Set<Object> unselectable) throws OseeCoreException { - Set<Object> toReturn = new HashSet<Object>(); + Set<Object> toReturn = new HashSet<>(); for (Object object : unselectable) { if (object instanceof Artifact) { ArtifactTestRunOperator operator = new ArtifactTestRunOperator(((Artifact) object)); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/ReportsDialog.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/ReportsDialog.java index c5f6f8192db..e39f903c92e 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/ReportsDialog.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/ReportsDialog.java @@ -101,7 +101,7 @@ public class ReportsDialog extends TitleAreaDialog { public ReportsDialog(Shell parent) { super(parent); - this.filesToDelete = new ArrayList<IFile>(); + this.filesToDelete = new ArrayList<>(); setShellStyle(SWT.SHELL_TRIM); } @@ -302,7 +302,7 @@ public class ReportsDialog extends TitleAreaDialog { group.setFont(parent.getFont()); group.setText(FORMAT_TITLE); - this.formatButtons = new HashMap<OutputFormat, Button>(); + this.formatButtons = new HashMap<>(); for (OutputFormat format : OutputFormat.values()) { Button button = new Button(group, SWT.RADIO); button.setText(format.name()); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java index 2bec3e0a2b8..c770b4207e8 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/importer/OutfileImportPage.java @@ -73,7 +73,7 @@ public class OutfileImportPage extends WizardDataTransferPage { this.treeSelectionMode = true; this.contentProvider = new WorkbenchContentProvider(); this.labelProvider = new WorkbenchLabelProvider(); - this.filters = new ArrayList<ViewerFilter>(); + this.filters = new ArrayList<>(); // this.filters.add(new FileFilter()); this.startingResourceSelection = selection; } @@ -325,7 +325,7 @@ public class OutfileImportPage extends WizardDataTransferPage { private URI[] getSelectedResources() { Object[] selected = treeViewer.getCheckedElements(); - List<URI> selectedResources = new ArrayList<URI>(); + List<URI> selectedResources = new ArrayList<>(); for (Object object : selected) { if (object instanceof IFile) { IFile iFile = (IFile) object; diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java index 7e7abda663d..03de0e352d3 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitJobDialog.java @@ -116,7 +116,7 @@ class CommitJobDialog extends UIJob { } private final class TestRunTableLabelProvider extends BaseLabelProvider implements ITableLabelProvider { - private final HashSet<Object> unselectableItems = new HashSet<Object>(); + private final HashSet<Object> unselectableItems = new HashSet<>(); private final int DUMMY_COLUMNS = 1; public TestRunTableLabelProvider() { diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java index 85f0c342e8a..8ab91c6faab 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/jobs/CommitTestRunJob.java @@ -78,7 +78,7 @@ public class CommitTestRunJob extends Job { private Artifact[] commitSelectedArtifacts(IProgressMonitor monitor, String comment, Object[] items) throws Exception { Map<IOseeBranch, List<Artifact>> commitMap = getArtifactsByBranch(items); - List<Artifact> committedList = new ArrayList<Artifact>(); + List<Artifact> committedList = new ArrayList<>(); for (IOseeBranch branch : commitMap.keySet()) { monitor.setTaskName(String.format("Committing Artifacts into Branch: [%s]", branch.getName())); List<Artifact> artList = commitMap.get(branch); @@ -89,13 +89,13 @@ public class CommitTestRunJob extends Job { } private Map<IOseeBranch, List<Artifact>> getArtifactsByBranch(Object[] items) { - Map<IOseeBranch, List<Artifact>> branchMap = new HashMap<IOseeBranch, List<Artifact>>(); + Map<IOseeBranch, List<Artifact>> branchMap = new HashMap<>(); for (Object object : items) { Artifact testRun = (Artifact) object; IOseeBranch branch = testRun.getBranch(); List<Artifact> artList = branchMap.get(branch); if (artList == null) { - artList = new ArrayList<Artifact>(); + artList = new ArrayList<>(); branchMap.put(branch, artList); } artList.add(testRun); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/SelectionComposite.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/SelectionComposite.java index 16d5668dac6..b79dcd3ae20 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/SelectionComposite.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/panels/SelectionComposite.java @@ -66,9 +66,9 @@ public class SelectionComposite extends Composite { private final Object[] resources; private final boolean isSelectAllByDefault; private final Map<Object, MutableBoolean> selectableMap; - private final Set<Object> userSelectedResources = new HashSet<Object>(); - private final Set<Object> notSelectableResources = new HashSet<Object>(); - private final Set<Object> overridable = new HashSet<Object>(); + private final Set<Object> userSelectedResources = new HashSet<>(); + private final Set<Object> notSelectableResources = new HashSet<>(); + private final Set<Object> overridable = new HashSet<>(); private final String[] columnNames; private Label lblSelectedResourcesNumber; private IOverrideHandler overrideHandler; @@ -82,7 +82,7 @@ public class SelectionComposite extends Composite { super(parent, style); this.columnNames = columnNames; this.tableLabelProvider = tableLabelProvider; - this.selectableMap = new HashMap<Object, MutableBoolean>(); + this.selectableMap = new HashMap<>(); this.resources = resources; this.isSelectAllByDefault = isSelectAllByDefault; if (userSelectedResources != null) { @@ -261,7 +261,7 @@ public class SelectionComposite extends Composite { } private Object[] getSelectedItems(boolean thatMatchTrue) { - List<Object> toReturn = new ArrayList<Object>(); + List<Object> toReturn = new ArrayList<>(); for (Object key : selectableMap.keySet()) { if (selectableMap.get(key).getValue() == thatMatchTrue) { toReturn.add(key); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java index bf7592f01dd..8067072fbf6 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java @@ -40,7 +40,7 @@ public class ExtensionDefinedReports { private static ExtensionDefinedReports instance = null; private ExtensionDefinedReports() { - this.reportMap = new HashMap<String, ReportData>(); + this.reportMap = new HashMap<>(); loadReports(); } @@ -54,7 +54,7 @@ public class ExtensionDefinedReports { @SuppressWarnings("unchecked") public Pair<String, String>[] getIdsAndNames() { if (idsAndNameMap == null) { - this.idsAndNameMap = new HashMap<String, Pair<String, String>>(); + this.idsAndNameMap = new HashMap<>(); Set<String> ids = reportMap.keySet(); for (String id : ids) { ReportData data = reportMap.get(id); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HighLevelSummary.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HighLevelSummary.java index f66e903a02e..263f35e7b7e 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HighLevelSummary.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HighLevelSummary.java @@ -36,7 +36,7 @@ public class HighLevelSummary implements ITestRunReport { private final Map<String, CollectedData> dataMap; public HighLevelSummary() { - this.dataMap = new HashMap<String, CollectedData>(); + this.dataMap = new HashMap<>(); } @Override @@ -67,7 +67,7 @@ public class HighLevelSummary implements ITestRunReport { @Override public String[][] getBody() { int numRows = dataMap.size(); - List<String> keys = new ArrayList<String>(dataMap.keySet()); + List<String> keys = new ArrayList<>(dataMap.keySet()); String[][] toReturn = new String[numRows][getHeader().length]; for (int row = 0; row < numRows; row++) { String key = keys.get(row); @@ -78,7 +78,7 @@ public class HighLevelSummary implements ITestRunReport { } private String[] addRow(CollectedData data) { - List<String> values = new ArrayList<String>(); + List<String> values = new ArrayList<>(); values.add(data.getPartition()); values.add(data.getSubsytem()); values.add(Integer.toString(data.getScriptCount())); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HistoricalTestRunData.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HistoricalTestRunData.java index 05887618892..1b11930bb9a 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HistoricalTestRunData.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HistoricalTestRunData.java @@ -40,8 +40,8 @@ public class HistoricalTestRunData implements ITestRunReport { private final Set<String> runsByName; public HistoricalTestRunData() { - this.runByCollection = new HashMap<Date, Map<String, TestRunOperator>>(); - this.runsByName = new TreeSet<String>(); + this.runByCollection = new HashMap<>(); + this.runsByName = new TreeSet<>(); } @Override @@ -52,7 +52,7 @@ public class HistoricalTestRunData implements ITestRunReport { Date date = operator.getEndDate(); Map<String, TestRunOperator> theMap = runByCollection.get(date); if (theMap == null) { - theMap = new HashMap<String, TestRunOperator>(); + theMap = new HashMap<>(); runByCollection.put(date, theMap); } String name = operator.getScriptSimpleName(); @@ -69,7 +69,7 @@ public class HistoricalTestRunData implements ITestRunReport { String[][] toReturn = new String[runByCollection.size() + 1][getHeader().length]; int index = 0; toReturn[index++] = getTitleRow(); - List<Date> dateList = new ArrayList<Date>(runByCollection.keySet()); + List<Date> dateList = new ArrayList<>(runByCollection.keySet()); Collections.sort(dateList); for (Date date : dateList) { Map<String, TestRunOperator> theMap = runByCollection.get(date); @@ -79,7 +79,7 @@ public class HistoricalTestRunData implements ITestRunReport { } private String[] getRow(Date date, Map<String, TestRunOperator> theMap) { - List<String> row = new ArrayList<String>(); + List<String> row = new ArrayList<>(); row.add(formatter.format(date)); for (String name : runsByName) { TestRunOperator operator = theMap.get(name); @@ -107,7 +107,7 @@ public class HistoricalTestRunData implements ITestRunReport { } private String[] getTitleRow() { - List<String> header = new ArrayList<String>(); + List<String> header = new ArrayList<>(); header.add(ONE_SPACE_STRING); for (int index = 0; index < runsByName.size(); index++) { header.addAll(Arrays.asList(PER_SCRIPT_HEADER)); @@ -122,7 +122,7 @@ public class HistoricalTestRunData implements ITestRunReport { @Override public String[] getHeader() { - List<String> header = new ArrayList<String>(); + List<String> header = new ArrayList<>(); header.add(DATE_HEADER); for (String name : runsByName) { header.add(name); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HttpReportRequest.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HttpReportRequest.java index 9ee272e9448..c8252a59f33 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HttpReportRequest.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/HttpReportRequest.java @@ -55,7 +55,7 @@ public class HttpReportRequest implements IHttpServerRequest { } public static String getUrl(String id, String format, String source, int preview) throws OseeStateException { - Map<String, String> parameters = new HashMap<String, String>(); + Map<String, String> parameters = new HashMap<>(); parameters.put(REPORT_ID, id); parameters.put(REPORT_FORMAT, format); parameters.put(REPORT_SOURCE, source); @@ -105,7 +105,7 @@ public class HttpReportRequest implements IHttpServerRequest { private ArtifactTestRunOperator[] getSourceData(HttpRequest httpRequest) { String source = httpRequest.getParameter(REPORT_SOURCE); - List<ArtifactTestRunOperator> toReturn = new ArrayList<ArtifactTestRunOperator>(); + List<ArtifactTestRunOperator> toReturn = new ArrayList<>(); if (source.equals("local")) { LocalSourceSelection selection = new LocalSourceSelection(); Displays.ensureInDisplayThread(selection); @@ -154,7 +154,7 @@ public class HttpReportRequest implements IHttpServerRequest { @Override public void run() { done = false; - List<ArtifactTestRunOperator> toReturn = new ArrayList<ArtifactTestRunOperator>(); + List<ArtifactTestRunOperator> toReturn = new ArrayList<>(); StructuredViewer viewer = TestRunView.getViewer(); if (viewer != null) { toReturn.addAll(SelectionHelper.getInstance().getSelections(viewer)); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlActiveTable.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlActiveTable.java index 775b8d5a332..46d86e24761 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlActiveTable.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/html/HtmlActiveTable.java @@ -48,8 +48,8 @@ public class HtmlActiveTable { public HtmlActiveTable() { super(); - this.rowData = new ArrayList<List<String>>(); - this.columnList = new ArrayList<HtmlActiveTableColumnData>(); + this.rowData = new ArrayList<>(); + this.columnList = new ArrayList<>(); this.elementName = "ID"; this.tableHeight = ""; this.tableWidth = ""; diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/SelectionHelper.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/SelectionHelper.java index 2c285208df0..9b33d90c7eb 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/SelectionHelper.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/utilities/SelectionHelper.java @@ -60,7 +60,7 @@ public class SelectionHelper { } public List<ArtifactTestRunOperator> getSelections(StructuredViewer viewer) { - List<ArtifactTestRunOperator> toReturn = new ArrayList<ArtifactTestRunOperator>(); + List<ArtifactTestRunOperator> toReturn = new ArrayList<>(); if (viewer != null) { IStructuredSelection selection = (IStructuredSelection) viewer.getSelection(); if (selection != null && selection.isEmpty() != true) { diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java index 9f3bb27e1b6..6a7c78d99c3 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java @@ -136,7 +136,7 @@ public class DragDropHandler { } private URI[] toResourceArray(Object[] objects) { - List<URI> toReturn = new ArrayList<URI>(); + List<URI> toReturn = new ArrayList<>(); for (Object object : objects) { if (object instanceof IAdaptable) { Object resource = ((IAdaptable) object).getAdapter(IResource.class); @@ -170,7 +170,7 @@ public class DragDropHandler { private void handleArtifactDrops(ArtifactData artifactData) throws OseeCoreException { Artifact[] artifactsDropped = artifactData.getArtifacts(); - Set<Artifact> artifactsToAdd = new HashSet<Artifact>(); + Set<Artifact> artifactsToAdd = new HashSet<>(); for (Artifact artifact : artifactsDropped) { if (artifact.isOfType(CoreArtifactTypes.TestRun)) { artifactsToAdd.add(artifact); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java index 241b6d8647c..d2f2eb4312b 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/TestRunXViewer.java @@ -63,7 +63,7 @@ public class TestRunXViewer extends XViewer { private static final ImageDescriptor REMOVE_IMAGE = ImageManager.getImageDescriptor(OteDefineImage.REMOVE); private static final ImageDescriptor REMOVE_ALL_IMAGE = ImageManager.getImageDescriptor(OteDefineImage.REMOVE_ALL); private XViewerDataManager dataManager; - private final List<AbstractActionHandler> actionList = new ArrayList<AbstractActionHandler>(); + private final List<AbstractActionHandler> actionList = new ArrayList<>(); private Action editDisposition; public TestRunXViewer(Composite parent) { @@ -185,7 +185,7 @@ public class TestRunXViewer extends XViewer { } private Artifact[] getAllItemsList() { - List<Artifact> allItems = new ArrayList<Artifact>(); + List<Artifact> allItems = new ArrayList<>(); allItems.addAll(Arrays.asList(dataManager.getAllCommitable())); if (isOverrideAllowed() != false) { allItems.addAll(Arrays.asList(dataManager.getUnCommitable())); @@ -242,7 +242,7 @@ public class TestRunXViewer extends XViewer { boolean returnValue = false; if (holder instanceof ArtifactItem) { if (xCol.equals(TestRunXViewerFactory.DISPOSITION)) { - ArrayList<Artifact> list = new ArrayList<Artifact>(); + ArrayList<Artifact> list = new ArrayList<>(); list.add(((ArtifactItem) holder).getData()); try { returnValue = setDisposition(list); @@ -256,7 +256,7 @@ public class TestRunXViewer extends XViewer { private boolean setDisposition(ArrayList<Artifact> selectedArtifacts) throws OseeCoreException { boolean returnValue = false; - ArrayList<Artifact> dispositionArtifacts = new ArrayList<Artifact>(); + ArrayList<Artifact> dispositionArtifacts = new ArrayList<>(); for (Artifact artifact : selectedArtifacts) { if (artifact.isOfType(CoreArtifactTypes.TestRun)) { String name = artifact.getName(); @@ -289,7 +289,7 @@ public class TestRunXViewer extends XViewer { } public ArrayList<Artifact> getSelectedArtifacts() { - ArrayList<Artifact> arts = new ArrayList<Artifact>(); + ArrayList<Artifact> arts = new ArrayList<>(); TreeItem items[] = getTree().getSelection(); if (items.length > 0) { for (TreeItem item : items) { diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java index a9bb5a0175e..94d90b879d9 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/XViewerDataManager.java @@ -48,12 +48,12 @@ public class XViewerDataManager { public XViewerDataManager(XViewer xViewer) { super(); - this.backingData = new ArrayList<DataItem>(); + this.backingData = new ArrayList<>(); this.isInitialized = false; this.xViewer = xViewer; - this.branchMap = new HashMap<IOseeBranch, DataItem>(); - this.commitableItems = new ArrayList<DataItem>(); - this.uncommitableItems = new ArrayList<DataItem>(); + this.branchMap = new HashMap<>(); + this.commitableItems = new ArrayList<>(); + this.uncommitableItems = new ArrayList<>(); this.listeners = Collections.synchronizedSet(new HashSet<IDataChangedListener>()); } @@ -182,7 +182,7 @@ public class XViewerDataManager { } private List<DataItem> getSelected() { - List<DataItem> toReturn = new ArrayList<DataItem>(); + List<DataItem> toReturn = new ArrayList<>(); TreeItem items[] = xViewer.getTree().getSelection(); if (items.length > 0) { for (TreeItem item : items) { @@ -193,7 +193,7 @@ public class XViewerDataManager { } public List<Artifact> getSelectedArtifacts() { - List<Artifact> toReturn = new ArrayList<Artifact>(); + List<Artifact> toReturn = new ArrayList<>(); for (DataItem item : getSelected()) { Object object = item.getData(); if (object instanceof Artifact) { @@ -212,7 +212,7 @@ public class XViewerDataManager { } private Artifact[] getArtifactsFromDataItemList(List<DataItem> sourceList) { - List<Artifact> toReturn = new ArrayList<Artifact>(); + List<Artifact> toReturn = new ArrayList<>(); for (DataItem item : sourceList) { toReturn.add((Artifact) item.getData()); } @@ -220,7 +220,7 @@ public class XViewerDataManager { } public Artifact[] getSelectedForCommit() { - List<Artifact> toReturn = new ArrayList<Artifact>(); + List<Artifact> toReturn = new ArrayList<>(); for (DataItem item : getSelected()) { if (commitableItems.contains(item)) { toReturn.add((Artifact) item.getData()); @@ -236,7 +236,7 @@ public class XViewerDataManager { } private void removeArtifactsFromDataItemList(List<DataItem> sourceList, final Collection<Artifact> artifactsToRemove) { - List<DataItem> itemsToRemove = new ArrayList<DataItem>(); + List<DataItem> itemsToRemove = new ArrayList<>(); for (DataItem item : sourceList) { Object object = item.getData(); if (artifactsToRemove.contains(object)) { diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java index 02cf9845b00..dfa560b8036 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/BranchItem.java @@ -54,7 +54,7 @@ public class BranchItem extends DataItem implements IXViewerItem { public DataItem[] getChildren() { DataItem[] toReturn = super.getChildren(); if (isGroupModeEnabled() != true) { - List<DataItem> tempList = new ArrayList<DataItem>(); + List<DataItem> tempList = new ArrayList<>(); for (DataItem item : toReturn) { if (item.hasChildren()) { for (DataItem itemX : item.getChildren()) { diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItem.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItem.java index cbc29158917..15d68b87b39 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItem.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/data/DataItem.java @@ -24,7 +24,7 @@ public abstract class DataItem { public DataItem(DataItem parentItem) { this.parentItem = parentItem; - this.childrenMap = new HashMap<Object, DataItem>(); + this.childrenMap = new HashMap<>(); } public void addChild(Object key, DataItem child) { diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunView.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunView.java index 51850def631..366aa836149 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunView.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunView.java @@ -233,7 +233,7 @@ public class TestRunView extends GenericViewPart implements IDataChangedListener } private final class ShowOnlyLatestRuns extends ViewerFilter { - private final Map<String, ArtifactItem> latestMap = new HashMap<String, ArtifactItem>(); + private final Map<String, ArtifactItem> latestMap = new HashMap<>(); @Override public Object[] filter(Viewer viewer, Object parent, Object[] elements) { diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunViewNavigateItem.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunViewNavigateItem.java index 3f6e0bb9b66..9e8ee772d39 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunViewNavigateItem.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/views/TestRunViewNavigateItem.java @@ -31,7 +31,7 @@ public class TestRunViewNavigateItem implements IXNavigateContainer { @Override public List<XNavigateItem> getNavigateItems() { - List<XNavigateItem> items = new ArrayList<XNavigateItem>(); + List<XNavigateItem> items = new ArrayList<>(); XNavigateItem msgItem = new XNavigateItem(null, "Test Analysis", PluginUiImage.FOLDER); new XNavigateItemAction(msgItem, new OpenTestRunView(), OteDefineImage.TEST_RUN_VIEW, false); diff --git a/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/ClearOteMarkerAction.java b/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/ClearOteMarkerAction.java index 445fd6e6a0f..44f290e4001 100644 --- a/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/ClearOteMarkerAction.java +++ b/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/ClearOteMarkerAction.java @@ -26,7 +26,7 @@ public class ClearOteMarkerAction implements IEditorActionDelegate{ private IEditorPart editor; public ClearOteMarkerAction() { - selections = new ArrayList<IResource>(); + selections = new ArrayList<>(); } @Override diff --git a/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/ClearOteMarkerActionView.java b/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/ClearOteMarkerActionView.java index d16c504d6ee..09b61d02f8c 100644 --- a/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/ClearOteMarkerActionView.java +++ b/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/ClearOteMarkerActionView.java @@ -25,7 +25,7 @@ public class ClearOteMarkerActionView implements IViewActionDelegate { ArrayList<IResource> selections; public ClearOteMarkerActionView() { - selections = new ArrayList<IResource>(); + selections = new ArrayList<>(); } @Override diff --git a/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/FileWatchList.java b/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/FileWatchList.java index 7ce6e570f62..cfe429938d2 100644 --- a/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/FileWatchList.java +++ b/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/FileWatchList.java @@ -38,7 +38,7 @@ public class FileWatchList { private final List<FileWatchItem> fileWatchItems; public FileWatchList() { - fileWatchItems = new CopyOnWriteArrayList<FileWatchItem>(); + fileWatchItems = new CopyOnWriteArrayList<>(); } public void put(IFile file, List<IMarker> markers) { diff --git a/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/OteMarkerHelper.java b/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/OteMarkerHelper.java index 43edad63197..adbc757d52c 100644 --- a/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/OteMarkerHelper.java +++ b/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/OteMarkerHelper.java @@ -32,14 +32,14 @@ public class OteMarkerHelper { private final List<MarkerInfo> markerInfo; private final List<IMarker> markersToDelete; - private final Map<CheckPointHelper, CheckPointHelper> count = new HashMap<CheckPointHelper, CheckPointHelper>(); + private final Map<CheckPointHelper, CheckPointHelper> count = new HashMap<>(); private final StringBuilder builder = new StringBuilder(); private final List<TestPointData> testPonitDatas; public OteMarkerHelper(List<TestPointData> testPointDatas) { this.testPonitDatas = testPointDatas; - markerInfo = new ArrayList<MarkerInfo>(); - markersToDelete = new ArrayList<IMarker>(); + markerInfo = new ArrayList<>(); + markersToDelete = new ArrayList<>(); doWork(); } @@ -100,8 +100,8 @@ public class OteMarkerHelper { private void finish() { - Set<String> fileAlreadyLookedFor = new HashSet<String>(); - Map<String, IResource> resources = new HashMap<String, IResource>(); + Set<String> fileAlreadyLookedFor = new HashSet<>(); + Map<String, IResource> resources = new HashMap<>(); for (MarkerInfo marker : markerInfo) { if (!fileAlreadyLookedFor.contains(marker.getFile())) { @@ -122,7 +122,7 @@ public class OteMarkerHelper { try { IResource resourceToMark = resources.get(marker.getFile()); if (resourceToMark != null) { - Map<String, Object> scriptMarkerMap = new HashMap<String, Object>(); + Map<String, Object> scriptMarkerMap = new HashMap<>(); scriptMarkerMap.put(IMarker.MESSAGE, marker.getMessage()); scriptMarkerMap.put(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO)); scriptMarkerMap.put(IMarker.LINE_NUMBER, marker.getLine()); diff --git a/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/ProcessOutfileSax.java b/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/ProcessOutfileSax.java index 72b6ccbff8b..bc1af2809cc 100644 --- a/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/ProcessOutfileSax.java +++ b/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/ProcessOutfileSax.java @@ -45,7 +45,7 @@ public class ProcessOutfileSax implements IExceptionableRunnable { private static final int _1_MB = 1048576; private static final int _20_MB = _1_MB * 20; - private final List<TestPointData> testPointDatas = new ArrayList<TestPointData>(); + private final List<TestPointData> testPointDatas = new ArrayList<>(); private TestPointData currentData = null; private CheckPointData currentCheckPoint = null; protected StackTraceCollection currentStackTrace; @@ -107,7 +107,7 @@ public class ProcessOutfileSax implements IExceptionableRunnable { xmlReader.setContentHandler(handler); xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler", handler); // This is the important part - final Stack<String> elementStack = new Stack<String>(); + final Stack<String> elementStack = new Stack<>(); handler.getHandler("*").addListener(new IBaseSaxElementListener() { @Override diff --git a/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/StackTraceCollection.java b/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/StackTraceCollection.java index 6fe87cdd948..addc272106f 100644 --- a/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/StackTraceCollection.java +++ b/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/StackTraceCollection.java @@ -19,7 +19,7 @@ import org.eclipse.osee.ote.core.framework.saxparse.elements.StacktraceData; */ public class StackTraceCollection { - public List<StacktraceData> data = new ArrayList<StacktraceData>(); + public List<StacktraceData> data = new ArrayList<>(); public void addTrace(StacktraceData obj) { data.add(obj); diff --git a/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/TestPointData.java b/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/TestPointData.java index f97c0edefd2..1fa278336b1 100644 --- a/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/TestPointData.java +++ b/plugins/org.eclipse.osee.ote.ui.markers/src/org/eclipse/osee/ote/ui/markers/TestPointData.java @@ -19,7 +19,7 @@ import java.util.List; public class TestPointData { private boolean isFailed; - private final List<CheckPointData> data = new ArrayList<CheckPointData>(); + private final List<CheckPointData> data = new ArrayList<>(); private String number; private StackTraceCollection stacktrace; diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/actions/AddToTestManagerPopupAction.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/actions/AddToTestManagerPopupAction.java index 9d7a93c16e0..e2a73ef7244 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/actions/AddToTestManagerPopupAction.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/actions/AddToTestManagerPopupAction.java @@ -30,7 +30,7 @@ public class AddToTestManagerPopupAction implements IWorkbenchWindowActionDelega public static String[] getSelection() { StructuredSelection sel = AWorkspace.getSelection(); Iterator<?> i = sel.iterator(); - List<String> selection = new ArrayList<String>(); + List<String> selection = new ArrayList<>(); while (i.hasNext()) { Object obj = i.next(); diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/configuration/pages/LoadScriptPage.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/configuration/pages/LoadScriptPage.java index 5553f0a9838..efdcfe4bd54 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/configuration/pages/LoadScriptPage.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/configuration/pages/LoadScriptPage.java @@ -47,7 +47,7 @@ public class LoadScriptPage implements ILoadConfig, ScriptPageConstants { public LoadScriptPage(ScriptPage tmPage) { this.scriptPage = tmPage; this.scriptTableViewer = scriptPage.getScriptTableViewer(); - scriptTasks = new Vector<ScriptTask>(); + scriptTasks = new Vector<>(); } @Override diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/connection/ScriptManager.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/connection/ScriptManager.java index be9ec77922a..a77d44895b0 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/connection/ScriptManager.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/connection/ScriptManager.java @@ -43,7 +43,7 @@ import org.eclipse.osee.ote.ui.test.manager.pages.scriptTable.ScriptTaskList; * @author Andrew M. Finkbeiner */ public abstract class ScriptManager implements Runnable { - private final Map<String, ScriptTask> guidToScriptTask = new HashMap<String, ScriptTask>(); + private final Map<String, ScriptTask> guidToScriptTask = new HashMap<>(); private TestManagerStatusListener statusListenerImpl; private final TestManagerEditor testManager; @@ -58,7 +58,7 @@ public abstract class ScriptManager implements Runnable { this.testManager = testManager; this.stv = stv; - tasksToUpdate = new HashSet<ScriptTask>(); + tasksToUpdate = new HashSet<>(); updater = Executors.newScheduledThreadPool(1, new ThreadFactory() { @Override diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/connection/TestManagerStatusListener.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/connection/TestManagerStatusListener.java index 13ec90e5203..4546dc1a88b 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/connection/TestManagerStatusListener.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/connection/TestManagerStatusListener.java @@ -43,7 +43,7 @@ public final class TestManagerStatusListener implements EventHandler { public TestManagerStatusListener(TestManagerEditor testManagerEditor, ScriptManager userEnvironment) { this.testManagerServiceDataVisitor = new TestManagerServiceStatusDataVisitor(userEnvironment, testManagerEditor); - Hashtable<String, Object> properties = new Hashtable<String, Object>(); + Hashtable<String, Object> properties = new Hashtable<>(); properties.put("event.topics", "ote/status/*"); eventReference = FrameworkUtil.getBundle(getClass()).getBundleContext().registerService(EventHandler.class.getName(), this, properties); } diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/PageManager.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/PageManager.java index 8827f38f0a4..a3602b3dd0c 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/PageManager.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/PageManager.java @@ -39,7 +39,7 @@ public class PageManager { public PageManager(ITestManagerFactory factory, TestManagerEditor testManager) { this.factory = factory; this.testManager = testManager; - this.pages = new ArrayList<TestManagerPage>(); + this.pages = new ArrayList<>(); } protected void createPages(Composite parent) { diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerInput.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerInput.java index f2d6e76fc4c..eb96246e39b 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerInput.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerInput.java @@ -34,7 +34,7 @@ public class TestManagerInput implements IEditorInput { private final HashMap<String, String> keyValue; public TestManagerInput() { - keyValue = new HashMap<String, String>(); + keyValue = new HashMap<>(); loadFromFile(); } diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/jobs/ScriptRunJob.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/jobs/ScriptRunJob.java index cf5394ebc51..64eb0980d7c 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/jobs/ScriptRunJob.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/jobs/ScriptRunJob.java @@ -46,7 +46,7 @@ public class ScriptRunJob extends Job { } public IStatus verifyOutfileLocations() { - final LinkedList<IStatus> failedLocations = new LinkedList<IStatus>(); + final LinkedList<IStatus> failedLocations = new LinkedList<>(); for (ScriptTask task : runTasks) { final String fileName = task.getScriptModel().getOutputModel().getRawFilename(); final File file = new File(fileName); diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/models/OutputModelJob.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/models/OutputModelJob.java index cf97bca314a..b7bce05ea04 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/models/OutputModelJob.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/models/OutputModelJob.java @@ -25,7 +25,7 @@ public class OutputModelJob extends Job { private static OutputModelJob singleton = null; private final ScriptManager scriptManager; - private final ConcurrentLinkedQueue<ScriptTask> outputModels = new ConcurrentLinkedQueue<ScriptTask>(); + private final ConcurrentLinkedQueue<ScriptTask> outputModels = new ConcurrentLinkedQueue<>(); public static void createSingleton(ScriptManager scriptManager) { if (singleton == null) { diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/AdvancedPage.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/AdvancedPage.java index 0641fc53f81..0e3880cf06a 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/AdvancedPage.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/AdvancedPage.java @@ -39,7 +39,7 @@ public class AdvancedPage extends TestManagerPage { public AdvancedPage(Composite parent, int style, TestManagerEditor parentTestManager) { super(parent, style, parentTestManager); - this.contributions = new ArrayList<IPropertyStoreBasedControl>(); + this.contributions = new ArrayList<>(); contributionsInitialized = false; } diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/StatusWindowWidget.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/StatusWindowWidget.java index 2f94343fc63..84ffc841a55 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/StatusWindowWidget.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/StatusWindowWidget.java @@ -36,8 +36,8 @@ public class StatusWindowWidget { } public StatusWindowWidget(Composite parent) { - keys = new ArrayList<String>(); - labelValueMap = new HashMap<String, Map<EntryAttribute, Object>>(); + keys = new ArrayList<>(); + labelValueMap = new HashMap<>(); statusTextArea = new FormattedText(parent, SWT.BORDER, SWT.DEFAULT, SWT.DEFAULT, false); statusTextArea.setTextAreaBackground(SWT.COLOR_WHITE); } @@ -46,7 +46,7 @@ public class StatusWindowWidget { if (!keys.contains(key)) { keys.add(key); } - Map<EntryAttribute, Object> entry = new HashMap<EntryAttribute, Object>(); + Map<EntryAttribute, Object> entry = new HashMap<>(); entry.put(EntryAttribute.LABEL, label); entry.put(EntryAttribute.VALUE, value); entry.put(EntryAttribute.STYLE, new Integer(style)); diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/ScriptTaskList.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/ScriptTaskList.java index 518b3abb266..50796e268ca 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/ScriptTaskList.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/ScriptTaskList.java @@ -18,8 +18,8 @@ import java.util.Vector; public class ScriptTaskList { - private final Set<ITaskListViewer> changeListeners = new HashSet<ITaskListViewer>(); - private final Vector<ScriptTask> tasks = new Vector<ScriptTask>(); + private final Set<ITaskListViewer> changeListeners = new HashSet<>(); + private final Vector<ScriptTask> tasks = new Vector<>(); private boolean isConnected = false; /** diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/xscript/XScriptTable.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/xscript/XScriptTable.java index 5488e9cc04d..11028105e52 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/xscript/XScriptTable.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/xscript/XScriptTable.java @@ -66,7 +66,7 @@ public class XScriptTable extends XViewer { public List<ScriptTask> getVisibleSortedScriptTasksToRun() { Object[] objs = getSortedChildren(getInput()); - List<ScriptTask> runs = new ArrayList<ScriptTask>(); + List<ScriptTask> runs = new ArrayList<>(); for (Object obj : objs) { if (((ScriptTask) obj).isRun()) { runs.add((ScriptTask) obj); @@ -77,7 +77,7 @@ public class XScriptTable extends XViewer { public List<ScriptTask> getVisibibleSortedScriptTasks() { Object[] objs = getSortedChildren(getInput()); - List<ScriptTask> runs = new ArrayList<ScriptTask>(); + List<ScriptTask> runs = new ArrayList<>(); for (Object obj : objs) { runs.add((ScriptTask) obj); } diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/xscript/XScriptTableLabelProvider.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/xscript/XScriptTableLabelProvider.java index 25836d9ae51..ad36d1f3852 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/xscript/XScriptTableLabelProvider.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/pages/scriptTable/xscript/XScriptTableLabelProvider.java @@ -29,7 +29,7 @@ public class XScriptTableLabelProvider extends XViewerLabelProvider { public static final OseeUiActivator plugin = TestManagerPlugin.getInstance(); private static Image checkedImage = ImageManager.getImage(OteTestManagerImage.CHECKBOX_ENABLED); private static Image outputImage = ImageManager.getImage(OteTestManagerImage.CHECK); - private static Map<ScriptStatusEnum, Image> statusImage = new HashMap<ScriptStatusEnum, Image>(); + private static Map<ScriptStatusEnum, Image> statusImage = new HashMap<>(); private static Image uncheckedImage = ImageManager.getImage(OteTestManagerImage.CHECKBOX_DISABLED); public XScriptTableLabelProvider(XScriptTable viewer) { diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/panels/LoggingPanel.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/panels/LoggingPanel.java index 99d2769f716..7139e96edff 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/panels/LoggingPanel.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/panels/LoggingPanel.java @@ -73,7 +73,7 @@ public class LoggingPanel extends Composite { private void createControl(Composite parent) { LoggingLevel[] levels = LoggingLevel.values(); - this.buttonMap = new HashMap<LoggingLevel, Button>(); + this.buttonMap = new HashMap<>(); Composite composite = new Composite(parent, SWT.NONE); GridLayout gl = new GridLayout(); gl.marginHeight = 0; diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/preferences/environment/EnvironmentPageDataViewer.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/preferences/environment/EnvironmentPageDataViewer.java index 955dc6a172a..eeebfb51056 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/preferences/environment/EnvironmentPageDataViewer.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/preferences/environment/EnvironmentPageDataViewer.java @@ -33,7 +33,7 @@ public class EnvironmentPageDataViewer { public EnvironmentPageDataViewer(Composite parent) { createArea(parent); - styleArray = new ArrayList<StyleRange>(); + styleArray = new ArrayList<>(); } public void clearTextArea() { diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/preferences/environment/EnvironmentPreferencePage.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/preferences/environment/EnvironmentPreferencePage.java index ecc14cfaa90..f72cc33b4f7 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/preferences/environment/EnvironmentPreferencePage.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/preferences/environment/EnvironmentPreferencePage.java @@ -56,7 +56,7 @@ public class EnvironmentPreferencePage { public static final String VALUE = "value"; public static Map<String, String> getSelectedItems() { - Map<String, String> environmentVariables = new HashMap<String, String>(); + Map<String, String> environmentVariables = new HashMap<>(); ArrayList<EnvironmentPreferenceNode> envList = loadVariables(); @@ -73,7 +73,7 @@ public class EnvironmentPreferencePage { } private static ArrayList<EnvironmentPreferenceNode> loadVariables() { - ArrayList<EnvironmentPreferenceNode> list = new ArrayList<EnvironmentPreferenceNode>(); + ArrayList<EnvironmentPreferenceNode> list = new ArrayList<>(); IPreferenceStore prefStore = TestManagerPlugin.getInstance().getPreferenceStore(); int numberOfValues = prefStore.getInt(PAGE_KEY + "." + NUMBER_OF_VALUES); diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/util/ClassServerInst.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/util/ClassServerInst.java index 6eee0601b7e..85dd0210e40 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/util/ClassServerInst.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/util/ClassServerInst.java @@ -117,7 +117,7 @@ public class ClassServerInst { } private String[] getAllProjects() { - ArrayList<String> list = new ArrayList<String>(); + ArrayList<String> list = new ArrayList<>(); IProject[] projects = AWorkspace.getProjects(); for (IProject project : projects) { diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/util/PluginUtil.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/util/PluginUtil.java index 4de82026885..b74dee98c2b 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/util/PluginUtil.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/util/PluginUtil.java @@ -23,7 +23,7 @@ import org.eclipse.ui.PlatformUI; public class PluginUtil { public static List<IViewReference> findAllViews(String viewID) { - ArrayList<IViewReference> list = new ArrayList<IViewReference>(); + ArrayList<IViewReference> list = new ArrayList<>(); IWorkbenchWindow windows[] = PlatformUI.getWorkbench().getWorkbenchWindows(); for (IWorkbenchWindow window : windows) { IWorkbenchPage pages[] = window.getPages(); @@ -45,7 +45,7 @@ public class PluginUtil { } public static TestManagerEditor[] getTestManagers() { - List<TestManagerEditor> tmes = new ArrayList<TestManagerEditor>(); + List<TestManagerEditor> tmes = new ArrayList<>(); IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); if (window != null) { IWorkbenchPage page = window.getActivePage(); diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/util/TestManagerSelectDialog.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/util/TestManagerSelectDialog.java index 1b3d52d57f1..51283fff7d9 100644 --- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/util/TestManagerSelectDialog.java +++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/util/TestManagerSelectDialog.java @@ -51,7 +51,7 @@ public class TestManagerSelectDialog { } public TestManagerEditor[] getResult() { - List<TestManagerEditor> tmes = new ArrayList<TestManagerEditor>(); + List<TestManagerEditor> tmes = new ArrayList<>(); for (Object object : listSelectionDialog.getResult()) { tmes.add((TestManagerEditor) object); } diff --git a/plugins/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/ProjectNatureTest.java b/plugins/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/ProjectNatureTest.java index b3d5499f9df..1b59976f228 100644 --- a/plugins/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/ProjectNatureTest.java +++ b/plugins/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/ProjectNatureTest.java @@ -20,7 +20,7 @@ public class ProjectNatureTest implements IProjectNature { public static final String TEST_NATURE = "org.eclipse.osee.ote.ui.testnature"; - private static List<IProject> testProjects = new ArrayList<IProject>(); + private static List<IProject> testProjects = new ArrayList<>(); private IProject project; diff --git a/plugins/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteNavigateViewItems.java b/plugins/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteNavigateViewItems.java index 276a5fb50e2..30159408a22 100644 --- a/plugins/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteNavigateViewItems.java +++ b/plugins/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteNavigateViewItems.java @@ -36,7 +36,7 @@ public class OteNavigateViewItems implements XNavigateViewItems { @Override public List<XNavigateItem> getSearchNavigateItems() { - List<XNavigateItem> items = new ArrayList<XNavigateItem>(); + List<XNavigateItem> items = new ArrayList<>(); try { addExtensionPointItems(items); } catch (OseeCoreException ex) { @@ -68,7 +68,7 @@ public class OteNavigateViewItems implements XNavigateViewItems { } private Map<String, XNavigateItem> createCategoriesAndAddToItems(List<XNavigateItem> items, Collection<XNavigateExtensionPointData> oteNavigateItemExtensions) { - Map<String, XNavigateItem> categoryToNavigateItem = new HashMap<String, XNavigateItem>(); + Map<String, XNavigateItem> categoryToNavigateItem = new HashMap<>(); for (XNavigateExtensionPointData data : oteNavigateItemExtensions) { if (!categoryToNavigateItem.containsKey(data.getCategory())) { String[] path = data.getItemPath(); diff --git a/plugins/org.eclipse.osee.ote.version.git.test/src/org/eclipse/osee/ote/version/git/GitVersionTest.java b/plugins/org.eclipse.osee.ote.version.git.test/src/org/eclipse/osee/ote/version/git/GitVersionTest.java index c41ced7bfd8..3e651f2b392 100644 --- a/plugins/org.eclipse.osee.ote.version.git.test/src/org/eclipse/osee/ote/version/git/GitVersionTest.java +++ b/plugins/org.eclipse.osee.ote.version.git.test/src/org/eclipse/osee/ote/version/git/GitVersionTest.java @@ -91,7 +91,7 @@ public class GitVersionTest { } }); - List<File> files = new ArrayList<File>(200); + List<File> files = new ArrayList<>(200); for(File folder:wpsfolders){ getJavaFiles(folder, files); } diff --git a/plugins/org.eclipse.osee.ote.version.git/src/org/eclipse/osee/ote/version/git/GitVersions.java b/plugins/org.eclipse.osee.ote.version.git/src/org/eclipse/osee/ote/version/git/GitVersions.java index 9210955b047..7ad53c3bdb8 100644 --- a/plugins/org.eclipse.osee.ote.version.git/src/org/eclipse/osee/ote/version/git/GitVersions.java +++ b/plugins/org.eclipse.osee.ote.version.git/src/org/eclipse/osee/ote/version/git/GitVersions.java @@ -36,8 +36,8 @@ public class GitVersions extends GitVersionBase { public Map<File, RevCommit> getLastCommits() { - Map<File, RevCommit> commits = new HashMap<File, RevCommit>(); - Map<File, List<File>> gitToFiles = new HashMap<File,List<File>>(); + Map<File, RevCommit> commits = new HashMap<>(); + Map<File, List<File>> gitToFiles = new HashMap<>(); for(File file:files){ if(!file.exists()){ continue; @@ -48,7 +48,7 @@ public class GitVersions extends GitVersionBase { } List<File> gitfiles = gitToFiles.get(gitFolder); if(gitfiles == null){ - gitfiles = new ArrayList<File>(); + gitfiles = new ArrayList<>(); gitToFiles.put(gitFolder, gitfiles); } gitfiles.add(file); diff --git a/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/ScriptToProject.java b/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/ScriptToProject.java index 8fc58cb58d8..cc7cc8d7013 100644 --- a/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/ScriptToProject.java +++ b/plugins/org.eclipse.osee.ote.version.svn/src/org/eclipse/osee/ote/version/svn/ScriptToProject.java @@ -16,8 +16,8 @@ import org.eclipse.team.svn.core.utility.SVNUtility; public class ScriptToProject { - private final Map<String, Set<String>> projectsScriptsMap = new HashMap<String, Set<String>>(); - private final Map<String, File> scriptNameToScriptFileMap = new HashMap<String, File>(); + private final Map<String, Set<String>> projectsScriptsMap = new HashMap<>(); + private final Map<String, File> scriptNameToScriptFileMap = new HashMap<>(); private final IProject[] workspaceProjects; public ScriptToProject(IProject[] workspaceProjects) { @@ -52,7 +52,7 @@ public class ScriptToProject { public void addScriptListValue(String key, String value) { Set<String> values = projectsScriptsMap.get(key); if (values == null) { - values = new HashSet<String>(); + values = new HashSet<>(); projectsScriptsMap.put(key, values); } values.add(value); diff --git a/plugins/org.eclipse.osee.ote.version/src/org/eclipse/osee/ote/version/internal/FileVersionInformationImpl.java b/plugins/org.eclipse.osee.ote.version/src/org/eclipse/osee/ote/version/internal/FileVersionInformationImpl.java index bc7bedf8367..59fc5a4ed75 100644 --- a/plugins/org.eclipse.osee.ote.version/src/org/eclipse/osee/ote/version/internal/FileVersionInformationImpl.java +++ b/plugins/org.eclipse.osee.ote.version/src/org/eclipse/osee/ote/version/internal/FileVersionInformationImpl.java @@ -26,7 +26,7 @@ public class FileVersionInformationImpl implements FileVersionInformation { private CopyOnWriteArrayList<FileVersionInformationProvider> providers; public FileVersionInformationImpl(){ - providers = new CopyOnWriteArrayList<FileVersionInformationProvider>(); + providers = new CopyOnWriteArrayList<>(); } public void addFileVersionInformationProvider(FileVersionInformationProvider versionProvider){ @@ -39,7 +39,7 @@ public class FileVersionInformationImpl implements FileVersionInformation { @Override public Map<File, FileVersion> getFileVersions(List<File> files) { - Map<File, FileVersion> versions = new HashMap<File, FileVersion>(files.size()); + Map<File, FileVersion> versions = new HashMap<>(files.size()); for(File file:files){ versions.put(file, null); } diff --git a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/SourceCounter.java b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/SourceCounter.java index 297f969b745..5d6749e9aa7 100644 --- a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/SourceCounter.java +++ b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/SourceCounter.java @@ -35,10 +35,10 @@ import org.eclipse.osee.framework.jdk.core.util.io.MatchFilter; public class SourceCounter { private static int sourceFileCounter = 0, slocCounter = 0; - private static final CountingMap<String> authorToFileCount = new CountingMap<String>(10); - private static final CountingMap<String> authorToSlocCount = new CountingMap<String>(10); - private static final CountingMap<String> packageToSlocCount = new CountingMap<String>(10); - private static final CountingMap<String> productToSlocCount = new CountingMap<String>(10); + private static final CountingMap<String> authorToFileCount = new CountingMap<>(10); + private static final CountingMap<String> authorToSlocCount = new CountingMap<>(10); + private static final CountingMap<String> packageToSlocCount = new CountingMap<>(10); + private static final CountingMap<String> productToSlocCount = new CountingMap<>(10); private static List<String> gitRepos = Arrays.asList("C:\\UserData\\git_merge\\org.eclipse.osee\\plugins\\", "C:\\UserData\\git_merge\\lba.osee\\plugins\\"); @@ -47,7 +47,7 @@ public class SourceCounter { try { StringBuffer results = new StringBuffer(); StringBuffer errors = new StringBuffer(); - bundleNames = new HashSet<String>(); + bundleNames = new HashSet<>(); for (String dirNam : gitRepos) { File dir1 = new File(dirNam); for (String bundleMatchStr : Arrays.asList(".*\\.osee\\..*", ".*\\.ats\\..*", ".*\\.xviewer\\..*", @@ -71,7 +71,7 @@ public class SourceCounter { results.append("\nAuthor, Count, Percent of Total\n"); results.append("\nTotal, " + sourceFileCounter + "\n"); - List<String> names = new ArrayList<String>(); + List<String> names = new ArrayList<>(); for (Entry<String, MutableInteger> entry : authorToFileCount.getCounts()) { System.out.println(String.format("Author [%s]", entry.getKey())); int count = entry.getValue().getValue(); diff --git a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestCounter.java b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestCounter.java index d6ebbb2ea50..efca9995629 100644 --- a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestCounter.java +++ b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestCounter.java @@ -32,8 +32,8 @@ import org.eclipse.osee.framework.jdk.core.util.io.MatchFilter; public class UnitTestCounter { private static int unitTestCount = 0, testPointCount = 0; - private static final CountingMap<String> authorToFileCount = new CountingMap<String>(10); - private static final CountingMap<String> authorToTestPointCount = new CountingMap<String>(10); + private static final CountingMap<String> authorToFileCount = new CountingMap<>(10); + private static final CountingMap<String> authorToTestPointCount = new CountingMap<>(10); public static void main(String[] args) { @@ -55,7 +55,7 @@ public class UnitTestCounter { results.append("\n\nTest Unit Total (file with at least 1 test case), " + unitTestCount + "\n"); - List<String> names = new ArrayList<String>(); + List<String> names = new ArrayList<>(); for (Entry<String, MutableInteger> entry : authorToFileCount.getCounts()) { System.out.println(String.format("Author [%s]", entry.getKey())); names.add(entry.getKey() + ", " + entry.getValue() + "\n"); diff --git a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestUtil.java b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestUtil.java index 8c8e35713a8..20016989434 100644 --- a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestUtil.java +++ b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestUtil.java @@ -52,7 +52,7 @@ public class UnitTestUtil { } public static Set<String> getAuthors(String fileContents) { - Set<String> authors = new HashSet<String>(); + Set<String> authors = new HashSet<>(); for (String line : fileContents.split("\n")) { if (line.contains("* @author")) { String author = line; diff --git a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestValidator.java b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestValidator.java index e0857401ba3..9a8ccbd7a3a 100644 --- a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestValidator.java +++ b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestValidator.java @@ -31,11 +31,11 @@ import org.eclipse.osee.framework.jdk.core.util.io.MatchFilter; public class UnitTestValidator { private static int suiteCount = 0; - private static List<File> testClassFiles = new ArrayList<File>(); - private static List<File> notForSuiteFiles = new ArrayList<File>(); + private static List<File> testClassFiles = new ArrayList<>(); + private static List<File> notForSuiteFiles = new ArrayList<>(); private static final Map<String, Collection<String>> testClassToSuites = new HashMap<String, Collection<String>>(100); - private static final List<File> suites = new ArrayList<File>(); + private static final List<File> suites = new ArrayList<>(); private static final String NOT_FOR_SUITE = "NOT_FOR_SUITE"; public static void main(String[] args) { @@ -68,7 +68,7 @@ public class UnitTestValidator { if (suiteFileText.contains(testClassName.replaceFirst(".java", ".class"))) { Collection<String> collection = testClassToSuites.get(testClassName); if (collection == null) { - collection = new ArrayList<String>(); + collection = new ArrayList<>(); testClassToSuites.put(testClassName, collection); } collection.add(suiteFile.getName()); diff --git a/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/ArtifactTypeOptionRuleTest.java b/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/ArtifactTypeOptionRuleTest.java index b476e4c03a2..30937e29c40 100644 --- a/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/ArtifactTypeOptionRuleTest.java +++ b/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/ArtifactTypeOptionRuleTest.java @@ -31,7 +31,7 @@ public class ArtifactTypeOptionRuleTest { @Test public void testBuild() throws Exception { - Set<String> typeNames = new HashSet<String>(); + Set<String> typeNames = new HashSet<>(); typeNames.add("Software Requirement Function"); ArtifactTypeOptionsRule rule = new ArtifactTypeOptionsRule("select_id", typeNames, typeNames); StringBuilder builder = new StringBuilder(); diff --git a/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/OseeTemplateTestTokens.java b/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/OseeTemplateTestTokens.java index 86ab125e178..dbdb034710d 100644 --- a/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/OseeTemplateTestTokens.java +++ b/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/OseeTemplateTestTokens.java @@ -20,7 +20,7 @@ import org.eclipse.osee.framework.jdk.core.type.ResourceToken; * @author Ryan D. Brooks */ public final class OseeTemplateTestTokens { - private static final ArrayList<ResourceToken> tokens = new ArrayList<ResourceToken>(); + private static final ArrayList<ResourceToken> tokens = new ArrayList<>(); // @formatter:off public static final ResourceToken TestValues_IncludeHtml = createToken(0x40000000000000F0L, "testValues_Include.html"); diff --git a/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/PageCreatorTest.java b/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/PageCreatorTest.java index e13794e34d8..a29221ecc3c 100644 --- a/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/PageCreatorTest.java +++ b/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/PageCreatorTest.java @@ -179,7 +179,7 @@ public class PageCreatorTest { @Test public void testArtifactSelectRule() { PageCreator page = new PageCreator(registry); - Set<String> types = new HashSet<String>(); + Set<String> types = new HashSet<>(); types.add("Software Requirement"); ArtifactTypeOptionsRule rule = new ArtifactTypeOptionsRule("select", types, types); page.addSubstitution(rule); @@ -190,7 +190,7 @@ public class PageCreatorTest { @Test public void realizePage_WithRule() { - Set<String> types = new HashSet<String>(); + Set<String> types = new HashSet<>(); types.add("Software Requirement"); ArtifactTypeOptionsRule rule = new ArtifactTypeOptionsRule("select", types, types); PageCreator page = PageFactory.newPageCreatorWithRules(registry, ArtifactSelect, rule); diff --git a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/ArtifactTypeOptionsRule.java b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/ArtifactTypeOptionsRule.java index f11566f72f3..e00a1dc0d5a 100644 --- a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/ArtifactTypeOptionsRule.java +++ b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/ArtifactTypeOptionsRule.java @@ -124,7 +124,7 @@ public class ArtifactTypeOptionsRule extends AppendableRule<String> { @Override public void applyTo(Appendable appendable) throws IOException { - ArrayList<String> sortedList = new ArrayList<String>(); + ArrayList<String> sortedList = new ArrayList<>(); for (String type : typeNames) { sortedList.add(type); } diff --git a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/CompositeRule.java b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/CompositeRule.java index 0c5cb868e7e..ffc1ab74838 100644 --- a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/CompositeRule.java +++ b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/CompositeRule.java @@ -18,7 +18,7 @@ import java.util.List; * @author Ryan D. Brooks */ public final class CompositeRule<T> extends AppendableRule<T> { - private final List<AppendableRule<T>> rules = new ArrayList<AppendableRule<T>>(); + private final List<AppendableRule<T>> rules = new ArrayList<>(); public CompositeRule(String ruleName) { super(ruleName); diff --git a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/OseeTemplateTokens.java b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/OseeTemplateTokens.java index 22d4502cc80..c4421c39381 100644 --- a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/OseeTemplateTokens.java +++ b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/OseeTemplateTokens.java @@ -21,7 +21,7 @@ import org.eclipse.osee.framework.jdk.core.type.ResourceToken; * @author Ryan D. Brooks */ public final class OseeTemplateTokens { - private static final List<ResourceToken> tokens = new ArrayList<ResourceToken>(); + private static final List<ResourceToken> tokens = new ArrayList<>(); // @formatter:off diff --git a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/PageCreator.java b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/PageCreator.java index da3cd8909c7..1c891bd80ff 100644 --- a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/PageCreator.java +++ b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/PageCreator.java @@ -147,7 +147,7 @@ public final class PageCreator { throw new OseeArgumentException("no rule was found for token %s", token); } - Map<String, String> attributes = new HashMap<String, String>(); + Map<String, String> attributes = new HashMap<>(); // parse the arguments parseArgumentList(token, attributes); try { @@ -230,7 +230,7 @@ public final class PageCreator { if (rule == null) { throw new OseeArgumentException("no rule was found for token %s", token); } - Map<String, String> attributes = new HashMap<String, String>(); + Map<String, String> attributes = new HashMap<>(); // parse the arguments parseArgumentList(token, attributes); try { @@ -243,7 +243,7 @@ public final class PageCreator { if (rule == null) { throw new OseeArgumentException("no substitution was found for token %s", token); } - Map<String, String> attributes = new HashMap<String, String>(); + Map<String, String> attributes = new HashMap<>(); // parse the arguments parseArgumentList(token, attributes); try { diff --git a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/StringOptionsRule.java b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/StringOptionsRule.java index 139734507d5..2abc5c6e8cc 100644 --- a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/StringOptionsRule.java +++ b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/StringOptionsRule.java @@ -19,7 +19,7 @@ import java.util.List; */ public class StringOptionsRule extends AppendableRule<String> { private final String listId; - private final List<String> options = new ArrayList<String>(); + private final List<String> options = new ArrayList<>(); protected String getListId() { return listId; diff --git a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/internal/JaxRsTemplateApplication.java b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/internal/JaxRsTemplateApplication.java index e0331ad6dfc..9b6fa40a57b 100644 --- a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/internal/JaxRsTemplateApplication.java +++ b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/internal/JaxRsTemplateApplication.java @@ -29,7 +29,7 @@ public class JaxRsTemplateApplication extends Application { } public void start() { - singletons = new HashSet<Object>(); + singletons = new HashSet<>(); singletons.add(new TemplateContributions(registry)); } diff --git a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/internal/TemplateContributions.java b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/internal/TemplateContributions.java index fd39e2a6130..d4b718f3584 100644 --- a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/internal/TemplateContributions.java +++ b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/internal/TemplateContributions.java @@ -53,7 +53,7 @@ public class TemplateContributions { @GET @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) public Collection<JaxRsTemplateContribution> getTemplateContributions(@Context final HttpHeaders httpHeaders, @Context final UriInfo uriInfo) { - final Map<String, JaxRsTemplateContribution> contribs = new HashMap<String, JaxRsTemplateContribution>(); + final Map<String, JaxRsTemplateContribution> contribs = new HashMap<>(); registry.accept(new TemplateVisitor() { @Override diff --git a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/internal/TemplateRegistryImpl.java b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/internal/TemplateRegistryImpl.java index d09b14d2c60..fc5ec77223c 100644 --- a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/internal/TemplateRegistryImpl.java +++ b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/internal/TemplateRegistryImpl.java @@ -55,9 +55,9 @@ public class TemplateRegistryImpl implements TemplateRegistry, IResourceRegistry } public void start(BundleContext context) { - templates = new ConcurrentHashMap<String, TemplateResources>(); - tokenByName = new ConcurrentHashMap<String, ResourceToken>(); - tokenByUuid = new ConcurrentHashMap<Long, ResourceToken>(); + templates = new ConcurrentHashMap<>(); + tokenByName = new ConcurrentHashMap<>(); + tokenByUuid = new ConcurrentHashMap<>(); OseeTemplateTokens.register(this); @@ -284,7 +284,7 @@ public class TemplateRegistryImpl implements TemplateRegistry, IResourceRegistry } private List<URL> findUrls(Bundle bundle, String headerValue, boolean recurse, String... resources) { - List<URL> resourceUrls = new ArrayList<URL>(); + List<URL> resourceUrls = new ArrayList<>(); for (String resource : resources) { int index = resource.lastIndexOf('/'); String path = index != -1 ? resource.substring(0, index) : "/"; @@ -308,7 +308,7 @@ public class TemplateRegistryImpl implements TemplateRegistry, IResourceRegistry } private static class TemplateResources { - private final Set<TemplateToken> tokens = new HashSet<TemplateToken>(); + private final Set<TemplateToken> tokens = new HashSet<>(); public boolean addToken(TemplateToken token) { return tokens.add(token); diff --git a/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/internal/VCastDataStoreImpl.java b/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/internal/VCastDataStoreImpl.java index bbf5ed906e1..0114f9c9b4f 100644 --- a/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/internal/VCastDataStoreImpl.java +++ b/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/internal/VCastDataStoreImpl.java @@ -58,7 +58,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastBranchCoverage> getAllBranchCoverages() throws OseeCoreException { - Collection<VCastBranchCoverage> toReturn = new ArrayList<VCastBranchCoverage>(); + Collection<VCastBranchCoverage> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -83,7 +83,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastBranchData> getAllBranchData() throws OseeCoreException { - Collection<VCastBranchData> toReturn = new ArrayList<VCastBranchData>(); + Collection<VCastBranchData> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -104,7 +104,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastFunction> getAllFunctions() throws OseeCoreException { - Collection<VCastFunction> toReturn = new ArrayList<VCastFunction>(); + Collection<VCastFunction> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -129,7 +129,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastInstrumentedFile> getAllInstrumentedFiles() throws OseeCoreException { - Collection<VCastInstrumentedFile> toReturn = new ArrayList<VCastInstrumentedFile>(); + Collection<VCastInstrumentedFile> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -153,7 +153,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastMcdcCoverage> getAllMcdcCoverages() throws OseeCoreException { - Collection<VCastMcdcCoverage> toReturn = new ArrayList<VCastMcdcCoverage>(); + Collection<VCastMcdcCoverage> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { stmt.runPreparedQuery("SELECT * FROM mcdc_coverage"); @@ -177,7 +177,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastMcdcCoverageCondition> getAllMcdcCoverageConditions() throws OseeCoreException { - Collection<VCastMcdcCoverageCondition> toReturn = new ArrayList<VCastMcdcCoverageCondition>(); + Collection<VCastMcdcCoverageCondition> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -204,7 +204,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastMcdcCoveragePairRow> getAllMcdcCoveragePairRows() throws OseeCoreException { - Collection<VCastMcdcCoveragePairRow> toReturn = new ArrayList<VCastMcdcCoveragePairRow>(); + Collection<VCastMcdcCoveragePairRow> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -227,7 +227,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastMcdcCoveragePair> getAllMcdcCoveragePairs() throws OseeCoreException { - Collection<VCastMcdcCoveragePair> toReturn = new ArrayList<VCastMcdcCoveragePair>(); + Collection<VCastMcdcCoveragePair> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -248,7 +248,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastMcdcData> getAllMcdcData() throws OseeCoreException { - Collection<VCastMcdcData> toReturn = new ArrayList<VCastMcdcData>(); + Collection<VCastMcdcData> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -271,7 +271,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastMcdcDataCondition> getAllMcdcDataConditions() throws OseeCoreException { - Collection<VCastMcdcDataCondition> toReturn = new ArrayList<VCastMcdcDataCondition>(); + Collection<VCastMcdcDataCondition> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -292,7 +292,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastProjectFile> getAllProjectFiles() throws OseeCoreException { - Collection<VCastProjectFile> toReturn = new ArrayList<VCastProjectFile>(); + Collection<VCastProjectFile> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -314,7 +314,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastProject> getAllProjects() throws OseeCoreException { - Collection<VCastProject> toReturn = new ArrayList<VCastProject>(); + Collection<VCastProject> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -333,7 +333,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastResult> getAllResults() throws OseeCoreException { - Collection<VCastResult> toReturn = new ArrayList<VCastResult>(); + Collection<VCastResult> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -357,7 +357,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastSetting> getAllSettings() throws OseeCoreException { - Collection<VCastSetting> toReturn = new ArrayList<VCastSetting>(); + Collection<VCastSetting> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -376,7 +376,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastSourceFile> getAllSourceFiles() throws OseeCoreException { - Collection<VCastSourceFile> toReturn = new ArrayList<VCastSourceFile>(); + Collection<VCastSourceFile> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -398,7 +398,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastStatementCoverage> getAllStatementCoverages() throws OseeCoreException { - Collection<VCastStatementCoverage> toReturn = new ArrayList<VCastStatementCoverage>(); + Collection<VCastStatementCoverage> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -420,7 +420,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastStatementData> getAllStatementData() throws OseeCoreException { - Collection<VCastStatementData> toReturn = new ArrayList<VCastStatementData>(); + Collection<VCastStatementData> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -503,7 +503,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastFunction> getFunctions(VCastInstrumentedFile instrumentedFile) throws OseeCoreException { - Collection<VCastFunction> toReturn = new ArrayList<VCastFunction>(); + Collection<VCastFunction> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -529,7 +529,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastStatementCoverage> getStatementCoverageLines(VCastFunction function) throws OseeCoreException { - Collection<VCastStatementCoverage> toReturn = new ArrayList<VCastStatementCoverage>(); + Collection<VCastStatementCoverage> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -550,7 +550,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastStatementData> getStatementData(VCastStatementCoverage statementCoverage) throws OseeCoreException { - Collection<VCastStatementData> toReturn = new ArrayList<VCastStatementData>(); + Collection<VCastStatementData> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { @@ -572,7 +572,7 @@ public class VCastDataStoreImpl implements VCastDataStore { @Override public Collection<VCastResult> getResults(VCastStatementData statementDataItem) throws OseeCoreException { - Collection<VCastResult> toReturn = new ArrayList<VCastResult>(); + Collection<VCastResult> toReturn = new ArrayList<>(); JdbcStatement stmt = getStatement(); try { diff --git a/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/model/CoverageDataSubProgram.java b/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/model/CoverageDataSubProgram.java index 55f7b395fd2..0622699cf8e 100644 --- a/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/model/CoverageDataSubProgram.java +++ b/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/model/CoverageDataSubProgram.java @@ -22,7 +22,7 @@ public class CoverageDataSubProgram { private int complexity; private int covered; private int total; - private final List<LineNumToBranches> lineNumToBranches = new ArrayList<LineNumToBranches>(); + private final List<LineNumToBranches> lineNumToBranches = new ArrayList<>(); public CoverageDataSubProgram(String name) { super(); diff --git a/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/model/CoverageDataUnit.java b/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/model/CoverageDataUnit.java index 04b8415b363..669170365b0 100644 --- a/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/model/CoverageDataUnit.java +++ b/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/model/CoverageDataUnit.java @@ -28,7 +28,7 @@ public class CoverageDataUnit { public String name; public int index; public CoverageDataType coverageType; - public List<CoverageDataSubProgram> subPrograms = new ArrayList<CoverageDataSubProgram>(); + public List<CoverageDataSubProgram> subPrograms = new ArrayList<>(); public CoverageDataUnit(String name) { super(); diff --git a/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/model/VCastVcp.java b/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/model/VCastVcp.java index 87162f8b93a..622948de35d 100644 --- a/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/model/VCastVcp.java +++ b/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/model/VCastVcp.java @@ -22,8 +22,8 @@ import java.util.List; */ public class VCastVcp { - private final List<VcpSourceFile> sourceFiles = new ArrayList<VcpSourceFile>(); - private final List<VcpResultsFile> resultsFiles = new ArrayList<VcpResultsFile>(); + private final List<VcpSourceFile> sourceFiles = new ArrayList<>(); + private final List<VcpResultsFile> resultsFiles = new ArrayList<>(); private final File file; public VCastVcp(File file) { diff --git a/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/AccountClientTest.java b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/AccountClientTest.java index ee7cea4d322..f26fe988238 100644 --- a/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/AccountClientTest.java +++ b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/performance/AccountClientTest.java @@ -73,7 +73,7 @@ public class AccountClientTest { email = String.format("email_%s_%s@hello.com", methodName, value); active = true; - prefs = new HashMap<String, String>(); + prefs = new HashMap<>(); prefs.put("a", "1"); prefs.put("b", "2"); prefs.put("c", "3"); @@ -187,7 +187,7 @@ public class AccountClientTest { @Test public void test_F_SetAccountPreferences() { - Map<String, String> newPrefs = new HashMap<String, String>(); + Map<String, String> newPrefs = new HashMap<>(); newPrefs.put("r", "7"); newPrefs.put("s", "8"); newPrefs.put("t", "9"); diff --git a/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/util/IntegrationUtil.java b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/util/IntegrationUtil.java index 5ebf4adf054..dc28c9977e9 100644 --- a/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/util/IntegrationUtil.java +++ b/plugins/org.eclipse.osee.x.server.integration.tests/src/org/eclipse/osee/x/server/integration/tests/util/IntegrationUtil.java @@ -43,7 +43,7 @@ public final class IntegrationUtil { } private static Map<String, Object> createClientConfig() { - Map<String, Object> config = new HashMap<String, Object>(); + Map<String, Object> config = new HashMap<>(); config.put(OSEE_APPLICATION_SERVER, getOseeApplicationServer()); return config; } |