(CDAP-656) Set Context ClassLoader to program ClassLoader for user Service

It's in the method javadoc already

Sent from my iPhone

> On Nov 17, 2014, at 6:47 PM, parthgandhi <notifications@github.com> wrote:
> 
> In cdap-app-fabric/src/main/java/co/cask/cdap/internal/app/runtime/service/http/HttpHandlerGenerator.java:
> 
> > +     * Generates the code block for setting context ClassLoader, calling user handler method
> > +     * and resetting context ClassLoader.
> > +     */
> > +    private void generateInvokeDelegate(GeneratorAdapter mg, int handler, Method method) {
> > +      Type classLoaderType = Type.getType(ClassLoader.class);
> > +      Type handlerType = Type.getType(delegateType.getRawType());
> > +
> > +      Label contextTryBegin = mg.newLabel();
> > +      Label contextTryEnd = mg.newLabel();
> > +      Label contextCatch = mg.newLabel();
> > +      Label contextEnd = mg.newLabel();
> > +      Label contextCatchEnd = mg.newLabel();
> > +
> > +      // For the try-finally block
> > +      // In bytecode, it's done by two try-catch instructions. The finally code are in both
> > +      // the tryEnd and catchEnd blocks.
> Can you leave a comment explaining what the generated code looks like? It took me a while to understand what you're doing here..
> 
> —
> Reply to this email directly or view it on GitHub.
>