r1749 - trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity
Author: tchemit Date: 2014-03-25 18:16:52 +0100 (Tue, 25 Mar 2014) New Revision: 1749 Url: http://forge.codelutin.com/projects/wao/repository/revisions/1749 Log: use diamonds Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactState.java trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/UserRole.java trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/WaoUserImpl.java Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java =================================================================== --- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java 2014-03-25 17:16:23 UTC (rev 1748) +++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactImpl.java 2014-03-25 17:16:52 UTC (rev 1749) @@ -169,7 +169,7 @@ @Override public List<WaoUser> getAllObservers() { - List<WaoUser> allObservers = new LinkedList<WaoUser>(); + List<WaoUser> allObservers = new LinkedList<>(); if (getMainObserver() != null) { allObservers.add(getMainObserver()); } Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactState.java =================================================================== --- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactState.java 2014-03-25 17:16:23 UTC (rev 1748) +++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/ContactState.java 2014-03-25 17:16:52 UTC (rev 1749) @@ -131,7 +131,7 @@ } public static List<ContactState> getAllowedStates(ObsProgram obsProgram) { - List<ContactState> allowedStates = new ArrayList<ContactState>(); + List<ContactState> allowedStates = new ArrayList<>(); for (ContactState contactState : values()) { if (contactState.isAllowed(obsProgram)) { allowedStates.add(contactState); Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java =================================================================== --- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java 2014-03-25 17:16:23 UTC (rev 1748) +++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowImpl.java 2014-03-25 17:16:52 UTC (rev 1749) @@ -83,7 +83,7 @@ */ @Override public String getSectors() { - Set<String> sectorNames = new LinkedHashSet<String>(); + Set<String> sectorNames = new LinkedHashSet<>(); for (FishingZone fishingZone : getFishingZone()) { sectorNames.add(fishingZone.getSectorName()); } @@ -172,7 +172,7 @@ setdCF5Code(null); } else { String[] splitCodes = codes.split(separatorRegex); - List<DCF5Code> dcfFives = new ArrayList<DCF5Code>(splitCodes.length); + List<DCF5Code> dcfFives = new ArrayList<>(splitCodes.length); for (String code : splitCodes) { String[] codeParts = code.split("_"); DCF5Code dcfFive = new DCF5CodeImpl(); Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java =================================================================== --- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java 2014-03-25 17:16:23 UTC (rev 1748) +++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SampleRowLogImpl.java 2014-03-25 17:16:52 UTC (rev 1749) @@ -112,9 +112,9 @@ Collection<TerrestrialLocation> newTerrestrialLocations = newRow.getTerrestrialLocations(); // Lists for boats by status - List<String> removedTerrestrialLocations = new ArrayList<String>(); - List<String> keptTerrestrialLocations = new ArrayList<String>(); - List<String> addedTerrestrialLocations = new ArrayList<String>(); + List<String> removedTerrestrialLocations = new ArrayList<>(); + List<String> keptTerrestrialLocations = new ArrayList<>(); + List<String> addedTerrestrialLocations = new ArrayList<>(); // filling the three lists for (TerrestrialLocation oldTerrestrialLocation : oldTerrestrialLocations) { @@ -155,9 +155,9 @@ Collection<TerrestrialLocation> newTerrestrialLocations = newRow.getTerrestrialLocations(); // Lists for boats by status - List<String> removedTerrestrialLocations = new ArrayList<String>(); - List<String> keptTerrestrialLocations = new ArrayList<String>(); - List<String> addedTerrestrialLocations = new ArrayList<String>(); + List<String> removedTerrestrialLocations = new ArrayList<>(); + List<String> keptTerrestrialLocations = new ArrayList<>(); + List<String> addedTerrestrialLocations = new ArrayList<>(); // filling the three lists for (TerrestrialLocation oldTerrestrialLocation : oldTerrestrialLocations) { @@ -314,9 +314,9 @@ List<ElligibleBoat> newEligibleBoats = newRow.getElligibleBoat(); // Lists for boats by status - List<Integer> noLongerEligibleBoats = new ArrayList<Integer>(); - List<Integer> stillEligibleBoats = new ArrayList<Integer>(); - List<Integer> newlyEligibleBoats = new ArrayList<Integer>(); + List<Integer> noLongerEligibleBoats = new ArrayList<>(); + List<Integer> stillEligibleBoats = new ArrayList<>(); + List<Integer> newlyEligibleBoats = new ArrayList<>(); // filling the three lists for (ElligibleBoat oldEligibleBoat : oldEligibleBoats) { @@ -359,9 +359,9 @@ List<FishingZone> newFishingZones = newRow.getFishingZone(); // Lists for boats by status - List<String> removedZones = new ArrayList<String>(); - List<String> keptZones = new ArrayList<String>(); - List<String> addedZones = new ArrayList<String>(); + List<String> removedZones = new ArrayList<>(); + List<String> keptZones = new ArrayList<>(); + List<String> addedZones = new ArrayList<>(); // filling the three lists for (FishingZone oldFishingZone : oldFishingZones) { @@ -417,8 +417,8 @@ newObservers = Collections.emptyList(); } - List<String> removedObservers = new LinkedList<String>(); - List<String> addedObservers = new LinkedList<String>(); + List<String> removedObservers = new LinkedList<>(); + List<String> addedObservers = new LinkedList<>(); for (WaoUser oldObserver : oldObservers) { if ( ! newObservers.contains(oldObserver)) { Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/UserRole.java =================================================================== --- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/UserRole.java 2014-03-25 17:16:23 UTC (rev 1748) +++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/UserRole.java 2014-03-25 17:16:52 UTC (rev 1749) @@ -78,7 +78,7 @@ * @return roles that the user can affect */ public static List<UserRole> getAllowedRoles(ObsProgram obsProgram, UserRole userRole) { - List<UserRole> allowedRoles = new ArrayList<UserRole>(); + List<UserRole> allowedRoles = new ArrayList<>(); allowedRoles.add(UserRole.COORDINATOR); allowedRoles.add(UserRole.OBSERVER); if (userRole.equals(UserRole.ADMIN)) { Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/WaoUserImpl.java =================================================================== --- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/WaoUserImpl.java 2014-03-25 17:16:23 UTC (rev 1748) +++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/WaoUserImpl.java 2014-03-25 17:16:52 UTC (rev 1749) @@ -72,7 +72,7 @@ @Override public List<UserProfile> getUserProfile(ObsProgram obsProgram) { - List<UserProfile> userProfiles = new ArrayList<UserProfile>(); + List<UserProfile> userProfiles = new ArrayList<>(); if (getUserProfile() != null) { for (UserProfile userProfile : getUserProfile()) { if (userProfile.getObsProgram().equals(obsProgram)) {
participants (1)
-
tchemit@users.forge.codelutin.com