[ISSUE #4335] Replace deprecated api in cl

This commit is contained in:
Oliver
2022-05-19 14:31:03 +08:00
committed by GitHub
parent dd69223624
commit 82a48be00a
5 changed files with 16 additions and 7 deletions
@@ -75,7 +75,7 @@ public class FastCodesHeaderTest {
private void check(RemotingCommand command, List<Field> fields,
Class<? extends CommandCustomHeader> classHeader) throws Exception {
CommandCustomHeader o1 = command.decodeCommandCustomHeader(classHeader, false);
CommandCustomHeader o2 = classHeader.newInstance();
CommandCustomHeader o2 = classHeader.getDeclaredConstructor().newInstance();
((FastCodesHeader)o2).decode(command.getExtFields());
for (Field f : fields) {
Object value1 = f.get(o1);