Ignore:
Timestamp:
2014-10-18T23:07:52+02:00 (10 years ago)
Author:
donvip
Message:

[josm_plugins] fix Java 7 / unused code warnings

Location:
applications/editors/josm/plugins/opendata/includes/org/apache
Files:
52 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/opendata/includes/org/apache/commons/collections/iterators/AbstractEmptyIterator.java

    r28000 r30737  
    2121import org.apache.commons.collections.ResettableIterator;
    2222
    23 /** 
     23/**
    2424 * Provides an implementation of an empty iterator.
    2525 *
    2626 * @since Commons Collections 3.1
    2727 * @version $Revision: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (jeu., 10 avr. 2008) $
    28  * 
     28 *
    2929 * @author Stephen Colebourne
    3030 */
    3131abstract class AbstractEmptyIterator implements ResettableIterator {
    32  
     32
    3333    /**
    3434     * Constructor.
     
    3838    }
    3939
     40    @Override
    4041    public boolean hasNext() {
    4142        return false;
    4243    }
    4344
     45    @Override
    4446    public Object next() {
    4547        throw new NoSuchElementException("Iterator contains no elements");
     
    6264    }
    6365
    64     @SuppressWarnings("unused")
    65         public void add(Object obj) {
     66    public void add(Object obj) {
    6667        throw new UnsupportedOperationException("add() not supported for empty Iterator");
    6768    }
    6869
    69     @SuppressWarnings("unused")
    70         public void set(Object obj) {
     70    public void set(Object obj) {
    7171        throw new IllegalStateException("Iterator contains no elements");
    7272    }
    7373
     74    @Override
    7475    public void remove() {
    7576        throw new IllegalStateException("Iterator contains no elements");
     
    8485    }
    8586
    86     @SuppressWarnings("unused")
    87         public Object setValue(Object value) {
     87    public Object setValue(Object value) {
    8888        throw new IllegalStateException("Iterator contains no elements");
    8989    }
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/MutablePropertySet.java

    r28000 r30737  
    6868        /* Initialize the sections. Since property set must have at least
    6969         * one section it is added right here. */
    70         sections = new LinkedList<Section>();
     70        sections = new LinkedList<>();
    7171        sections.add(new MutableSection());
    7272    }
     
    9090        clearSections();
    9191        if (sections == null)
    92             sections = new LinkedList<Section>();
     92            sections = new LinkedList<>();
    9393        for (final Iterator<Section> i = ps.getSections().iterator(); i.hasNext();)
    9494        {
     
    182182    {
    183183        if (sections == null)
    184             sections = new LinkedList<Section>();
     184            sections = new LinkedList<>();
    185185        sections.add(section);
    186186    }
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/MutableSection.java

    r28000 r30737  
    7474        formatID = null;
    7575        offset = -1;
    76         preprops = new LinkedList<Property>();
     76        preprops = new LinkedList<>();
    7777    }
    7878
     
    124124    {
    125125        this.properties = properties;
    126         preprops = new LinkedList<Property>();
     126        preprops = new LinkedList<>();
    127127        for (int i = 0; i < properties.length; i++)
    128128            preprops.add(properties[i]);
     
    200200     * @return the section's size.
    201201     */
     202    @Override
    202203    public int getSize()
    203204    {
     
    315316        Collections.sort(preprops, new Comparator<Property>()
    316317            {
     318                @Override
    317319                public int compare(final Property p1, final Property p2)
    318320                {
     
    453455     * @return The number of properties in this section
    454456     */
     457    @Override
    455458    public int getPropertyCount()
    456459    {
     
    465468     * @return this section's properties.
    466469     */
     470    @Override
    467471    public Property[] getProperties()
    468472    {
     
    479483     * @return The property or <code>null</code> if there is no such property
    480484     */
     485    @Override
    481486    public Object getProperty(final long id)
    482487    {
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/Property.java

    r28000 r30737  
    211211        o += LittleEndian.INT_SIZE;
    212212
    213         final Map<Long, String> m = new HashMap<Long, String>((int) nrEntries, (float) 1.0);
     213        final Map<Long, String> m = new HashMap<>((int) nrEntries, (float) 1.0);
    214214
    215215        try
     
    298298     * @see Object#equals(java.lang.Object)
    299299     */
     300    @Override
    300301    public boolean equals(final Object o)
    301302    {
     
    343344     * @see Object#hashCode()
    344345     */
     346    @Override
    345347    public int hashCode()
    346348    {
     
    360362     * @see Object#toString()
    361363     */
     364    @Override
    362365    public String toString()
    363366    {
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/PropertySet.java

    r28000 r30737  
    383383         * exception and is no longer fostered by Microsoft.
    384384         */
    385         sections = new ArrayList<Section>(sectionCount);
     385        sections = new ArrayList<>(sectionCount);
    386386
    387387        /*
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/Section.java

    r28000 r30737  
    209209        /* Pass 1: Read the property list. */
    210210        int pass1Offset = o1;
    211         final List<PropertyListEntry> propertyList = new ArrayList<PropertyListEntry>(propertyCount);
     211        final List<PropertyListEntry> propertyList = new ArrayList<>(propertyCount);
    212212        PropertyListEntry ple;
    213213        for (int i = 0; i < properties.length; i++)
     
    308308         * @see Comparable#compareTo(java.lang.Object)
    309309         */
     310        @Override
    310311        public int compareTo(final PropertyListEntry o)
    311312        {
     
    319320        }
    320321
     322        @Override
    321323        public String toString()
    322324        {
     
    457459     * not
    458460     */
     461    @Override
    459462    public boolean equals(final Object o)
    460463    {
     
    550553     * @see Object#hashCode()
    551554     */
     555    @Override
    552556    public int hashCode()
    553557    {
     
    566570     * @see Object#toString()
    567571     */
     572    @Override
    568573    public String toString()
    569574    {
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/Variant.java

    r28000 r30737  
    136136    {
    137137        /* Initialize the number-to-name map: */
    138         Map<Long, Object> tm1 = new HashMap<Long, Object>();
     138        Map<Long, Object> tm1 = new HashMap<>();
    139139        tm1.put(Long.valueOf(0), "VT_EMPTY");
    140140        tm1.put(Long.valueOf(1), "VT_NULL");
     
    177177        tm1.put(Long.valueOf(71), "VT_CF");
    178178        tm1.put(Long.valueOf(72), "VT_CLSID");
    179         Map<Long, Object> tm2 = new HashMap<Long, Object>(tm1.size(), 1.0F);
     179        Map<Long, Object> tm2 = new HashMap<>(tm1.size(), 1.0F);
    180180        tm2.putAll(tm1);
    181181        numberToName = Collections.unmodifiableMap(tm2);
     
    223223        tm1.put(Long.valueOf(71), LENGTH_UNKNOWN);
    224224        tm1.put(Long.valueOf(72), LENGTH_UNKNOWN);
    225         tm2 = new HashMap<Long, Object>(tm1.size(), 1.0F);
     225        tm2 = new HashMap<>(tm1.size(), 1.0F);
    226226        tm2.putAll(tm1);
    227227    }
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hpsf/VariantSupport.java

    r28000 r30737  
    8787        {
    8888            if (unsupportedMessage == null)
    89                 unsupportedMessage = new LinkedList<Long>();
     89                unsupportedMessage = new LinkedList<>();
    9090            Long vt = Long.valueOf(ex.getVariantType());
    9191            if (!unsupportedMessage.contains(vt))
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/InternalSheet.java

    r28000 r30737  
    119119        RowRecordsAggregate rra = null;
    120120
    121         List<RecordBase> records = new ArrayList<RecordBase>(128);
     121        List<RecordBase> records = new ArrayList<>(128);
    122122        _records = records; // needed here due to calls to findFirstRecordLocBySid before we're done
    123123        int dimsloc = -1;
     
    254254    private InternalSheet() {
    255255        _mergedCellsTable = new MergedCellsTable();
    256         List<RecordBase> records = new ArrayList<RecordBase>(32);
     256        List<RecordBase> records = new ArrayList<>(32);
    257257
    258258        if (log.check( POILogger.DEBUG ))
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/InternalWorkbook.java

    r28000 r30737  
    112112        records     = new WorkbookRecordList();
    113113
    114                 boundsheets = new ArrayList<BoundSheetRecord>();
    115                 formats = new ArrayList<FormatRecord>();
    116                 hyperlinks = new ArrayList<HyperlinkRecord>();
     114                boundsheets = new ArrayList<>();
     115                formats = new ArrayList<>();
     116                hyperlinks = new ArrayList<>();
    117117                numxfs = 0;
    118118                maxformatid = -1;
    119119                uses1904datewindowing = false;
    120                 commentRecords = new LinkedHashMap<String, NameCommentRecord>();
     120                commentRecords = new LinkedHashMap<>();
    121121    }
    122122
     
    138138                    Integer.valueOf(recs.size()));
    139139        InternalWorkbook retval = new InternalWorkbook();
    140         List<Record> records = new ArrayList<Record>(recs.size() / 3);
     140        List<Record> records = new ArrayList<>(recs.size() / 3);
    141141        retval.records.setRecords(records);
    142142
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/LinkTable.java

    r28000 r30737  
    9090                public ExternalBookBlock(RecordStream rs) {
    9191                        _externalBookRecord = (SupBookRecord) rs.getNext();
    92                         List<Object> temp = new ArrayList<Object>();
     92                        List<Object> temp = new ArrayList<>();
    9393                        while(rs.peekNextClass() == ExternalNameRecord.class) {
    9494                           temp.add(rs.getNext());
     
    127127                RecordStream rs = new RecordStream(inputList, startIndex);
    128128
    129                 List<ExternalBookBlock> temp = new ArrayList<ExternalBookBlock>();
     129                List<ExternalBookBlock> temp = new ArrayList<>();
    130130                while(rs.peekNextClass() == SupBookRecord.class) {
    131131                   temp.add(new ExternalBookBlock(rs));
     
    148148                }
    149149
    150                 _definedNames = new ArrayList<NameRecord>();
     150                _definedNames = new ArrayList<>();
    151151                // collect zero or more DEFINEDNAMEs id=0x18,
    152152                //  with their comments if present
     
    171171
    172172        private static ExternSheetRecord readExtSheetRecord(RecordStream rs) {
    173                 List<ExternSheetRecord> temp = new ArrayList<ExternSheetRecord>(2);
     173                List<ExternSheetRecord> temp = new ArrayList<>(2);
    174174                while(rs.peekNextClass() == ExternSheetRecord.class) {
    175175                        temp.add((ExternSheetRecord) rs.getNext());
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/RowBlocksReader.java

    r28000 r30737  
    4848         */
    4949        public RowBlocksReader(RecordStream rs) {
    50                 List<Record> plainRecords = new ArrayList<Record>();
    51                 List<Record> shFrmRecords = new ArrayList<Record>();
    52                 List<CellReference> firstCellRefs = new ArrayList<CellReference>();
    53                 List<Record> arrayRecords = new ArrayList<Record>();
    54                 List<Record> tableRecords = new ArrayList<Record>();
    55                 List<Record> mergeCellRecords = new ArrayList<Record>();
     50                List<Record> plainRecords = new ArrayList<>();
     51                List<Record> shFrmRecords = new ArrayList<>();
     52                List<CellReference> firstCellRefs = new ArrayList<>();
     53                List<Record> arrayRecords = new ArrayList<>();
     54                List<Record> tableRecords = new ArrayList<>();
     55                List<Record> mergeCellRecords = new ArrayList<>();
    5656
    5757                Record prevRec = null;
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/model/WorkbookRecordList.java

    r28000 r30737  
    2525
    2626public final class WorkbookRecordList implements Iterable<Record> {
    27     private List<Record> records = new ArrayList<Record>();
     27    private List<Record> records = new ArrayList<>();
    2828
    2929        private int  protpos     = 0;   // holds the position of the protect record.
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/ExternSheetRecord.java

    r28000 r30737  
    8181       
    8282        public ExternSheetRecord() {
    83                 _list = new ArrayList<RefSubRecord>();
     83                _list = new ArrayList<>();
    8484        }
    8585
    8686        public ExternSheetRecord(RecordInputStream in) { // NO_UCD
    87                 _list = new ArrayList<RefSubRecord>();
     87                _list = new ArrayList<>();
    8888               
    8989                int nItems  = in.readShort();
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/ObjRecord.java

    r28000 r30737  
    5353
    5454        public ObjRecord() {
    55                 subrecords = new ArrayList<SubRecord>(2);
     55                subrecords = new ArrayList<>(2);
    5656                // TODO - ensure 2 sub-records (ftCmo 15h, and ftEnd 00h) are always created
    5757                _uninterpretedData = null;
     
    8888        */
    8989
    90                 subrecords = new ArrayList<SubRecord>();
     90                subrecords = new ArrayList<>();
    9191                ByteArrayInputStream bais = new ByteArrayInputStream(subRecordData);
    9292                LittleEndianInputStream subRecStream = new LittleEndianInputStream(bais);
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/PageBreakRecord.java

    r28000 r30737  
    7676
    7777    protected PageBreakRecord() {
    78         _breaks = new ArrayList<Break>();
    79         _breakMap = new HashMap<Integer, Break>();
     78        _breaks = new ArrayList<>();
     79        _breakMap = new HashMap<>();
    8080    }
    8181
     
    8383    {
    8484        int nBreaks = in.readShort();
    85         _breaks = new ArrayList<Break>(nBreaks + 2);
    86         _breakMap = new HashMap<Integer, Break>();
     85        _breaks = new ArrayList<>(nBreaks + 2);
     86        _breakMap = new HashMap<>();
    8787
    8888        for(int k = 0; k < nBreaks; k++) {
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/RecordFactory.java

    r28000 r30737  
    245245         */
    246246        private static Map<Integer, I_RecordCreator> recordsToMap(Class<? extends Record> [] records) {
    247                 Map<Integer, I_RecordCreator> result = new HashMap<Integer, I_RecordCreator>();
    248                 Set<Class<?>> uniqueRecClasses = new HashSet<Class<?>>(records.length * 3 / 2);
     247                Map<Integer, I_RecordCreator> result = new HashMap<>();
     248                Set<Class<?>> uniqueRecClasses = new HashSet<>(records.length * 3 / 2);
    249249
    250250                for (int i = 0; i < records.length; i++) {
     
    306306        public static List<Record> createRecords(InputStream in) throws RecordFormatException {
    307307
    308                 List<Record> records = new ArrayList<Record>(NUM_RECORDS);
     308                List<Record> records = new ArrayList<>(NUM_RECORDS);
    309309
    310310                RecordFactoryInputStream recStream = new RecordFactoryInputStream(in, true);
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/RecordFactoryInputStream.java

    r28000 r30737  
    125125        public RecordFactoryInputStream(InputStream in, boolean shouldIncludeContinueRecords) {
    126126                RecordInputStream rs = new RecordInputStream(in);
    127                 List<Record> records = new ArrayList<Record>();
     127                List<Record> records = new ArrayList<>();
    128128                StreamEncryptionInfo sei = new StreamEncryptionInfo(rs, records);
    129129
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/SSTRecord.java

    r28000 r30737  
    5656        field_1_num_strings = 0;
    5757        field_2_num_unique_strings = 0;
    58         field_3_strings = new IntMapper<UnicodeString>();
     58        field_3_strings = new IntMapper<>();
    5959    }
    6060
     
    227227        field_1_num_strings = in.readInt();
    228228        field_2_num_unique_strings = in.readInt();
    229         field_3_strings = new IntMapper<UnicodeString>();
     229        field_3_strings = new IntMapper<>();
    230230        deserializer = new SSTDeserializer(field_3_strings);
    231231        deserializer.manufactureStrings( field_2_num_unique_strings, in );
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/ColumnInfoRecordsAggregate.java

    r28000 r30737  
    5353         */
    5454        public ColumnInfoRecordsAggregate() {
    55                 records = new ArrayList<ColumnInfoRecord>();
     55                records = new ArrayList<>();
    5656        }
    5757        public ColumnInfoRecordsAggregate(RecordStream rs) {
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/DataValidityTable.java

    r28000 r30737  
    4242        public DataValidityTable(RecordStream rs) {
    4343                _headerRec = (DVALRecord) rs.getNext();
    44                 List<Record> temp = new ArrayList<Record>();
     44                List<Record> temp = new ArrayList<>();
    4545                while (rs.peekNextClass() == DVRecord.class) {
    4646                        temp.add(rs.getNext());
     
    5151        public DataValidityTable() {
    5252                _headerRec = new DVALRecord();
    53                 _validationList = new ArrayList<Record>();
     53                _validationList = new ArrayList<>();
    5454        }
    5555
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/MergedCellsTable.java

    r28000 r30737  
    3939         */
    4040        public MergedCellsTable() {
    41                 _mergedRegions = new ArrayList<CellRangeAddress>();
     41                _mergedRegions = new ArrayList<>();
    4242        }
    4343
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java

    r28000 r30737  
    6161                        throw new IllegalArgumentException("SharedValueManager must be provided.");
    6262                }
    63                 _rowRecords = new TreeMap<Integer, RowRecord>();
     63                _rowRecords = new TreeMap<>();
    6464                _valuesAgg = new ValueRecordsAggregate();
    65                 _unknownRecords = new ArrayList<Record>();
     65                _unknownRecords = new ArrayList<>();
    6666                _sharedValueManager = svm;
    6767        }
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/SharedValueManager.java

    r28000 r30737  
    135135                _arrayRecords = toList(arrayRecords);
    136136                _tableRecords = tableRecords;
    137                 Map<SharedFormulaRecord, SharedFormulaGroup> m = new HashMap<SharedFormulaRecord, SharedFormulaGroup>(nShF * 3 / 2);
     137                Map<SharedFormulaRecord, SharedFormulaGroup> m = new HashMap<>(nShF * 3 / 2);
    138138                for (int i = 0; i < nShF; i++) {
    139139                        SharedFormulaRecord sfr = sharedFormulaRecords[i];
     
    147147         */
    148148        private static <Z> List<Z> toList(Z[] zz) {
    149                 List<Z> result = new ArrayList<Z>(zz.length);
     149                List<Z> result = new ArrayList<>(zz.length);
    150150                for (int i = 0; i < zz.length; i++) {
    151151                        result.add(zz[i]);
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java

    r28000 r30737  
    241241         */
    242242        public CellValueRecordInterface[] getValueRecords() {
    243                 List<CellValueRecordInterface> temp = new ArrayList<CellValueRecordInterface>();
     243                List<CellValueRecordInterface> temp = new ArrayList<>();
    244244
    245245                for (int rowIx = 0; rowIx < records.length; rowIx++) {
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/common/UnicodeString.java

    r28000 r30737  
    414414
    415415        if (isRichText() && (runCount > 0)) {
    416           field_4_format_runs = new ArrayList<FormatRun>(runCount);
     416          field_4_format_runs = new ArrayList<>(runCount);
    417417          for (int i=0;i<runCount;i++) {
    418418            field_4_format_runs.add(new FormatRun(in));
     
    539539    public void addFormatRun(FormatRun r) {
    540540      if (field_4_format_runs == null) {
    541                 field_4_format_runs = new ArrayList<FormatRun>();
     541                field_4_format_runs = new ArrayList<>();
    542542        }
    543543
     
    709709        str.field_3_string = field_3_string;
    710710        if (field_4_format_runs != null) {
    711           str.field_4_format_runs = new ArrayList<FormatRun>();
     711          str.field_4_format_runs = new ArrayList<>();
    712712          for (FormatRun r : field_4_format_runs) {
    713713            str.field_4_format_runs.add(new FormatRun(r._character, r._fontIndex));
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/formula/Ptg.java

    r28000 r30737  
    5050         */
    5151        public static Ptg[] readTokens(int size, LittleEndianInput in) {
    52                 List<Ptg> temp = new ArrayList<Ptg>(4 + size / 2);
     52                List<Ptg> temp = new ArrayList<>(4 + size / 2);
    5353                int pos = 0;
    5454                boolean hasArrayPtgs = false;
     
    216216                        if (ptg instanceof ArrayPtg) {
    217217                                if (arrayPtgs == null) {
    218                                         arrayPtgs = new ArrayList<Ptg>(5);
     218                                        arrayPtgs = new ArrayList<>(5);
    219219                                }
    220220                                arrayPtgs.add(ptg);
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/formula/function/FunctionDataBuilder.java

    r28000 r30737  
    3838        public FunctionDataBuilder(int sizeEstimate) {
    3939                _maxFunctionIndex = -1;
    40                 _functionDataByName = new HashMap<String, FunctionMetadata>(sizeEstimate * 3 / 2);
    41                 _functionDataByIndex = new HashMap<Integer, FunctionMetadata>(sizeEstimate * 3 / 2);
    42                 _mutatingFunctionIndexes = new HashSet<Integer>();
     40                _functionDataByName = new HashMap<>(sizeEstimate * 3 / 2);
     41                _functionDataByIndex = new HashMap<>(sizeEstimate * 3 / 2);
     42                _mutatingFunctionIndexes = new HashSet<>();
    4343        }
    4444
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/record/formula/function/FunctionMetadataReader.java

    r28000 r30737  
    5151                "LOG10", "ATAN2", "DAYS360", "SUMXMY2", "SUMX2MY2", "SUMX2PY2",
    5252        };
    53         private static final Set<String> DIGIT_ENDING_FUNCTION_NAMES_SET = new HashSet<String>(Arrays.asList(DIGIT_ENDING_FUNCTION_NAMES));
     53        private static final Set<String> DIGIT_ENDING_FUNCTION_NAMES_SET = new HashSet<>(Arrays.asList(DIGIT_ENDING_FUNCTION_NAMES));
    5454
    5555        public static FunctionMetadataRegistry createRegistry() {
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/usermodel/HSSFDataFormat.java

    r28000 r30737  
    5050        private static final String[] _builtinFormats = BuiltinFormats.getAll();
    5151
    52         private final Vector<String> _formats = new Vector<String>();
     52        private final Vector<String> _formats = new Vector<>();
    5353        private boolean _movedBuiltins = false;  // Flag to see if need to
    5454        // check the built in list
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/usermodel/HSSFSheet.java

    r28000 r30737  
    7373    protected HSSFSheet(HSSFWorkbook workbook, InternalSheet sheet) {
    7474        this._sheet = sheet;
    75         _rows = new TreeMap<Integer, HSSFRow>();
     75        _rows = new TreeMap<>();
    7676        this._workbook = workbook;
    7777        setPropertiesFromSheet(sheet);
     
    264264        int height = lastRow - firstRow + 1;
    265265        int width = lastColumn - firstColumn + 1;
    266         List<HSSFCell> temp = new ArrayList<HSSFCell>(height*width);
     266        List<HSSFCell> temp = new ArrayList<>(height*width);
    267267        for (int rowIn = firstRow; rowIn <= lastRow; rowIn++) {
    268268            for (int colIn = firstColumn; colIn <= lastColumn; colIn++) {
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/hssf/usermodel/HSSFWorkbook.java

    r28000 r30737  
    9494                super(null);
    9595                workbook = book;
    96                 _sheets = new ArrayList<HSSFSheet>(INITIAL_CAPACITY);
    97                 names = new ArrayList<HSSFName>(INITIAL_CAPACITY);
     96                _sheets = new ArrayList<>(INITIAL_CAPACITY);
     97                names = new ArrayList<>(INITIAL_CAPACITY);
    9898        }
    9999
     
    182182        }
    183183
    184         _sheets = new ArrayList<HSSFSheet>(INITIAL_CAPACITY);
    185         names  = new ArrayList<HSSFName>(INITIAL_CAPACITY);
     184        _sheets = new ArrayList<>(INITIAL_CAPACITY);
     185        names  = new ArrayList<>(INITIAL_CAPACITY);
    186186
    187187        // Grab the data from the workbook stream, however
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/filesystem/DirectoryNode.java

    r28000 r30737  
    8181        }
    8282        _filesystem = filesystem;
    83         _byname     = new HashMap<String, Entry>();
    84         _entries    = new ArrayList<Entry>();
     83        _byname     = new HashMap<>();
     84        _entries    = new ArrayList<>();
    8585        Iterator<Property> iter = property.getChildren();
    8686
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/filesystem/POIFSDocument.java

    r28000 r30737  
    9898         */
    9999        public POIFSDocument(String name, POIFSBigBlockSize bigBlockSize, InputStream stream) throws IOException {
    100                 List<DocumentBlock> blocks = new ArrayList<DocumentBlock>();
     100                List<DocumentBlock> blocks = new ArrayList<>();
    101101
    102102                _size = 0;
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/filesystem/POIFSFileSystem.java

    r28000 r30737  
    6969    {
    7070        _property_table = new PropertyTable();
    71         _documents      = new ArrayList<POIFSDocument>();
     71        _documents      = new ArrayList<>();
    7272        _root           = null;
    7373    }
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/property/DirectoryProperty.java

    r28000 r30737  
    4848    {
    4949        super();
    50         _children       = new ArrayList<Property>();
    51         _children_names = new HashSet<String>();
     50        _children       = new ArrayList<>();
     51        _children_names = new HashSet<>();
    5252        setName(name);
    5353        setSize(0);
     
    6868    {
    6969        super(index, array, offset);
    70         _children       = new ArrayList<Property>();
    71         _children_names = new HashSet<String>();
     70        _children       = new ArrayList<>();
     71        _children_names = new HashSet<>();
    7272    }
    7373
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/property/PropertyFactory.java

    r28000 r30737  
    6161        throws IOException
    6262    {
    63         List<Property> properties = new ArrayList<Property>();
     63        List<Property> properties = new ArrayList<>();
    6464
    6565        for (int j = 0; j < blocks.length; j++)
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/property/PropertyTable.java

    r28000 r30737  
    4040    public PropertyTable()
    4141    {
    42         _properties  = new ArrayList<Property>();
     42        _properties  = new ArrayList<>();
    4343        addProperty(new RootProperty());
    4444        _blocks = null;
     
    111111            return;
    112112        }
    113         Stack<Property> children = new Stack<Property>();
     113        Stack<Property> children = new Stack<>();
    114114
    115115        children.push(_properties.get(index));
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/storage/BlockAllocationTableReader.java

    r28000 r30737  
    202202    ListManagedBlock[] fetchBlocks(int startBlock, int headerPropertiesStartBlock,
    203203            BlockList blockList) throws IOException {
    204         List<ListManagedBlock> blocks = new ArrayList<ListManagedBlock>();
     204        List<ListManagedBlock> blocks = new ArrayList<>();
    205205        int  currentBlock = startBlock;
    206206        boolean firstPass = true;
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/storage/RawDataBlockList.java

    r28000 r30737  
    5050        throws IOException
    5151    {
    52         List<RawDataBlock> blocks = new ArrayList<RawDataBlock>();
     52        List<RawDataBlock> blocks = new ArrayList<>();
    5353
    5454        while (true)
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/poifs/storage/SmallDocumentBlock.java

    r28000 r30737  
    147147        int _blocks_per_big_block = getBlocksPerBigBlock(bigBlockSize);
    148148       
    149         List<SmallDocumentBlock> sdbs = new ArrayList<SmallDocumentBlock>();
     149        List<SmallDocumentBlock> sdbs = new ArrayList<>();
    150150
    151151        for (int j = 0; j < blocks.length; j++)
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/format/CellElapsedFormatter.java

    r28000 r30737  
    132132        super(pattern);
    133133
    134         specs = new ArrayList<TimeSpec>();
     134        specs = new ArrayList<>();
    135135
    136136        StringBuffer desc = CellFormatPart.parseFormat(pattern,
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/format/CellNumberFormatter.java

    r28000 r30737  
    246246        scale = 1;
    247247
    248         specials = new LinkedList<Special>();
     248        specials = new LinkedList<>();
    249249
    250250        NumPartHandler partHandler = new NumPartHandler();
     
    573573        }
    574574
    575         Set<StringMod> mods = new TreeSet<StringMod>();
     575        Set<StringMod> mods = new TreeSet<>();
    576576        StringBuffer output = new StringBuffer(desc);
    577577
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/formula/FormulaRenderer.java

    r28000 r30737  
    4848            throw new IllegalArgumentException("ptgs must not be null");
    4949        }
    50         Stack<String> stack = new Stack<String>();
     50        Stack<String> stack = new Stack<>();
    5151
    5252        for (int i=0 ; i < ptgs.length; i++) {
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/usermodel/BuiltinFormats.java

    r28000 r30737  
    7575
    7676        static {
    77                 List<String> m = new ArrayList<String>();
     77                List<String> m = new ArrayList<>();
    7878                putFormat(m, 0, "General");
    7979                putFormat(m, 1, "0");
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/util/CellRangeAddressList.java

    r28000 r30737  
    4545
    4646        public CellRangeAddressList() {
    47                 _list = new ArrayList<CellRangeAddress>();
     47                _list = new ArrayList<>();
    4848        }
    4949        /**
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/ss/util/SSCellRange.java

    r28000 r30737  
    5050                B[] flattenedArray = (B[]) Array.newInstance(cellClass, nItems);
    5151                flattenedList.toArray(flattenedArray);
    52                 return new SSCellRange<B>(firstRow, firstColumn, height, width, flattenedArray);
     52                return new SSCellRange<>(firstRow, firstColumn, height, width, flattenedArray);
    5353        }
    5454
    5555        public Iterator<K> iterator() {
    56                 return new ArrayIterator<K>(_flattenedArray);
     56                return new ArrayIterator<>(_flattenedArray);
    5757        }
    5858        private static final class ArrayIterator<D> implements Iterator<D> {
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/BitFieldFactory.java

    r28000 r30737  
    2929
    3030public class BitFieldFactory {
    31     private static Map<Integer, BitField> instances = new HashMap<Integer, BitField>();
     31    private static Map<Integer, BitField> instances = new HashMap<>();
    3232
    3333    public static BitField getInstance(int mask) {
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/HexRead.java

    r28000 r30737  
    3838        int characterCount = 0;
    3939        byte b = (byte) 0;
    40         List<Byte> bytes = new ArrayList<Byte>();
     40        List<Byte> bytes = new ArrayList<>();
    4141        boolean done = false;
    4242        while ( !done )
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/IntMapper.java

    r28000 r30737  
    5656    public IntMapper(final int initialCapacity)
    5757    {
    58         elements = new ArrayList<T>(initialCapacity);
    59         valueKeyMap = new HashMap<T,Integer>(initialCapacity);
     58        elements = new ArrayList<>(initialCapacity);
     59        valueKeyMap = new HashMap<>(initialCapacity);
    6060    }
    6161
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/POILogFactory.java

    r28000 r30737  
    3838     * Map of POILogger instances, with classes as keys
    3939     */
    40     private static Map<String, POILogger> _loggers = new HashMap<String, POILogger>();
     40    private static Map<String, POILogger> _loggers = new HashMap<>();
    4141
    4242    /**
  • applications/editors/josm/plugins/opendata/includes/org/apache/poi/util/POILogger.java

    r28000 r30737  
    571571    private Object [] flattenArrays(Object [] objects)
    572572    {
    573         List<Object> results = new ArrayList<Object>();
     573        List<Object> results = new ArrayList<>();
    574574
    575575        for (int i = 0; i < objects.length; i++)
     
    582582    private List<Object> objectToObjectArray(Object object)
    583583    {
    584         List<Object> results = new ArrayList<Object>();
     584        List<Object> results = new ArrayList<>();
    585585
    586586        if (object instanceof byte [])
Note: See TracChangeset for help on using the changeset viewer.