You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by "Kazuomi Kashii (JIRA)" <ji...@apache.org> on 2012/05/17 21:20:09 UTC
[jira] [Commented] (GORA-134) ListGenericArray's hashCode causes
StackOverflowError
[ https://issues.apache.org/jira/browse/GORA-134?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13278126#comment-13278126 ]
Kazuomi Kashii commented on GORA-134:
-------------------------------------
public int hashCode() {
return GenericData.get().hashCode(this, schema);
}
I think the following should fix this bug.
return this.list.hashCode();
> ListGenericArray's hashCode causes StackOverflowError
> -----------------------------------------------------
>
> Key: GORA-134
> URL: https://issues.apache.org/jira/browse/GORA-134
> Project: Apache Gora
> Issue Type: Bug
> Components: schema
> Reporter: Kazuomi Kashii
>
> public static void main(String[] args) throws Exception {
> Type type = STRING;
> Schema schema = Schema.create(type);
> GenericArray array = new ListGenericArray(schema);
> array.add(new Utf8("array test"));
> System.out.println("hashCode=" + array.hashCode());
> }
> Exception in thread "main" java.lang.StackOverflowError
> at org.apache.avro.generic.GenericData.get(GenericData.java:39)
> at org.apache.gora.persistency.ListGenericArray.hashCode(ListGenericArray.java:86)
> at org.apache.avro.generic.GenericData.hashCode(GenericData.java:434)
> at org.apache.gora.persistency.ListGenericArray.hashCode(ListGenericArray.java:86)
> at org.apache.avro.generic.GenericData.hashCode(GenericData.java:434)
> at org.apache.gora.persistency.ListGenericArray.hashCode(ListGenericArray.java:86)
> ...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira