{"action":"created","comment":{"url":"https://api.github.com/repos/querydsl/querydsl/pulls/comments/28220735","id":28220735,"diff_hunk":"@@ -0,0 +1,69 @@\n+/*\n+ * Copyright 2011, Mysema Ltd\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package com.querydsl.codegen;\n+\n+import org.reflections.Reflections;\n+import org.reflections.adapters.JavaReflectionAdapter;\n+import org.reflections.scanners.ResourcesScanner;\n+import org.reflections.scanners.SubTypesScanner;\n+import org.reflections.util.ClasspathHelper;\n+import org.reflections.util.ConfigurationBuilder;\n+\n+import java.io.IOException;\n+import java.util.HashSet;\n+import java.util.Set;\n+\n+/**\n+ * ClassPathUtils provides classpath scanning functionality\n+ *\n+ * @author tiwe\n+ */\n+public final class ClassPathUtils {\n+\n+    public static Set<Class<?>> scanPackage(ClassLoader classLoader, Package pkg) throws IOException {\n+        return scanPackage(classLoader, pkg.getName());\n+    }\n+\n+    public static Set<Class<?>> scanPackage(ClassLoader classLoader, String pkg) throws IOException {\n+        Reflections reflections = new Reflections(new ConfigurationBuilder()\n+                .addUrls(ClasspathHelper.forPackage(pkg, classLoader))\n+                .addClassLoader(classLoader)\n+                .setScanners(new SubTypesScanner(false))\n+                .setMetadataAdapter(new JavaReflectionAdapter()));","path":"querydsl-codegen/src/main/java/com/querydsl/codegen/ClassPathUtils.java","position":43,"original_position":43,"commit_id":"2fcc638910dab25d5732b27aa190e80d63e103eb","original_commit_id":"2fcc638910dab25d5732b27aa190e80d63e103eb","user":{"login":"Shredder121","id":4105066,"avatar_url":"https://avatars.githubusercontent.com/u/4105066?v=3","gravatar_id":"","url":"https://api.github.com/users/Shredder121","html_url":"https://github.com/Shredder121","followers_url":"https://api.github.com/users/Shredder121/followers","following_url":"https://api.github.com/users/Shredder121/following{/other_user}","gists_url":"https://api.github.com/users/Shredder121/gists{/gist_id}","starred_url":"https://api.github.com/users/Shredder121/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shredder121/subscriptions","organizations_url":"https://api.github.com/users/Shredder121/orgs","repos_url":"https://api.github.com/users/Shredder121/repos","events_url":"https://api.github.com/users/Shredder121/events{/privacy}","received_events_url":"https://api.github.com/users/Shredder121/received_events","type":"User","site_admin":false},"body":"[Looking at the implementation of `getMetadataAdapter()`](http://grepcode.com/file/repo1.maven.org/maven2/org.reflections/reflections/0.9.9/org/reflections/util/ConfigurationBuilder.java#ConfigurationBuilder.getMetadataAdapter%28%29) it is safe (and more extensible) to leave the construction of the `MetadataAdapter` to reflections.","created_at":"2015-04-13T08:13:51Z","updated_at":"2015-04-13T08:13:51Z","html_url":"https://github.com/querydsl/querydsl/pull/1313#discussion_r28220735","pull_request_url":"https://api.github.com/repos/querydsl/querydsl/pulls/1313","_links":{"self":{"href":"https://api.github.com/repos/querydsl/querydsl/pulls/comments/28220735"},"html":{"href":"https://github.com/querydsl/querydsl/pull/1313#discussion_r28220735"},"pull_request":{"href":"https://api.github.com/repos/querydsl/querydsl/pulls/1313"}}},"pull_request":{"url":"https://api.github.com/repos/querydsl/querydsl/pulls/1313","id":32987368,"html_url":"https://github.com/querydsl/querydsl/pull/1313","diff_url":"https://github.com/querydsl/querydsl/pull/1313.diff","patch_url":"https://github.com/querydsl/querydsl/pull/1313.patch","issue_url":"https://api.github.com/repos/querydsl/querydsl/issues/1313","number":1313,"state":"open","locked":false,"title":"Change ClasspathUtils to support 'zip'-files implementation. Used Reflections API.","user":{"login":"bcubk","id":503274,"avatar_url":"https://avatars.githubusercontent.com/u/503274?v=3","gravatar_id":"","url":"https://api.github.com/users/bcubk","html_url":"https://github.com/bcubk","followers_url":"https://api.github.com/users/bcubk/followers","following_url":"https://api.github.com/users/bcubk/following{/other_user}","gists_url":"https://api.github.com/users/bcubk/gists{/gist_id}","starred_url":"https://api.github.com/users/bcubk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcubk/subscriptions","organizations_url":"https://api.github.com/users/bcubk/orgs","repos_url":"https://api.github.com/users/bcubk/repos","events_url":"https://api.github.com/users/bcubk/events{/privacy}","received_events_url":"https://api.github.com/users/bcubk/received_events","type":"User","site_admin":false},"body":"Fixed ClassPathUtils to support 'zip' files. I used the method 'safeClassForName' to initialize the retrieved classes. This PR is a fix of #1312\r\nIssue: #1235","created_at":"2015-04-09T19:22:13Z","updated_at":"2015-04-13T08:13:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2578b2e8e1fdb25e76834ec6784d3e4f3c6bf961","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/querydsl/querydsl/pulls/1313/commits","review_comments_url":"https://api.github.com/repos/querydsl/querydsl/pulls/1313/comments","review_comment_url":"https://api.github.com/repos/querydsl/querydsl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/querydsl/querydsl/issues/1313/comments","statuses_url":"https://api.github.com/repos/querydsl/querydsl/statuses/2fcc638910dab25d5732b27aa190e80d63e103eb","head":{"label":"bcubk:master","ref":"master","sha":"2fcc638910dab25d5732b27aa190e80d63e103eb","user":{"login":"bcubk","id":503274,"avatar_url":"https://avatars.githubusercontent.com/u/503274?v=3","gravatar_id":"","url":"https://api.github.com/users/bcubk","html_url":"https://github.com/bcubk","followers_url":"https://api.github.com/users/bcubk/followers","following_url":"https://api.github.com/users/bcubk/following{/other_user}","gists_url":"https://api.github.com/users/bcubk/gists{/gist_id}","starred_url":"https://api.github.com/users/bcubk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcubk/subscriptions","organizations_url":"https://api.github.com/users/bcubk/orgs","repos_url":"https://api.github.com/users/bcubk/repos","events_url":"https://api.github.com/users/bcubk/events{/privacy}","received_events_url":"https://api.github.com/users/bcubk/received_events","type":"User","site_admin":false},"repo":{"id":31907806,"name":"querydsl","full_name":"bcubk/querydsl","owner":{"login":"bcubk","id":503274,"avatar_url":"https://avatars.githubusercontent.com/u/503274?v=3","gravatar_id":"","url":"https://api.github.com/users/bcubk","html_url":"https://github.com/bcubk","followers_url":"https://api.github.com/users/bcubk/followers","following_url":"https://api.github.com/users/bcubk/following{/other_user}","gists_url":"https://api.github.com/users/bcubk/gists{/gist_id}","starred_url":"https://api.github.com/users/bcubk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcubk/subscriptions","organizations_url":"https://api.github.com/users/bcubk/orgs","repos_url":"https://api.github.com/users/bcubk/repos","events_url":"https://api.github.com/users/bcubk/events{/privacy}","received_events_url":"https://api.github.com/users/bcubk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bcubk/querydsl","description":"Unified Queries for Java","fork":true,"url":"https://api.github.com/repos/bcubk/querydsl","forks_url":"https://api.github.com/repos/bcubk/querydsl/forks","keys_url":"https://api.github.com/repos/bcubk/querydsl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bcubk/querydsl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bcubk/querydsl/teams","hooks_url":"https://api.github.com/repos/bcubk/querydsl/hooks","issue_events_url":"https://api.github.com/repos/bcubk/querydsl/issues/events{/number}","events_url":"https://api.github.com/repos/bcubk/querydsl/events","assignees_url":"https://api.github.com/repos/bcubk/querydsl/assignees{/user}","branches_url":"https://api.github.com/repos/bcubk/querydsl/branches{/branch}","tags_url":"https://api.github.com/repos/bcubk/querydsl/tags","blobs_url":"https://api.github.com/repos/bcubk/querydsl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bcubk/querydsl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bcubk/querydsl/git/refs{/sha}","trees_url":"https://api.github.com/repos/bcubk/querydsl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bcubk/querydsl/statuses/{sha}","languages_url":"https://api.github.com/repos/bcubk/querydsl/languages","stargazers_url":"https://api.github.com/repos/bcubk/querydsl/stargazers","contributors_url":"https://api.github.com/repos/bcubk/querydsl/contributors","subscribers_url":"https://api.github.com/repos/bcubk/querydsl/subscribers","subscription_url":"https://api.github.com/repos/bcubk/querydsl/subscription","commits_url":"https://api.github.com/repos/bcubk/querydsl/commits{/sha}","git_commits_url":"https://api.github.com/repos/bcubk/querydsl/git/commits{/sha}","comments_url":"https://api.github.com/repos/bcubk/querydsl/comments{/number}","issue_comment_url":"https://api.github.com/repos/bcubk/querydsl/issues/comments{/number}","contents_url":"https://api.github.com/repos/bcubk/querydsl/contents/{+path}","compare_url":"https://api.github.com/repos/bcubk/querydsl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bcubk/querydsl/merges","archive_url":"https://api.github.com/repos/bcubk/querydsl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bcubk/querydsl/downloads","issues_url":"https://api.github.com/repos/bcubk/querydsl/issues{/number}","pulls_url":"https://api.github.com/repos/bcubk/querydsl/pulls{/number}","milestones_url":"https://api.github.com/repos/bcubk/querydsl/milestones{/number}","notifications_url":"https://api.github.com/repos/bcubk/querydsl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bcubk/querydsl/labels{/name}","releases_url":"https://api.github.com/repos/bcubk/querydsl/releases{/id}","created_at":"2015-03-09T15:54:48Z","updated_at":"2015-04-11T09:28:32Z","pushed_at":"2015-04-11T09:28:30Z","git_url":"git://github.com/bcubk/querydsl.git","ssh_url":"git@github.com:bcubk/querydsl.git","clone_url":"https://github.com/bcubk/querydsl.git","svn_url":"https://github.com/bcubk/querydsl","homepage":"http://www.querydsl.com","size":42049,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"querydsl:master","ref":"master","sha":"8a8c36e7500d63180c8c777d1e1b56b5e1aa87ac","user":{"login":"querydsl","id":7044479,"avatar_url":"https://avatars.githubusercontent.com/u/7044479?v=3","gravatar_id":"","url":"https://api.github.com/users/querydsl","html_url":"https://github.com/querydsl","followers_url":"https://api.github.com/users/querydsl/followers","following_url":"https://api.github.com/users/querydsl/following{/other_user}","gists_url":"https://api.github.com/users/querydsl/gists{/gist_id}","starred_url":"https://api.github.com/users/querydsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/querydsl/subscriptions","organizations_url":"https://api.github.com/users/querydsl/orgs","repos_url":"https://api.github.com/users/querydsl/repos","events_url":"https://api.github.com/users/querydsl/events{/privacy}","received_events_url":"https://api.github.com/users/querydsl/received_events","type":"Organization","site_admin":false},"repo":{"id":2158982,"name":"querydsl","full_name":"querydsl/querydsl","owner":{"login":"querydsl","id":7044479,"avatar_url":"https://avatars.githubusercontent.com/u/7044479?v=3","gravatar_id":"","url":"https://api.github.com/users/querydsl","html_url":"https://github.com/querydsl","followers_url":"https://api.github.com/users/querydsl/followers","following_url":"https://api.github.com/users/querydsl/following{/other_user}","gists_url":"https://api.github.com/users/querydsl/gists{/gist_id}","starred_url":"https://api.github.com/users/querydsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/querydsl/subscriptions","organizations_url":"https://api.github.com/users/querydsl/orgs","repos_url":"https://api.github.com/users/querydsl/repos","events_url":"https://api.github.com/users/querydsl/events{/privacy}","received_events_url":"https://api.github.com/users/querydsl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/querydsl/querydsl","description":"Unified Queries for Java","fork":false,"url":"https://api.github.com/repos/querydsl/querydsl","forks_url":"https://api.github.com/repos/querydsl/querydsl/forks","keys_url":"https://api.github.com/repos/querydsl/querydsl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/querydsl/querydsl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/querydsl/querydsl/teams","hooks_url":"https://api.github.com/repos/querydsl/querydsl/hooks","issue_events_url":"https://api.github.com/repos/querydsl/querydsl/issues/events{/number}","events_url":"https://api.github.com/repos/querydsl/querydsl/events","assignees_url":"https://api.github.com/repos/querydsl/querydsl/assignees{/user}","branches_url":"https://api.github.com/repos/querydsl/querydsl/branches{/branch}","tags_url":"https://api.github.com/repos/querydsl/querydsl/tags","blobs_url":"https://api.github.com/repos/querydsl/querydsl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/querydsl/querydsl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/querydsl/querydsl/git/refs{/sha}","trees_url":"https://api.github.com/repos/querydsl/querydsl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/querydsl/querydsl/statuses/{sha}","languages_url":"https://api.github.com/repos/querydsl/querydsl/languages","stargazers_url":"https://api.github.com/repos/querydsl/querydsl/stargazers","contributors_url":"https://api.github.com/repos/querydsl/querydsl/contributors","subscribers_url":"https://api.github.com/repos/querydsl/querydsl/subscribers","subscription_url":"https://api.github.com/repos/querydsl/querydsl/subscription","commits_url":"https://api.github.com/repos/querydsl/querydsl/commits{/sha}","git_commits_url":"https://api.github.com/repos/querydsl/querydsl/git/commits{/sha}","comments_url":"https://api.github.com/repos/querydsl/querydsl/comments{/number}","issue_comment_url":"https://api.github.com/repos/querydsl/querydsl/issues/comments{/number}","contents_url":"https://api.github.com/repos/querydsl/querydsl/contents/{+path}","compare_url":"https://api.github.com/repos/querydsl/querydsl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/querydsl/querydsl/merges","archive_url":"https://api.github.com/repos/querydsl/querydsl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/querydsl/querydsl/downloads","issues_url":"https://api.github.com/repos/querydsl/querydsl/issues{/number}","pulls_url":"https://api.github.com/repos/querydsl/querydsl/pulls{/number}","milestones_url":"https://api.github.com/repos/querydsl/querydsl/milestones{/number}","notifications_url":"https://api.github.com/repos/querydsl/querydsl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/querydsl/querydsl/labels{/name}","releases_url":"https://api.github.com/repos/querydsl/querydsl/releases{/id}","created_at":"2011-08-05T06:46:32Z","updated_at":"2015-04-10T15:08:08Z","pushed_at":"2015-04-11T09:28:31Z","git_url":"git://github.com/querydsl/querydsl.git","ssh_url":"git@github.com:querydsl/querydsl.git","clone_url":"https://github.com/querydsl/querydsl.git","svn_url":"https://github.com/querydsl/querydsl","homepage":"http://www.querydsl.com","size":80384,"stargazers_count":498,"watchers_count":498,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":131,"mirror_url":null,"open_issues_count":109,"forks":131,"open_issues":109,"watchers":498,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/querydsl/querydsl/pulls/1313"},"html":{"href":"https://github.com/querydsl/querydsl/pull/1313"},"issue":{"href":"https://api.github.com/repos/querydsl/querydsl/issues/1313"},"comments":{"href":"https://api.github.com/repos/querydsl/querydsl/issues/1313/comments"},"review_comments":{"href":"https://api.github.com/repos/querydsl/querydsl/pulls/1313/comments"},"review_comment":{"href":"https://api.github.com/repos/querydsl/querydsl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/querydsl/querydsl/pulls/1313/commits"},"statuses":{"href":"https://api.github.com/repos/querydsl/querydsl/statuses/2fcc638910dab25d5732b27aa190e80d63e103eb"}}}}