author | ksrini |
Tue, 29 May 2012 14:56:48 -0700 | |
changeset 12857 | 0a5f341c2a28 |
parent 10115 | eb08d08c7ef7 |
child 14774 | 4e298ffae1c7 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
12857
0a5f341c2a28
7168401: pack200 does not produce a compatible pack file for JDK7 classes if indy is not present
ksrini
parents:
10115
diff
changeset
|
2 |
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package com.sun.java.util.jar.pack; |
|
27 |
||
28 |
import java.beans.PropertyChangeListener; |
|
29 |
import java.beans.PropertyChangeEvent; |
|
7192
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
30 |
import java.io.IOException; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
31 |
import java.io.InputStream; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
32 |
import java.io.PrintStream; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
33 |
import java.io.PrintWriter; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
34 |
import java.util.ArrayList; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
35 |
import java.util.Collection; |
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
36 |
import java.util.Comparator; |
7192
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
37 |
import java.util.HashMap; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
38 |
import java.util.List; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
39 |
import java.util.Map; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
40 |
import java.util.Properties; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
41 |
import java.util.Set; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
42 |
import java.util.SortedMap; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
43 |
import java.util.TreeMap; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
44 |
import java.util.jar.Pack200; |
2 | 45 |
/** |
46 |
* Control block for publishing Pack200 options to the other classes. |
|
47 |
*/ |
|
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
48 |
|
10115 | 49 |
final class PropMap implements SortedMap<String, String> { |
50 |
private final TreeMap<String, String> theMap = new TreeMap<>();; |
|
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
51 |
private final List<PropertyChangeListener> listenerList = new ArrayList<>(1); |
2 | 52 |
|
53 |
void addListener(PropertyChangeListener listener) { |
|
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
54 |
listenerList.add(listener); |
2 | 55 |
} |
56 |
||
57 |
void removeListener(PropertyChangeListener listener) { |
|
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
58 |
listenerList.remove(listener); |
2 | 59 |
} |
60 |
||
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
61 |
void addListeners(ArrayList<PropertyChangeListener> listeners) { |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
62 |
listenerList.addAll(listeners); |
2 | 63 |
} |
64 |
||
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
65 |
void removeListeners(ArrayList<PropertyChangeListener> listeners) { |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
66 |
listenerList.removeAll(listeners); |
2 | 67 |
} |
68 |
||
69 |
// Override: |
|
10115 | 70 |
public String put(String key, String value) { |
71 |
String oldValue = theMap.put(key, value); |
|
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
72 |
if (value != oldValue && !listenerList.isEmpty()) { |
2 | 73 |
// Post the property change event. |
74 |
PropertyChangeEvent event = |
|
10115 | 75 |
new PropertyChangeEvent(this, key, |
2 | 76 |
oldValue, value); |
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
77 |
for (PropertyChangeListener listener : listenerList) { |
2 | 78 |
listener.propertyChange(event); |
79 |
} |
|
80 |
} |
|
81 |
return oldValue; |
|
82 |
} |
|
83 |
||
84 |
// All this other stuff is private to the current package. |
|
85 |
// Outide clients of Pack200 do not need to use it; they can |
|
86 |
// get by with generic SortedMap functionality. |
|
10115 | 87 |
private static Map<String, String> defaultProps; |
2 | 88 |
static { |
89 |
Properties props = new Properties(); |
|
90 |
||
91 |
// Allow implementation selected via -Dpack.disable.native=true |
|
92 |
props.put(Utils.DEBUG_DISABLE_NATIVE, |
|
93 |
String.valueOf(Boolean.getBoolean(Utils.DEBUG_DISABLE_NATIVE))); |
|
94 |
||
95 |
// Set the DEBUG_VERBOSE from system |
|
96 |
props.put(Utils.DEBUG_VERBOSE, |
|
97 |
String.valueOf(Integer.getInteger(Utils.DEBUG_VERBOSE,0))); |
|
98 |
||
99 |
// Set the PACK_TIMEZONE_NO_UTC |
|
100 |
props.put(Utils.PACK_DEFAULT_TIMEZONE, |
|
101 |
String.valueOf(Boolean.getBoolean(Utils.PACK_DEFAULT_TIMEZONE))); |
|
102 |
||
5799
e0089b2436a4
6575373: Error verifying signatures of pack200 files in some cases
ksrini
parents:
5506
diff
changeset
|
103 |
// The segment size is unlimited |
6322
0a20892f9af6
6969063: (pack200) The default value of Pack200.Packer.SEGMENT_LIMIT property is empty string instead of -1
ksrini
parents:
5799
diff
changeset
|
104 |
props.put(Pack200.Packer.SEGMENT_LIMIT, "-1"); |
2 | 105 |
|
106 |
// Preserve file ordering by default. |
|
107 |
props.put(Pack200.Packer.KEEP_FILE_ORDER, Pack200.Packer.TRUE); |
|
108 |
||
109 |
// Preserve all modification times by default. |
|
110 |
props.put(Pack200.Packer.MODIFICATION_TIME, Pack200.Packer.KEEP); |
|
111 |
||
112 |
// Preserve deflation hints by default. |
|
113 |
props.put(Pack200.Packer.DEFLATE_HINT, Pack200.Packer.KEEP); |
|
114 |
||
115 |
// Pass through files with unrecognized attributes by default. |
|
116 |
props.put(Pack200.Packer.UNKNOWN_ATTRIBUTE, Pack200.Packer.PASS); |
|
117 |
||
118 |
// Default effort is 5, midway between 1 and 9. |
|
119 |
props.put(Pack200.Packer.EFFORT, "5"); |
|
120 |
||
121 |
// Define certain attribute layouts by default. |
|
122 |
// Do this after the previous props are put in place, |
|
123 |
// to allow override if necessary. |
|
8803
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
124 |
String propFile = "intrinsic.properties"; |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
125 |
|
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
126 |
try (InputStream propStr = PackerImpl.class.getResourceAsStream(propFile)) { |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
127 |
if (propStr == null) { |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
128 |
throw new RuntimeException(propFile + " cannot be loaded"); |
2 | 129 |
} |
8803
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
130 |
props.load(propStr); |
2 | 131 |
} catch (IOException ee) { |
132 |
throw new RuntimeException(ee); |
|
8803
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
133 |
} |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
134 |
|
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
135 |
for (Map.Entry<Object, Object> e : props.entrySet()) { |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
136 |
String key = (String) e.getKey(); |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
137 |
String val = (String) e.getValue(); |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
138 |
if (key.startsWith("attribute.")) { |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
139 |
e.setValue(Attribute.normalizeLayoutString(val)); |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
140 |
} |
2 | 141 |
} |
142 |
||
10115 | 143 |
@SuppressWarnings({"unchecked", "rawtypes"}) |
144 |
HashMap<String, String> temp = new HashMap(props); // shrink to fit |
|
145 |
defaultProps = temp; |
|
2 | 146 |
} |
147 |
||
148 |
PropMap() { |
|
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
149 |
theMap.putAll(defaultProps); |
2 | 150 |
} |
151 |
||
152 |
// Return a view of this map which includes only properties |
|
153 |
// that begin with the given prefix. This is easy because |
|
154 |
// the map is sorted, and has a subMap accessor. |
|
10115 | 155 |
SortedMap<String, String> prefixMap(String prefix) { |
2 | 156 |
int len = prefix.length(); |
157 |
if (len == 0) |
|
158 |
return this; |
|
159 |
char nextch = (char)(prefix.charAt(len-1) + 1); |
|
160 |
String limit = prefix.substring(0, len-1)+nextch; |
|
161 |
//System.out.println(prefix+" => "+subMap(prefix, limit)); |
|
162 |
return subMap(prefix, limit); |
|
163 |
} |
|
164 |
||
165 |
String getProperty(String s) { |
|
10115 | 166 |
return get(s); |
2 | 167 |
} |
168 |
String getProperty(String s, String defaultVal) { |
|
169 |
String val = getProperty(s); |
|
170 |
if (val == null) |
|
171 |
return defaultVal; |
|
172 |
return val; |
|
173 |
} |
|
174 |
String setProperty(String s, String val) { |
|
10115 | 175 |
return put(s, val); |
2 | 176 |
} |
177 |
||
178 |
// Get sequence of props for "prefix", and "prefix.*". |
|
10115 | 179 |
List<String> getProperties(String prefix) { |
180 |
Collection<String> values = prefixMap(prefix).values(); |
|
181 |
List<String> res = new ArrayList<>(values.size()); |
|
2 | 182 |
res.addAll(values); |
183 |
while (res.remove(null)); |
|
184 |
return res; |
|
185 |
} |
|
186 |
||
187 |
private boolean toBoolean(String val) { |
|
188 |
return Boolean.valueOf(val).booleanValue(); |
|
189 |
} |
|
190 |
boolean getBoolean(String s) { |
|
191 |
return toBoolean(getProperty(s)); |
|
192 |
} |
|
193 |
boolean setBoolean(String s, boolean val) { |
|
194 |
return toBoolean(setProperty(s, String.valueOf(val))); |
|
195 |
} |
|
196 |
int toInteger(String val) { |
|
12857
0a5f341c2a28
7168401: pack200 does not produce a compatible pack file for JDK7 classes if indy is not present
ksrini
parents:
10115
diff
changeset
|
197 |
return toInteger(val, 0); |
0a5f341c2a28
7168401: pack200 does not produce a compatible pack file for JDK7 classes if indy is not present
ksrini
parents:
10115
diff
changeset
|
198 |
} |
0a5f341c2a28
7168401: pack200 does not produce a compatible pack file for JDK7 classes if indy is not present
ksrini
parents:
10115
diff
changeset
|
199 |
int toInteger(String val, int def) { |
0a5f341c2a28
7168401: pack200 does not produce a compatible pack file for JDK7 classes if indy is not present
ksrini
parents:
10115
diff
changeset
|
200 |
if (val == null) return def; |
2 | 201 |
if (Pack200.Packer.TRUE.equals(val)) return 1; |
202 |
if (Pack200.Packer.FALSE.equals(val)) return 0; |
|
203 |
return Integer.parseInt(val); |
|
204 |
} |
|
12857
0a5f341c2a28
7168401: pack200 does not produce a compatible pack file for JDK7 classes if indy is not present
ksrini
parents:
10115
diff
changeset
|
205 |
int getInteger(String s, int def) { |
0a5f341c2a28
7168401: pack200 does not produce a compatible pack file for JDK7 classes if indy is not present
ksrini
parents:
10115
diff
changeset
|
206 |
return toInteger(getProperty(s), def); |
0a5f341c2a28
7168401: pack200 does not produce a compatible pack file for JDK7 classes if indy is not present
ksrini
parents:
10115
diff
changeset
|
207 |
} |
2 | 208 |
int getInteger(String s) { |
209 |
return toInteger(getProperty(s)); |
|
210 |
} |
|
211 |
int setInteger(String s, int val) { |
|
212 |
return toInteger(setProperty(s, String.valueOf(val))); |
|
213 |
} |
|
214 |
||
215 |
long toLong(String val) { |
|
216 |
try { |
|
217 |
return val == null ? 0 : Long.parseLong(val); |
|
218 |
} catch (java.lang.NumberFormatException nfe) { |
|
219 |
throw new IllegalArgumentException("Invalid value"); |
|
220 |
} |
|
221 |
} |
|
222 |
long getLong(String s) { |
|
223 |
return toLong(getProperty(s)); |
|
224 |
} |
|
225 |
long setLong(String s, long val) { |
|
226 |
return toLong(setProperty(s, String.valueOf(val))); |
|
227 |
} |
|
228 |
||
229 |
int getTime(String s) { |
|
230 |
String sval = getProperty(s, "0"); |
|
231 |
if (Utils.NOW.equals(sval)) { |
|
232 |
return (int)((System.currentTimeMillis()+500)/1000); |
|
233 |
} |
|
234 |
long lval = toLong(sval); |
|
235 |
final long recentSecondCount = 1000000000; |
|
236 |
||
237 |
if (lval < recentSecondCount*10 && !"0".equals(sval)) |
|
238 |
Utils.log.warning("Supplied modtime appears to be seconds rather than milliseconds: "+sval); |
|
239 |
||
240 |
return (int)((lval+500)/1000); |
|
241 |
} |
|
242 |
||
243 |
void list(PrintStream out) { |
|
244 |
PrintWriter outw = new PrintWriter(out); |
|
245 |
list(outw); |
|
246 |
outw.flush(); |
|
247 |
} |
|
248 |
void list(PrintWriter out) { |
|
249 |
out.println("#"+Utils.PACK_ZIP_ARCHIVE_MARKER_COMMENT+"["); |
|
10115 | 250 |
Set<Map.Entry<String, String>> defaults = defaultProps.entrySet(); |
251 |
for (Map.Entry<String, String> e : theMap.entrySet()) { |
|
2 | 252 |
if (defaults.contains(e)) continue; |
253 |
out.println(" " + e.getKey() + " = " + e.getValue()); |
|
254 |
} |
|
255 |
out.println("#]"); |
|
256 |
} |
|
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
257 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
258 |
@Override |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
259 |
public int size() { |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
260 |
return theMap.size(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
261 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
262 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
263 |
@Override |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
264 |
public boolean isEmpty() { |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
265 |
return theMap.isEmpty(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
266 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
267 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
268 |
@Override |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
269 |
public boolean containsKey(Object key) { |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
270 |
return theMap.containsKey(key); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
271 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
272 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
273 |
@Override |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
274 |
public boolean containsValue(Object value) { |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
275 |
return theMap.containsValue(value); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
276 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
277 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
278 |
@Override |
10115 | 279 |
public String get(Object key) { |
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
280 |
return theMap.get(key); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
281 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
282 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
283 |
@Override |
10115 | 284 |
public String remove(Object key) { |
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
285 |
return theMap.remove(key); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
286 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
287 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
288 |
@Override |
10115 | 289 |
public void putAll(Map<? extends String, ? extends String> m) { |
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
290 |
theMap.putAll(m); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
291 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
292 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
293 |
@Override |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
294 |
public void clear() { |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
295 |
theMap.clear(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
296 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
297 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
298 |
@Override |
10115 | 299 |
public Set<String> keySet() { |
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
300 |
return theMap.keySet(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
301 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
302 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
303 |
@Override |
10115 | 304 |
public Collection<String> values() { |
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
305 |
return theMap.values(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
306 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
307 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
308 |
@Override |
10115 | 309 |
public Set<Map.Entry<String, String>> entrySet() { |
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
310 |
return theMap.entrySet(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
311 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
312 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
313 |
@Override |
10115 | 314 |
public Comparator<? super String> comparator() { |
315 |
return theMap.comparator(); |
|
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
316 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
317 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
318 |
@Override |
10115 | 319 |
public SortedMap<String, String> subMap(String fromKey, String toKey) { |
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
320 |
return theMap.subMap(fromKey, toKey); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
321 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
322 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
323 |
@Override |
10115 | 324 |
public SortedMap<String, String> headMap(String toKey) { |
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
325 |
return theMap.headMap(toKey); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
326 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
327 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
328 |
@Override |
10115 | 329 |
public SortedMap<String, String> tailMap(String fromKey) { |
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
330 |
return theMap.tailMap(fromKey); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
331 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
332 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
333 |
@Override |
10115 | 334 |
public String firstKey() { |
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
335 |
return theMap.firstKey(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
336 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
337 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
338 |
@Override |
10115 | 339 |
public String lastKey() { |
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
340 |
return theMap.lastKey(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
341 |
} |
2 | 342 |
} |