## What is the purpose of the change

This patch can standardize semantics of all mergers :  merge arguments can be 
null , and all the others should have same type . 

For ArrayMerger , as its arguments type is  Object[]... items ,  so we can 
avoid checking whether item[i] is
an Array . Also , in order to avoid problems like 
```
        class Person{};
        class Teacher extends Person{};
        Person[] a= {new Person()};
        Teacher[] b= {new Teacher()};
        Object[] result = ArrayMerger.INSTANCE.merge(a,b);
```
we can require all elements to have the same type , al least the user should 
pass in the same type

For MergerFactory , if the required class is not in cache , we can throw an 
user friendly Exception 

For test case , I add some exception case , and fix an ArrayMerger case , also 
add some null argument
test case . 


## Brief changelog

dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/*
dubbo-cluster/src/test/java/org/apache/dubbo/rpc/cluster/merger/ResultMergerTest


## Verifying this change

mvn clean install -DskipTests


[ Full content available at: 
https://github.com/apache/incubator-dubbo/pull/2936 ]
This message was relayed via gitbox.apache.org for 
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to