Ignore:
Timestamp:
2021-09-11T14:11:31+12:00 (3 years ago)
Author:
kjdon
Message:

new Long(long) and new Integer(int) are deprecated. Use Integer.valueOf and Long.valueOf instead

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java

    r32546 r35363  
    14771477        if (phrase_query_term_variants_hierarchy.size() ==0) {
    14781478          for (int i = 0; i < word_matches.size(); i++) {
    1479             highlight_start_positions.add(new Integer(word_matches.get(i).start_position));
    1480             highlight_end_positions.add(new Integer(word_matches.get(i).end_position));
     1479            highlight_start_positions.add(Integer.valueOf(word_matches.get(i).start_position));
     1480            highlight_end_positions.add(Integer.valueOf(word_matches.get(i).end_position));
    14811481          }
    14821482        }
     
    15171517                            }
    15181518
    1519                             highlight_start_positions.add(new Integer(partial_phrase_match.start_position));
    1520                             highlight_end_positions.add(new Integer(word_match.end_position));
     1519                            highlight_start_positions.add(Integer.valueOf(partial_phrase_match.start_position));
     1520                            highlight_end_positions.add(Integer.valueOf(word_match.end_position));
    15211521                        }
    15221522                        // No, but add the partial match back into the list for next time
     
    15441544                    if (phrase_query_p_term_variants_list.size() == 1)
    15451545                    {
    1546                         highlight_start_positions.add(new Integer(word_match.start_position));
    1547                         highlight_end_positions.add(new Integer(word_match.end_position));
     1546                        highlight_start_positions.add(Integer.valueOf(word_match.start_position));
     1547                        highlight_end_positions.add(Integer.valueOf(word_match.end_position));
    15481548                    }
    15491549                    // Otherwise we have the start of a potential phrase match
Note: See TracChangeset for help on using the changeset viewer.