infinispan / infinispan/protostream

ObjectArrayAdapter generating marshaller in java.lang

Open
#154 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
56
Forks
39
Avg merge
5h 36m
Merged PRs (30d)
5

Description

I'm trying to create an adaptor for a dto which contains an object field, that's either an object of a registered marshaller, or an object array of objects of various registered marshallers [1].. I tried adding the ObjectArrayAdapter to my project but protostream-processor is generating an Object marshaller in java.lang inside the generated sources folder, am I using it incorrectly / bug?

[1]

```java
public class Message
{
private int messageType;
private int messageId;

private NodeAddress fromNode;
private NodeAddress toNode;

private Map headers;

// target reference fields
private int interfaceId;
private Object objectId;
private NodeAddress referenceAddress;

// method fields
private int methodId;
private Object payload; // problematic field

private long localRequestTime;

private long remoteInvocationCreationTime;
private long remoteInvocationCompletionTime;
```

![object array](https://user-images.githubusercontent.com/323497/162956345-c4e06572-bf42-45c8-a386-c035bc728e5e.png)

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported use of ObjectArrayAdapter with the Message.payload field and inspect the generated sources, focusing on why protostream-processor creates an Object marshaller in java.lang. Confirm the behavior with registered marshallers and determine that generation no longer produces the unintended marshaller.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.