Skip to content

Commit 3cb9f53

Browse files
committed
Minor refacto
1 parent dd7f8f6 commit 3cb9f53

5 files changed

Lines changed: 2 additions & 27 deletions

File tree

AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/processing/rest/DeleteProcessor.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020

2121
import org.androidannotations.annotations.rest.Delete;
2222

23-
import com.sun.codemodel.JInvocation;
24-
2523
public class DeleteProcessor extends MethodCrudProcessor {
2624

2725
public DeleteProcessor(ProcessingEnvironment processingEnv, RestImplementationsHolder restImplementationsHolder) {
@@ -39,8 +37,4 @@ public String retrieveUrlSuffix(Element element) {
3937
return getAnnotation.value();
4038
}
4139

42-
@Override
43-
protected JInvocation addHttpEntityVar(JInvocation restCall, MethodProcessorHolder methodHolder) {
44-
return restCall.arg(generateHttpEntityVar(methodHolder));
45-
}
4640
}

AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/processing/rest/HeadProcessor.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import com.sun.codemodel.JCodeModel;
2828
import com.sun.codemodel.JExpr;
2929
import com.sun.codemodel.JExpression;
30-
import com.sun.codemodel.JInvocation;
3130

3231
public class HeadProcessor extends MethodProcessor {
3332

@@ -55,11 +54,6 @@ public void process(Element element, JCodeModel codeModel, EBeanHolder holder) t
5554
generateRestTemplateCallBlock(new MethodProcessorHolder(holder, executableElement, urlSuffix, expectedClass, expectedClass, codeModel));
5655
}
5756

58-
@Override
59-
protected JInvocation addHttpEntityVar(JInvocation restCall, MethodProcessorHolder methodHolder) {
60-
return restCall.arg(generateHttpEntityVar(methodHolder));
61-
}
62-
6357
@Override
6458
protected JExpression addResultCallMethod(JExpression restCall, MethodProcessorHolder methodHolder) {
6559
return JExpr.invoke(restCall, "getHeaders");

AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/processing/rest/MethodCrudProcessor.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,6 @@ protected String plainName(JClass jClass) {
251251
return plainName;
252252
}
253253

254-
@Override
255-
protected JInvocation addHttpEntityVar(JInvocation restCall, MethodProcessorHolder methodHolder) {
256-
return restCall.arg(generateHttpEntityVar(methodHolder));
257-
}
258-
259254
@Override
260255
protected JInvocation addResponseEntityArg(JInvocation restCall, MethodProcessorHolder methodHolder) {
261256
JClass expectedClass = methodHolder.getExpectedClass();

AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/processing/rest/MethodProcessor.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,10 @@ protected void generateRestTemplateCallBlock(MethodProcessorHolder methodHolder)
182182
}
183183

184184
/**
185-
* Add the HttpEntity attribute to restTemplate.exchange() method. By
186-
* default, the value will be <code>null</code> (for DELETE, HEAD and
187-
* OPTIONS method type)
185+
* Add the HttpEntity attribute to restTemplate.exchange() method.
188186
*/
189187
protected JInvocation addHttpEntityVar(JInvocation restCall, MethodProcessorHolder methodHolder) {
190-
return restCall.arg(JExpr._null());
188+
return restCall.arg(generateHttpEntityVar(methodHolder));
191189
}
192190

193191
/**

AndroidAnnotations/androidannotations/src/main/java/org/androidannotations/processing/rest/OptionsProcessor.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import com.sun.codemodel.JCodeModel;
3030
import com.sun.codemodel.JExpr;
3131
import com.sun.codemodel.JExpression;
32-
import com.sun.codemodel.JInvocation;
3332

3433
public class OptionsProcessor extends MethodProcessor {
3534

@@ -63,11 +62,6 @@ public void process(Element element, JCodeModel codeModel, EBeanHolder holder) t
6362
generateRestTemplateCallBlock(new MethodProcessorHolder(holder, executableElement, urlSuffix, expectedClass, generatedReturnType, codeModel));
6463
}
6564

66-
@Override
67-
protected JInvocation addHttpEntityVar(JInvocation restCall, MethodProcessorHolder methodHolder) {
68-
return restCall.arg(generateHttpEntityVar(methodHolder));
69-
}
70-
7165
@Override
7266
protected JExpression addResultCallMethod(JExpression restCall, MethodProcessorHolder methodHolder) {
7367
restCall = JExpr.invoke(restCall, "getHeaders");

0 commit comments

Comments
 (0)