Skip to content

Loosing reference of the original StringBuilder in the RenderResultPartial #51

@BogdanNicolau

Description

@BogdanNicolau

Hi,

Great work on the module. However I have a big problem that's preventing me from upgrading to the latest 0.9.4.3.
Inside my controller, I'm making some final checks on the request parameters trying to see if I need to return a jsonp response. If so, I would've simply done something like:

JapidResult jR = new JapidResult(getRenderResultWith(template(), stuffToRender));
StringBuilder res = jR.getRenderResult().getContent();
res.insert(0, "(").insert(0, callback).append(")");
throw jR;

But now, the RenderResultPartial sends back a new StringBuilder upon every access so my method obviously fails.
It would be optimal to always return the original StringBuilder, and not just enhance a new one every time getContent() is called.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions