@@ -301,25 +301,35 @@ protected final DataTableSpec[] configure(final DataTableSpec[] inSpecs)
301301 DataType type = StringCell .TYPE ;
302302 String columnType = columnTypes [i ];
303303
304+ // convert short classes names
304305 if ("String" .equals (columnType )) {
305- type = StringCell .TYPE ;
306+ columnType = StringCell .class . getName () ;
306307 } else if ("Integer" .equals (columnType )) {
307- type = IntCell .TYPE ;
308+ columnType = IntCell .class . getName () ;
308309 } else if ("Double" .equals (columnType )) {
309- type = DoubleCell .TYPE ;
310- } else {
311- try {
312- Class <DataCell > cls = (Class <DataCell >) Class .forName (columnType );
313- if (cls != null )
314- type = DataType .getType (cls );
315- else
316- columnType = "StringCell" ;
317-
318- } catch (ClassNotFoundException e ) {
319- // e.printStackTrace();
310+ columnType = DoubleCell .class .getName ();
311+ }
312+
313+ try {
314+ Class <DataCell > cls = (Class <DataCell >) Class
315+ .forName (columnType );
316+ if (cls != null )
317+ type = DataType .getType (cls );
318+ else
320319 columnType = "StringCell" ;
321- }
320+
321+ } catch (ClassNotFoundException e ) {
322+ // e.printStackTrace();
323+ throw new InvalidSettingsException (columnType
324+ + " is an incorrect Java class name. "
325+ + "Please check it and specify a fully qualified class name." );
326+
327+ //columnType = "StringCell";
322328 }
329+
330+ if (!columnTypes [i ].equals (columnType ))
331+ columnTypes [i ] = columnType ;
332+
323333 DataColumnSpec newColumn = new DataColumnSpecCreator (
324334 columnNames [i ], type ).createSpec ();
325335
0 commit comments