Project

General

Profile

« Previous | Next » 

Revision 5423

Added by berkley over 14 years ago

fixed bug where null session data was not treated properly.

View differences:

src/edu/ucsb/nceas/metacat/restservice/ResourceHandler.java
468 468
            boolean validSession = false;
469 469
            SessionService ss = SessionService.getInstance();
470 470
            System.out.println("sessionData: " + sessionData);
471
            if(sessionData == null)
472
            {
473
                username = "public";
474
                sessionId = "0";
475
                System.out.println("sessiondata is null.  Creating a public session.");
476
                return;
477
            }
478
            
471 479
            System.out.println("username: " + sessionData.getUserName());
472 480
            System.out.println("sessionid: " + sessionData.getId());
473 481
            //validate the session
......
498 506
        }
499 507
        catch(Exception e)
500 508
        {
509
            e.printStackTrace();
501 510
            throw new Exception("Could not load the session data: " + e.getMessage());
502 511
        }
503 512
    }

Also available in: Unified diff