{"action":"opened","issue":{"url":"https://api.github.com/repos/fizzed/rocker/issues/31","repository_url":"https://api.github.com/repos/fizzed/rocker","labels_url":"https://api.github.com/repos/fizzed/rocker/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/fizzed/rocker/issues/31/comments","events_url":"https://api.github.com/repos/fizzed/rocker/issues/31/events","html_url":"https://github.com/fizzed/rocker/issues/31","id":165461444,"number":31,"title":"Improve Rocker.template() for more complex classloading environments","user":{"login":"alkemist","id":17825,"avatar_url":"https://avatars.githubusercontent.com/u/17825?v=3","gravatar_id":"","url":"https://api.github.com/users/alkemist","html_url":"https://github.com/alkemist","followers_url":"https://api.github.com/users/alkemist/followers","following_url":"https://api.github.com/users/alkemist/following{/other_user}","gists_url":"https://api.github.com/users/alkemist/gists{/gist_id}","starred_url":"https://api.github.com/users/alkemist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alkemist/subscriptions","organizations_url":"https://api.github.com/users/alkemist/orgs","repos_url":"https://api.github.com/users/alkemist/repos","events_url":"https://api.github.com/users/alkemist/events{/privacy}","received_events_url":"https://api.github.com/users/alkemist/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-14T02:15:21Z","updated_at":"2016-07-14T02:15:21Z","closed_at":null,"body":"This method effectively loads templates via: https://github.com/alkemist/rocker/blob/69881f8863d2f3adcebeea6a308b326b588e5f87/runtime/src/main/java/com/fizzed/rocker/runtime/DefaultRockerBootstrap.java#L99-L99\r\n\r\nThis assumes that the classloader that loaded the Rocker runtime can see the target class.\r\n\r\nTwo (non mutually exclusive) potential options:\r\n\r\n1. Change `DefaultRockerBootstrap.model()` to use `Thread.currentThread().getContextClassLoader()`\r\n2. Add a `Rocker.template()` variant that takes a classloader\r\n\r\nI think it probably makes sense to do both. In most environments where classloading is complex, the context classloader is set to something with good general visibility. Option \\#2 is potentially useful for even more complex environments. I'd probably be tempted to just do \\#1 though, and see if anyone ever needs \\#2."}}
{"actor":{"display_login":"alkemist"}}