Share

JOX

Tracker: Bugs

5 IntrospectionException for Object data member. - ID: 1576106
Last Update: Tracker Item Submitted ( maryeidria )

I've got a generic class which handles multiple data
types, I've got a 2nd data member to tell me the type.

Object oValue = null;
int iDBDataType = java.sql.Types.OTHER;

My getter and setter for oValue treats the data type as
an Object:

public Object getOValue() {return oValue; }
public void setOValue(Object oValue) { this.oValue =
oValue;}

The problem is in JoxUtils.needsClassName(Object ob,
Class propClass)

The following code:
if (ob instanceof String) return false;

Should be changed to something like this:
Class obClass = ob.getClass();
if (ob instanceof String && propClass != null &&
obClass.equals(propClass))
return false;

This way it'll return true if the data is a String, but
the data member is not a String.
This way I won't get an error when going from XML file
to Java bean.

IntrospectionException: java.lang.Object not
superclass of java.lang.Object


maryr ( maryeidria ) - 2006-10-12 18:33

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.