File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/com/yahoo/platform/yui/compressor Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 8
8
*/
9
9
package com .yahoo .platform .yui .compressor ;
10
10
11
- import java .util .ArrayList ;
12
- import java .util .Enumeration ;
13
- import java .util .Hashtable ;
11
+ import java .util .*;
14
12
15
13
class ScriptOrFnScope {
16
14
@@ -124,7 +122,7 @@ void munge() {
124
122
// Do not munge symbols in the global scope!
125
123
if (parentScope != null ) {
126
124
127
- ArrayList freeSymbols = new ArrayList ();
125
+ LinkedHashSet freeSymbols = new LinkedHashSet ();
128
126
129
127
freeSymbols .addAll (JavaScriptCompressor .ones );
130
128
freeSymbols .removeAll (getAllUsedSymbols ());
@@ -163,7 +161,9 @@ void munge() {
163
161
String mungedValue ;
164
162
JavaScriptIdentifier identifier = (JavaScriptIdentifier ) elements .nextElement ();
165
163
if (identifier .isMarkedForMunging ()) {
166
- mungedValue = (String ) freeSymbols .remove (0 );
164
+ Iterator freeSymIt = freeSymbols .iterator ();
165
+ mungedValue = (String ) freeSymIt .next ();
166
+ freeSymIt .remove ();
167
167
} else {
168
168
mungedValue = identifier .getValue ();
169
169
}
You can’t perform that action at this time.
0 commit comments