{"action":"created","comment":{"url":"https://api.github.com/repos/square/retrofit/pulls/comments/45280300","id":45280300,"diff_hunk":"@@ -291,12 +295,64 @@\n         .addConverterFactory(new MyConverterFactory())\n         .build();\n     Annotated annotated = retrofit.create(Annotated.class);\n-    annotated.parameter(null); // Trigger internal setup.\n+    annotated.bodyParameter(null); // Trigger internal setup.\n \n     Annotation[] annotations = annotationsRef.get();\n     assertThat(annotations).hasAtLeastOneElementOfType(Annotated.Foo.class);\n   }\n \n+  @Test public void parameterAnnotationsPassedToStringConverter() {\n+    final AtomicReference<Annotation[]> annotationsRef = new AtomicReference<>();\n+    class MyConverterFactory extends Converter.Factory {\n+      @Override public Converter<?, String> toString(Type type, Annotation[] annotations) {\n+        annotationsRef.set(annotations);\n+\n+        return new Converter<Object, String>() {\n+          @Override public String convert(Object value) throws IOException {\n+            return String.valueOf(value);\n+          }\n+        };\n+      }\n+    }\n+    Retrofit retrofit = new Retrofit.Builder()\n+        .baseUrl(server.url(\"/\"))\n+        .addConverterFactory(new MyConverterFactory())\n+        .build();\n+    Annotated annotated = retrofit.create(Annotated.class);\n+    annotated.queryParameter(null); // Trigger internal setup.\n+\n+    Annotation[] annotations = annotationsRef.get();\n+    assertThat(annotations).hasAtLeastOneElementOfType(Annotated.Foo.class);\n+  }\n+\n+  @Test public void stringConverterNotCalledForString() {\n+    class MyConverterFactory extends Converter.Factory {\n+      @Override public Converter<?, String> toString(Type type, Annotation[] annotations) {\n+        throw new AssertionError();\n+      }\n+    }\n+    Retrofit retrofit = new Retrofit.Builder()\n+        .baseUrl(server.url(\"/\"))\n+        .addConverterFactory(new MyConverterFactory())\n+        .build();\n+    CallMethod service = retrofit.create(CallMethod.class);\n+    service.queryString(null);\n+  }\n+\n+  @Test public void stringConverterReturningNullResultsInDefault() {\n+    class MyConverterFactory extends Converter.Factory {\n+      @Override public Converter<?, String> toString(Type type, Annotation[] annotations) {\n+        return null;\n+      }\n+    }\n+    Retrofit retrofit = new Retrofit.Builder()\n+        .baseUrl(server.url(\"/\"))\n+        .addConverterFactory(new MyConverterFactory())\n+        .build();\n+    CallMethod service = retrofit.create(CallMethod.class);\n+    service.queryObject(null);","path":"retrofit/src/test/java/retrofit/RetrofitTest.java","position":114,"original_position":114,"commit_id":"536b3d2be8557a2477e82e817330b51602661d02","original_commit_id":"536b3d2be8557a2477e82e817330b51602661d02","user":{"login":"swankjesse","id":133019,"avatar_url":"https://avatars.githubusercontent.com/u/133019?v=3","gravatar_id":"","url":"https://api.github.com/users/swankjesse","html_url":"https://github.com/swankjesse","followers_url":"https://api.github.com/users/swankjesse/followers","following_url":"https://api.github.com/users/swankjesse/following{/other_user}","gists_url":"https://api.github.com/users/swankjesse/gists{/gist_id}","starred_url":"https://api.github.com/users/swankjesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swankjesse/subscriptions","organizations_url":"https://api.github.com/users/swankjesse/orgs","repos_url":"https://api.github.com/users/swankjesse/repos","events_url":"https://api.github.com/users/swankjesse/events{/privacy}","received_events_url":"https://api.github.com/users/swankjesse/received_events","type":"User","site_admin":false},"body":"should this assert someting?","created_at":"2015-11-18T23:55:45Z","updated_at":"2015-11-18T23:55:45Z","html_url":"https://github.com/square/retrofit/pull/1294#discussion_r45280300","pull_request_url":"https://api.github.com/repos/square/retrofit/pulls/1294","_links":{"self":{"href":"https://api.github.com/repos/square/retrofit/pulls/comments/45280300"},"html":{"href":"https://github.com/square/retrofit/pull/1294#discussion_r45280300"},"pull_request":{"href":"https://api.github.com/repos/square/retrofit/pulls/1294"}}},"pull_request":{"url":"https://api.github.com/repos/square/retrofit/pulls/1294","id":51046504,"html_url":"https://github.com/square/retrofit/pull/1294","diff_url":"https://github.com/square/retrofit/pull/1294.diff","patch_url":"https://github.com/square/retrofit/pull/1294.patch","issue_url":"https://api.github.com/repos/square/retrofit/issues/1294","number":1294,"state":"open","locked":false,"title":"Add string converter support for all non-body annotation types.","user":{"login":"JakeWharton","id":66577,"avatar_url":"https://avatars.githubusercontent.com/u/66577?v=3","gravatar_id":"","url":"https://api.github.com/users/JakeWharton","html_url":"https://github.com/JakeWharton","followers_url":"https://api.github.com/users/JakeWharton/followers","following_url":"https://api.github.com/users/JakeWharton/following{/other_user}","gists_url":"https://api.github.com/users/JakeWharton/gists{/gist_id}","starred_url":"https://api.github.com/users/JakeWharton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakeWharton/subscriptions","organizations_url":"https://api.github.com/users/JakeWharton/orgs","repos_url":"https://api.github.com/users/JakeWharton/repos","events_url":"https://api.github.com/users/JakeWharton/events{/privacy}","received_events_url":"https://api.github.com/users/JakeWharton/received_events","type":"User","site_admin":false},"body":"This also changes body-based annotation types to go through the request body converter at parsing time.","created_at":"2015-11-18T06:12:09Z","updated_at":"2015-11-18T23:55:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"316b05b5077a269e02e1cce5f6eac87e935f6521","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/square/retrofit/pulls/1294/commits","review_comments_url":"https://api.github.com/repos/square/retrofit/pulls/1294/comments","review_comment_url":"https://api.github.com/repos/square/retrofit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/square/retrofit/issues/1294/comments","statuses_url":"https://api.github.com/repos/square/retrofit/statuses/536b3d2be8557a2477e82e817330b51602661d02","head":{"label":"square:jw/string-converter","ref":"jw/string-converter","sha":"536b3d2be8557a2477e82e817330b51602661d02","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":892275,"name":"retrofit","full_name":"square/retrofit","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/retrofit","description":"Type-safe HTTP client for Android and Java by Square, Inc.","fork":false,"url":"https://api.github.com/repos/square/retrofit","forks_url":"https://api.github.com/repos/square/retrofit/forks","keys_url":"https://api.github.com/repos/square/retrofit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/retrofit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/retrofit/teams","hooks_url":"https://api.github.com/repos/square/retrofit/hooks","issue_events_url":"https://api.github.com/repos/square/retrofit/issues/events{/number}","events_url":"https://api.github.com/repos/square/retrofit/events","assignees_url":"https://api.github.com/repos/square/retrofit/assignees{/user}","branches_url":"https://api.github.com/repos/square/retrofit/branches{/branch}","tags_url":"https://api.github.com/repos/square/retrofit/tags","blobs_url":"https://api.github.com/repos/square/retrofit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/retrofit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/retrofit/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/retrofit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/retrofit/statuses/{sha}","languages_url":"https://api.github.com/repos/square/retrofit/languages","stargazers_url":"https://api.github.com/repos/square/retrofit/stargazers","contributors_url":"https://api.github.com/repos/square/retrofit/contributors","subscribers_url":"https://api.github.com/repos/square/retrofit/subscribers","subscription_url":"https://api.github.com/repos/square/retrofit/subscription","commits_url":"https://api.github.com/repos/square/retrofit/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/retrofit/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/retrofit/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/retrofit/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/retrofit/contents/{+path}","compare_url":"https://api.github.com/repos/square/retrofit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/retrofit/merges","archive_url":"https://api.github.com/repos/square/retrofit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/retrofit/downloads","issues_url":"https://api.github.com/repos/square/retrofit/issues{/number}","pulls_url":"https://api.github.com/repos/square/retrofit/pulls{/number}","milestones_url":"https://api.github.com/repos/square/retrofit/milestones{/number}","notifications_url":"https://api.github.com/repos/square/retrofit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/retrofit/labels{/name}","releases_url":"https://api.github.com/repos/square/retrofit/releases{/id}","created_at":"2010-09-06T21:39:43Z","updated_at":"2015-11-18T23:49:25Z","pushed_at":"2015-11-18T06:12:09Z","git_url":"git://github.com/square/retrofit.git","ssh_url":"git@github.com:square/retrofit.git","clone_url":"https://github.com/square/retrofit.git","svn_url":"https://github.com/square/retrofit","homepage":"http://square.github.io/retrofit/","size":58856,"stargazers_count":8171,"watchers_count":8171,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1446,"mirror_url":null,"open_issues_count":45,"forks":1446,"open_issues":45,"watchers":8171,"default_branch":"master"}},"base":{"label":"square:master","ref":"master","sha":"6e29d07cce87748d0fc78b49c2a2ffba7f0bb94e","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":892275,"name":"retrofit","full_name":"square/retrofit","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/retrofit","description":"Type-safe HTTP client for Android and Java by Square, Inc.","fork":false,"url":"https://api.github.com/repos/square/retrofit","forks_url":"https://api.github.com/repos/square/retrofit/forks","keys_url":"https://api.github.com/repos/square/retrofit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/retrofit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/retrofit/teams","hooks_url":"https://api.github.com/repos/square/retrofit/hooks","issue_events_url":"https://api.github.com/repos/square/retrofit/issues/events{/number}","events_url":"https://api.github.com/repos/square/retrofit/events","assignees_url":"https://api.github.com/repos/square/retrofit/assignees{/user}","branches_url":"https://api.github.com/repos/square/retrofit/branches{/branch}","tags_url":"https://api.github.com/repos/square/retrofit/tags","blobs_url":"https://api.github.com/repos/square/retrofit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/retrofit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/retrofit/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/retrofit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/retrofit/statuses/{sha}","languages_url":"https://api.github.com/repos/square/retrofit/languages","stargazers_url":"https://api.github.com/repos/square/retrofit/stargazers","contributors_url":"https://api.github.com/repos/square/retrofit/contributors","subscribers_url":"https://api.github.com/repos/square/retrofit/subscribers","subscription_url":"https://api.github.com/repos/square/retrofit/subscription","commits_url":"https://api.github.com/repos/square/retrofit/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/retrofit/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/retrofit/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/retrofit/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/retrofit/contents/{+path}","compare_url":"https://api.github.com/repos/square/retrofit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/retrofit/merges","archive_url":"https://api.github.com/repos/square/retrofit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/retrofit/downloads","issues_url":"https://api.github.com/repos/square/retrofit/issues{/number}","pulls_url":"https://api.github.com/repos/square/retrofit/pulls{/number}","milestones_url":"https://api.github.com/repos/square/retrofit/milestones{/number}","notifications_url":"https://api.github.com/repos/square/retrofit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/retrofit/labels{/name}","releases_url":"https://api.github.com/repos/square/retrofit/releases{/id}","created_at":"2010-09-06T21:39:43Z","updated_at":"2015-11-18T23:49:25Z","pushed_at":"2015-11-18T06:12:09Z","git_url":"git://github.com/square/retrofit.git","ssh_url":"git@github.com:square/retrofit.git","clone_url":"https://github.com/square/retrofit.git","svn_url":"https://github.com/square/retrofit","homepage":"http://square.github.io/retrofit/","size":58856,"stargazers_count":8171,"watchers_count":8171,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1446,"mirror_url":null,"open_issues_count":45,"forks":1446,"open_issues":45,"watchers":8171,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/retrofit/pulls/1294"},"html":{"href":"https://github.com/square/retrofit/pull/1294"},"issue":{"href":"https://api.github.com/repos/square/retrofit/issues/1294"},"comments":{"href":"https://api.github.com/repos/square/retrofit/issues/1294/comments"},"review_comments":{"href":"https://api.github.com/repos/square/retrofit/pulls/1294/comments"},"review_comment":{"href":"https://api.github.com/repos/square/retrofit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/square/retrofit/pulls/1294/commits"},"statuses":{"href":"https://api.github.com/repos/square/retrofit/statuses/536b3d2be8557a2477e82e817330b51602661d02"}}}}