Null values in InputResultSet

I'm building interfaces between Java programs and Progress 4gl (Ver 9.1c) using the progress proxy interface. We have been doing this for some time and have most of it under control. However in passing a result set back to progress from Java (into a temp-table) I have hit a snag with some date fields which may in some circumstances be null.

The getObject method of the extended InputResultSet has to return something. However if it is allowed to be null, a null pointer exception is raised when the program runs. The code is as below:
public Object getObject(int columnNo)
{
Object col = null;
switch(columnNo)
{
case 1: col = mt.getCreateDate().toSQLDate();
break;
case 2: col = mt.getCreateId();
break;
case 3:
if(mt.getDeleteDate()!=null) col = mt.getDeleteDate().toSQLDate();
else col = null;
break;
.
.
.
}
return col;
}

Is there a way around this, or am I looking in the wrong place for the error?

Any help would be appreciated.
 
Top