001    package org.sonar.ide.wsclient;
002    
003    import org.sonar.wsclient.services.ViolationQuery;
004    
005    /**
006     * Workaround for SONAR-1793: Wrong URL construction in ViolationQuery, when depth parameter used.
007     * 
008     * @deprecated Should be removed after release of sonar-ws-client 2.3
009     */
010    @Deprecated
011    public class ProperViolationQuery extends ViolationQuery {
012      public ProperViolationQuery(String resourceKeyOrId) {
013        super(resourceKeyOrId);
014      }
015    
016      @Override
017      public String getUrl() {
018        String url = super.getUrl();
019        if (getDepth() != 0) {
020          url += "depth=" + getDepth();
021        }
022        return url;
023      }
024    }