Fix locale parsing error with en_en, tr_tr, etc

Previously, StringUtils#parseLocaleString would parse locale strings
having the same lowercase token for both language and country
incorrectly, e.g. 'tr_tr' would parse to 'tr_TR_tr' as opposed to the
expected 'tr_TR'.

This commit fixes this behavior by using using String#lastIndexOf
instead of String#indexOf when determining the location of the country
code token.

Issue: SPR-9420
Fix property replacement bug in Log4jWebConfigurer

Previously, if the resolution of a ${...} placeholder resulted in a
valid URL for the location of a log4j properties/XML file, the URL
would ultimately be malformed by an unnecessary call to to
WebUtils#getRealPath.

The implementation of Log4jWebConfigurer#initLogging now eagerly
attempts SystemPropertyUtils#resolvePlaceholders before checking to see
if the location is a valid URL, and bypassing the call to
WebUtils#getRealPath if so.

Issue: SPR-9417
Fix SpEL JavaBean compliance

Before this fix ReflectivePropertyAccessor was not able to find write
method for valid property name that has first character in lower case
and second character in upper case. Write method lookup would always
convert first character of property name to upper case which is not
compliant with JavaBean specification. As consequence this caused an
unwanted behavior in SpEL when obtaining values of expressions that
reference such JavaBean properties.

As of this change, write method lookup skips conversion of property
name first character to upper case when property name is longer than
one character and second character is in upper case. This also fixes
mentioned bug in SpEL value resolution.

Issue: SPR-9123
Merge pull request #49 from sslavic/SPR-9123

* SPR-9123:
  Fix SpEL JavaBean compliance
Fix JibxMarshallerTests failing on Windows

Before this change JibxMarshallerTests would fail on Windows with an
error message explaining that JiBX compiler generated classes are not
found on the classpath for binding with name 'binding'. Tests would
execute well on Linux and OS X.

Actual root cause of this bug is found to be in JiBX 1.1.5 release that
is used to build Spring. The binding name can be explicitly specified in
JiBX binding file. If omitted, when generating classes the JiBX compiler
as fall-back mechanism tries to derive the binding name from the binding
file name. That logic had a bug which gets manifested when configured
binding file path has mixed Windows and *nix style file separators, as
in case of JibxMarshallerTests being executed on a Windows platform.

This commit resolves this issue by upgrading Spring's build from JiBX
1.1.5 to 1.2.3, as the bug mentioned was fixed in JiBX 1.2. See JIBX-441
for more details.

Issue: SPR-8360
Merge pull request #59 from sslavic/SPR-8360

* SPR-8360:
  Fix JibxMarshallerTests failing on Windows
Allow null params as advertised in Constants#toCode*

Even though the Javadoc for Constants#toCode and #toCodeForSuffix
specifies that a null value for the 'namePrefix' and 'nameSuffix'
parameters are respectively allowed, before this change passing a null
to either would result in a NullPointerException.

This change fixes constant name lookup for null values of these params
as if an empty string had been passed instead. This way of handling a
null value is consistent with the rest of Constants class API.

Issue: SPR-8278
Fix compiler warnings in Constants/ConstantsTests
Merge pull request #57 from sslavic/SPR-8278

* SPR-8278:
  Fix compiler warnings in Constants/ConstantsTests
  Allow null params as advertised in Constants#toCode*
Support [] array ref syntax in SpEL T() construct

Prior to this change, SpEL would not allow the use of '[]' in
expressions like the following:

    T(foo.Bar[])

This commit updates TypeReference and InternalSpelExpressionParser to
support this syntax, avoiding the need for workarounds like:

    new foo.bar[0].class

Issue: SPR-9203
Eliminate trailing whitespace in SpEL classes
Merge pull request #53 from aclement/SPR-9203

* SPR-9203:
  Eliminate trailing whitespace in SpEL classes
  Support [] array ref syntax in SpEL T() construct
Fix compiler warnings

This patch fixes several compiler warnings that do not point to code
problems. Two kinds of warnings are fixed. First in a lot of cases
@SuppressWarnings("unchecked") is used although there are no unchecked
casts happening. This seems to be a leftover from when the code base
was on Java 1.4, now that the code base was moved to Java 1.5 these are
no longer necessary. Secondly there some places where the raw types of
List and Class are used where there wildcard types (List<?> and
Class<?>) would work just as well without causing any raw type warnings.

These changes are beneficial particularly when working in Eclipse or
other IDEs because it reduces 'noise', helping to isolate actual
potential problems in the code.

The following changes have been made:

 - remove @SuppressWarnings where no longer needed

 - use wildcard types instead of raw types where possible
Merge pull request #34 from marschall/warnings

* warnings:
  Fix compiler warnings
Fix circular placeholder prevention

A set of resolved placeholder references is used for circular
placeholder prevention. For complex property definitions this mechanism
would put property values with unresolved inner placeholder references
in the set, but would try to remove property values with placeholders
resolved, leaving the set in an invalid state and the mechanism broken.

This fix makes sure that the value that is put in the set is same one
that is removed from it, and by doing so avoids false positives in
reporting circular placeholders.

Issue: SPR-5369
Merge pull request #42 from sslavic/SPR-5369

* SPR-5369:
  Fix circular placeholder prevention
Polish recent changes to Log4jWebConfigurer

Reordered inline comments so that they now apply to current
state of the code.

Added logger entry in testlog4j.properties to avoid console
warning.

Issue: SPR-9417
Improve documentation of annotated class support in the TCF

Updated all Javadoc in the Spring TestContext Framework (TCF) to explain
and refer to 'annotated classes' instead of 'configuration classes'.

Specifically, @ContextConfiguration now explicitly defines what is meant
by 'annotated classes', and various other classes now refer to this
definition. Otherwise, the term 'configuration class' has simply been
replaced with 'annotated class'.

Also deleted cross references to deprecated JUnit 3.8 classes and
formatted Javadoc in general for greater readability.

Issue: SPR-9401
Decode path vars when url decoding is turned off

When URL decoding is turned off in AbstractHandlerMapping, the
extracted path variables are also not encoded. Turning off URL decoding
may be necessary for request mapping to work correctly when the path
may contain the (encoded) special character '/'. At the same time there
is no good reason not to leave path variables encoded. This change
ensures path variables are encoded when URL decoding is turned off.

Issue: SPR-9098
Decode path vars in pre-3.1 `@MVC` support clases too

See the commit comments for:
https://github.com/SpringSource/spring-framework/commit/57307a0b2e5bce8f70d5deddf8df11d034dc8c5a

This commit also applies the change to pre-3.1 `@MVC` suppor classes.

Issue: SPR-6951