src/main/java/com/sgoertzen/sonarbreak/QueryExecutor.java
private Result fetchSonarStatus(URL queryURL) throws IOException, SonarBreakException {
        InputStream in = null;
        try {
            URLConnection connection = queryURL.openConnection();
            connection.setRequestProperty("Accept", "application/json");
            in = connection.getInputStream();

            String response = IOUtils.toString(in);
            return parseResponse(response);
        } finally {
            IOUtils.closeQuietly(in);
        }
    }
private Result fetchSonarStatus(URL queryURL) throws IOException, SonarBreakException {
        InputStream in = null;
        try {
            URLConnection connection = queryURL.openConnection();
            connection.setRequestProperty("Accept", "application/json");
            in = connection.getInputStream();

            String response = IOUtils.toString(in);
            return parseResponse(response);
        } finally {
            IOUtils.closeQuietly(in);
        }
    }
private Result fetchSonarStatus ( URL queryURL ) throws IOException , SonarBreakException { InputStream in = null ; try { URLConnection connection = queryURL . openConnection ( ) ; connection . setRequestProperty ( "Accept" , "application/json" ) ; in = connection . getInputStream ( ) ; String response = IOUtils . toString ( in ) ; return parseResponse ( response ) ; } finally { IOUtils . closeQuietly ( in ) ; } }
Get the status of a build project from sonar.  This returns the current status that sonar has and does not
do any checking to ensure it matches the current project

@param queryURL The sonar URL to hit to get the status
@return The sonar response include quality gate status
@throws IOException
@throws SonarBreakException
Get the status of a build project from sonar . This returns the current status that sonar has and does not do any checking to ensure it matches the current project