You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Gregg Donovan (JIRA)" <ji...@apache.org> on 2015/11/13 20:47:11 UTC

[jira] [Comment Edited] (SOLR-4021) JavaBinCodec has poor default behavior for unrecognized classes of objects

    [ https://issues.apache.org/jira/browse/SOLR-4021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15004590#comment-15004590 ] 

Gregg Donovan edited comment on SOLR-4021 at 11/13/15 7:46 PM:
---------------------------------------------------------------

This patch adds BigDecimal support to javabin by serializing/deserializing as a string. The [JavaDocs|https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html#toString--] make toString sound like a reasonable way to serialize BigDecimal.


was (Author: greggny3):
This adds BigDecimal support to javabin by serializing/deserializing as a string. The [JavaDocs|https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html#toString--] make toString sound like a reasonable way to serialize BigDecimal.

> JavaBinCodec has poor default behavior for unrecognized classes of objects
> --------------------------------------------------------------------------
>
>                 Key: SOLR-4021
>                 URL: https://issues.apache.org/jira/browse/SOLR-4021
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 4.0
>            Reporter: Hoss Man
>
> It seems that JavaBinCodec has inconsistent serialize/deserialize behavior when dealing with objects of classes that it doesn't recognized.  In particular, unrecnognized objects seem to be serialized with the full classname prepented to the "toString()" value, and then that resulting concatentated string is left as is during deserialization.
> as a concrete example: serializing & deserializing a BigDecimal value results in a final value like "java.math.BigDecimal:1848.66" even though for most users the simple toString() value would have worked as intended.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org