View | Details | Raw Unified | Return to bug 59748
Collapse All | Expand All

(-)a/src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java (-2 / +2 lines)
Lines 18-24 package org.apache.poi.hssf.eventusermodel; Link Here
18
18
19
import java.text.NumberFormat;
19
import java.text.NumberFormat;
20
import java.util.ArrayList;
20
import java.util.ArrayList;
21
import java.util.Hashtable;
21
import java.util.HashMap;
22
import java.util.List;
22
import java.util.List;
23
import java.util.Locale;
23
import java.util.Locale;
24
import java.util.Map;
24
import java.util.Map;
Lines 45-51 public class FormatTrackingHSSFListener implements HSSFListener { Link Here
45
	private final HSSFListener _childListener;
45
	private final HSSFListener _childListener;
46
	private final HSSFDataFormatter _formatter;
46
	private final HSSFDataFormatter _formatter;
47
	private final NumberFormat _defaultFormat;
47
	private final NumberFormat _defaultFormat;
48
	private final Map<Integer, FormatRecord> _customFormatRecords = new Hashtable<Integer, FormatRecord>();
48
	private final Map<Integer, FormatRecord> _customFormatRecords = new HashMap<Integer, FormatRecord>();
49
	private final List<ExtendedFormatRecord> _xfRecords = new ArrayList<ExtendedFormatRecord>();
49
	private final List<ExtendedFormatRecord> _xfRecords = new ArrayList<ExtendedFormatRecord>();
50
50
51
	/**
51
	/**
(-)a/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java (-5 / +4 lines)
Lines 33-41 import java.util.ArrayList; Link Here
33
import java.util.Arrays;
33
import java.util.Arrays;
34
import java.util.Collection;
34
import java.util.Collection;
35
import java.util.Collections;
35
import java.util.Collections;
36
import java.util.HashMap;
37
import java.util.HashSet;
36
import java.util.HashSet;
38
import java.util.Hashtable;
37
import java.util.HashMap;
39
import java.util.Iterator;
38
import java.util.Iterator;
40
import java.util.List;
39
import java.util.List;
41
import java.util.Map;
40
import java.util.Map;
Lines 155-161 public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss Link Here
155
     * this holds the HSSFFont objects attached to this workbook.
154
     * this holds the HSSFFont objects attached to this workbook.
156
     * We only create these from the low level records as required.
155
     * We only create these from the low level records as required.
157
     */
156
     */
158
    private Hashtable<Short,HSSFFont> fonts;
157
    private Map<Short,HSSFFont> fonts;
159
158
160
    /**
159
    /**
161
     * holds whether or not to preserve other nodes in the POIFS.  Used
160
     * holds whether or not to preserve other nodes in the POIFS.  Used
Lines 1204-1210 public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss Link Here
1204
     */
1203
     */
1205
    @Override
1204
    @Override
1206
    public HSSFFont getFontAt(short idx) {
1205
    public HSSFFont getFontAt(short idx) {
1207
        if(fonts == null) fonts = new Hashtable<Short, HSSFFont>();
1206
        if(fonts == null) fonts = new HashMap<Short, HSSFFont>();
1208
1207
1209
        // So we don't confuse users, give them back
1208
        // So we don't confuse users, give them back
1210
        //  the same object every time, but create
1209
        //  the same object every time, but create
Lines 1228-1234 public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss Link Here
1228
     *  and that's not something you should normally do
1227
     *  and that's not something you should normally do
1229
     */
1228
     */
1230
    protected void resetFontCache() {
1229
    protected void resetFontCache() {
1231
        fonts = new Hashtable<Short, HSSFFont>();
1230
        fonts = new HashMap<Short, HSSFFont>();
1232
    }
1231
    }
1233
1232
1234
    /**
1233
    /**
(-)a/src/java/org/apache/poi/hssf/util/HSSFColor.java (-10 / +10 lines)
Lines 19-25 package org.apache.poi.hssf.util; Link Here
19
19
20
import java.lang.reflect.Field;
20
import java.lang.reflect.Field;
21
import java.util.Collections;
21
import java.util.Collections;
22
import java.util.Hashtable;
22
import java.util.HashMap;
23
import java.util.Map;
23
import java.util.Map;
24
24
25
import org.apache.poi.ss.usermodel.Color;
25
import org.apache.poi.ss.usermodel.Color;
Lines 57-74 public class HSSFColor implements Color { Link Here
57
        return indexHash;
57
        return indexHash;
58
    }
58
    }
59
    /**
59
    /**
60
     * This function returns all the Colours, stored in a Hashtable that
60
     * This function returns all the Colours, stored in a Map that
61
     *  can be edited. No caching is performed. If you don't need to edit
61
     *  can be edited. No caching is performed. If you don't need to edit
62
     *  the table, then call {@link #getIndexHash()} which returns a
62
     *  the table, then call {@link #getIndexHash()} which returns a
63
     *  statically cached imuatable map of colours.
63
     *  statically cached imuatable map of colours.
64
     */
64
     */
65
    public final static Hashtable<Integer,HSSFColor> getMutableIndexHash() {
65
    public final static Map<Integer,HSSFColor> getMutableIndexHash() {
66
       return createColorsByIndexMap();
66
       return createColorsByIndexMap();
67
    }
67
    }
68
68
69
    private static Hashtable<Integer,HSSFColor> createColorsByIndexMap() {
69
    private static Map<Integer,HSSFColor> createColorsByIndexMap() {
70
        HSSFColor[] colors = getAllColors();
70
        HSSFColor[] colors = getAllColors();
71
        Hashtable<Integer,HSSFColor> result = new Hashtable<Integer,HSSFColor>(colors.length * 3 / 2);
71
        Map<Integer,HSSFColor> result = new HashMap<Integer,HSSFColor>(colors.length * 3 / 2);
72
72
73
        for (int i = 0; i < colors.length; i++) {
73
        for (int i = 0; i < colors.length; i++) {
74
            HSSFColor color = colors[i];
74
            HSSFColor color = colors[i];
Lines 148-163 public class HSSFColor implements Color { Link Here
148
     * it takes to create it once per request but you will not hold onto it
148
     * it takes to create it once per request but you will not hold onto it
149
     * if you have none of those requests.
149
     * if you have none of those requests.
150
     *
150
     *
151
     * @return a hashtable containing all colors keyed by String gnumeric-like triplets
151
     * @return a Map containing all colors keyed by String gnumeric-like triplets
152
     */
152
     */
153
    public final static Hashtable<String,HSSFColor> getTripletHash()
153
    public final static Map<String,HSSFColor> getTripletHash()
154
    {
154
    {
155
        return createColorsByHexStringMap();
155
        return createColorsByHexStringMap();
156
    }
156
    }
157
157
158
    private static Hashtable<String,HSSFColor> createColorsByHexStringMap() {
158
    private static Map<String,HSSFColor> createColorsByHexStringMap() {
159
        HSSFColor[] colors = getAllColors();
159
        HSSFColor[] colors = getAllColors();
160
        Hashtable<String,HSSFColor> result = new Hashtable<String,HSSFColor>(colors.length * 3 / 2);
160
        Map<String,HSSFColor> result = new HashMap<String,HSSFColor>(colors.length * 3 / 2);
161
161
162
        for (int i = 0; i < colors.length; i++) {
162
        for (int i = 0; i < colors.length; i++) {
163
            HSSFColor color = colors[i];
163
            HSSFColor color = colors[i];
Lines 1683-1689 public class HSSFColor implements Color { Link Here
1683
1683
1684
    /**
1684
    /**
1685
     * Special Default/Normal/Automatic color.
1685
     * Special Default/Normal/Automatic color.
1686
     * <p><i>Note:</i> This class is NOT in the default HashTables returned by HSSFColor.
1686
     * <p><i>Note:</i> This class is NOT in the default Map returned by HSSFColor.
1687
     * The index is a special case which is interpreted in the various setXXXColor calls.
1687
     * The index is a special case which is interpreted in the various setXXXColor calls.
1688
     *
1688
     *
1689
     * @author Jason
1689
     * @author Jason
(-)a/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java (-3 / +3 lines)
Lines 30-36 import java.net.URISyntaxException; Link Here
30
import java.util.ArrayList;
30
import java.util.ArrayList;
31
import java.util.Collections;
31
import java.util.Collections;
32
import java.util.Date;
32
import java.util.Date;
33
import java.util.Hashtable;
33
import java.util.HashMap;
34
import java.util.List;
34
import java.util.List;
35
import java.util.Map;
35
import java.util.Map;
36
import java.util.concurrent.locks.ReentrantReadWriteLock;
36
import java.util.concurrent.locks.ReentrantReadWriteLock;
Lines 145-152 public abstract class OPCPackage implements RelationshipSource, Closeable { Link Here
145
	 * Initialize the package instance.
145
	 * Initialize the package instance.
146
	 */
146
	 */
147
	private void init() {
147
	private void init() {
148
		this.partMarshallers = new Hashtable<ContentType, PartMarshaller>(5);
148
		this.partMarshallers = new HashMap<ContentType, PartMarshaller>(5);
149
		this.partUnmarshallers = new Hashtable<ContentType, PartUnmarshaller>(2);
149
		this.partUnmarshallers = new HashMap<ContentType, PartUnmarshaller>(2);
150
150
151
		try {
151
		try {
152
			// Add 'default' unmarshaller
152
			// Add 'default' unmarshaller
(-)a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentType.java (-3 / +3 lines)
Lines 17-23 Link Here
17
17
18
package org.apache.poi.openxml4j.opc.internal;
18
package org.apache.poi.openxml4j.opc.internal;
19
19
20
import java.util.Hashtable;
20
import java.util.LinkedHashMap;
21
import java.util.Map;
21
import java.util.Map;
22
import java.util.regex.Matcher;
22
import java.util.regex.Matcher;
23
import java.util.regex.Pattern;
23
import java.util.regex.Pattern;
Lines 63-69 public final class ContentType { Link Here
63
	/**
63
	/**
64
	 * Parameters
64
	 * Parameters
65
	 */
65
	 */
66
	private Hashtable<String, String> parameters;
66
	private Map<String, String> parameters;
67
67
68
	/**
68
	/**
69
	 * Media type compiled pattern, without parameters
69
	 * Media type compiled pattern, without parameters
Lines 160-166 public final class ContentType { Link Here
160
			this.subType = mMediaType.group(2);
160
			this.subType = mMediaType.group(2);
161
161
162
			// Parameters
162
			// Parameters
163
			this.parameters = new Hashtable<String, String>(1);
163
			this.parameters = new LinkedHashMap<String, String>();
164
			// Java RegExps are unhelpful, and won't do multiple group captures
164
			// Java RegExps are unhelpful, and won't do multiple group captures
165
			// See http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html#cg
165
			// See http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html#cg
166
			if (mMediaType.groupCount() >= 5) {
166
			if (mMediaType.groupCount() >= 5) {
(-)a/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java (-3 / +3 lines)
Lines 22-28 import java.io.IOException; Link Here
22
import java.io.InputStream;
22
import java.io.InputStream;
23
import java.io.InputStreamReader;
23
import java.io.InputStreamReader;
24
import java.util.ArrayList;
24
import java.util.ArrayList;
25
import java.util.Hashtable;
25
import java.util.HashMap;
26
import java.util.Map;
26
import java.util.Map;
27
import java.util.StringTokenizer;
27
import java.util.StringTokenizer;
28
28
Lines 44-50 public final class ChunkFactory { Link Here
44
	 * Key is a Chunk's type, value is an array of its CommandDefinitions
44
	 * Key is a Chunk's type, value is an array of its CommandDefinitions
45
	 */
45
	 */
46
	private final Map<Integer, CommandDefinition[]> chunkCommandDefinitions = 
46
	private final Map<Integer, CommandDefinition[]> chunkCommandDefinitions = 
47
	      new Hashtable<Integer, CommandDefinition[]>();
47
	      new HashMap<Integer, CommandDefinition[]>();
48
	/**
48
	/**
49
	 * What the name is of the chunk table definitions file?
49
	 * What the name is of the chunk table definitions file?
50
	 * This file comes from the scratchpad resources directory.
50
	 * This file comes from the scratchpad resources directory.
Lines 105-111 public final class ChunkFactory { Link Here
105
    
105
    
106
    			CommandDefinition[] defs = defsL.toArray(new CommandDefinition[defsL.size()]);
106
    			CommandDefinition[] defs = defsL.toArray(new CommandDefinition[defsL.size()]);
107
    
107
    
108
    			// Add to the hashtable
108
    			// Add to the map
109
    			chunkCommandDefinitions.put(Integer.valueOf(chunkType), defs);
109
    			chunkCommandDefinitions.put(Integer.valueOf(chunkType), defs);
110
    		}
110
    		}
111
		} finally {
111
		} finally {
(-)a/src/scratchpad/src/org/apache/poi/hslf/record/DocumentEncryptionAtom.java (-2 / +2 lines)
Lines 20-26 package org.apache.poi.hslf.record; Link Here
20
import java.io.ByteArrayInputStream;
20
import java.io.ByteArrayInputStream;
21
import java.io.IOException;
21
import java.io.IOException;
22
import java.io.OutputStream;
22
import java.io.OutputStream;
23
import java.util.Hashtable;
23
import java.util.Map;
24
24
25
import org.apache.poi.poifs.crypt.CipherAlgorithm;
25
import org.apache.poi.poifs.crypt.CipherAlgorithm;
26
import org.apache.poi.poifs.crypt.EncryptionInfo;
26
import org.apache.poi.poifs.crypt.EncryptionInfo;
Lines 123-129 public final class DocumentEncryptionAtom extends PositionDependentRecordAtom { Link Here
123
		out.write(data, 0, bos.getWriteIndex());
123
		out.write(data, 0, bos.getWriteIndex());
124
	}
124
	}
125
125
126
    public void updateOtherRecordReferences(Hashtable<Integer,Integer> oldToNewReferencesLookup) {
126
    public void updateOtherRecordReferences(Map<Integer,Integer> oldToNewReferencesLookup) {
127
        
127
        
128
    }
128
    }
129
}
129
}
(-)a/src/scratchpad/src/org/apache/poi/hslf/record/ExOleObjStg.java (-2 / +2 lines)
Lines 22-28 import java.io.ByteArrayOutputStream; Link Here
22
import java.io.IOException;
22
import java.io.IOException;
23
import java.io.InputStream;
23
import java.io.InputStream;
24
import java.io.OutputStream;
24
import java.io.OutputStream;
25
import java.util.Hashtable;
25
import java.util.Map;
26
import java.util.zip.DeflaterOutputStream;
26
import java.util.zip.DeflaterOutputStream;
27
import java.util.zip.InflaterInputStream;
27
import java.util.zip.InflaterInputStream;
28
28
Lines 184-190 public class ExOleObjStg extends RecordAtom implements PositionDependentRecord, Link Here
184
        myLastOnDiskOffset = offset;
184
        myLastOnDiskOffset = offset;
185
    }
185
    }
186
186
187
    public void updateOtherRecordReferences(Hashtable<Integer,Integer> oldToNewReferencesLookup) {
187
    public void updateOtherRecordReferences(Map<Integer,Integer> oldToNewReferencesLookup) {
188
        return;
188
        return;
189
    }
189
    }
190
190
(-)a/src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java (-6 / +6 lines)
Lines 20-26 package org.apache.poi.hslf.record; Link Here
20
import java.io.ByteArrayOutputStream;
20
import java.io.ByteArrayOutputStream;
21
import java.io.IOException;
21
import java.io.IOException;
22
import java.io.OutputStream;
22
import java.io.OutputStream;
23
import java.util.Hashtable;
23
import java.util.HashMap;
24
import java.util.Map;
24
import java.util.Map;
25
import java.util.TreeMap;
25
import java.util.TreeMap;
26
26
Lines 52-58 public final class PersistPtrHolder extends PositionDependentRecordAtom Link Here
52
	 * You always need to check the most recent PersistPtrHolder
52
	 * You always need to check the most recent PersistPtrHolder
53
	 *  that knows about a given slide to find the right location
53
	 *  that knows about a given slide to find the right location
54
	 */
54
	 */
55
	private Hashtable<Integer,Integer> _slideLocations;
55
	private Map<Integer,Integer> _slideLocations;
56
56
57
	private static final BitField persistIdFld = new BitField(0X000FFFFF);
57
	private static final BitField persistIdFld = new BitField(0X000FFFFF);
58
	private static final BitField cntPersistFld  = new BitField(0XFFF00000);
58
	private static final BitField cntPersistFld  = new BitField(0XFFF00000);
Lines 64-70 public final class PersistPtrHolder extends PositionDependentRecordAtom Link Here
64
64
65
	/**
65
	/**
66
	 * Get the list of slides that this PersistPtrHolder knows about.
66
	 * Get the list of slides that this PersistPtrHolder knows about.
67
	 * (They will be the keys in the hashtable for looking up the positions
67
	 * (They will be the keys in the map for looking up the positions
68
	 *  of these slides)
68
	 *  of these slides)
69
	 */
69
	 */
70
	public int[] getKnownSlideIDs() {
70
	public int[] getKnownSlideIDs() {
Lines 80-86 public final class PersistPtrHolder extends PositionDependentRecordAtom Link Here
80
	 * Get the lookup from slide numbers to byte offsets, for the slides
80
	 * Get the lookup from slide numbers to byte offsets, for the slides
81
	 *  known about by this PersistPtrHolder.
81
	 *  known about by this PersistPtrHolder.
82
	 */
82
	 */
83
	public Hashtable<Integer,Integer> getSlideLocationsLookup() {
83
	public Map<Integer,Integer> getSlideLocationsLookup() {
84
		return _slideLocations;
84
		return _slideLocations;
85
	}
85
	}
86
	
86
	
Lines 104-110 public final class PersistPtrHolder extends PositionDependentRecordAtom Link Here
104
		//      base number for these entries
104
		//      base number for these entries
105
		//   count * 32 bit offsets
105
		//   count * 32 bit offsets
106
		// Repeat as many times as you have data
106
		// Repeat as many times as you have data
107
		_slideLocations = new Hashtable<Integer,Integer>();
107
		_slideLocations = new HashMap<Integer,Integer>();
108
		_ptrData = new byte[len-8];
108
		_ptrData = new byte[len-8];
109
		System.arraycopy(source,start+8,_ptrData,0,_ptrData.length);
109
		System.arraycopy(source,start+8,_ptrData,0,_ptrData.length);
110
110
Lines 157-163 public final class PersistPtrHolder extends PositionDependentRecordAtom Link Here
157
	 * At write-out time, update the references to the sheets to their
157
	 * At write-out time, update the references to the sheets to their
158
	 *  new positions
158
	 *  new positions
159
	 */
159
	 */
160
	public void updateOtherRecordReferences(Hashtable<Integer,Integer> oldToNewReferencesLookup) {
160
	public void updateOtherRecordReferences(Map<Integer,Integer> oldToNewReferencesLookup) {
161
		// Loop over all the slides we know about
161
		// Loop over all the slides we know about
162
		// Find where they used to live, and where they now live
162
		// Find where they used to live, and where they now live
163
	    for (Map.Entry<Integer,Integer> me : _slideLocations.entrySet()) {
163
	    for (Map.Entry<Integer,Integer> me : _slideLocations.entrySet()) {
(-)a/src/scratchpad/src/org/apache/poi/hslf/record/PositionDependentRecord.java (-2 / +2 lines)
Lines 16-22 Link Here
16
==================================================================== */
16
==================================================================== */
17
17
18
package org.apache.poi.hslf.record;
18
package org.apache.poi.hslf.record;
19
import java.util.Hashtable;
19
import java.util.Map;
20
20
21
/**
21
/**
22
 * Records which either care about where they are on disk, or have other
22
 * Records which either care about where they are on disk, or have other
Lines 47-51 public interface PositionDependentRecord Link Here
47
	 * Offer the record the list of records that have changed their
47
	 * Offer the record the list of records that have changed their
48
	 *  location as part of the writeout.
48
	 *  location as part of the writeout.
49
	 */
49
	 */
50
	public void updateOtherRecordReferences(Hashtable<Integer,Integer> oldToNewReferencesLookup);
50
	public void updateOtherRecordReferences(Map<Integer,Integer> oldToNewReferencesLookup);
51
}
51
}
(-)a/src/scratchpad/src/org/apache/poi/hslf/record/PositionDependentRecordAtom.java (-2 / +2 lines)
Lines 16-22 Link Here
16
==================================================================== */
16
==================================================================== */
17
17
18
package org.apache.poi.hslf.record;
18
package org.apache.poi.hslf.record;
19
import java.util.Hashtable;
19
import java.util.Map;
20
20
21
/**
21
/**
22
 * A special (and dangerous) kind of Record Atom that cares about where
22
 * A special (and dangerous) kind of Record Atom that cares about where
Lines 48-52 public abstract class PositionDependentRecordAtom extends RecordAtom implements Link Here
48
	 * Allows records to update their internal pointers to other records
48
	 * Allows records to update their internal pointers to other records
49
	 *  locations
49
	 *  locations
50
	 */
50
	 */
51
	public abstract void updateOtherRecordReferences(Hashtable<Integer,Integer> oldToNewReferencesLookup);
51
	public abstract void updateOtherRecordReferences(Map<Integer,Integer> oldToNewReferencesLookup);
52
}
52
}
(-)a/src/scratchpad/src/org/apache/poi/hslf/record/PositionDependentRecordContainer.java (-2 / +2 lines)
Lines 16-22 Link Here
16
==================================================================== */
16
==================================================================== */
17
17
18
package org.apache.poi.hslf.record;
18
package org.apache.poi.hslf.record;
19
import java.util.Hashtable;
19
import java.util.Map;
20
20
21
/**
21
/**
22
 * A special (and dangerous) kind of Record Container, for which other
22
 * A special (and dangerous) kind of Record Container, for which other
Lines 60-66 public abstract class PositionDependentRecordContainer extends RecordContainer i Link Here
60
	 * Since we're a container, we don't mind if other records move about.
60
	 * Since we're a container, we don't mind if other records move about.
61
	 * If we're told they have, just return straight off.
61
	 * If we're told they have, just return straight off.
62
	 */
62
	 */
63
	public void updateOtherRecordReferences(Hashtable<Integer,Integer> oldToNewReferencesLookup) {
63
	public void updateOtherRecordReferences(Map<Integer,Integer> oldToNewReferencesLookup) {
64
		return;
64
		return;
65
	}
65
	}
66
}
66
}
(-)a/src/scratchpad/src/org/apache/poi/hslf/record/UserEditAtom.java (-2 / +2 lines)
Lines 22-28 import org.apache.poi.util.LittleEndianConsts; Link Here
22
22
23
import java.io.IOException;
23
import java.io.IOException;
24
import java.io.OutputStream;
24
import java.io.OutputStream;
25
import java.util.Hashtable;
25
import java.util.Map;
26
26
27
/**
27
/**
28
 * A UserEdit Atom (type 4085). Holds information which bits of the file
28
 * A UserEdit Atom (type 4085). Holds information which bits of the file
Lines 146-152 public final class UserEditAtom extends PositionDependentRecordAtom Link Here
146
	 * At write-out time, update the references to PersistPtrs and
146
	 * At write-out time, update the references to PersistPtrs and
147
	 *  other UserEditAtoms to point to their new positions
147
	 *  other UserEditAtoms to point to their new positions
148
	 */
148
	 */
149
	public void updateOtherRecordReferences(Hashtable<Integer,Integer> oldToNewReferencesLookup) {
149
	public void updateOtherRecordReferences(Map<Integer,Integer> oldToNewReferencesLookup) {
150
		// Look up the new positions of our preceding UserEditAtomOffset
150
		// Look up the new positions of our preceding UserEditAtomOffset
151
		if(lastUserEditAtomOffset != 0) {
151
		if(lastUserEditAtomOffset != 0) {
152
			Integer newLocation = oldToNewReferencesLookup.get(Integer.valueOf(lastUserEditAtomOffset));
152
			Integer newLocation = oldToNewReferencesLookup.get(Integer.valueOf(lastUserEditAtomOffset));
(-)a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java (-2 / +2 lines)
Lines 28-34 import java.security.GeneralSecurityException; Link Here
28
import java.util.ArrayList;
28
import java.util.ArrayList;
29
import java.util.Collections;
29
import java.util.Collections;
30
import java.util.HashMap;
30
import java.util.HashMap;
31
import java.util.Hashtable;
31
import java.util.Map;
32
import java.util.List;
32
import java.util.List;
33
import java.util.Map;
33
import java.util.Map;
34
import java.util.NavigableMap;
34
import java.util.NavigableMap;
Lines 464-470 public final class HSLFSlideShowImpl extends POIDocument implements Closeable { Link Here
464
        // For position dependent records, hold where they were and now are
464
        // For position dependent records, hold where they were and now are
465
        // As we go along, update, and hand over, to any Position Dependent
465
        // As we go along, update, and hand over, to any Position Dependent
466
        //  records we happen across
466
        //  records we happen across
467
        Hashtable<Integer,Integer> oldToNewPositions = new Hashtable<Integer,Integer>();
467
        Map<Integer,Integer> oldToNewPositions = new HashMap<Integer,Integer>();
468
468
469
        // First pass - figure out where all the position dependent
469
        // First pass - figure out where all the position dependent
470
        //   records are going to end up, in the new scheme
470
        //   records are going to end up, in the new scheme
(-)a/src/scratchpad/testcases/org/apache/poi/hslf/TestReWriteSanity.java (-2 / +2 lines)
Lines 60-67 public final class TestReWriteSanity extends TestCase { Link Here
60
		// Find the location of the PersistPtrIncrementalBlocks and
60
		// Find the location of the PersistPtrIncrementalBlocks and
61
		// UserEditAtoms
61
		// UserEditAtoms
62
		Record[] r = wss.getRecords();
62
		Record[] r = wss.getRecords();
63
		Map<Integer,Record> pp = new Hashtable<Integer,Record>();
63
		Map<Integer,Record> pp = new HashMap<Integer,Record>();
64
		Map<Integer,Object> ue = new Hashtable<Integer,Object>();
64
		Map<Integer,Object> ue = new HashMap<Integer,Object>();
65
		ue.put(Integer.valueOf(0),Integer.valueOf(0)); // Will show 0 if first
65
		ue.put(Integer.valueOf(0),Integer.valueOf(0)); // Will show 0 if first
66
		int pos = 0;
66
		int pos = 0;
67
		int lastUEPos = -1;
67
		int lastUEPos = -1;
(-)a/src/testcases/org/apache/poi/hssf/util/TestHSSFColor.java (-2 / +2 lines)
Lines 17-23 Link Here
17
17
18
package org.apache.poi.hssf.util;
18
package org.apache.poi.hssf.util;
19
19
20
import java.util.Hashtable;
20
import java.util.Map;
21
21
22
import junit.framework.TestCase;
22
import junit.framework.TestCase;
23
/**
23
/**
Lines 40-46 public final class TestHSSFColor extends TestCase { Link Here
40
	}
40
	}
41
	
41
	
42
	public void testTrippletHash() {
42
	public void testTrippletHash() {
43
		Hashtable tripplets = HSSFColor.getTripletHash();
43
		Map tripplets = HSSFColor.getTripletHash();
44
		
44
		
45
		assertEquals(
45
		assertEquals(
46
				HSSFColor.MAROON.class,
46
				HSSFColor.MAROON.class,

Return to bug 59748