]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sat, 14 Oct 2017 19:03:47 +0000 (21:03 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 14 Oct 2017 19:03:47 +0000 (21:03 +0200)
- simplified for() loop, no need for extra iteration + next instance as a simple
  double-dot (:) does the same on a List<Foo>

Signed-off-by: Roland Häder <roland@mxchange.org>
12 files changed:
src/java/org/mxchange/jfinancials/beans/business/basicdata/FinancialsBusinessDataWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/business/branchoffice/FinancialsBranchOfficeWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/business/department/FinancialsDepartmentWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/business/employee/FinancialsEmployeeWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/business/opening_time/FinancialsOpeningTimeWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/country/FinancialsCountryWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/mobileprovider/FinancialsMobileProviderWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/phone/FinancialsPhoneWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/user/FinancialsUserWebRequestBean.java
src/java/org/mxchange/jfinancials/beans/user/activity/FinancialsUserActivityWebRequestBean.java
web/WEB-INF/links.jsf.taglib.xml
web/WEB-INF/widgets.jsf.taglib.xml

index c5d12c37d1316c3e89cb8d9901ba3d5f71f63590..afab9ec8a1890f241ddac5fe253128153dcf4043 100644 (file)
@@ -375,15 +375,12 @@ public class FinancialsBusinessDataWebRequestBean extends BaseFinancialsBean imp
                // Is cache there?
                if (!this.basicDataCache.iterator().hasNext()) {
                        // Get whole list
-                       final List<BusinessBasicData> list = this.businessDataBean.allCompanyBasicData();
+                       final List<BusinessBasicData> basicDatas = this.businessDataBean.allCompanyBasicData();
 
                        // Add all
-                       for (final Iterator<BusinessBasicData> iterator = list.iterator(); iterator.hasNext();) {
-                               // Get next element
-                               final BusinessBasicData next = iterator.next();
-
+                       for (final BusinessBasicData basicData : basicDatas) {
                                // Add it to cache
-                               this.basicDataCache.put(next.getBasicDataId(), next);
+                               this.basicDataCache.put(basicData.getBasicDataId(), basicData);
                        }
                }
 
index fe35a43ddf6bba9be466b7ac772b966f68fdf120..6121069254c09f01ebbdc00a3c14867951739b04 100644 (file)
@@ -146,15 +146,12 @@ public class FinancialsBranchOfficeWebRequestBean extends BaseFinancialsBean imp
                // Is cache there?
                if (!this.branchOfficeCache.iterator().hasNext()) {
                        // Get whole list
-                       final List<BranchOffice> list = this.branchOfficeBean.allBranchOffices();
+                       final List<BranchOffice> branchOffices = this.branchOfficeBean.allBranchOffices();
 
                        // Add all
-                       for (final Iterator<BranchOffice> iterator = list.iterator(); iterator.hasNext();) {
-                               // Get next element
-                               final BranchOffice next = iterator.next();
-
+                       for (final BranchOffice branchOffice : branchOffices) {
                                // Add it to cache
-                               this.branchOfficeCache.put(next.getBranchId(), next);
+                               this.branchOfficeCache.put(branchOffice.getBranchId(), branchOffice);
                        }
                }
 
index 294670fc6090f991310be9a9ad8b1ad156020b01..da0b7f2232968251a0065f601eaf7a71be83d4b5 100644 (file)
@@ -146,15 +146,12 @@ public class FinancialsDepartmentWebRequestBean extends BaseFinancialsBean imple
                // Is cache there?
                if (!this.departmentCache.iterator().hasNext()) {
                        // Get whole list
-                       final List<Department> list = this.departmentBean.allDepartments();
+                       final List<Department> departments = this.departmentBean.allDepartments();
 
                        // Add all
-                       for (final Iterator<Department> iterator = list.iterator(); iterator.hasNext();) {
-                               // Get next element
-                               final Department next = iterator.next();
-
+                       for (final Department department : departments) {
                                // Add it to cache
-                               this.departmentCache.put(next.getDepartmentId(), next);
+                               this.departmentCache.put(department.getDepartmentId(), department);
                        }
                }
 
index 98ae943b29b6438763184085b9307b098544da77..49621af24b492351e7a827eb0d16a091a97b13b4 100644 (file)
@@ -146,15 +146,12 @@ public class FinancialsEmployeeWebRequestBean extends BaseFinancialsBean impleme
                // Is cache there?
                if (!this.employeeCache.iterator().hasNext()) {
                        // Get whole list
-                       final List<Employee> list = this.employeeBean.allCompanyEmployees();
+                       final List<Employee> employees = this.employeeBean.allCompanyEmployees();
 
                        // Add all
-                       for (final Iterator<Employee> iterator = list.iterator(); iterator.hasNext();) {
-                               // Get next element
-                               final Employee next = iterator.next();
-
+                       for (final Employee employee : employees) {
                                // Add it to cache
-                               this.employeeCache.put(next.getEmployeeId(), next);
+                               this.employeeCache.put(employee.getEmployeeId(), employee);
                        }
                }
 
index 093b59b4c1e1c54b8b57a404c11bf050f3cce2f8..c5d8382e1b4222801bc1f1b71099c935a10e3577 100644 (file)
@@ -142,15 +142,12 @@ public class FinancialsOpeningTimeWebRequestBean extends BaseFinancialsBean impl
                // Is cache there?
                if (!this.openingTimesCache.iterator().hasNext()) {
                        // Get whole list
-                       final List<OpeningTime> list = this.openingTimesBean.allOpeningTimes();
+                       final List<OpeningTime> openingTimes = this.openingTimesBean.allOpeningTimes();
 
                        // Add all
-                       for (final Iterator<OpeningTime> iterator = list.iterator(); iterator.hasNext();) {
-                               // Get next element
-                               final OpeningTime next = iterator.next();
-
+                       for (final OpeningTime openingTime : openingTimes) {
                                // Add it to cache
-                               this.openingTimesCache.put(next.getOpeningId(), next);
+                               this.openingTimesCache.put(openingTime.getOpeningId(), openingTime);
                        }
                }
 
index 9bcc4e61c5f264e4f5f1e35573335c358d43a448..62db3b8546774142d01159613a1ceb38837538d8 100644 (file)
@@ -124,15 +124,12 @@ public class FinancialsCountryWebRequestBean extends BaseFinancialsBean implemen
                // Is cache there?
                if (!this.countryCache.iterator().hasNext()) {
                        // Get whole list
-                       final List<Country> list = this.countryBean.allCountries();
+                       final List<Country> countries = this.countryBean.allCountries();
 
                        // Add all
-                       for (final Iterator<Country> iterator = list.iterator(); iterator.hasNext();) {
-                               // Get next element
-                               final Country next = iterator.next();
-
+                       for (final Country country : countries) {
                                // Add it to cache
-                               this.countryCache.put(next.getCountryId(), next);
+                               this.countryCache.put(country.getCountryId(), country);
                        }
                }
        }
index 0c1b079a8b28eec1a5232fafc6d834247c031720..f1b0a41a276170d299d1f964e48e2751a2540cae 100644 (file)
@@ -144,15 +144,12 @@ public class FinancialsMobileProviderWebRequestBean extends BaseFinancialsBean i
                // Is cache there?
                if (!this.mobileProviderCache.iterator().hasNext()) {
                        // Get whole list
-                       final List<MobileProvider> list = this.mobileProviderBean.allMobileProviders();
+                       final List<MobileProvider> mobileProviders = this.mobileProviderBean.allMobileProviders();
 
                        // Add all
-                       for (final Iterator<MobileProvider> iterator = list.iterator(); iterator.hasNext();) {
-                               // Get next element
-                               final MobileProvider next = iterator.next();
-
+                       for (final MobileProvider mobileProvider : mobileProviders) {
                                // Add it to cache
-                               this.mobileProviderCache.put(next.getProviderId(), next);
+                               this.mobileProviderCache.put(mobileProvider.getProviderId(), mobileProvider);
                        }
                }
 
index 2c515c89cb97774e61ee6e401d0a9d3ceb20708d..30b1c68e24b2f7ec16e789abac8ff05ec1a2afc8 100644 (file)
@@ -554,45 +554,36 @@ public class FinancialsPhoneWebRequestBean extends BaseFinancialsBean implements
                // Is cache there?
                if (!this.faxNumberCache.iterator().hasNext()) {
                        // Get whole list
-                       final List<DialableFaxNumber> list = this.phoneBean.allFaxNumbers();
+                       final List<DialableFaxNumber> faxNumbers = this.phoneBean.allFaxNumbers();
 
                        // Add all
-                       for (final Iterator<DialableFaxNumber> iterator = list.iterator(); iterator.hasNext();) {
-                               // Get next element
-                               final DialableFaxNumber next = iterator.next();
-
+                       for (final DialableFaxNumber faxNumber : faxNumbers) {
                                // Add it to cache
-                               this.faxNumberCache.put(next.getPhoneId(), next);
+                               this.faxNumberCache.put(faxNumber.getPhoneId(), faxNumber);
                        }
                }
 
                // Is cache there?
                if (!this.landLineNumberCache.iterator().hasNext()) {
                        // Get whole list
-                       final List<DialableLandLineNumber> list = this.phoneBean.allLandLineNumbers();
+                       final List<DialableLandLineNumber> lineNumbers = this.phoneBean.allLandLineNumbers();
 
                        // Add all
-                       for (final Iterator<DialableLandLineNumber> iterator = list.iterator(); iterator.hasNext();) {
-                               // Get next element
-                               final DialableLandLineNumber next = iterator.next();
-
+                       for (final DialableLandLineNumber lineNumber : lineNumbers) {
                                // Add it to cache
-                               this.landLineNumberCache.put(next.getPhoneId(), next);
+                               this.landLineNumberCache.put(lineNumber.getPhoneId(), lineNumber);
                        }
                }
 
                // Is cache there?
                if (!this.mobileNumberCache.iterator().hasNext()) {
                        // Get whole list
-                       final List<DialableMobileNumber> list = this.phoneBean.allMobileNumbers();
+                       final List<DialableMobileNumber> mobileNumbers = this.phoneBean.allMobileNumbers();
 
                        // Add all
-                       for (final Iterator<DialableMobileNumber> iterator = list.iterator(); iterator.hasNext();) {
-                               // Get next element
-                               final DialableMobileNumber next = iterator.next();
-
+                       for (final DialableMobileNumber mobileNumber : mobileNumbers) {
                                // Add it to cache
-                               this.mobileNumberCache.put(next.getPhoneId(), next);
+                               this.mobileNumberCache.put(mobileNumber.getPhoneId(), mobileNumber);
                        }
                }
        }
index b8f29716511bfe1585e003ac48ad07d73f33d682..27ddc39a98c9cf855791936b07391200bf50eb63 100644 (file)
@@ -828,16 +828,13 @@ public class FinancialsUserWebRequestBean extends BaseFinancialsBean implements
                // Is cache there?
                if (!this.userCache.iterator().hasNext()) {
                        // Get whole list
-                       final List<User> list = this.userBean.allUsers();
+                       final List<User> users = this.userBean.allUsers();
 
                        // Add all
-                       for (final Iterator<User> iterator = list.iterator(); iterator.hasNext();) {
-                               // Get next element
-                               final User next = iterator.next();
-
+                       for (final User user : users) {
                                // Add it to cache
-                               this.userCache.put(next.getUserId(), next);
-                               this.userNameCache.put(next.getUserId(), next.getUserName());
+                               this.userCache.put(user.getUserId(), user);
+                               this.userNameCache.put(user.getUserId(), user.getUserName());
                        }
                }
 
index 31473bf41f840d6c33bfa758552457aa98650d3e..62eaa504d2d2a085eb1280af1cefeaebeaff0b60 100644 (file)
@@ -545,10 +545,10 @@ public class FinancialsUserActivityWebRequestBean extends BaseFinancialsBean imp
        @PostConstruct
        public void init () {
                // Get whole list
-               final List<LogableUserActivity> list = this.userActivityBean.fetchAllUserActivityLog();
+               final List<LogableUserActivity> userActivities = this.userActivityBean.fetchAllUserActivityLog();
 
                // Put all in map, per-user
-               for (final LogableUserActivity userActivity : list) {
+               for (final LogableUserActivity userActivity : userActivities) {
                        // Is the list there?
                        if (!this.userActivityCache.containsKey(userActivity.getActivityUser())) {
                                // Init list
index a0841d5af86e8bb960cf95f59a80af68bae1933f..d07704b7ce9899254467cce4a2690f79f46f69d9 100644 (file)
@@ -55,7 +55,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
                </attribute>
                <attribute>
                        <name>renderShowLink</name>
-                       <description>Whether this tag is used to show mobile data (default true).</description>
+                       <description>Whether this tag is used to show fax data (default true).</description>
                        <required>false</required>
                        <type>java.lang.Boolean</type>
                </attribute>
@@ -84,7 +84,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
                </attribute>
                <attribute>
                        <name>renderShowLink</name>
-                       <description>Whether this tag is used to show mobile data (default true).</description>
+                       <description>Whether this tag is used to show land-line data (default true).</description>
                        <required>false</required>
                        <type>java.lang.Boolean</type>
                </attribute>
@@ -136,7 +136,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
                </attribute>
                <attribute>
                        <name>renderShowLink</name>
-                       <description>Whether this tag is used to show mobile data (default true).</description>
+                       <description>Whether this tag is used to show mobile provider data (default true).</description>
                        <required>false</required>
                        <type>java.lang.Boolean</type>
                </attribute>
index 8fa3bebee1c964b6d390b4425b5bca41c258efc7..c8b9fb57ae7603a03dbee47b1328ea4f9f1394f3 100644 (file)
@@ -193,7 +193,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
                <source>resources/tags/admin/panel_grids/fax/admin_fax_data.tpl</source>
                <attribute>
                        <name>renderShowLink</name>
-                       <description>Whether this tag is used to show mobile data (default true).</description>
+                       <description>Whether this tag is used to show fax data (default true).</description>
                        <required>false</required>
                        <type>java.lang.Boolean</type>
                </attribute>
@@ -228,7 +228,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
                <source>resources/tags/admin/panel_grids/landline/admin_landline_data.tpl</source>
                <attribute>
                        <name>renderShowLink</name>
-                       <description>Whether this tag is used to show mobile data (default true).</description>
+                       <description>Whether this tag is used to show land-line data (default true).</description>
                        <required>false</required>
                        <type>java.lang.Boolean</type>
                </attribute>