Changeset 5400


Ignore:
Timestamp:
Sep 3, 2010, 12:44:11 PM (12 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1505: Table exporter fails with NPE when exporting spot data

Location:
trunk/src/clients/web/net/sf/basedb/clients/web/plugins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/plugins/ExportedProperty.java

    r5319 r5400  
    7878      }
    7979    }
    80     else if (dataloader == null)
     80    else if (dataloader == null && metadata != null)
    8181    {
    8282      propertyPath = metadata.getPropertyPath(name, false);
  • trunk/src/clients/web/net/sf/basedb/clients/web/plugins/SimpleExport.java

    r5384 r5400  
    253253    String entityName = null;
    254254    Class entityClass = null;
     255    Metadata metadata = null;
    255256    if (itemType == Item.RAWDATA)
    256257    {
     
    272273      entityClass = itemType.getDataClass();
    273274    }
    274     Metadata metadata = entityName == null ?
    275         Metadata.getInstance(entityClass) :
    276         Metadata.getInstance(entityClass, entityName);
     275    if (entityName != null)
     276    {
     277      metadata = Metadata.getInstance(entityClass, entityName);
     278    }
     279    else if (entityClass != null)
     280    {
     281      metadata = Metadata.getInstance(entityClass);
     282    }
    277283
    278284    // Parse the WHICH_PROPERTIES parameter. It is a list of property:title entries
Note: See TracChangeset for help on using the changeset viewer.