Violation.lineId might be null and 0 - seems that both values indicates that violation attached to file, but not to a concrete line. Which leads to misunderstandings, because method Violation.getLineId returns original value.
- setter must log a warning if value<1. It will throw an exception in future releases
- getter must return null or value>=1
- add the methods "boolean hasLineId()" to both org.sonar.api.rules.Violation and org.sonar.wsclient.services.Violation
- violation web service does return the lineId field only if value is set (>=1)
- javadoc should be improved to describe convention