Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty brackets cause exception for an embedded widget with no parameters #68

Open
kidogo opened this issue Feb 20, 2014 · 0 comments
Open

Comments

@kidogo
Copy link

kidogo commented Feb 20, 2014

An exception is raise when a @embedas widget with no parameters is used with empty brackets

For example, for this widget:

@EmbedAs("MyWidget")
public class MyWidget{
}

An exception is raised when using with brackets like this,

  @MyWidget()
  <div></div>

And it works ok, when used without brackets, like this

  @MyWidget
  <div></div>

This is the stack trace of the exception raised

java.lang.IllegalArgumentException: Object must not be null
    at org.jsoup.helper.Validate.notNull(Validate.java:16)
    at org.jsoup.nodes.Attribute.<init>(Attribute.java:23)
    at org.jsoup.nodes.Attributes.put(Attributes.java:42)
    at org.jsoup.nodes.Node.attr(Node.java:96)
    at org.jsoup.nodes.TextNode.attr(TextNode.java:155)
    at com.google.sitebricks.compiler.AnnotationNode.annotation(AnnotationNode.java:49)
    at com.google.sitebricks.compiler.AnnotationNode.<init>(AnnotationNode.java:32)
    at com.google.sitebricks.compiler.HtmlParser.parseTextNode(HtmlParser.java:375)
    at com.google.sitebricks.compiler.HtmlParser.parse(HtmlParser.java:116)
    at com.google.sitebricks.compiler.HtmlParser.parse(HtmlParser.java:90)
    at com.google.sitebricks.compiler.HtmlTemplateCompiler.compile(HtmlTemplateCompiler.java:83)
    at com.google.sitebricks.TemplateLoader.compile(TemplateLoader.java:47)
    at com.google.sitebricks.compiler.StandardCompilers.compilePage(StandardCompilers.java:105)
    at com.google.sitebricks.DebugModePageBook.reload(DebugModePageBook.java:118)
    at com.google.sitebricks.DebugModePageBook.forName(DebugModePageBook.java:61)
    at com.google.sitebricks.rendering.control.DecorateWidget.render(DecorateWidget.java:52)
    at com.google.sitebricks.rendering.control.ProceedingWidgetChain.render(ProceedingWidgetChain.java:21)
    at com.google.sitebricks.rendering.control.XmlWidget.render(XmlWidget.java:79)
    at com.google.sitebricks.rendering.control.ProceedingWidgetChain.render(ProceedingWidgetChain.java:21)
    at com.google.sitebricks.rendering.control.XmlWidget.render(XmlWidget.java:79)
    at com.google.sitebricks.rendering.control.ProceedingWidgetChain.render(ProceedingWidgetChain.java:21)
    at com.google.sitebricks.routing.WidgetRoutingDispatcher.bindAndRespond(WidgetRoutingDispatcher.java:158)
    at com.google.sitebricks.routing.WidgetRoutingDispatcher.dispatch(WidgetRoutingDispatcher.java:91)
    at com.google.sitebricks.DebugModeRoutingDispatcher.dispatch(DebugModeRoutingDispatcher.java:56)
    at com.google.sitebricks.SitebricksFilter.doFilter(SitebricksFilter.java:62)
    at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
    at com.google.sitebricks.HiddenMethodFilter.doFilter(HiddenMethodFilter.java:70)
    at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant