Skip to content

Instantly share code, notes, and snippets.

@isyoon
Created June 12, 2013 07:40
Show Gist options
  • Save isyoon/5763485 to your computer and use it in GitHub Desktop.
Save isyoon/5763485 to your computer and use it in GitHub Desktop.
@RequestMapping("{id}")
public ModelAndView info(@PathVariable("id") String sId, HttpServletRequest req, SitePreference sitePreference, Device device) {
Long id;
Series series;
try {
id = Long.valueOf(sId);
series = seriesService.findById(id);
} catch (NumberFormatException nfe) {
series = seriesService.findByUrl(sId);
}
if (series == null) {
throw new PageNotFoundException();
}
User user = securityService.getCurrentUser();
........
...............
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment