Ignore:
Timestamp:
2014-08-06T19:33:57+02:00 (10 years ago)
Author:
donvip
Message:

[josm_opendata] add more unit tests, fix Java 7 warnings

Location:
applications/editors/josm/plugins/opendata/includes/org/j7zip/SevenZip/Archive
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/opendata/includes/org/j7zip/SevenZip/Archive/Common/BindInfo.java

    r29679 r30568  
    55
    66public class BindInfo {
    7     public RecordVector<CoderStreamsInfo> Coders = new RecordVector<CoderStreamsInfo>();
    8     public RecordVector<BindPair> BindPairs = new RecordVector<BindPair>();
     7    public RecordVector<CoderStreamsInfo> Coders = new RecordVector<>();
     8    public RecordVector<BindPair> BindPairs = new RecordVector<>();
    99    public IntVector InStreams = new IntVector();
    1010    public IntVector OutStreams = new IntVector();
  • applications/editors/josm/plugins/opendata/includes/org/j7zip/SevenZip/Archive/Common/CoderMixer2ST.java

    r29681 r30568  
    2020   
    2121    BindInfo _bindInfo = new BindInfo();
    22     ObjectVector<STCoderInfo> _coders = new ObjectVector<STCoderInfo>();
     22    ObjectVector<STCoderInfo> _coders = new ObjectVector<>();
    2323   
    2424    public CoderMixer2ST() {
     
    202202        CoderInfo mainCoder = _coders.get(_mainCoderIndex);
    203203       
    204         ObjectVector< java.io.InputStream > seqInStreams = new ObjectVector< java.io.InputStream >(); // CObjectVector< CMyComPtr<ISequentialInStream> >
    205         ObjectVector< java.io.OutputStream > seqOutStreams = new ObjectVector< java.io.OutputStream >(); // CObjectVector< CMyComPtr<ISequentialOutStream> >
     204        ObjectVector< java.io.InputStream > seqInStreams = new ObjectVector< >(); // CObjectVector< CMyComPtr<ISequentialInStream> >
     205        ObjectVector< java.io.OutputStream > seqOutStreams = new ObjectVector< >(); // CObjectVector< CMyComPtr<ISequentialOutStream> >
    206206        int startInIndex = _bindInfo.GetCoderInStreamIndex(_mainCoderIndex);
    207207        int startOutIndex = _bindInfo.GetCoderOutStreamIndex(_mainCoderIndex);
     
    220220            seqOutStreams.add(seqOutStream);
    221221        }
    222         RecordVector< java.io.InputStream > seqInStreamsSpec = new RecordVector< java.io.InputStream >();
    223         RecordVector< java.io.OutputStream > seqOutStreamsSpec = new RecordVector< java.io.OutputStream >();
     222        RecordVector< java.io.InputStream > seqInStreamsSpec = new RecordVector< >();
     223        RecordVector< java.io.OutputStream > seqOutStreamsSpec = new RecordVector< >();
    224224        for (i = 0; i < mainCoder.NumInStreams; i++)
    225225            seqInStreamsSpec.add(seqInStreams.get(i));
  • applications/editors/josm/plugins/opendata/includes/org/j7zip/SevenZip/Archive/Common/FilterCoder.java

    r29681 r30568  
    44import java.io.IOException;
    55
    6 import org.j7zip.SevenZip.HRESULT;
    76import org.j7zip.SevenZip.ICompressCoder;
    87import org.j7zip.SevenZip.ICompressSetOutStream;
  • applications/editors/josm/plugins/opendata/includes/org/j7zip/SevenZip/Archive/SevenZip/ArchiveDatabase.java

    r29679 r30568  
    1010    public BoolVector PackCRCsDefined = new BoolVector();
    1111    public IntVector PackCRCs = new IntVector();
    12     public ObjectVector<Folder> Folders = new ObjectVector<Folder>();
     12    public ObjectVector<Folder> Folders = new ObjectVector<>();
    1313    public IntVector NumUnPackStreamsVector = new IntVector();
    14     public ObjectVector<FileItem> Files = new ObjectVector<FileItem>();
     14    public ObjectVector<FileItem> Files = new ObjectVector<>();
    1515   
    1616    void Clear() {
  • applications/editors/josm/plugins/opendata/includes/org/j7zip/SevenZip/Archive/SevenZip/BindInfoEx.java

    r29679 r30568  
    77class BindInfoEx extends BindInfo {
    88   
    9     RecordVector<MethodID> CoderMethodIDs = new RecordVector<MethodID>();
     9    RecordVector<MethodID> CoderMethodIDs = new RecordVector<>();
    1010   
    1111    public void Clear() {
  • applications/editors/josm/plugins/opendata/includes/org/j7zip/SevenZip/Archive/SevenZip/CoderInfo.java

    r29679 r30568  
    77    int NumInStreams;
    88    int NumOutStreams;
    9     public ObjectVector<AltCoderInfo> AltCoders = new org.j7zip.Common.ObjectVector<AltCoderInfo>();
     9    public ObjectVector<AltCoderInfo> AltCoders = new org.j7zip.Common.ObjectVector<>();
    1010   
    1111    boolean IsSimpleCoder() { return (NumInStreams == 1) && (NumOutStreams == 1); }
  • applications/editors/josm/plugins/opendata/includes/org/j7zip/SevenZip/Archive/SevenZip/Decoder.java

    r29681 r30568  
    4545       
    4646        _mixerCoder = null;
    47         _decoders = new ObjectVector<Object>();
     47        _decoders = new ObjectVector<>();
    4848       
    4949        // #ifndef EXCLUDE_COM -- LoadMethodMap();
     
    117117       
    118118       
    119         ObjectVector<java.io.InputStream> inStreams = new ObjectVector<java.io.InputStream>(); // CObjectVector< CMyComPtr<ISequentialInStream> >
     119        ObjectVector<java.io.InputStream> inStreams = new ObjectVector<>(); // CObjectVector< CMyComPtr<ISequentialInStream> >
    120120       
    121121        LockedInStream lockedInStream = new LockedInStream();
     
    357357        if (numCoders == 0)
    358358            return 0;
    359         RecordVector<java.io.InputStream> inStreamPointers = new RecordVector<java.io.InputStream>(); // CRecordVector<ISequentialInStream *>
     359        RecordVector<java.io.InputStream> inStreamPointers = new RecordVector<>(); // CRecordVector<ISequentialInStream *>
    360360        inStreamPointers.Reserve(inStreams.size());
    361361        for (i = 0; i < inStreams.size(); i++)
    362362            inStreamPointers.add(inStreams.get(i));
    363363
    364         RecordVector<java.io.OutputStream> outStreamPointer = new RecordVector<java.io.OutputStream>();
     364        RecordVector<java.io.OutputStream> outStreamPointer = new RecordVector<>();
    365365        outStreamPointer.add(outStream);
    366366        return _mixerCoder.Code(
  • applications/editors/josm/plugins/opendata/includes/org/j7zip/SevenZip/Archive/SevenZip/Folder.java

    r29679 r30568  
    1111
    1212class Folder {
    13     public RecordVector<CoderInfo> Coders = new RecordVector<CoderInfo>();
    14     RecordVector<BindPair> BindPairs = new RecordVector<BindPair>();
     13    public RecordVector<CoderInfo> Coders = new RecordVector<>();
     14    RecordVector<BindPair> BindPairs = new RecordVector<>();
    1515    IntVector PackStreams = new IntVector();
    1616    LongVector UnPackSizes = new LongVector();
  • applications/editors/josm/plugins/opendata/includes/org/j7zip/SevenZip/Archive/SevenZip/Handler.java

    r29681 r30568  
    8484            return HRESULT.S_OK;
    8585       
    86         ObjectVector<ExtractFolderInfo> extractFolderInfoVector = new ObjectVector<ExtractFolderInfo>();
     86        ObjectVector<ExtractFolderInfo> extractFolderInfoVector = new ObjectVector<>();
    8787        for(int ii = 0; ii < numItems; ii++) {
    8888            int ref2Index = allFilesMode ? ii : indices[ii];
  • applications/editors/josm/plugins/opendata/includes/org/j7zip/SevenZip/Archive/SevenZip/InArchive.java

    r29681 r30568  
    3232   
    3333    public InArchive() {
    34         _inByteVector = new ObjectVector<InByte2>();
     34        _inByteVector = new ObjectVector<>();
    3535        _inByteBack = new InByte2();
    3636    }
     
    710710        IntVector packCRCs = new IntVector(); // CRecordVector<UInt32> packCRCs;
    711711       
    712         ObjectVector<Folder> folders = new ObjectVector<Folder>();
     712        ObjectVector<Folder> folders = new ObjectVector<>();
    713713       
    714714        IntVector numUnPackStreamsInFolders = new IntVector();
     
    823823        streamSwitch.Set(this, buffer2);
    824824       
    825         ObjectVector<ByteBuffer> dataVector = new ObjectVector<ByteBuffer>(); // CObjectVector<CByteBuffer> dataVector;
     825        ObjectVector<ByteBuffer> dataVector = new ObjectVector<>(); // CObjectVector<CByteBuffer> dataVector;
    826826       
    827827        for (;;) {
     
    863863        }
    864864       
    865         ObjectVector<ByteBuffer> dataVector = new ObjectVector<ByteBuffer>();
     865        ObjectVector<ByteBuffer> dataVector = new ObjectVector<>();
    866866       
    867867        if (type == NID.kAdditionalStreamsInfo) {
Note: See TracChangeset for help on using the changeset viewer.