{"action":"created","issue":{"url":"https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/issues/813","labels_url":"https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/issues/813/labels{/name}","comments_url":"https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/issues/813/comments","events_url":"https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/issues/813/events","html_url":"https://github.com/UniversalMediaServer/UniversalMediaServer/pull/813","id":129875017,"number":813,"title":"Misc bug fixes to FileUtil","user":{"login":"Nadahar","id":12900583,"avatar_url":"https://avatars.githubusercontent.com/u/12900583?v=3","gravatar_id":"","url":"https://api.github.com/users/Nadahar","html_url":"https://github.com/Nadahar","followers_url":"https://api.github.com/users/Nadahar/followers","following_url":"https://api.github.com/users/Nadahar/following{/other_user}","gists_url":"https://api.github.com/users/Nadahar/gists{/gist_id}","starred_url":"https://api.github.com/users/Nadahar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nadahar/subscriptions","organizations_url":"https://api.github.com/users/Nadahar/orgs","repos_url":"https://api.github.com/users/Nadahar/repos","events_url":"https://api.github.com/users/Nadahar/events{/privacy}","received_events_url":"https://api.github.com/users/Nadahar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/milestones/9","html_url":"https://github.com/UniversalMediaServer/UniversalMediaServer/milestones/6.0.1","labels_url":"https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/milestones/9/labels","id":1552594,"number":9,"title":"6.0.1","description":null,"creator":{"login":"SubJunk","id":584228,"avatar_url":"https://avatars.githubusercontent.com/u/584228?v=3","gravatar_id":"","url":"https://api.github.com/users/SubJunk","html_url":"https://github.com/SubJunk","followers_url":"https://api.github.com/users/SubJunk/followers","following_url":"https://api.github.com/users/SubJunk/following{/other_user}","gists_url":"https://api.github.com/users/SubJunk/gists{/gist_id}","starred_url":"https://api.github.com/users/SubJunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SubJunk/subscriptions","organizations_url":"https://api.github.com/users/SubJunk/orgs","repos_url":"https://api.github.com/users/SubJunk/repos","events_url":"https://api.github.com/users/SubJunk/events{/privacy}","received_events_url":"https://api.github.com/users/SubJunk/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2016-01-30T08:22:50Z","updated_at":"2016-01-30T08:22:50Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-01-29T20:33:33Z","updated_at":"2016-01-30T11:58:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/pulls/813","html_url":"https://github.com/UniversalMediaServer/UniversalMediaServer/pull/813","diff_url":"https://github.com/UniversalMediaServer/UniversalMediaServer/pull/813.diff","patch_url":"https://github.com/UniversalMediaServer/UniversalMediaServer/pull/813.patch"},"body":"@UniversalMediaServer/developers This started out as a simple bugfix for [this bug] (http://www.universalmediaserver.com/forum/viewtopic.php?f=9&t=6011). But, after fixing that bug I ran FindBugs and Threadsafe, and this lead to much more (and changed this from being a commit to a PR).\r\n\r\nI hope we can expedite this once quickly, as there's no (intended) behaviour change here. I have multiple questions and comments though, so this needs to be reviewed. I'll make the comments in Reviewable.\n\n<!-- Reviewable:start -->\n[<img src=\"https://reviewable.io/review_button.svg\" height=\"40\" alt=\"Review on Reviewable\"/>](https://reviewable.io/reviews/universalmediaserver/universalmediaserver/813)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/issues/comments/177162055","html_url":"https://github.com/UniversalMediaServer/UniversalMediaServer/pull/813#issuecomment-177162055","issue_url":"https://api.github.com/repos/UniversalMediaServer/UniversalMediaServer/issues/813","id":177162055,"user":{"login":"Nadahar","id":12900583,"avatar_url":"https://avatars.githubusercontent.com/u/12900583?v=3","gravatar_id":"","url":"https://api.github.com/users/Nadahar","html_url":"https://github.com/Nadahar","followers_url":"https://api.github.com/users/Nadahar/followers","following_url":"https://api.github.com/users/Nadahar/following{/other_user}","gists_url":"https://api.github.com/users/Nadahar/gists{/gist_id}","starred_url":"https://api.github.com/users/Nadahar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nadahar/subscriptions","organizations_url":"https://api.github.com/users/Nadahar/orgs","repos_url":"https://api.github.com/users/Nadahar/repos","events_url":"https://api.github.com/users/Nadahar/events{/privacy}","received_events_url":"https://api.github.com/users/Nadahar/received_events","type":"User","site_admin":false},"created_at":"2016-01-30T11:58:23Z","updated_at":"2016-01-30T11:58:23Z","body":"\n\n\n\nReview status: 0 of 1 files reviewed at latest revision, 8 unresolved discussions.\n\n---\n\n*[src/main/java/net/pms/util/FileUtil.java, line 266 \\[r1\\]](https://reviewable.io:443/reviews/universalmediaserver/universalmediaserver/813#-K9E8Q2A3vdfhh7ukIM2:-K9HLlaWCqupykGuQHz7:1852856968) ([raw file](https://github.com/universalmediaserver/universalmediaserver/blob/280eb4be029a7e7687fb6adf2f5b48b1c47ea771/src/main/java/net/pms/util/FileUtil.java#L266)):*\nYes, but my guess is that in the original code loopedOnce's value was remembered between each run - then it would make some sense. The only way to figure this out properly is to go back in git history and look at earlier code.\n\n---\n\n*[src/main/java/net/pms/util/FileUtil.java, line 268 \\[r1\\]](https://reviewable.io:443/reviews/universalmediaserver/universalmediaserver/813#-K9E7TizDVIHq91Q0kWQ:-K9HMI3b4E3sQYHoH9U-:1485437710) ([raw file](https://github.com/universalmediaserver/universalmediaserver/blob/280eb4be029a7e7687fb6adf2f5b48b1c47ea771/src/main/java/net/pms/util/FileUtil.java#L268)):*\nYes, but the question is if that still applies the way the code was now. I suspect that the loopedOnce function has since been lost, for it to have any meaning it must have been retained between runs.\n\nSplitting on ```-``` is very hard for me to see how could have any effect the way the code works now. The method that's called on the separate strings (or the total string in the other variant) splits on space and then loops and replaces the first letter of each word with a capital letter except for certain words. It's very hard to see how the results of this can possible differ when treating a long string versus several shorter ones.\n\nTo get to the bottom of this I think the original code must be studied, and the changes done since that must be identified and taken into consideration.\n\n---\n\n*[src/main/java/net/pms/util/FileUtil.java, line 1193 \\[r1\\]](https://reviewable.io:443/reviews/universalmediaserver/universalmediaserver/813#-K9EBeubLiJObu5VsJtc:-K9HOLoPRjDyR7e8v8l4:5174689) ([raw file](https://github.com/universalmediaserver/universalmediaserver/blob/280eb4be029a7e7687fb6adf2f5b48b1c47ea771/src/main/java/net/pms/util/FileUtil.java#L1193)):*\nok\n\n---\n\n\n*Comments from the [review on Reviewable.io](https://reviewable.io:443/reviews/universalmediaserver/universalmediaserver/813)*\n<!-- Sent from Reviewable.io -->\n"}}