Ignore:
Timestamp:
2017-01-24T23:08:13+13:00 (7 years ago)
Author:
davidb
Message:

Changed to using containsKey rather than get to avoid null pointer cast problem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/hathitrust/wcsa/vol-checker/src/org/hathitrust/extractedfeatures/VolumeCheck.java

    r31354 r31355  
    256256        String cgi_convert_col = request.getParameter("convert-col");
    257257       
    258         System.err.println("**** cgi_ids = '" + cgi_ids + "'");
    259         System.err.println("**** cgi_convert_col = '" + cgi_convert_col + "'");
    260        
    261258        if (cgi_ids != null) {
    262259            response.setContentType("application/json");
     
    270267            for (int i=0; i<ids_len; i++) {
    271268                String id = ids[i];
    272                
    273                 boolean exists = id_check_.get(id);
     269
     270                boolean exists = id_check_.containsKey(id);
    274271               
    275272                if (i>0) {
     
    286283           
    287284            String id = cgi_id;
    288             boolean exists = id_check_.get(id);
     285            boolean exists = id_check_.containsKey(id);
    289286            pw.append("{'" + id + "':" + exists + "}");
    290287        }
    291288        else if (cgi_download_id != null) {
    292289            String download_id = cgi_download_id;
    293             boolean exists = id_check_.get(download_id);
     290            boolean exists = id_check_.containsKey(download_id);
    294291            if (!exists) {
    295292                // Error
Note: See TracChangeset for help on using the changeset viewer.