Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix eclipse deprecation warnings #1917

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/@unreleased/pr-1917.v2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type: improvement
improvement:
description: Generated code does not produce deprecation warnings in eclipse by
default
links:
- https://github.com/palantir/conjure-java/pull/1917

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
import com.palantir.dialogue.TypeMarker;
import com.palantir.logsafe.SafeArg;
import com.palantir.logsafe.exceptions.SafeIllegalStateException;
import com.squareup.javapoet.AnnotationSpec;
import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.CodeBlock;
import com.squareup.javapoet.FieldSpec;
Expand Down Expand Up @@ -200,12 +199,6 @@ private MethodSpec clientImpl(EndpointDefinition def) {
.addParameters(params)
.addAnnotation(Override.class);

if (def.getDeprecated().isPresent()) {
methodBuilder.addAnnotation(AnnotationSpec.builder(SuppressWarnings.class)
.addMember("value", "$S", "deprecation")
.build());
}

TypeName returnType =
methodType.switchBy(returnTypes.baseType(def.getReturns()), returnTypes.async(def.getReturns()));
methodBuilder.returns(returnType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -910,11 +910,6 @@ private static MethodSpec createWrapperAcceptMethod(
} else {
methodBuilder.addStatement("return $N.$N($N)", visitor, visitMethodName, valueName);
}
if (isDeprecated) {
methodBuilder.addAnnotation(AnnotationSpec.builder(SuppressWarnings.class)
.addMember("value", "$S", "deprecation")
.build());
}
return methodBuilder.build();
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.