jhipster / jhipster/prettier-java

Improve formatting of method will lot of parameters and with exception

Open
#286 12 comments 1 reaction 1 assignee Claimed by @clementdessoude View on GitHub
area: enhancement :wrench: theme: Re-Writer
Dominant language
Java
Stars
1.2k
Forks
120
Avg merge
1d 14h
Merged PRs (30d)
27

Description

Source:
```java
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:
```java
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:
```java
public LoggingConfiguration(
@Value("${spring.application.name}") String appName,
@Value("${server.port}") String serverPort,
JHipsterProperties jHipsterProperties,
ObjectMapper mapper
) throws JsonProcessingException {
// ...
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.