{"action":"closed","issue":{"url":"https://api.github.com/repos/mtedone/podam/issues/106","labels_url":"https://api.github.com/repos/mtedone/podam/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/mtedone/podam/issues/106/comments","events_url":"https://api.github.com/repos/mtedone/podam/issues/106/events","html_url":"https://github.com/mtedone/podam/issues/106","id":79728329,"number":106,"title":"Unused fields in AbstractRandomDataProviderStrategy.addAttributeStrategy() and AbstractRandomDataProviderStrategy.addSpecific(). The Javadoc for these two methods is incorrect as does not specify a correct contract. ","user":{"login":"daivanov","id":1887529,"avatar_url":"https://avatars.githubusercontent.com/u/1887529?v=3","gravatar_id":"","url":"https://api.github.com/users/daivanov","html_url":"https://github.com/daivanov","followers_url":"https://api.github.com/users/daivanov/followers","following_url":"https://api.github.com/users/daivanov/following{/other_user}","gists_url":"https://api.github.com/users/daivanov/gists{/gist_id}","starred_url":"https://api.github.com/users/daivanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daivanov/subscriptions","organizations_url":"https://api.github.com/users/daivanov/orgs","repos_url":"https://api.github.com/users/daivanov/repos","events_url":"https://api.github.com/users/daivanov/events{/privacy}","received_events_url":"https://api.github.com/users/daivanov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-23T04:47:06Z","updated_at":"2015-05-23T15:22:36Z","closed_at":"2015-05-23T15:22:36Z","body":"Calling AbstractRandomDataProviderStrategy.addAttributeStrategy() and AbstractRandomDataProviderStrategy.addSpecific() has no effect if there is already mapping or attribute strategy present.\r\n\r\nDespite JavaDocs specifies correct behavior:\r\nhttp://mtedone.github.io/podam/apidocs/uk/co/jemos/podam/api/AbstractRandomDataProviderStrategy.html#addSpecific-java.lang.Class-java.lang.Class-\r\n\r\nhttps://github.com/mtedone/podam/blob/cf7d7fda9b50bb767ce809bf7d9342fdfad41e1d/src/main/java/uk/co/jemos/podam/api/AbstractRandomDataProviderStrategy.java#L540\r\n\r\nhttps://github.com/mtedone/podam/blob/cf7d7fda9b50bb767ce809bf7d9342fdfad41e1d/src/main/java/uk/co/jemos/podam/api/AbstractRandomDataProviderStrategy.java#L598\r\n\r\nBoth methods define unused variable aClass and attributeStrategyClass\r\n\r\n\tClass<?> aClass = specificTypes.putIfAbsent(abstractClass, specificClass);\r\n\tif (null == aClass) {\r\n\t\taClass = specificClass;\r\n\t}\r\n\r\n\tClass<AttributeStrategy<?>> attributeStrategyClass = attributeStrategies.putIfAbsent(annotationClass, strategyClass);\r\n\tif (null == attributeStrategyClass) {\r\n\t\tattributeStrategyClass = strategyClass;\r\n\t}"}}