Sitelet https://github.com/jhipster/prettier-java/issues/286
Skip to content

Improve formatting of method will lot of parameters and with exception #286

Description

@murdos

Source:

    public LoggingConfiguration(@Value("${spring.application.name}") String appName,
        @Value("${server.port}") String serverPort,
        JHipsterProperties jHipsterProperties,
        ObjectMapper mapper)
        throws JsonProcessingException {
        // ...
    }

Formatted with prettier 0.4.0:

    public LoggingConfiguration(
        @Value("${spring.application.name}") String appName,
        @Value("${server.port}") String serverPort,
        JHipsterProperties jHipsterProperties,
        ObjectMapper mapper
    )
        throws JsonProcessingException {
        // ...
    }

I'm not really sure what the result should be, but the position of ) after the last parameter is a bit strange in regards to the exception.
Maybe:

    public LoggingConfiguration(
        @Value("${spring.application.name}") String appName,
        @Value("${server.port}") String serverPort,
        JHipsterProperties jHipsterProperties,
        ObjectMapper mapper
    ) throws JsonProcessingException {
        // ...
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions