score:1

Accepted answer

your custom class overriddes the setpassword method, but contains only half of the operations of the original method:

    public void setpassword(string password) {
        this.poolproperties.setpassword(password);
        this.poolproperties.getdbproperties().setproperty("password",this.poolproperties.getpassword());
    }

when overriding methods you should always consider calling the overridden method, by using the keyword super:

    @override
    public void setpassword(string encodedpassword){
        crypt crypt = new crypt();
        string decodepassword = crypt.decryptvalue(encodedpassword);
        super.setpassword(decodepassword);
    }

Related Query

More Query from same tag