local variable type inference changes (#1028)

* local variable type inference changes

replacing type with var

* the type changed back to String

since it is initializing to null and later having different value, it is throwing error in Travis-CI.  Made changes.
This commit is contained in:
GVSharma 2019-10-23 19:55:45 +05:30 committed by Ilkka Seppälä
parent 4904d7eea0
commit acaa6cdc62
3 changed files with 4 additions and 4 deletions

View File

@ -107,7 +107,7 @@ public class Person implements Serializable {
@Override @Override
public int hashCode() { public int hashCode() {
int result = firstName != null ? firstName.hashCode() : 0; var result = firstName != null ? firstName.hashCode() : 0;
result = 31 * result + (lastName != null ? lastName.hashCode() : 0); result = 31 * result + (lastName != null ? lastName.hashCode() : 0);
result = 31 * result + (address != null ? address.hashCode() : 0); result = 31 * result + (address != null ? address.hashCode() : 0);
return result; return result;

View File

@ -130,7 +130,7 @@ public class LambdaInfo implements Serializable {
@Override @Override
public int hashCode() { public int hashCode() {
int result = awsRequestId != null ? awsRequestId.hashCode() : 0; var result = awsRequestId != null ? awsRequestId.hashCode() : 0;
result = 31 * result + (logGroupName != null ? logGroupName.hashCode() : 0); result = 31 * result + (logGroupName != null ? logGroupName.hashCode() : 0);
result = 31 * result + (logStreamName != null ? logStreamName.hashCode() : 0); result = 31 * result + (logStreamName != null ? logStreamName.hashCode() : 0);
result = 31 * result + (functionName != null ? functionName.hashCode() : 0); result = 31 * result + (functionName != null ? functionName.hashCode() : 0);

View File

@ -63,7 +63,7 @@ public class LambdaInfoApiHandler implements RequestHandler<Map<String, Object>,
* @return LambdaInfo * @return LambdaInfo
*/ */
private LambdaInfo lambdaInfo(Context context) { private LambdaInfo lambdaInfo(Context context) {
LambdaInfo lambdaInfo = new LambdaInfo(); var lambdaInfo = new LambdaInfo();
lambdaInfo.setAwsRequestId(context.getAwsRequestId()); lambdaInfo.setAwsRequestId(context.getAwsRequestId());
lambdaInfo.setFunctionName(context.getFunctionName()); lambdaInfo.setFunctionName(context.getFunctionName());
lambdaInfo.setFunctionVersion(context.getFunctionVersion()); lambdaInfo.setFunctionVersion(context.getFunctionVersion());
@ -75,7 +75,7 @@ public class LambdaInfoApiHandler implements RequestHandler<Map<String, Object>,
} }
private Map<String, String> headers() { private Map<String, String> headers() {
Map<String, String> headers = new HashMap<>(); var headers = new HashMap<String, String>();
headers.put("Content-Type", "application/json"); headers.put("Content-Type", "application/json");
return headers; return headers;