Coverage Report - net.fckeditor.localization.impl.JstlResolver
 
Classes in this File Line Coverage Branch Coverage Complexity
JstlResolver
0%
0/4
0%
0/2
1
 
 1  
 /*
 2  
  * FCKeditor - The text editor for Internet - http://www.fckeditor.net
 3  
  * Copyright (C) 2004-2010 Frederico Caldeira Knabben
 4  
  * 
 5  
  * == BEGIN LICENSE ==
 6  
  * 
 7  
  * Licensed under the terms of any of the following licenses at your
 8  
  * choice:
 9  
  * 
 10  
  *  - GNU General Public License Version 2 or later (the "GPL")
 11  
  *    http://www.gnu.org/licenses/gpl.html
 12  
  * 
 13  
  *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
 14  
  *    http://www.gnu.org/licenses/lgpl.html
 15  
  * 
 16  
  *  - Mozilla Public License Version 1.1 or later (the "MPL")
 17  
  *    http://www.mozilla.org/MPL/MPL-1.1.html
 18  
  * 
 19  
  * == END LICENSE ==
 20  
  */
 21  
 package net.fckeditor.localization.impl;
 22  
 
 23  
 import java.util.Locale;
 24  
 
 25  
 import javax.servlet.http.HttpServletRequest;
 26  
 import javax.servlet.jsp.jstl.core.Config;
 27  
 
 28  
 import net.fckeditor.localization.LocaleResolver;
 29  
 
 30  
 /**
 31  
  * JSTL implementation of the locale resolver. It resolves the locale against
 32  
  * the user session.
 33  
  * 
 34  
  * @version $Id: JstlResolver.java 4785 2009-12-21 20:10:28Z mosipov $
 35  
  */
 36  
 public class JstlResolver implements LocaleResolver {
 37  
 
 38  0
         public JstlResolver() {
 39  0
                 Config.class.hashCode();
 40  0
         }
 41  
 
 42  
         public Locale resolveLocale(final HttpServletRequest request) {
 43  
 
 44  0
                 return (Locale) Config.get(request.getSession(), Config.FMT_LOCALE);
 45  
         }
 46  
 
 47  
 }