Opened 17 years ago

Closed 17 years ago

#563 closed defect (fixed)

FlatFileParser can't handle complex mappings

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: minor Milestone: BASE 2.2.3
Component: core Version:
Keywords: Cc:


If you for example create a column mapping as '\Ch1 B Mean\ ' (note the extra space) you will get the following exception when importing data with it:

at net.sf.basedb.util.parser.ConstantMapper.<init>(
at net.sf.basedb.util.parser.FlatFileParser.getMapper(
at net.sf.basedb.util.parser.FlatFileParser.getMapper(
at net.sf.basedb.plugins.AbstractFlatFileImporter.getMapper(
at net.sf.basedb.plugins.RawDataFlatFileImporter.beginData(
at net.sf.basedb.plugins.AbstractFlatFileImporter.doImport(
at net.sf.basedb.core.PluginExecutionRequest.invoke(
at net.sf.basedb.core.InternalJobQueue$

The problem is that the number parser is applied to the trailing space. This generates an exception since it is not a number. On the other hand, if this had been handled correctly, the CompoundMapper that is later putting together the result is not using the number formatter. This must also be fixed.

In this case the result would still be an error (NumberFormatException), since the space is still not a number.

For more info see mailarchive:

Change History (1)

comment:1 by Nicklas Nordborg, 17 years ago

Resolution: fixed
Status: newclosed

(In [3241]) Fixes #563: FlatFileParser can't handle complex mappings

Note: See TracTickets for help on using tickets.