DATACMNS-828 - Fixed potential NullPointerException in ResultProcessor.
ResultProcessor.processResult(…) now explicitly handles null values to prevent IllegalArgumentExceptions being provoked in the ProjectionFactory which occurred if null values were handed down to it.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
* Copyright 2015-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -121,7 +121,7 @@ public class ResultProcessor {
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T processResult(Object source, Converter<Object, Object> preparingConverter) {
|
||||
|
||||
if (type.isInstance(source) || !type.isProjecting()) {
|
||||
if (source == null || type.isInstance(source) || !type.isProjecting()) {
|
||||
return (T) source;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user