Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

Java generated code from WADL contains unreachable blocks #83

Open
uesleilima opened this issue Apr 9, 2021 · 0 comments
Open

Java generated code from WADL contains unreachable blocks #83

uesleilima opened this issue Apr 9, 2021 · 0 comments

Comments

@uesleilima
Copy link

uesleilima commented Apr 9, 2021

After trying to generate the code from using the following spec - https://docs.atlassian.com/bitbucket-server/rest/7.11.2/bitbucket-rest.wadl - it throws me unreachable statement error when trying to compile the generated source.

This is caused by a break statement being added right after throwing an exception in the line before:

            switch (response.getStatus()) {
                case  401 :
                    throw new ExampleCom_RestApi10 .WebApplicationExceptionMessage(response);
                    break;

Plugin configuration:

            <plugin>
                <groupId>org.jvnet.ws.wadl</groupId>
                <artifactId>wadl-client-plugin</artifactId>
                <version>1.1.6</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <packageName>com.atlassian.bitbucket.server</packageName>
                            <targets>
                                <target>file://${project.basedir}/src/main/resources/wadl/bitbucket-rest.wadl</target>
                            </targets>
                            <generationStyle>jaxrs20</generationStyle>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant