Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package net.thucydides.plugins.jira.requirements;
 
A description goes here. User: john Date: 7/03/2014 Time: 2:57 PM
public class ConfigurableJiraClient extends JerseyJiraClient {
    private static final String FAIL_ON_JIRA_ERROR = "thucydides.fail.on.jira.error";
    private final org.slf4j.Logger logger = LoggerFactory.getLogger(JIRARequirementsProvider.class);
    public ConfigurableJiraClient(String urlString usernameString passwordString project) {
        super(urlusernamepasswordprojectcustomFields());
         = Injectors.getInjector().getProvider(EnvironmentVariables.class).get() ;
    }
    private static List<StringcustomFields() {
        EnvironmentVariables environmentVariables = Injectors.getInjector().getProvider(EnvironmentVariables.class).get() ;
        return Lists.newArrayList();
    }
    @Override
    public List<IssueSummaryfindByJQL(String querythrows JSONException {
        try {
            return super.findByJQL(query);
        } catch(JIRAAuthenticationError authenticationError) {
            if (failOnJiraErrors()) {
                throw authenticationError;
            } else {
                .error("Could not connect to JIRA"authenticationError);
            }
        } catch(JIRAConfigurationError configurationError) {
            if (failOnJiraErrors()) {
                throw configurationError;
            } else {
                .error("Could not connect to JIRA"configurationError);
            }
        }
        return Lists.newArrayList();
    }
    private boolean failOnJiraErrors() {
    }
    @Override
    public Optional<IssueSummaryfindByKey(String keythrows JSONException {
        try {
            return super.findByKey(key);
        } catch(JIRAAuthenticationError authenticationError) {
        } catch(JIRAConfigurationError configurationError) {
        }
        return Optional.absent();
    }
New to GrepCode? Check out our FAQ X