Project

General

Profile

« Previous | Next » 

Revision 5426

Added by berkley over 14 years ago

fixed NPE with sessionData

View differences:

src/edu/ucsb/nceas/metacat/dataone/CrudService.java
481 481
          
482 482
          //System.out.println("query is: metacatUrl: " + metacatUrl + " user: " + sessionData.getUserName() +
483 483
          //    " sessionid: " + sessionData.getId() + " params: " + params.toString());
484
          String username = "public";
485
          String[] groups = null;
486
          String sessionid = "";
487
          if(sessionData != null)
488
          {
489
              username = sessionData.getUserName();
490
              groups = sessionData.getGroupNames();
491
              sessionid = sessionData.getId();
492
          }
484 493
          
485
          MetacatResultSet rs = handler.query(metacatUrl, params, sessionData.getUserName(), 
486
                  sessionData.getGroupNames(), sessionData.getId());
494
          MetacatResultSet rs = handler.query(metacatUrl, params, username, 
495
                  groups, sessionid);
487 496
          List docs = rs.getDocuments();
488 497
          if(count == 1000)
489 498
          {

Also available in: Unified diff