Skip to content

Some problems with dubbo-cluster rpc merger #2926

@luchy0120

Description

@luchy0120

Hello, dubbo team. I'm learning the dubbo project , and I found some problems with rpc.merger module
listed as below:

1, The ArrayMerger uses its first element's component type to create a new Array. But some times
if we use

        class Person{};
        class Teacher extends Person{};
        Person[] a= {new Person()};
        Teacher[] b= {new Teacher()};
        Object[] result = ArrayMerger.INSTANCE.merge(a,b);

This will fail with "array element type mismatch"

2, The ArrayMerger doesn't allow null object , but ListMerger and MapMerger allows user to input
null object

       MergerFactory.getMerger(List.class).merge(list1, list2, null);

this is not semantic consistent

3, All the mergers doesn't check for null input and MergeFactory.getmerger could return null
if the request class not in cache.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions