0

due to Project refactoring, i’ve found a serialization POJO class and interface for serialization.

POJO class implement serialization and service set byte[] and hashMap.


public class POJO implements Serializable {

private Hashmap HashMapForRequest = new HashMap();

//and getter,setters..
}

public Interface InterfaceService{

     public POJO serviceMethod (HashMap hsh, byte[] byt) throw Exception;
}

it looks nothing special but occurs nullpointerException in below code.

import POJO;

@RequiredArgsConstructor
@Component
public class Controller {

private InterfaceService Interface;

callMethod();
    
    @Synchronized
    public callMethod(HashMap hsh, byte[] byt){
        POJO pojo = Interface.serviceMethod(hsh, byt);
    }
}

i doubt about parameter name are not matched with POJO’s field, but it runs without any error on original project. serialVersionUid is not defined.

any kind of help will be greatly appreciated, thank you.

*** it was interface for remoting, i didn't notice sorry

0 Answers0