Changeset 427


Ignore:
Timestamp:
Mar 3, 2010, 6:56:07 PM (15 years ago)
Author:
gav
Message:

Small improvements to InventoryCsvService, protect against array out of bounds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/InventoryCsvService.groovy

    r426 r427  
    374374                inventoryParams.averageDeliveryPeriod = averageDeliveryPeriodInstance
    375375
    376                 // Format remaining properties.
     376                // Name.
     377                // Checked above for blank string.
    377378                inventoryParams.name = WordUtils.capitalize(inventoryParams.name)
    378                 inventoryParams.description = inventoryParams.description[0].toUpperCase() + inventoryParams.description[1..-1]
     379
     380                // Description.
     381                if(inventoryParams.description != '')
     382                    inventoryParams.description = inventoryParams.description[0].toUpperCase() + inventoryParams.description[1..-1]
    379383
    380384                // Debug
Note: See TracChangeset for help on using the changeset viewer.