{"action":"created","comment":{"url":"https://api.github.com/repos/pantsbuild/jarjar/pulls/comments/40208101","id":40208101,"diff_hunk":"@@ -90,7 +94,24 @@ public void process(File rulesFile, File inJar, File outJar) throws IOException\n     List<PatternElement> rules = RulesFileParser.parse(rulesFile);\n     boolean verbose = Boolean.getBoolean(\"verbose\");\n     boolean skipManifest = Boolean.getBoolean(\"skipManifest\");\n-    MainProcessor proc = new MainProcessor(rules, verbose, skipManifest);\n+    String misplacedClassStrategyName = System.getProperty(\"misplacedClassStrategy\");\n+    MisplacedClassStrategy misplacedClassStrategy = null;\n+    if (misplacedClassStrategyName != null && misplacedClassStrategyName.length() > 0) {\n+      if (misplacedClassStrategyName.equalsIgnoreCase(\"fatal\")) {","path":"src/main/org/pantsbuild/jarjar/Main.java","position":19,"original_position":19,"commit_id":"6e1df0afb4a51626339d876d411d6e89e77e23a0","original_commit_id":"6e1df0afb4a51626339d876d411d6e89e77e23a0","user":{"login":"gmalmquist","id":3391199,"avatar_url":"https://avatars.githubusercontent.com/u/3391199?v=3","gravatar_id":"","url":"https://api.github.com/users/gmalmquist","html_url":"https://github.com/gmalmquist","followers_url":"https://api.github.com/users/gmalmquist/followers","following_url":"https://api.github.com/users/gmalmquist/following{/other_user}","gists_url":"https://api.github.com/users/gmalmquist/gists{/gist_id}","starred_url":"https://api.github.com/users/gmalmquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmalmquist/subscriptions","organizations_url":"https://api.github.com/users/gmalmquist/orgs","repos_url":"https://api.github.com/users/gmalmquist/repos","events_url":"https://api.github.com/users/gmalmquist/events{/privacy}","received_events_url":"https://api.github.com/users/gmalmquist/received_events","type":"User","site_admin":false},"body":"Yeah I was considering something like that.","created_at":"2015-09-23T14:17:11Z","updated_at":"2015-09-23T14:17:11Z","html_url":"https://github.com/pantsbuild/jarjar/pull/8#discussion_r40208101","pull_request_url":"https://api.github.com/repos/pantsbuild/jarjar/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/pantsbuild/jarjar/pulls/comments/40208101"},"html":{"href":"https://github.com/pantsbuild/jarjar/pull/8#discussion_r40208101"},"pull_request":{"href":"https://api.github.com/repos/pantsbuild/jarjar/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/pantsbuild/jarjar/pulls/8","id":45714132,"html_url":"https://github.com/pantsbuild/jarjar/pull/8","diff_url":"https://github.com/pantsbuild/jarjar/pull/8.diff","patch_url":"https://github.com/pantsbuild/jarjar/pull/8.patch","issue_url":"https://api.github.com/repos/pantsbuild/jarjar/issues/8","number":8,"state":"open","locked":false,"title":"Make JarJar handle jars with misplaced classes more reasonably.","user":{"login":"gmalmquist","id":3391199,"avatar_url":"https://avatars.githubusercontent.com/u/3391199?v=3","gravatar_id":"","url":"https://api.github.com/users/gmalmquist","html_url":"https://github.com/gmalmquist","followers_url":"https://api.github.com/users/gmalmquist/followers","following_url":"https://api.github.com/users/gmalmquist/following{/other_user}","gists_url":"https://api.github.com/users/gmalmquist/gists{/gist_id}","starred_url":"https://api.github.com/users/gmalmquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmalmquist/subscriptions","organizations_url":"https://api.github.com/users/gmalmquist/orgs","repos_url":"https://api.github.com/users/gmalmquist/repos","events_url":"https://api.github.com/users/gmalmquist/events{/privacy}","received_events_url":"https://api.github.com/users/gmalmquist/received_events","type":"User","site_admin":false},"body":"A \"misplaced class\" here refers to a class whose jar entry path\r\n(eg, \"org/pantsbuild/Foobar.class\") does not match the path\r\nimplied by its fully-qualified classname.\r\n\r\nPreviously, if you had a (corrupt) jar with a directory containing\r\nmisplaced classes, jarjar would move all the classes in the so\r\nthat their directory properly matched their package names. This\r\nwas simply an undocumented (and probably unconsidered) side-effect\r\nof how jar entries are transformed by the JarTransformer.\r\n\r\nThis would cause problems when there already were classes at those\r\nlocations, and JarJar would explode due to a duplicate jar entries\r\nproblem that it had constructed itself.\r\n\r\nWith this change, JarJar allows the specification of a\r\n\"misnamedClassStrategy\" variable, which can be \"fatal\" (for\r\nfail-fast exit behavior), \"move\" (for the previously existing\r\nbehavior), or \"skip\" (exclude the classes from shading).\r\n\r\nThis defaults to \"skip\". A warning is also printed to stderr if the\r\nverbose flag is turned on.","created_at":"2015-09-22T20:42:24Z","updated_at":"2015-09-23T14:17:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2623d207ecaac77ea0bdb1b3cd0d2ce2ce67883","assignee":{"login":"jsirois","id":157586,"avatar_url":"https://avatars.githubusercontent.com/u/157586?v=3","gravatar_id":"","url":"https://api.github.com/users/jsirois","html_url":"https://github.com/jsirois","followers_url":"https://api.github.com/users/jsirois/followers","following_url":"https://api.github.com/users/jsirois/following{/other_user}","gists_url":"https://api.github.com/users/jsirois/gists{/gist_id}","starred_url":"https://api.github.com/users/jsirois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsirois/subscriptions","organizations_url":"https://api.github.com/users/jsirois/orgs","repos_url":"https://api.github.com/users/jsirois/repos","events_url":"https://api.github.com/users/jsirois/events{/privacy}","received_events_url":"https://api.github.com/users/jsirois/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/pantsbuild/jarjar/pulls/8/commits","review_comments_url":"https://api.github.com/repos/pantsbuild/jarjar/pulls/8/comments","review_comment_url":"https://api.github.com/repos/pantsbuild/jarjar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pantsbuild/jarjar/issues/8/comments","statuses_url":"https://api.github.com/repos/pantsbuild/jarjar/statuses/6e1df0afb4a51626339d876d411d6e89e77e23a0","head":{"label":"pantsbuild:gmalmquist/handle-inconsistent-classnames-intelligently","ref":"gmalmquist/handle-inconsistent-classnames-intelligently","sha":"6e1df0afb4a51626339d876d411d6e89e77e23a0","user":{"login":"pantsbuild","id":3065172,"avatar_url":"https://avatars.githubusercontent.com/u/3065172?v=3","gravatar_id":"","url":"https://api.github.com/users/pantsbuild","html_url":"https://github.com/pantsbuild","followers_url":"https://api.github.com/users/pantsbuild/followers","following_url":"https://api.github.com/users/pantsbuild/following{/other_user}","gists_url":"https://api.github.com/users/pantsbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/pantsbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pantsbuild/subscriptions","organizations_url":"https://api.github.com/users/pantsbuild/orgs","repos_url":"https://api.github.com/users/pantsbuild/repos","events_url":"https://api.github.com/users/pantsbuild/events{/privacy}","received_events_url":"https://api.github.com/users/pantsbuild/received_events","type":"Organization","site_admin":false},"repo":{"id":33747790,"name":"jarjar","full_name":"pantsbuild/jarjar","owner":{"login":"pantsbuild","id":3065172,"avatar_url":"https://avatars.githubusercontent.com/u/3065172?v=3","gravatar_id":"","url":"https://api.github.com/users/pantsbuild","html_url":"https://github.com/pantsbuild","followers_url":"https://api.github.com/users/pantsbuild/followers","following_url":"https://api.github.com/users/pantsbuild/following{/other_user}","gists_url":"https://api.github.com/users/pantsbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/pantsbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pantsbuild/subscriptions","organizations_url":"https://api.github.com/users/pantsbuild/orgs","repos_url":"https://api.github.com/users/pantsbuild/repos","events_url":"https://api.github.com/users/pantsbuild/events{/privacy}","received_events_url":"https://api.github.com/users/pantsbuild/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pantsbuild/jarjar","description":"An export of https://code.google.com/p/jarjar/ @ svn:r142 for pants tool use and further development.","fork":false,"url":"https://api.github.com/repos/pantsbuild/jarjar","forks_url":"https://api.github.com/repos/pantsbuild/jarjar/forks","keys_url":"https://api.github.com/repos/pantsbuild/jarjar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pantsbuild/jarjar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pantsbuild/jarjar/teams","hooks_url":"https://api.github.com/repos/pantsbuild/jarjar/hooks","issue_events_url":"https://api.github.com/repos/pantsbuild/jarjar/issues/events{/number}","events_url":"https://api.github.com/repos/pantsbuild/jarjar/events","assignees_url":"https://api.github.com/repos/pantsbuild/jarjar/assignees{/user}","branches_url":"https://api.github.com/repos/pantsbuild/jarjar/branches{/branch}","tags_url":"https://api.github.com/repos/pantsbuild/jarjar/tags","blobs_url":"https://api.github.com/repos/pantsbuild/jarjar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pantsbuild/jarjar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pantsbuild/jarjar/git/refs{/sha}","trees_url":"https://api.github.com/repos/pantsbuild/jarjar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pantsbuild/jarjar/statuses/{sha}","languages_url":"https://api.github.com/repos/pantsbuild/jarjar/languages","stargazers_url":"https://api.github.com/repos/pantsbuild/jarjar/stargazers","contributors_url":"https://api.github.com/repos/pantsbuild/jarjar/contributors","subscribers_url":"https://api.github.com/repos/pantsbuild/jarjar/subscribers","subscription_url":"https://api.github.com/repos/pantsbuild/jarjar/subscription","commits_url":"https://api.github.com/repos/pantsbuild/jarjar/commits{/sha}","git_commits_url":"https://api.github.com/repos/pantsbuild/jarjar/git/commits{/sha}","comments_url":"https://api.github.com/repos/pantsbuild/jarjar/comments{/number}","issue_comment_url":"https://api.github.com/repos/pantsbuild/jarjar/issues/comments{/number}","contents_url":"https://api.github.com/repos/pantsbuild/jarjar/contents/{+path}","compare_url":"https://api.github.com/repos/pantsbuild/jarjar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pantsbuild/jarjar/merges","archive_url":"https://api.github.com/repos/pantsbuild/jarjar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pantsbuild/jarjar/downloads","issues_url":"https://api.github.com/repos/pantsbuild/jarjar/issues{/number}","pulls_url":"https://api.github.com/repos/pantsbuild/jarjar/pulls{/number}","milestones_url":"https://api.github.com/repos/pantsbuild/jarjar/milestones{/number}","notifications_url":"https://api.github.com/repos/pantsbuild/jarjar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pantsbuild/jarjar/labels{/name}","releases_url":"https://api.github.com/repos/pantsbuild/jarjar/releases{/id}","created_at":"2015-04-10T19:53:16Z","updated_at":"2015-09-10T15:13:28Z","pushed_at":"2015-09-22T21:03:48Z","git_url":"git://github.com/pantsbuild/jarjar.git","ssh_url":"git@github.com:pantsbuild/jarjar.git","clone_url":"https://github.com/pantsbuild/jarjar.git","svn_url":"https://github.com/pantsbuild/jarjar","homepage":null,"size":1708,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"pantsbuild:master","ref":"master","sha":"c46291d4f28710d80e7f9723d7fb167435b8cf0d","user":{"login":"pantsbuild","id":3065172,"avatar_url":"https://avatars.githubusercontent.com/u/3065172?v=3","gravatar_id":"","url":"https://api.github.com/users/pantsbuild","html_url":"https://github.com/pantsbuild","followers_url":"https://api.github.com/users/pantsbuild/followers","following_url":"https://api.github.com/users/pantsbuild/following{/other_user}","gists_url":"https://api.github.com/users/pantsbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/pantsbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pantsbuild/subscriptions","organizations_url":"https://api.github.com/users/pantsbuild/orgs","repos_url":"https://api.github.com/users/pantsbuild/repos","events_url":"https://api.github.com/users/pantsbuild/events{/privacy}","received_events_url":"https://api.github.com/users/pantsbuild/received_events","type":"Organization","site_admin":false},"repo":{"id":33747790,"name":"jarjar","full_name":"pantsbuild/jarjar","owner":{"login":"pantsbuild","id":3065172,"avatar_url":"https://avatars.githubusercontent.com/u/3065172?v=3","gravatar_id":"","url":"https://api.github.com/users/pantsbuild","html_url":"https://github.com/pantsbuild","followers_url":"https://api.github.com/users/pantsbuild/followers","following_url":"https://api.github.com/users/pantsbuild/following{/other_user}","gists_url":"https://api.github.com/users/pantsbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/pantsbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pantsbuild/subscriptions","organizations_url":"https://api.github.com/users/pantsbuild/orgs","repos_url":"https://api.github.com/users/pantsbuild/repos","events_url":"https://api.github.com/users/pantsbuild/events{/privacy}","received_events_url":"https://api.github.com/users/pantsbuild/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pantsbuild/jarjar","description":"An export of https://code.google.com/p/jarjar/ @ svn:r142 for pants tool use and further development.","fork":false,"url":"https://api.github.com/repos/pantsbuild/jarjar","forks_url":"https://api.github.com/repos/pantsbuild/jarjar/forks","keys_url":"https://api.github.com/repos/pantsbuild/jarjar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pantsbuild/jarjar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pantsbuild/jarjar/teams","hooks_url":"https://api.github.com/repos/pantsbuild/jarjar/hooks","issue_events_url":"https://api.github.com/repos/pantsbuild/jarjar/issues/events{/number}","events_url":"https://api.github.com/repos/pantsbuild/jarjar/events","assignees_url":"https://api.github.com/repos/pantsbuild/jarjar/assignees{/user}","branches_url":"https://api.github.com/repos/pantsbuild/jarjar/branches{/branch}","tags_url":"https://api.github.com/repos/pantsbuild/jarjar/tags","blobs_url":"https://api.github.com/repos/pantsbuild/jarjar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pantsbuild/jarjar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pantsbuild/jarjar/git/refs{/sha}","trees_url":"https://api.github.com/repos/pantsbuild/jarjar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pantsbuild/jarjar/statuses/{sha}","languages_url":"https://api.github.com/repos/pantsbuild/jarjar/languages","stargazers_url":"https://api.github.com/repos/pantsbuild/jarjar/stargazers","contributors_url":"https://api.github.com/repos/pantsbuild/jarjar/contributors","subscribers_url":"https://api.github.com/repos/pantsbuild/jarjar/subscribers","subscription_url":"https://api.github.com/repos/pantsbuild/jarjar/subscription","commits_url":"https://api.github.com/repos/pantsbuild/jarjar/commits{/sha}","git_commits_url":"https://api.github.com/repos/pantsbuild/jarjar/git/commits{/sha}","comments_url":"https://api.github.com/repos/pantsbuild/jarjar/comments{/number}","issue_comment_url":"https://api.github.com/repos/pantsbuild/jarjar/issues/comments{/number}","contents_url":"https://api.github.com/repos/pantsbuild/jarjar/contents/{+path}","compare_url":"https://api.github.com/repos/pantsbuild/jarjar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pantsbuild/jarjar/merges","archive_url":"https://api.github.com/repos/pantsbuild/jarjar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pantsbuild/jarjar/downloads","issues_url":"https://api.github.com/repos/pantsbuild/jarjar/issues{/number}","pulls_url":"https://api.github.com/repos/pantsbuild/jarjar/pulls{/number}","milestones_url":"https://api.github.com/repos/pantsbuild/jarjar/milestones{/number}","notifications_url":"https://api.github.com/repos/pantsbuild/jarjar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pantsbuild/jarjar/labels{/name}","releases_url":"https://api.github.com/repos/pantsbuild/jarjar/releases{/id}","created_at":"2015-04-10T19:53:16Z","updated_at":"2015-09-10T15:13:28Z","pushed_at":"2015-09-22T21:03:48Z","git_url":"git://github.com/pantsbuild/jarjar.git","ssh_url":"git@github.com:pantsbuild/jarjar.git","clone_url":"https://github.com/pantsbuild/jarjar.git","svn_url":"https://github.com/pantsbuild/jarjar","homepage":null,"size":1708,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pantsbuild/jarjar/pulls/8"},"html":{"href":"https://github.com/pantsbuild/jarjar/pull/8"},"issue":{"href":"https://api.github.com/repos/pantsbuild/jarjar/issues/8"},"comments":{"href":"https://api.github.com/repos/pantsbuild/jarjar/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/pantsbuild/jarjar/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/pantsbuild/jarjar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pantsbuild/jarjar/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/pantsbuild/jarjar/statuses/6e1df0afb4a51626339d876d411d6e89e77e23a0"}}}}