Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@takezoe
Copy link
Contributor

@takezoe takezoe commented Jan 19, 2024

java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class [Lorg.msgpack.value.Value; ([Ljava.lang.Object; is in module java.base of loader 'bootstrap'; [Lorg.msgpack.value.Value; is in unnamed module of loader 'app')
        at org.msgpack.value.Variable$ArrayValueAccessor.array(Variable.java:890)
        at org.msgpack.value.Variable$ArrayValueAccessor.immutableValue(Variable.java:851)
        at org.msgpack.value.Variable$ArrayValueAccessor.immutableValue(Variable.java:832)
        at org.msgpack.value.Variable.immutableValue(Variable.java:1136)
        at org.msgpack.value.Variable.toJson(Variable.java:1161)

@github-actions github-actions bot added the bug label Jan 19, 2024
this.type = Type.LIST;
this.accessor = arrayAccessor;
this.objectValue = v.toArray();
this.objectValue = v.toArray(new Value[v.size()]);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ClassCastException occurs here:

public Value[] array()
{
return (Value[]) objectValue;
}

@xerial xerial merged commit 480fd73 into msgpack:main Jan 21, 2024
@xerial xerial changed the title Fix ClassCastException when array values is set as List core: Fix ClassCastException when array values is set as List Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.