could not coerce BigDecimal to class java.lang.Object (TypeError)
------------------------------------------------------------------
Key: JRUBY-4043
URL: http://jira.codehaus.org/browse/JRUBY-4043
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.4.0RC1
Environment: Max OS X 10.5
Reporter: Roger Gilliar
The following code worked with 1.3.1. It is called by the getValueAt method
from a table model use by a JTable instance. In 1.4 I get the follwing error:
Exception in thread "AWT-EventQueue-0" :1: could not coerce BigDecimal to class
java.lang.Object (TypeError)
...internal jruby stack elided...
from (unknown).(unknown)(:1)
row_object is an ActiveRecord instance bound to a MySql table.
def column_value row_object, column
method = @column_model.column_value_methods[column]
if column == 0
result =
ValueObjectWrapper.new(@column_model.column_value_methods[0], row_object)
else
if method != nil
result = row_object.send
@column_model.column_value_methods[column]
if (@column_model.column_classes[column] ==
Java::JavaLang::Boolean.java_class)
if result == 1
result = true
else
result = false
end
elsif (@column_model.column_classes[column] ==
Java::JavaMath::BigDecimal.java_class)
## just for debuging the 1.4 error
## setting result to "1" makes the problem disapear
end
else
result = nil
end
end
result
end
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email