문제

I have the following code :

private Integer idadr;

@Id()
@SequenceGenerator(name = "idadrGenerator", sequenceName = "SEQ_ADR", allocationSize = 1)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "idadrGenerator")
@Column(name = "IDADR", unique = true, nullable = false, precision = 8)
public Integer getIdadr() {
  return this.idadr;
}

public void setIdadr(Integer idadr) {
  this.idadr = idadr;
}

When I run an analyse : a new violation with the UndocumentApi rule is raised. I think this violation must not appear because it is a basic getter on a field.

Is it a bug ?

Regards,

Stef

도움이 되었습니까?

해결책

As your comment says, this is a bug/deficiency in how SonarQube decides if a method is a getter.

http://jira.codehaus.org/browse/SONARJAVA-7

Unfortunately it's not currently going to be fixed because of a related ticket (http://jira.codehaus.org/browse/SONARJAVA-398)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top