This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unsure about this filter

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I have been reading LinkTrackerFilter class from "Servlets and JavaServer Pages� The J2EE� Technology Web Tier" book's source and some questions arised.
This class extracts a url from the query string then redirects the request to that url and then return statement appears.
At the end of the class, the code increases a static counter then there is a chain.doFilter( ).
The book emphases that the calling to the previous doFilter is important in order to allow other filters, servlets and JSP to handle the request.
Since the code the freely avaible, I will post some snipets here :

How the hell the last two lines would be getting called ? there is a return statement !
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you look closely at the code? Is the return statement unconditionally always reached?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic