[OLINGO-1139] - Merge of GitHub pull request (about typos)
diff --git a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAFunctionContext.java b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAFunctionContext.java
index 0e7630f..2dfb933 100644
--- a/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAFunctionContext.java
+++ b/odata2-jpa-processor/jpa-core/src/main/java/org/apache/olingo/odata2/jpa/processor/core/access/data/JPAFunctionContext.java
@@ -46,15 +46,15 @@
public class JPAFunctionContextBuilder extends JPAMethodContextBuilder {
- protected GetFunctionImportUriInfo functiontView;
+ protected GetFunctionImportUriInfo functionView;
private EdmFunctionImport functionImport;
private EdmMapping mapping;
@Override
public JPAMethodContext build() throws ODataJPAModelException, ODataJPARuntimeException {
- if (functiontView != null) {
+ if (functionView != null) {
- functionImport = functiontView.getFunctionImport();
+ functionImport = functionView.getFunctionImport();
try {
mapping = functionImport.getMapping();
@@ -85,7 +85,7 @@
@Override
protected void setResultsView(final Object resultsView) {
if (resultsView instanceof GetFunctionImportUriInfo) {
- functiontView = (GetFunctionImportUriInfo) resultsView;
+ functionView = (GetFunctionImportUriInfo) resultsView;
}
}
@@ -96,35 +96,32 @@
Class<?>[] parameterTypes = getParameterTypes();
Method method = getMethod(parameterTypes);
Type returnType = getReturnType();
- Object[] args = getAruguments();
+ Object[] args = getArguments();
- JPAFunction jpafunction = new JPAFunction(method, parameterTypes, returnType, args);
-
- return jpafunction;
+ return new JPAFunction(method, parameterTypes, returnType, args);
}
- private Object[] getAruguments() throws EdmException {
- Map<String, EdmLiteral> edmArguements = functiontView.getFunctionImportParameters();
+ private Object[] getArguments() throws EdmException {
+ Map<String, EdmLiteral> edmArguments = functionView.getFunctionImportParameters();
- if (edmArguements == null) {
+ if (edmArguments == null) {
return null;
} else {
Collection<String> paramNames = functionImport.getParameterNames();
Object[] args = new Object[paramNames.size()];
int i = 0;
for (String paramName : functionImport.getParameterNames()) {
- EdmLiteral literal = edmArguements.get(paramName);
+ EdmLiteral literal = edmArguments.get(paramName);
EdmParameter parameter = functionImport.getParameter(paramName);
JPAEdmMapping mapping = (JPAEdmMapping) parameter.getMapping();
- args[i] = convertArguement(literal, parameter.getFacets(), mapping.getJPAType());
- i++;
+ args[i++] = convertArgument(literal, parameter.getFacets(), mapping.getJPAType());
}
return args;
}
}
- private Object convertArguement(final EdmLiteral edmLiteral, final EdmFacets facets, final Class<?> targetType)
+ private Object convertArgument(final EdmLiteral edmLiteral, final EdmFacets facets, final Class<?> targetType)
throws EdmSimpleTypeException {
Object value = null;
if (edmLiteral != null) {
@@ -140,8 +137,7 @@
int i = 0;
for (String parameterName : functionImport.getParameterNames()) {
EdmParameter parameter = functionImport.getParameter(parameterName);
- parameterTypes[i] = ((JPAEdmMapping) parameter.getMapping()).getJPAType();
- i++;
+ parameterTypes[i++] = ((JPAEdmMapping) parameter.getMapping()).getJPAType();
}
return parameterTypes;
@@ -167,8 +163,6 @@
Object[] params = null;
return type.getConstructor((Class<?>[]) params).newInstance(params);
-
}
-
}
}