Skip to content

Commit

Permalink
using getSlingScriptHelper method
Browse files Browse the repository at this point in the history
  • Loading branch information
Shashi Bhushan committed Aug 23, 2016
1 parent 314679a commit 4b910c0
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,7 @@ public static <T> T getFromCurrentPath(final PageContext pageContext, final Clas
* @throws ClassNotFoundException if the class was not found
*/
public static Class<?> getClassFromType(final PageContext pageContext, final String type) throws ClassNotFoundException {
final SlingBindings bindings = (SlingBindings) pageContext.getRequest().getAttribute(
SlingBindings.class.getName());
final SlingScriptHelper scriptHelper = bindings.getSling();
final SlingScriptHelper scriptHelper = getSlingScriptHelper(pageContext);
final DynamicClassLoaderManager dynamicClassLoaderManager = scriptHelper
.getService(DynamicClassLoaderManager.class);
final ClassLoader classLoader = dynamicClassLoaderManager.getDynamicClassLoader();
Expand Down

0 comments on commit 4b910c0

Please sign in to comment.