package org.apache.poi.xwpf.usermodel;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
ZIG_ZAG_STITCH(191);
- private static Map<Integer, Borders> imap = new HashMap<>();
+ private static final Map<Integer, Borders> imap;
static {
+ final Map<Integer, Borders> tempMap = new HashMap<>();
for (Borders p : values()) {
- imap.put(Integer.valueOf(p.getValue()), p);
+ tempMap.put(Integer.valueOf(p.getValue()), p);
}
+ imap = Collections.unmodifiableMap(tempMap);
}
private final int value;
==================================================================== */
package org.apache.poi.xwpf.usermodel;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
*/
NONE(18);
- private static Map<Integer, UnderlinePatterns> imap = new HashMap<>();
+ private static final Map<Integer, UnderlinePatterns> imap;
static {
+ final Map<Integer, UnderlinePatterns> tempMap = new HashMap<>();
for (UnderlinePatterns p : values()) {
- imap.put(p.getValue(), p);
+ tempMap.put(p.getValue(), p);
}
+ imap = Collections.unmodifiableMap(tempMap);
}
private final int value;