Release 5.1.0.10
Date: Dec 23, 2014
Juno 5.1.0.10 is a moderate update.
Core
-
Major changes to URL-Encoded serializer and parser.
- Logic for serializing and parsing URL-Encoded key-value pairs moved to UrlEncodingSerializer and UrlEncodingParser classes.
- Logic for serializing and parsing URL-Encoded values moved to new UonSerializer and UonParser classes.
-
Fix bug where
BeanRuntimeExceptions
weren't being thrown on subsequent calls to BeanContext.getClassMeta(Class). -
Moved logic for
BeanContext.getPrimitiveDefault(Class)
to new ClassMeta.getPrimitiveDefault() method for performance reasons. -
Fixed bug in
BeanContext.addTransforms(Class[])that would cause filter order to get messed up. -
ClassMeta.newInstance() can now create array instances.
-
Fixed indentation bugs in HtmlSerializer.
-
Fixed issue in HtmlSerializer where newlines were not being converted into line breaks.
-
New WriterSerializer.toString(Object) method that's identical to the serialize method but throws
RuntimeExceptions
to make the serializer easier to use for debugging.
Server
-
Fixed major issue that prevented parsing URL-Encoded form posts into POJOs. Calling
HttpServlet.getParameter(String)was forcing the underlying servlet code to process the HTTP body itself, preventing theUrlEncodingSerializer
class from being able to parse the content. Updated code no longer inadvertantly calls this method. -
New
RestRequest.getQueryParameter(String),RestRequest.hasQueryParameter(String), andRestRequest.hasAnyQueryParameters(String[])methods that only look for parameters in the URL query string to prevent loading and parsing of URL-Encoded form posts. -
New
@QParamand@HasQParamannotations for accessing query parameters from the URL query string. -
&plainText
parameter can now specify a false value. -
Removed properties parameters from
RestServlet.onPreCall(RestRequest)andRestServlet.onPostCall(RestRequest,RestResponse)methods since the properties are already accessible throughRestRequest.getProperties()
. -
Added UonSerializer and UonParser to serializer and parser lists on
BasicRestServletandRestServletJenaDefault.
Client
-
Moved to Apache HttpClient 4.3 to match Jazz 6.0.
-
Renamed
RestResponseEntity
toRestRequestEntity. -
Improved performance on URL-Encoded form posts by serializing directly to output stream instead of serialized to string first.
-
New methods on RestClient class that makes it easier to associate serializer and parser attributes with registered serializer and parser:
RestClient.setProperty(String,Object)RestClient.setProperties(ObjectMap)RestClient.addNotBeanClasses(Class[])RestClient.addTransforms(Class[])RestClient.addImplClass(Class,Class)
-
Renamed
RestClient.shutdown()
to RestClient.close() to mirror change in Apache API.
Samples
-
New
CodeFormatterResource
for quickly formatting Java and XML code samples in Javadocs. -
New
UrlEncodedFormResource
for showing how to work with URL-Encoded form posts.