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

Java generated code from WADL contains unreachable blocks #83

@uesleilima

Description

@uesleilima

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions