0

I have an abstract class as follows:

public abstract class ServerClass extends AsyncServer {

    private Validator serverValidator;

    public ServerClass(Validator val) {

        serverContext = ctx;
        serverValidator = val;
    }

    public start() {

        result(serverValidator.start("foo"));
    }

    abstract void result(String r);
};

Then, I call this method as follows:

ServerClass server = new ServerClass(validator) {

    @Override
    void result(String r) {

        useString(r);
    }
};

But for some reason the String r (returned from result()) is null. Is there something wrong in this code?

Evan Porter
  • 2,987
  • 3
  • 32
  • 44

0 Answers0