Author: fanningpj
Date: Tue Feb 22 13:34:35 2022
New Revision: 1898322

URL: http://svn.apache.org/viewvc?rev=1898322&view=rev
Log:
code tidyup

Modified:
    
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/atp/WorkdayCalculator.java

Modified: 
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/atp/WorkdayCalculator.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/atp/WorkdayCalculator.java?rev=1898322&r1=1898321&r2=1898322&view=diff
==============================================================================
--- 
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/atp/WorkdayCalculator.java
 (original)
+++ 
poi/trunk/poi/src/main/java/org/apache/poi/ss/formula/atp/WorkdayCalculator.java
 Tue Feb 22 13:34:35 2022
@@ -19,6 +19,7 @@ package org.apache.poi.ss.formula.atp;
 
 import java.util.Arrays;
 import java.util.Calendar;
+import java.util.Collections;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -49,20 +50,13 @@ public class WorkdayCalculator {
             new HashSet<>(Arrays.asList(Calendar.THURSDAY, Calendar.FRIDAY));
     private static final Set<Integer> friSatWeekend =
             new HashSet<>(Arrays.asList(Calendar.FRIDAY, Calendar.SATURDAY));
-    private static final Set<Integer> monWeekend =
-            new HashSet<>(Arrays.asList(Calendar.MONDAY));
-    private static final Set<Integer> tuesWeekend =
-            new HashSet<>(Arrays.asList(Calendar.TUESDAY));
-    private static final Set<Integer> wedsWeekend =
-            new HashSet<>(Arrays.asList(Calendar.WEDNESDAY));
-    private static final Set<Integer> thursWeekend =
-            new HashSet<>(Arrays.asList(Calendar.THURSDAY));
-    private static final Set<Integer> friWeekend =
-            new HashSet<>(Arrays.asList(Calendar.FRIDAY));
-    private static final Set<Integer> satWeekend =
-            new HashSet<>(Arrays.asList(Calendar.SATURDAY));
-    private static final Set<Integer> sunWeekend =
-            new HashSet<>(Arrays.asList(Calendar.SUNDAY));
+    private static final Set<Integer> monWeekend =  
Collections.singleton(Calendar.MONDAY);
+    private static final Set<Integer> tuesWeekend =  
Collections.singleton(Calendar.TUESDAY);
+    private static final Set<Integer> wedsWeekend =  
Collections.singleton(Calendar.WEDNESDAY);
+    private static final Set<Integer> thursWeekend = 
Collections.singleton(Calendar.THURSDAY);
+    private static final Set<Integer> friWeekend = 
Collections.singleton(Calendar.FRIDAY);
+    private static final Set<Integer> satWeekend = 
Collections.singleton(Calendar.SATURDAY);
+    private static final Set<Integer> sunWeekend = 
Collections.singleton(Calendar.SUNDAY);
     private static final Map<Integer, Set<Integer>> weekendTypeMap = new 
HashMap<>();
 
     static {



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to