## Description
Snakeyaml is the 3rd party library we use for JSON and YAML parsing. 

It has always been an optional component, traditionally only needed for json/yaml changelogs and offline snapshots (which are json-formatted).

As we are adding hub.liquibase.com based functionality, that also requires snakeyaml for the json rest API calls.

With 4.3.0, there is an issue where the "get the HubService" implementation call returns null if we cannot instantiate the standard hubservice class, and then the code that expects a service to be returned throws the null pointer exception.

## Impact
This should NOT impact:

* CLI users (because snakeyaml is included in the CLI distribution)
* Liquibase-Maven-Plugin users, because Maven appears to include snakeyaml in the liquibase classpath with the `<optional>true</optional>` setting we have in the plugin's pom.xml
* Any spring boot or other embedded users, where snakeyaml is not explicitly included as a dependency

This SHOULD impact:

* Any spring boot or other embedded setups, where snakeyaml is not explicitly included as a dependency. We have it listed as <optional>true</option> in our pom.xml, so it should not be automatically included
* Ant users
* Anyone else running liquibase without snakeyaml.jar in their classpath.

## Resolution Options
1. We can make snakeyaml a required dependency. As we continue to add hub-based functionality, the ability to use json will become more and more central that it's not worth keeping it as an optional dependency.
1. Continue to keep snakeyaml optional, and improve test coverage around how to handle cases where the library is not available

NOTE: Using a different library than snakeyaml for json parsing is a different issue.

## Liquibase Internal QA Test Requirements
* Verify Liquibase CLI update does not throw a null pointer if snakeyaml is not in path.
* Verify Liquibase Ant update does not throw a null pointer if snakeyaml is not in the path.
* Verify Liquibase Servlet update does not throw a null pointer if snakeyaml is not in the path.
* Verify Liquibase Maven update does not throw a null pointer.
  * Fix should have no impact on Maven for reasons described in the Impact section.
* Verify all automated functional CLI tests pass on Jenkins.
##### Jenkins is an internal build server and results are not visible to the wider community.


package liquibase.hub;
import liquibase.plugin.AbstractPluginFactory;
public class HubServiceFactory extends AbstractPluginFactory<HubService> {
    private String offlineReason;
    protected HubServiceFactory() {
    }
    @Override
    protected Class<HubService> getPluginClass() {
        return HubService.class;
    }
    @Override
    protected int getPriority(HubService obj, Object... args) {
        return obj.getPriority();
    }
    public HubService getService() {
        return getPlugin();
    }
    public boolean isOnline() {
        return getService().isOnline();
    }
    public String getOfflineReason() {
        return offlineReason;
    }
    public void setOfflineReason(String offlineReason) {
        this.offlineReason = offlineReason;
    }
}