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

[JENKINS-34764] Fix PCT against 2.x baseline #13

Merged
merged 1 commit into from
May 13, 2016
Merged
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
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.5</version>
<version>2.9</version>
</parent>

<groupId>org.jenkins-ci.plugins.pipeline-stage-view</groupId>
Expand All @@ -49,7 +49,6 @@
<jenkins.version>1.609.3</jenkins.version>
<java.level>6</java.level>
<workflow.version>1.14</workflow.version>
<jenkins-test-harness.version>2.1</jenkins-test-harness.version>
</properties>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ public static class Processor extends Interceptor {
@Override
public Object invoke(StaplerRequest request, StaplerResponse response, Object instance, Object[] arguments)
throws IllegalAccessException, InvocationTargetException {
Object o = target.invoke(request, response, instance, arguments);

return new JsonResponse(JSONReadWrite.jsonMapper,o);
try {
Object o = target.invoke(request, response, instance, arguments);
return new JsonResponse(JSONReadWrite.jsonMapper,o);
} catch (Exception e) {
// TODO: Can be removed and ServletException added to throws declarations from 1.651+
throw new RuntimeException("Unexpected exception while serving JSON", e);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is here because invoke declaration in Interceptor class throws ServletException from 1.651 onwards, so build fails for the 2.x line (as well as for any version from and including 1.651)

}
}
}
}