Changeset 6892 for branches/3.5-stable


Ignore:
Timestamp:
May 5, 2015, 7:48:18 AM (6 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1946: NullPointerException? in item list view

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.5-stable/src/core/net/sf/basedb/core/ItemContext.java

    r6887 r6892  
    183183  private String sortProperty = null;
    184184  private String message;
    185   private SortDirection sortDirection = null;
     185  private SortDirection sortDirection = SortDirection.ASC;
    186186  private Set<Include> include;
    187187  private Permission permission;
     
    541541  public SortDirection getSortDirection()
    542542  {
    543     return sortDirection;
     543    return sortDirection == null ? SortDirection.ASC : sortDirection;
    544544  }
    545545 
     
    15551555    // To make sure we get a reproducable ordering when there is no
    15561556    // other ordering or of the ordering is made on non-unique columns
    1557     if (!isSortingOnIdProperty)
     1557    if (!isSortingOnIdProperty && !noPaging)
    15581558    {
    15591559      query.order(getSortDirection().sortBy(Hql.property("id")));
Note: See TracChangeset for help on using the changeset viewer.