Ignore:
Timestamp:
Apr 18, 2008, 2:09:41 PM (14 years ago)
Author:
Nicklas Nordborg
Message:

Changes related to http://base.thep.lu.se/changeset/4237

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/net.sf.basedb.examples/trunk/src/net/sf/basedb/examples/extensions/HelloUserFactory.java

    r642 r667  
    5151  private String getUserName(ClientContext context)
    5252  {
    53     DbControl dc = null;
    54     try
    55     {
    56       SessionControl sc = context.getSessionControl();
    57       dc = sc.newDbControl();
    58       User current = User.getById(dc, sc.getLoggedInUserId());
    59       return current.getName();
    60     }
    61     finally
    62     {
    63       if (dc != null) dc.close();
    64     }
     53    SessionControl sc = context.getSessionControl();
     54    DbControl dc = context.getDbControl();
     55    User current = User.getById(dc, sc.getLoggedInUserId());
     56    return current.getName();
    6557  }
    6658 
Note: See TracChangeset for help on using the changeset viewer.