Skip to content

Commit

Permalink
renamed local variable to remove underscore
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1492624 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
grobmeier committed Jun 13, 2013
1 parent 89cd538 commit bbe2a3b
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ public String intercept(ActionInvocation invocation) throws Exception {
Map<String, Object> params = invocation.getInvocationContext().getParameters();

boolean storeInSession = true;
Object requested_locale = findLocaleParameter(params, parameterName);
if (requested_locale == null) {
requested_locale = findLocaleParameter(params, requestOnlyParameterName);
if (requested_locale != null) {
Object requestedLocale = findLocaleParameter(params, parameterName);
if (requestedLocale == null) {
requestedLocale = findLocaleParameter(params, requestOnlyParameterName);
if (requestedLocale != null) {
storeInSession = false;
}
}
Expand All @@ -137,9 +137,9 @@ public String intercept(ActionInvocation invocation) throws Exception {
Map<String, Object> session = invocation.getInvocationContext().getSession();

Locale locale = null;
if (requested_locale != null) {
locale = (requested_locale instanceof Locale) ?
(Locale) requested_locale : LocalizedTextUtil.localeFromString(requested_locale.toString(), null);
if (requestedLocale != null) {
locale = (requestedLocale instanceof Locale) ?
(Locale) requestedLocale : LocalizedTextUtil.localeFromString(requestedLocale.toString(), null);
if (locale != null && LOG.isDebugEnabled()) {
LOG.debug("applied request locale=#0", locale);
}
Expand Down Expand Up @@ -184,16 +184,16 @@ public String intercept(ActionInvocation invocation) throws Exception {
}

private Object findLocaleParameter(Map<String, Object> params, String parameterName) {
Object requested_locale = params.remove(parameterName);
if (requested_locale != null && requested_locale.getClass().isArray()
&& ((Object[]) requested_locale).length == 1) {
requested_locale = ((Object[]) requested_locale)[0];
Object requestedLocale = params.remove(parameterName);
if (requestedLocale != null && requestedLocale.getClass().isArray()
&& ((Object[]) requestedLocale).length == 1) {
requestedLocale = ((Object[]) requestedLocale)[0];

if (LOG.isDebugEnabled()) {
LOG.debug("requested_locale=#0", requested_locale);
LOG.debug("requested_locale=#0", requestedLocale);
}
}
return requested_locale;
return requestedLocale;
}

/**
Expand Down

0 comments on commit bbe2a3b

Please sign in to comment.