Bound mismatch error and java generic method

前端 未结 5 1533
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-06 00:32

I am getting the following error:

Bound mismatch: The generic method constructPage(WebDriver, int, Class) of type     
Page is not applicab         


        
5条回答
  •  [愿得一人]
    2021-01-06 00:52

    For the purposes of your constructPage method, you could just use

    protected static final > T constructPage(...) 
    {
        Page p = null;
        //...
    }
    

提交回复
热议问题