Umbraco

Infinite recursion

V3110 Possible infinite recursion inside ‘Render’ method. MenuSplitButton.cs 30

protected override void Render(System.Web.UI.HtmlTextWriter writer)
{
  writer.Write("</div>");
  base.Render(writer);
  this.Render(writer);  
  writer.Write("<div class='btn-group>");
}

Apparently, this code fragment has a bug caused by an infinite recursion. After the call of the Render method of the base class, there is a recursive call of the overloaded Render method “by the analogy”. Perhaps, the method this.Render should contain some condition of the exit from the recursion. However, it’s hard to make a clear conclusion as to what the correct variant of this construction should be.

Please click here to see more bugs from this project.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s