{"action":"created","issue":{"url":"https://api.github.com/repos/appium/java-client/issues/368","repository_url":"https://api.github.com/repos/appium/java-client","labels_url":"https://api.github.com/repos/appium/java-client/issues/368/labels{/name}","comments_url":"https://api.github.com/repos/appium/java-client/issues/368/comments","events_url":"https://api.github.com/repos/appium/java-client/issues/368/events","html_url":"https://github.com/appium/java-client/issues/368","id":150827080,"number":368,"title":"Failed to initialize object with generic type via AppiumFieldDecorator","user":{"login":"SButterfly","id":4300612,"avatar_url":"https://avatars.githubusercontent.com/u/4300612?v=3","gravatar_id":"","url":"https://api.github.com/users/SButterfly","html_url":"https://github.com/SButterfly","followers_url":"https://api.github.com/users/SButterfly/followers","following_url":"https://api.github.com/users/SButterfly/following{/other_user}","gists_url":"https://api.github.com/users/SButterfly/gists{/gist_id}","starred_url":"https://api.github.com/users/SButterfly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SButterfly/subscriptions","organizations_url":"https://api.github.com/users/SButterfly/orgs","repos_url":"https://api.github.com/users/SButterfly/repos","events_url":"https://api.github.com/users/SButterfly/events{/privacy}","received_events_url":"https://api.github.com/users/SButterfly/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/appium/java-client/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-25T11:21:17Z","updated_at":"2016-04-25T12:41:20Z","closed_at":null,"body":"Hello,\r\nwhen I want to use pages with generic types, I get those: \r\n\r\nObjects:\r\n\r\n```java\r\npublic class TempLoginPage<T> {\r\n\r\n    public List<T> items;\r\n\r\n    public List<T> getItems() {\r\n        return items;\r\n    }\r\n}\r\n\r\npublic class LoginPage extends TempLoginPage<Object> {\r\n\r\n    @iOSFindBy(uiAutomator = \".buttons()['Login']\")\r\n    public WebElement loginButton;\r\n}\r\n\r\n// main\r\nPageFactory.initElements(new AppiumFieldDecorator(getDriver()), new LoginPage());\r\n```\r\n\r\nCrashes with:\r\n```java\r\njava.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class\r\n\tat io.appium.java_client.pagefactory.AppiumFieldDecorator.decorateWidget(AppiumFieldDecorator.java:185)\r\n\tat io.appium.java_client.pagefactory.AppiumFieldDecorator.decorate(AppiumFieldDecorator.java:160)\r\n\tat org.openqa.selenium.support.PageFactory.proxyFields(PageFactory.java:113)\r\n\tat org.openqa.selenium.support.PageFactory.initElements(PageFactory.java:105)\r\n\tat \r\n\t... 47 more\r\n```\r\nI'm using 3.3.0 java client"},"comment":{"url":"https://api.github.com/repos/appium/java-client/issues/comments/214298073","html_url":"https://github.com/appium/java-client/issues/368#issuecomment-214298073","issue_url":"https://api.github.com/repos/appium/java-client/issues/368","id":214298073,"user":{"login":"TikhomirovSergey","id":4927589,"avatar_url":"https://avatars.githubusercontent.com/u/4927589?v=3","gravatar_id":"","url":"https://api.github.com/users/TikhomirovSergey","html_url":"https://github.com/TikhomirovSergey","followers_url":"https://api.github.com/users/TikhomirovSergey/followers","following_url":"https://api.github.com/users/TikhomirovSergey/following{/other_user}","gists_url":"https://api.github.com/users/TikhomirovSergey/gists{/gist_id}","starred_url":"https://api.github.com/users/TikhomirovSergey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TikhomirovSergey/subscriptions","organizations_url":"https://api.github.com/users/TikhomirovSergey/orgs","repos_url":"https://api.github.com/users/TikhomirovSergey/repos","events_url":"https://api.github.com/users/TikhomirovSergey/events{/privacy}","received_events_url":"https://api.github.com/users/TikhomirovSergey/received_events","type":"User","site_admin":false},"created_at":"2016-04-25T12:41:20Z","updated_at":"2016-04-25T12:41:20Z","body":"@SButterfly \r\nThanks for the report"}}