{"action":"created","comment":{"url":"https://api.github.com/repos/javaparser/javaparser/pulls/comments/200852222","pull_request_review_id":135244084,"id":200852222,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMDg1MjIyMg==","diff_hunk":"@@ -0,0 +1,62 @@\n+package com.github.javaparser.symbolsolver;\n+\n+import com.github.javaparser.*;\n+import com.github.javaparser.ast.CompilationUnit;\n+import com.github.javaparser.ast.body.VariableDeclarator;\n+import com.github.javaparser.ast.expr.VariableDeclarationExpr;\n+import com.github.javaparser.resolution.declarations.ResolvedFieldDeclaration;\n+import com.github.javaparser.resolution.types.ResolvedType;\n+import com.github.javaparser.symbolsolver.model.resolution.TypeSolver;\n+import com.github.javaparser.symbolsolver.resolution.typesolvers.ReflectionTypeSolver;\n+import org.junit.Before;\n+import org.junit.Test;\n+\n+import java.util.Optional;\n+\n+import static org.junit.Assert.assertEquals;\n+import static org.junit.Assert.assertTrue;\n+\n+public class Issue1668 {\n+\n+    private JavaParser javaParser;\n+\n+    @Before\n+    public void setUp() {\n+        TypeSolver typeSolver = new ReflectionTypeSolver();\n+        ParserConfiguration config = new ParserConfiguration();\n+        config.setSymbolResolver(new JavaSymbolSolver(typeSolver));\n+        javaParser = new JavaParser(config);\n+    }\n+\n+    @Test\n+    public void test() {\n+        String code = String.join(System.lineSeparator(),\n+                \"public class X {\",\n+                \"   public static void main(String[] args) {\",\n+                \"       String s = \\\"a,b,c,d,e\\\";\",\n+                \"       String[] stringArray = s.split(',');\",\n+                \"   }\",\n+                \"}\"\n+        );\n+\n+        ParseResult<CompilationUnit> parseResult = javaParser.parse(ParseStart.COMPILATION_UNIT, Providers.provider(code));\n+        assertTrue(parseResult.isSuccessful());\n+        assertTrue(parseResult.getResult().isPresent());\n+\n+        CompilationUnit compilationUnit = parseResult.getResult().get();\n+        Optional<VariableDeclarator> stringArray = compilationUnit.findFirst(VariableDeclarator.class, variableDeclarator ->\n+                variableDeclarator.getNameAsString()\n+                        .equals(\"stringArray\"));\n+        assertTrue(stringArray.isPresent());\n+        VariableDeclarator variableDeclarator = stringArray.get();\n+        variableDeclarator.getParentNode().ifPresent(parent -> {\n+            if (parent instanceof VariableDeclarationExpr) {\n+                VariableDeclarationExpr variableDeclarationExpr = (VariableDeclarationExpr) parent;\n+                ResolvedType resolvedType = variableDeclarationExpr.calculateResolvedType();\n+                assertEquals(\"java.lang.String[]\", resolvedType.describe());\n+            }\n+        });\n+        ResolvedFieldDeclaration resolve = variableDeclarator.resolve();\n+        assertEquals(\"java.lang.String[]\", resolve.declaringType().getQualifiedName());","path":"javaparser-symbol-solver-testing/src/test/java/com/github/javaparser/symbolsolver/Issue1668.java","position":60,"original_position":60,"commit_id":"373e78673955a27c77141ebccf9b5f935215a524","original_commit_id":"85dd8e93907b4769fb635ea2bab93ada71890ff9","user":{"login":"matozoid","id":55701,"node_id":"MDQ6VXNlcjU1NzAx","avatar_url":"https://avatars3.githubusercontent.com/u/55701?v=4","gravatar_id":"","url":"https://api.github.com/users/matozoid","html_url":"https://github.com/matozoid","followers_url":"https://api.github.com/users/matozoid/followers","following_url":"https://api.github.com/users/matozoid/following{/other_user}","gists_url":"https://api.github.com/users/matozoid/gists{/gist_id}","starred_url":"https://api.github.com/users/matozoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matozoid/subscriptions","organizations_url":"https://api.github.com/users/matozoid/orgs","repos_url":"https://api.github.com/users/matozoid/repos","events_url":"https://api.github.com/users/matozoid/events{/privacy}","received_events_url":"https://api.github.com/users/matozoid/received_events","type":"User","site_admin":false},"body":"@ftomassetti @daanschipper can you come to a resolution on this?","created_at":"2018-07-08T20:12:40Z","updated_at":"2018-07-08T20:12:40Z","html_url":"https://github.com/javaparser/javaparser/pull/1669#discussion_r200852222","pull_request_url":"https://api.github.com/repos/javaparser/javaparser/pulls/1669","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/javaparser/javaparser/pulls/comments/200852222"},"html":{"href":"https://github.com/javaparser/javaparser/pull/1669#discussion_r200852222"},"pull_request":{"href":"https://api.github.com/repos/javaparser/javaparser/pulls/1669"}},"in_reply_to_id":198167828},"pull_request":{"url":"https://api.github.com/repos/javaparser/javaparser/pulls/1669","id":197358578,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3MzU4NTc4","html_url":"https://github.com/javaparser/javaparser/pull/1669","diff_url":"https://github.com/javaparser/javaparser/pull/1669.diff","patch_url":"https://github.com/javaparser/javaparser/pull/1669.patch","issue_url":"https://api.github.com/repos/javaparser/javaparser/issues/1669","number":1669,"state":"open","locked":false,"title":"[WIP] Resolving VariableDeclarator","user":{"login":"daanschipper","id":2778477,"node_id":"MDQ6VXNlcjI3Nzg0Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/2778477?v=4","gravatar_id":"","url":"https://api.github.com/users/daanschipper","html_url":"https://github.com/daanschipper","followers_url":"https://api.github.com/users/daanschipper/followers","following_url":"https://api.github.com/users/daanschipper/following{/other_user}","gists_url":"https://api.github.com/users/daanschipper/gists{/gist_id}","starred_url":"https://api.github.com/users/daanschipper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daanschipper/subscriptions","organizations_url":"https://api.github.com/users/daanschipper/orgs","repos_url":"https://api.github.com/users/daanschipper/repos","events_url":"https://api.github.com/users/daanschipper/events{/privacy}","received_events_url":"https://api.github.com/users/daanschipper/received_events","type":"User","site_admin":false},"body":"Providing test case for #1668 ","created_at":"2018-06-26T09:31:05Z","updated_at":"2018-07-08T20:12:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4db257f6eaa62594ca5d42bd0d1d1ee80e4d0220","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/javaparser/javaparser/pulls/1669/commits","review_comments_url":"https://api.github.com/repos/javaparser/javaparser/pulls/1669/comments","review_comment_url":"https://api.github.com/repos/javaparser/javaparser/pulls/comments{/number}","comments_url":"https://api.github.com/repos/javaparser/javaparser/issues/1669/comments","statuses_url":"https://api.github.com/repos/javaparser/javaparser/statuses/373e78673955a27c77141ebccf9b5f935215a524","head":{"label":"daanschipper:issue-1668","ref":"issue-1668","sha":"373e78673955a27c77141ebccf9b5f935215a524","user":{"login":"daanschipper","id":2778477,"node_id":"MDQ6VXNlcjI3Nzg0Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/2778477?v=4","gravatar_id":"","url":"https://api.github.com/users/daanschipper","html_url":"https://github.com/daanschipper","followers_url":"https://api.github.com/users/daanschipper/followers","following_url":"https://api.github.com/users/daanschipper/following{/other_user}","gists_url":"https://api.github.com/users/daanschipper/gists{/gist_id}","starred_url":"https://api.github.com/users/daanschipper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daanschipper/subscriptions","organizations_url":"https://api.github.com/users/daanschipper/orgs","repos_url":"https://api.github.com/users/daanschipper/repos","events_url":"https://api.github.com/users/daanschipper/events{/privacy}","received_events_url":"https://api.github.com/users/daanschipper/received_events","type":"User","site_admin":false},"repo":{"id":122035015,"node_id":"MDEwOlJlcG9zaXRvcnkxMjIwMzUwMTU=","name":"javaparser","full_name":"daanschipper/javaparser","owner":{"login":"daanschipper","id":2778477,"node_id":"MDQ6VXNlcjI3Nzg0Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/2778477?v=4","gravatar_id":"","url":"https://api.github.com/users/daanschipper","html_url":"https://github.com/daanschipper","followers_url":"https://api.github.com/users/daanschipper/followers","following_url":"https://api.github.com/users/daanschipper/following{/other_user}","gists_url":"https://api.github.com/users/daanschipper/gists{/gist_id}","starred_url":"https://api.github.com/users/daanschipper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daanschipper/subscriptions","organizations_url":"https://api.github.com/users/daanschipper/orgs","repos_url":"https://api.github.com/users/daanschipper/repos","events_url":"https://api.github.com/users/daanschipper/events{/privacy}","received_events_url":"https://api.github.com/users/daanschipper/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daanschipper/javaparser","description":" Java 9 Parser and Abstract Syntax Tree for Java –","fork":true,"url":"https://api.github.com/repos/daanschipper/javaparser","forks_url":"https://api.github.com/repos/daanschipper/javaparser/forks","keys_url":"https://api.github.com/repos/daanschipper/javaparser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daanschipper/javaparser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daanschipper/javaparser/teams","hooks_url":"https://api.github.com/repos/daanschipper/javaparser/hooks","issue_events_url":"https://api.github.com/repos/daanschipper/javaparser/issues/events{/number}","events_url":"https://api.github.com/repos/daanschipper/javaparser/events","assignees_url":"https://api.github.com/repos/daanschipper/javaparser/assignees{/user}","branches_url":"https://api.github.com/repos/daanschipper/javaparser/branches{/branch}","tags_url":"https://api.github.com/repos/daanschipper/javaparser/tags","blobs_url":"https://api.github.com/repos/daanschipper/javaparser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daanschipper/javaparser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daanschipper/javaparser/git/refs{/sha}","trees_url":"https://api.github.com/repos/daanschipper/javaparser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daanschipper/javaparser/statuses/{sha}","languages_url":"https://api.github.com/repos/daanschipper/javaparser/languages","stargazers_url":"https://api.github.com/repos/daanschipper/javaparser/stargazers","contributors_url":"https://api.github.com/repos/daanschipper/javaparser/contributors","subscribers_url":"https://api.github.com/repos/daanschipper/javaparser/subscribers","subscription_url":"https://api.github.com/repos/daanschipper/javaparser/subscription","commits_url":"https://api.github.com/repos/daanschipper/javaparser/commits{/sha}","git_commits_url":"https://api.github.com/repos/daanschipper/javaparser/git/commits{/sha}","comments_url":"https://api.github.com/repos/daanschipper/javaparser/comments{/number}","issue_comment_url":"https://api.github.com/repos/daanschipper/javaparser/issues/comments{/number}","contents_url":"https://api.github.com/repos/daanschipper/javaparser/contents/{+path}","compare_url":"https://api.github.com/repos/daanschipper/javaparser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daanschipper/javaparser/merges","archive_url":"https://api.github.com/repos/daanschipper/javaparser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daanschipper/javaparser/downloads","issues_url":"https://api.github.com/repos/daanschipper/javaparser/issues{/number}","pulls_url":"https://api.github.com/repos/daanschipper/javaparser/pulls{/number}","milestones_url":"https://api.github.com/repos/daanschipper/javaparser/milestones{/number}","notifications_url":"https://api.github.com/repos/daanschipper/javaparser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daanschipper/javaparser/labels{/name}","releases_url":"https://api.github.com/repos/daanschipper/javaparser/releases{/id}","deployments_url":"https://api.github.com/repos/daanschipper/javaparser/deployments","created_at":"2018-02-19T08:20:44Z","updated_at":"2018-07-05T13:22:54Z","pushed_at":"2018-07-08T20:12:17Z","git_url":"git://github.com/daanschipper/javaparser.git","ssh_url":"git@github.com:daanschipper/javaparser.git","clone_url":"https://github.com/daanschipper/javaparser.git","svn_url":"https://github.com/daanschipper/javaparser","homepage":"http://javaparser.org","size":18583,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"javaparser:master","ref":"master","sha":"510b943a21a985d4d377e4fb55ae475f3f64bfe1","user":{"login":"javaparser","id":9988471,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5ODg0NzE=","avatar_url":"https://avatars2.githubusercontent.com/u/9988471?v=4","gravatar_id":"","url":"https://api.github.com/users/javaparser","html_url":"https://github.com/javaparser","followers_url":"https://api.github.com/users/javaparser/followers","following_url":"https://api.github.com/users/javaparser/following{/other_user}","gists_url":"https://api.github.com/users/javaparser/gists{/gist_id}","starred_url":"https://api.github.com/users/javaparser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javaparser/subscriptions","organizations_url":"https://api.github.com/users/javaparser/orgs","repos_url":"https://api.github.com/users/javaparser/repos","events_url":"https://api.github.com/users/javaparser/events{/privacy}","received_events_url":"https://api.github.com/users/javaparser/received_events","type":"Organization","site_admin":false},"repo":{"id":2675355,"node_id":"MDEwOlJlcG9zaXRvcnkyNjc1MzU1","name":"javaparser","full_name":"javaparser/javaparser","owner":{"login":"javaparser","id":9988471,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5ODg0NzE=","avatar_url":"https://avatars2.githubusercontent.com/u/9988471?v=4","gravatar_id":"","url":"https://api.github.com/users/javaparser","html_url":"https://github.com/javaparser","followers_url":"https://api.github.com/users/javaparser/followers","following_url":"https://api.github.com/users/javaparser/following{/other_user}","gists_url":"https://api.github.com/users/javaparser/gists{/gist_id}","starred_url":"https://api.github.com/users/javaparser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javaparser/subscriptions","organizations_url":"https://api.github.com/users/javaparser/orgs","repos_url":"https://api.github.com/users/javaparser/repos","events_url":"https://api.github.com/users/javaparser/events{/privacy}","received_events_url":"https://api.github.com/users/javaparser/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/javaparser/javaparser","description":" Java 10 Parser and Abstract Syntax Tree for Java –","fork":false,"url":"https://api.github.com/repos/javaparser/javaparser","forks_url":"https://api.github.com/repos/javaparser/javaparser/forks","keys_url":"https://api.github.com/repos/javaparser/javaparser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/javaparser/javaparser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/javaparser/javaparser/teams","hooks_url":"https://api.github.com/repos/javaparser/javaparser/hooks","issue_events_url":"https://api.github.com/repos/javaparser/javaparser/issues/events{/number}","events_url":"https://api.github.com/repos/javaparser/javaparser/events","assignees_url":"https://api.github.com/repos/javaparser/javaparser/assignees{/user}","branches_url":"https://api.github.com/repos/javaparser/javaparser/branches{/branch}","tags_url":"https://api.github.com/repos/javaparser/javaparser/tags","blobs_url":"https://api.github.com/repos/javaparser/javaparser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/javaparser/javaparser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/javaparser/javaparser/git/refs{/sha}","trees_url":"https://api.github.com/repos/javaparser/javaparser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/javaparser/javaparser/statuses/{sha}","languages_url":"https://api.github.com/repos/javaparser/javaparser/languages","stargazers_url":"https://api.github.com/repos/javaparser/javaparser/stargazers","contributors_url":"https://api.github.com/repos/javaparser/javaparser/contributors","subscribers_url":"https://api.github.com/repos/javaparser/javaparser/subscribers","subscription_url":"https://api.github.com/repos/javaparser/javaparser/subscription","commits_url":"https://api.github.com/repos/javaparser/javaparser/commits{/sha}","git_commits_url":"https://api.github.com/repos/javaparser/javaparser/git/commits{/sha}","comments_url":"https://api.github.com/repos/javaparser/javaparser/comments{/number}","issue_comment_url":"https://api.github.com/repos/javaparser/javaparser/issues/comments{/number}","contents_url":"https://api.github.com/repos/javaparser/javaparser/contents/{+path}","compare_url":"https://api.github.com/repos/javaparser/javaparser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/javaparser/javaparser/merges","archive_url":"https://api.github.com/repos/javaparser/javaparser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/javaparser/javaparser/downloads","issues_url":"https://api.github.com/repos/javaparser/javaparser/issues{/number}","pulls_url":"https://api.github.com/repos/javaparser/javaparser/pulls{/number}","milestones_url":"https://api.github.com/repos/javaparser/javaparser/milestones{/number}","notifications_url":"https://api.github.com/repos/javaparser/javaparser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/javaparser/javaparser/labels{/name}","releases_url":"https://api.github.com/repos/javaparser/javaparser/releases{/id}","deployments_url":"https://api.github.com/repos/javaparser/javaparser/deployments","created_at":"2011-10-30T14:03:44Z","updated_at":"2018-07-08T20:01:00Z","pushed_at":"2018-07-08T20:12:19Z","git_url":"git://github.com/javaparser/javaparser.git","ssh_url":"git@github.com:javaparser/javaparser.git","clone_url":"https://github.com/javaparser/javaparser.git","svn_url":"https://github.com/javaparser/javaparser","homepage":"https://javaparser.org","size":18571,"stargazers_count":1825,"watchers_count":1825,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":434,"mirror_url":null,"archived":false,"open_issues_count":233,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":434,"open_issues":233,"watchers":1825,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/javaparser/javaparser/pulls/1669"},"html":{"href":"https://github.com/javaparser/javaparser/pull/1669"},"issue":{"href":"https://api.github.com/repos/javaparser/javaparser/issues/1669"},"comments":{"href":"https://api.github.com/repos/javaparser/javaparser/issues/1669/comments"},"review_comments":{"href":"https://api.github.com/repos/javaparser/javaparser/pulls/1669/comments"},"review_comment":{"href":"https://api.github.com/repos/javaparser/javaparser/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/javaparser/javaparser/pulls/1669/commits"},"statuses":{"href":"https://api.github.com/repos/javaparser/javaparser/statuses/373e78673955a27c77141ebccf9b5f935215a524"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"matozoid"}}