author | alanb |
Sun, 15 Dec 2013 08:11:41 +0000 | |
changeset 22046 | b7163958d6d9 |
parent 15526 | 84de8685a2d0 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
15526
84de8685a2d0
8003549: (pack200) assertion errors when processing lambda class files with IMethods
ksrini
parents:
14774
diff
changeset
|
2 |
* Copyright (c) 2003, 2013, 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 |
||
7192
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
28 |
import java.io.IOException; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
29 |
import java.io.InputStream; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
30 |
import java.io.PrintStream; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
31 |
import java.io.PrintWriter; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
32 |
import java.util.ArrayList; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
33 |
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
|
34 |
import java.util.Comparator; |
7192
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
35 |
import java.util.HashMap; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
36 |
import java.util.List; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
37 |
import java.util.Map; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
38 |
import java.util.Properties; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
39 |
import java.util.Set; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
40 |
import java.util.SortedMap; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
41 |
import java.util.TreeMap; |
445c518364c4
7003227: (pack200) intermittent failures compiling pack200
ksrini
parents:
6322
diff
changeset
|
42 |
import java.util.jar.Pack200; |
14774
4e298ffae1c7
8004874: Reduce dependency on java.beans to only add/removePropertyChangeListener
alanb
parents:
12857
diff
changeset
|
43 |
|
2 | 44 |
/** |
45 |
* Control block for publishing Pack200 options to the other classes. |
|
46 |
*/ |
|
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
47 |
|
10115 | 48 |
final class PropMap implements SortedMap<String, String> { |
49 |
private final TreeMap<String, String> theMap = new TreeMap<>();; |
|
2 | 50 |
|
51 |
// Override: |
|
10115 | 52 |
public String put(String key, String value) { |
53 |
String oldValue = theMap.put(key, value); |
|
2 | 54 |
return oldValue; |
55 |
} |
|
56 |
||
57 |
// All this other stuff is private to the current package. |
|
58 |
// Outide clients of Pack200 do not need to use it; they can |
|
59 |
// get by with generic SortedMap functionality. |
|
10115 | 60 |
private static Map<String, String> defaultProps; |
2 | 61 |
static { |
62 |
Properties props = new Properties(); |
|
63 |
||
64 |
// Allow implementation selected via -Dpack.disable.native=true |
|
65 |
props.put(Utils.DEBUG_DISABLE_NATIVE, |
|
66 |
String.valueOf(Boolean.getBoolean(Utils.DEBUG_DISABLE_NATIVE))); |
|
67 |
||
68 |
// Set the DEBUG_VERBOSE from system |
|
69 |
props.put(Utils.DEBUG_VERBOSE, |
|
70 |
String.valueOf(Integer.getInteger(Utils.DEBUG_VERBOSE,0))); |
|
71 |
||
72 |
// Set the PACK_TIMEZONE_NO_UTC |
|
73 |
props.put(Utils.PACK_DEFAULT_TIMEZONE, |
|
74 |
String.valueOf(Boolean.getBoolean(Utils.PACK_DEFAULT_TIMEZONE))); |
|
75 |
||
5799
e0089b2436a4
6575373: Error verifying signatures of pack200 files in some cases
ksrini
parents:
5506
diff
changeset
|
76 |
// 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
|
77 |
props.put(Pack200.Packer.SEGMENT_LIMIT, "-1"); |
2 | 78 |
|
79 |
// Preserve file ordering by default. |
|
80 |
props.put(Pack200.Packer.KEEP_FILE_ORDER, Pack200.Packer.TRUE); |
|
81 |
||
82 |
// Preserve all modification times by default. |
|
83 |
props.put(Pack200.Packer.MODIFICATION_TIME, Pack200.Packer.KEEP); |
|
84 |
||
85 |
// Preserve deflation hints by default. |
|
86 |
props.put(Pack200.Packer.DEFLATE_HINT, Pack200.Packer.KEEP); |
|
87 |
||
88 |
// Pass through files with unrecognized attributes by default. |
|
89 |
props.put(Pack200.Packer.UNKNOWN_ATTRIBUTE, Pack200.Packer.PASS); |
|
90 |
||
15526
84de8685a2d0
8003549: (pack200) assertion errors when processing lambda class files with IMethods
ksrini
parents:
14774
diff
changeset
|
91 |
// Pass through files with unrecognized format by default, also |
84de8685a2d0
8003549: (pack200) assertion errors when processing lambda class files with IMethods
ksrini
parents:
14774
diff
changeset
|
92 |
// allow system property to be set |
84de8685a2d0
8003549: (pack200) assertion errors when processing lambda class files with IMethods
ksrini
parents:
14774
diff
changeset
|
93 |
props.put(Utils.CLASS_FORMAT_ERROR, |
84de8685a2d0
8003549: (pack200) assertion errors when processing lambda class files with IMethods
ksrini
parents:
14774
diff
changeset
|
94 |
System.getProperty(Utils.CLASS_FORMAT_ERROR, Pack200.Packer.PASS)); |
84de8685a2d0
8003549: (pack200) assertion errors when processing lambda class files with IMethods
ksrini
parents:
14774
diff
changeset
|
95 |
|
2 | 96 |
// Default effort is 5, midway between 1 and 9. |
97 |
props.put(Pack200.Packer.EFFORT, "5"); |
|
98 |
||
99 |
// Define certain attribute layouts by default. |
|
100 |
// Do this after the previous props are put in place, |
|
101 |
// to allow override if necessary. |
|
8803
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
102 |
String propFile = "intrinsic.properties"; |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
103 |
|
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
104 |
try (InputStream propStr = PackerImpl.class.getResourceAsStream(propFile)) { |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
105 |
if (propStr == null) { |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
106 |
throw new RuntimeException(propFile + " cannot be loaded"); |
2 | 107 |
} |
8803
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
108 |
props.load(propStr); |
2 | 109 |
} catch (IOException ee) { |
110 |
throw new RuntimeException(ee); |
|
8803
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
111 |
} |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
112 |
|
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
113 |
for (Map.Entry<Object, Object> e : props.entrySet()) { |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
114 |
String key = (String) e.getKey(); |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
115 |
String val = (String) e.getValue(); |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
116 |
if (key.startsWith("attribute.")) { |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
117 |
e.setValue(Attribute.normalizeLayoutString(val)); |
b3f57bfca459
7022382: convert pack200 library code to use try-with-resources
smarks
parents:
7795
diff
changeset
|
118 |
} |
2 | 119 |
} |
120 |
||
10115 | 121 |
@SuppressWarnings({"unchecked", "rawtypes"}) |
122 |
HashMap<String, String> temp = new HashMap(props); // shrink to fit |
|
123 |
defaultProps = temp; |
|
2 | 124 |
} |
125 |
||
126 |
PropMap() { |
|
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
127 |
theMap.putAll(defaultProps); |
2 | 128 |
} |
129 |
||
130 |
// Return a view of this map which includes only properties |
|
131 |
// that begin with the given prefix. This is easy because |
|
132 |
// the map is sorted, and has a subMap accessor. |
|
10115 | 133 |
SortedMap<String, String> prefixMap(String prefix) { |
2 | 134 |
int len = prefix.length(); |
135 |
if (len == 0) |
|
136 |
return this; |
|
137 |
char nextch = (char)(prefix.charAt(len-1) + 1); |
|
138 |
String limit = prefix.substring(0, len-1)+nextch; |
|
139 |
//System.out.println(prefix+" => "+subMap(prefix, limit)); |
|
140 |
return subMap(prefix, limit); |
|
141 |
} |
|
142 |
||
143 |
String getProperty(String s) { |
|
10115 | 144 |
return get(s); |
2 | 145 |
} |
146 |
String getProperty(String s, String defaultVal) { |
|
147 |
String val = getProperty(s); |
|
148 |
if (val == null) |
|
149 |
return defaultVal; |
|
150 |
return val; |
|
151 |
} |
|
152 |
String setProperty(String s, String val) { |
|
10115 | 153 |
return put(s, val); |
2 | 154 |
} |
155 |
||
156 |
// Get sequence of props for "prefix", and "prefix.*". |
|
10115 | 157 |
List<String> getProperties(String prefix) { |
158 |
Collection<String> values = prefixMap(prefix).values(); |
|
159 |
List<String> res = new ArrayList<>(values.size()); |
|
2 | 160 |
res.addAll(values); |
161 |
while (res.remove(null)); |
|
162 |
return res; |
|
163 |
} |
|
164 |
||
165 |
private boolean toBoolean(String val) { |
|
166 |
return Boolean.valueOf(val).booleanValue(); |
|
167 |
} |
|
168 |
boolean getBoolean(String s) { |
|
169 |
return toBoolean(getProperty(s)); |
|
170 |
} |
|
171 |
boolean setBoolean(String s, boolean val) { |
|
172 |
return toBoolean(setProperty(s, String.valueOf(val))); |
|
173 |
} |
|
174 |
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
|
175 |
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
|
176 |
} |
0a5f341c2a28
7168401: pack200 does not produce a compatible pack file for JDK7 classes if indy is not present
ksrini
parents:
10115
diff
changeset
|
177 |
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
|
178 |
if (val == null) return def; |
2 | 179 |
if (Pack200.Packer.TRUE.equals(val)) return 1; |
180 |
if (Pack200.Packer.FALSE.equals(val)) return 0; |
|
181 |
return Integer.parseInt(val); |
|
182 |
} |
|
12857
0a5f341c2a28
7168401: pack200 does not produce a compatible pack file for JDK7 classes if indy is not present
ksrini
parents:
10115
diff
changeset
|
183 |
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
|
184 |
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
|
185 |
} |
2 | 186 |
int getInteger(String s) { |
187 |
return toInteger(getProperty(s)); |
|
188 |
} |
|
189 |
int setInteger(String s, int val) { |
|
190 |
return toInteger(setProperty(s, String.valueOf(val))); |
|
191 |
} |
|
192 |
||
193 |
long toLong(String val) { |
|
194 |
try { |
|
195 |
return val == null ? 0 : Long.parseLong(val); |
|
196 |
} catch (java.lang.NumberFormatException nfe) { |
|
197 |
throw new IllegalArgumentException("Invalid value"); |
|
198 |
} |
|
199 |
} |
|
200 |
long getLong(String s) { |
|
201 |
return toLong(getProperty(s)); |
|
202 |
} |
|
203 |
long setLong(String s, long val) { |
|
204 |
return toLong(setProperty(s, String.valueOf(val))); |
|
205 |
} |
|
206 |
||
207 |
int getTime(String s) { |
|
208 |
String sval = getProperty(s, "0"); |
|
209 |
if (Utils.NOW.equals(sval)) { |
|
210 |
return (int)((System.currentTimeMillis()+500)/1000); |
|
211 |
} |
|
212 |
long lval = toLong(sval); |
|
213 |
final long recentSecondCount = 1000000000; |
|
214 |
||
215 |
if (lval < recentSecondCount*10 && !"0".equals(sval)) |
|
216 |
Utils.log.warning("Supplied modtime appears to be seconds rather than milliseconds: "+sval); |
|
217 |
||
218 |
return (int)((lval+500)/1000); |
|
219 |
} |
|
220 |
||
221 |
void list(PrintStream out) { |
|
222 |
PrintWriter outw = new PrintWriter(out); |
|
223 |
list(outw); |
|
224 |
outw.flush(); |
|
225 |
} |
|
226 |
void list(PrintWriter out) { |
|
227 |
out.println("#"+Utils.PACK_ZIP_ARCHIVE_MARKER_COMMENT+"["); |
|
10115 | 228 |
Set<Map.Entry<String, String>> defaults = defaultProps.entrySet(); |
229 |
for (Map.Entry<String, String> e : theMap.entrySet()) { |
|
2 | 230 |
if (defaults.contains(e)) continue; |
231 |
out.println(" " + e.getKey() + " = " + e.getValue()); |
|
232 |
} |
|
233 |
out.println("#]"); |
|
234 |
} |
|
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
235 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
236 |
@Override |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
237 |
public int size() { |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
238 |
return theMap.size(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
239 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
240 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
241 |
@Override |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
242 |
public boolean isEmpty() { |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
243 |
return theMap.isEmpty(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
244 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
245 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
246 |
@Override |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
247 |
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
|
248 |
return theMap.containsKey(key); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
249 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
250 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
251 |
@Override |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
252 |
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
|
253 |
return theMap.containsValue(value); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
254 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
255 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
256 |
@Override |
10115 | 257 |
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
|
258 |
return theMap.get(key); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
259 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
260 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
261 |
@Override |
10115 | 262 |
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
|
263 |
return theMap.remove(key); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
264 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
265 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
266 |
@Override |
10115 | 267 |
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
|
268 |
theMap.putAll(m); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
269 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
270 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
271 |
@Override |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
272 |
public void clear() { |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
273 |
theMap.clear(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
274 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
275 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
276 |
@Override |
10115 | 277 |
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
|
278 |
return theMap.keySet(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
279 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
280 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
281 |
@Override |
10115 | 282 |
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
|
283 |
return theMap.values(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
284 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
285 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
286 |
@Override |
10115 | 287 |
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
|
288 |
return theMap.entrySet(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
289 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
290 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
291 |
@Override |
10115 | 292 |
public Comparator<? super String> comparator() { |
293 |
return theMap.comparator(); |
|
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
294 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
295 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
296 |
@Override |
10115 | 297 |
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
|
298 |
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
|
299 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
300 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
301 |
@Override |
10115 | 302 |
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
|
303 |
return theMap.headMap(toKey); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
304 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
305 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
306 |
@Override |
10115 | 307 |
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
|
308 |
return theMap.tailMap(fromKey); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
309 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
310 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
311 |
@Override |
10115 | 312 |
public String firstKey() { |
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
313 |
return theMap.firstKey(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
314 |
} |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
315 |
|
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
316 |
@Override |
10115 | 317 |
public String lastKey() { |
7795
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
318 |
return theMap.lastKey(); |
98021fc612af
6990106: FindBugs scan - Malicious code vulnerability Warnings in com.sun.java.util.jar.pack.*
ksrini
parents:
7192
diff
changeset
|
319 |
} |
2 | 320 |
} |