Upgrade SAT and Spotless, apply Spotless and enable check (#1446)

* Update SAT and Spotless dependencies
* Apply Spotless and enable check

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born 2020-04-26 11:15:24 +02:00 committed by GitHub
parent ed4b5ff94b
commit 61e17ce39e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
904 changed files with 146 additions and 1064 deletions

View File

@ -49,5 +49,4 @@ public interface AudioHTTPServer {
* @return the relative URL to access the stream starting with a '/'
*/
String serve(FixedLengthAudioStream stream, int seconds);
}

View File

@ -192,5 +192,4 @@ public interface AudioManager {
* @return ids of matching sinks
*/
Set<String> getSinkIds(String pattern);
}

View File

@ -58,5 +58,4 @@ public interface AudioSource {
* @throws AudioException If problem occurs obtaining the stream
*/
AudioStream getInputStream(AudioFormat format) throws AudioException;
}

View File

@ -37,5 +37,4 @@ public abstract class AudioStream extends InputStream {
* @return The supported audio format
*/
public abstract AudioFormat getFormat();
}

View File

@ -60,5 +60,4 @@ public class ByteArrayAudioStream extends FixedLengthAudioStream {
public InputStream getClonedStream() {
return new ByteArrayAudioStream(bytes, format);
}
}

View File

@ -200,5 +200,4 @@ public class AudioConsoleCommandExtension extends AbstractConsoleCommandExtensio
console.println(e.getMessage());
}
}
}

View File

@ -321,5 +321,4 @@ public class AudioManagerImpl implements AudioManager, ConfigOptionProvider {
protected void removeAudioSink(AudioSink audioSink) {
this.audioSinks.remove(audioSink.getId());
}
}

View File

@ -190,5 +190,4 @@ public class AudioServlet extends SmartHomeServlet implements AudioHTTPServer {
private String getRelativeURL(String streamId) {
return SERVLET_NAME + "/" + streamId;
}
}

View File

@ -66,5 +66,4 @@ public class AudioStreamUtils {
public static boolean isExtension(String filename, String extension) {
return !extension.isEmpty() && getExtension(filename).equals(extension);
}
}

View File

@ -121,5 +121,4 @@ public abstract class AbstractAudioServletTest extends JavaTest {
private String generateURL(String protocol, String hostname, int port, String path) {
return String.format("%s://%s:%s%s", protocol, hostname, port, path);
}
}

View File

@ -190,5 +190,4 @@ public class AudioConsoleTest extends AbstractAudioServletTest {
waitForAssert(() -> assertThat("The listed source was not as expected", consoleOutput,
is(String.format("* %s (%s)", audioSource.getLabel(Locale.getDefault()), audioSource.getId()))));
}
}

View File

@ -87,5 +87,4 @@ public class AudioManagerServletTest extends AbstractAudioServletTest {
return new ByteArrayAudioStream(testByteArray, audioFormat);
}
}

View File

@ -66,7 +66,6 @@ public class AudioManagerTest {
audioSource = mock(AudioSource.class);
when(audioSource.getId()).thenReturn("audioSourceId");
when(audioSource.getLabel(any(Locale.class))).thenReturn("audioSourceLabel");
}
@After
@ -315,5 +314,4 @@ public class AudioManagerTest {
return new ByteArrayAudioStream(testByteArray, audioFormat);
}
}

View File

@ -153,5 +153,4 @@ public class AudioServletTest extends AbstractAudioServletTest {
response = request.send();
assertThat("The response status was not as expected", response.getStatus(), is(HttpStatus.NOT_FOUND_404));
}
}

View File

@ -93,5 +93,4 @@ public class BundledSoundFileHandler implements Closeable {
public String wavFilePath() {
return wavFilePath;
}
}

View File

@ -30,5 +30,4 @@ public class ManagedUserLoginConfiguration extends Configuration {
return new AppConfigurationEntry[] { new AppConfigurationEntry(ManagedUserLoginModule.class.getCanonicalName(),
LoginModuleControlFlag.SUFFICIENT, new HashMap<String, Object>()) };
}
}

View File

@ -36,5 +36,4 @@ public interface Keyword {
String CODE = "code"; // https://tools.ietf.org/html/rfc6749#section-4.1
String STATE = "state"; // https://tools.ietf.org/html/rfc6749#section-4.1
}

View File

@ -395,5 +395,4 @@ public class OAuthClientServiceImpl implements OAuthClientService {
private String createNewState() {
return UUID.randomUUID().toString();
}
}

View File

@ -373,5 +373,4 @@ public class OAuthConnector {
logger.error("Exception while shutting down httpClient, {}", e.getMessage(), e);
}
}
}

View File

@ -162,5 +162,4 @@ public class OAuthFactoryImpl implements OAuthFactory {
public void setTokenExpiresInBuffer(int bufferInSeconds) {
tokenExpiresInBuffer = bufferInSeconds;
}
}

View File

@ -433,5 +433,4 @@ public class OAuthStoreHandlerImpl implements OAuthStoreHandler {
}
}
}
}

View File

@ -36,5 +36,4 @@ public enum StorageRecordType {
public String getKey(@Nullable String handle) {
return (handle == null) ? this.suffix : (handle + this.suffix);
}
}

View File

@ -167,5 +167,4 @@ public class SymmetricKeyCipher implements StorageCipher {
public void unsetConfigurationAdmin(ConfigurationAdmin configurationAdmin) {
this.configurationAdmin = configurationAdmin;
}
}

View File

@ -82,5 +82,4 @@ public class MediaScriptScopeProvider implements ScriptExtensionProvider {
@Override
public void unload(String scriptIdentifier) {
}
}

View File

@ -52,5 +52,4 @@ public class PlayActionHandler extends BaseActionModuleHandler {
}
return null;
}
}

View File

@ -217,5 +217,4 @@ public class RuleSupportScriptExtension implements ScriptExtensionProvider {
}
}
}
}

View File

@ -122,5 +122,4 @@ public class RuleSupportRuleRegistryDelegate implements RuleRegistry {
public Collection<Rule> getByTags(String... tags) {
return ruleRegistry.getByTags(tags);
}
}

View File

@ -68,5 +68,4 @@ public class ScriptedRuleProvider implements RuleProvider {
providerChangeListener.removed(this, rule);
}
}
}

View File

@ -257,5 +257,4 @@ public abstract class SimpleRule implements Rule, SimpleRuleActionHandler {
}
return true;
}
}

View File

@ -33,5 +33,4 @@ public class SimpleRuleActionHandlerDelegate extends SimpleActionHandler {
public Object execute(Action module, Map<String, ?> inputs) {
return handler.execute(module, inputs);
}
}

View File

@ -58,5 +58,4 @@ public interface ScriptEngineFactory {
*/
@Nullable
ScriptEngine createScriptEngine(String scriptType);
}

View File

@ -59,5 +59,4 @@ public interface ScriptEngineManager {
* @return true, if supported, else false
*/
boolean isSupported(String scriptType);
}

View File

@ -77,5 +77,4 @@ public interface ScriptExtensionProvider {
* @param scriptIdentifier the identifier of the script that is unloaded
*/
void unload(String scriptIdentifier);
}

View File

@ -72,5 +72,4 @@ public class NashornScriptEngineFactory extends AbstractScriptEngineFactory {
logger.error("ScriptException while importing scope: {}", ex.getMessage());
}
}
}

View File

@ -221,5 +221,4 @@ public class ScriptEngineManagerImpl implements ScriptEngineManager {
public boolean isSupported(String scriptType) {
return findEngineFactory(scriptType) != null;
}
}

View File

@ -124,5 +124,4 @@ public class ScriptExtensionManager {
provider.unload(scriptIdentifier);
}
}
}

View File

@ -119,5 +119,4 @@ public class ItemRegistryDelegate implements Map<String, State> {
}
return entries;
}
}

View File

@ -91,5 +91,4 @@ public class ScriptThingActions {
ThingActionsScope scopeAnnotation = actions.getClass().getAnnotation(ThingActionsScope.class);
return scopeAnnotation.name();
}
}

View File

@ -86,5 +86,4 @@ public class ScriptModuleHandlerFactory extends BaseModuleHandlerFactory {
public void unsetScriptEngineManager(ScriptEngineManager scriptEngineManager) {
this.scriptEngineManager = null;
}
}

View File

@ -130,5 +130,4 @@ public abstract class AbstractScriptModuleHandler<T extends Module> extends Base
executionContext.setAttribute(key, value, ScriptContext.ENGINE_SCOPE);
}
}
}

View File

@ -167,5 +167,4 @@ public class ScriptModuleTypeProvider implements ModuleTypeProvider {
public void unsetScriptEngineFactory(ScriptEngineFactory scriptEngineFactory) {
parameterOptions.clear();
}
}

View File

@ -159,5 +159,4 @@ public class ModuleTypeResource implements RESTResource {
public boolean isSatisfied() {
return moduleTypeRegistry != null && localeService != null;
}
}

View File

@ -482,5 +482,4 @@ public class RuleResource implements RESTResource {
public boolean isSatisfied() {
return ruleRegistry != null && ruleManager != null;
}
}

View File

@ -23,5 +23,4 @@ import org.openhab.core.automation.dto.RuleDTO;
public class EnrichedRuleDTO extends RuleDTO {
public RuleStatusInfo status;
}

View File

@ -29,5 +29,4 @@ public class EnrichedRuleDTOMapper extends RuleDTOMapper {
enrichedRuleDto.status = ruleEngine.getStatusInfo(rule.getUID());
return enrichedRuleDto;
}
}

View File

@ -48,5 +48,4 @@ public interface Action extends Module {
* @return a map with the input references of this action.
*/
Map<String, String> getInputs();
}

View File

@ -49,5 +49,4 @@ public interface Condition extends Module {
* @return a map that contains the input references of this condition.
*/
Map<String, String> getInputs();
}

View File

@ -77,5 +77,4 @@ public interface Module {
* @return the current configuration values of the {@link Module}.
*/
Configuration getConfiguration();
}

View File

@ -92,5 +92,4 @@ public interface ModuleHandlerCallback {
* @param context the context that is passed to the conditions and the actions of the rule.
*/
void runNow(String uid, boolean considerConditions, @Nullable Map<String, Object> context);
}

View File

@ -154,5 +154,4 @@ public interface Rule extends Identifiable<String> {
}
return null;
}
}

View File

@ -92,5 +92,4 @@ public interface RuleManager {
* @param context the context that is passed to the conditions and the actions of the rule.
*/
void runNow(String uid, boolean considerConditions, @Nullable Map<String, Object> context);
}

View File

@ -179,5 +179,4 @@ public class RulePredicates {
return hasAnyOfTags(Arrays.asList(tags));
}
}
}

View File

@ -85,5 +85,4 @@ public interface RuleRegistry extends Registry<Rule, String> {
* @return collection of {@link Rule}s having specified tags.
*/
public Collection<Rule> getByTags(String... tags);
}

View File

@ -27,5 +27,4 @@ import java.lang.annotation.Target;
public @interface ActionScope {
String name();
}

View File

@ -35,5 +35,4 @@ public @interface RuleAction {
String[] tags() default {};
Visibility visibility() default Visibility.VISIBLE;
}

View File

@ -22,5 +22,4 @@ import java.util.Map;
public class ActionDTO extends ModuleDTO {
public Map<String, String> inputs;
}

View File

@ -62,5 +62,4 @@ public class ActionDTOMapper extends ModuleDTOMapper {
}
return actions;
}
}

View File

@ -26,5 +26,4 @@ public class ActionTypeDTO extends ModuleTypeDTO {
public List<Input> inputs;
public List<Output> outputs;
}

View File

@ -72,5 +72,4 @@ public class ActionTypeDTOMapper extends ModuleTypeDTOMapper {
actionTypeDto.outputs = actionType.getOutputs();
return actionTypeDto;
}
}

View File

@ -22,5 +22,4 @@ import java.util.List;
public class CompositeConditionTypeDTO extends ConditionTypeDTO {
public List<ConditionDTO> children;
}

View File

@ -22,5 +22,4 @@ import java.util.List;
public class CompositeTriggerTypeDTO extends TriggerTypeDTO {
public List<TriggerDTO> children;
}

View File

@ -22,5 +22,4 @@ import java.util.Map;
public class ConditionDTO extends ModuleDTO {
public Map<String, String> inputs;
}

View File

@ -61,5 +61,4 @@ public class ConditionDTOMapper extends ModuleDTOMapper {
}
return conditions;
}
}

View File

@ -24,5 +24,4 @@ import org.openhab.core.automation.type.Input;
public class ConditionTypeDTO extends ModuleTypeDTO {
public List<Input> inputs;
}

View File

@ -72,5 +72,4 @@ public class ConditionTypeDTOMapper extends ModuleTypeDTOMapper {
conditionTypeDto.inputs = conditionType.getInputs();
return conditionTypeDto;
}
}

View File

@ -26,5 +26,4 @@ public class ModuleDTO {
public String description;
public Map<String, Object> configuration;
public String type;
}

View File

@ -28,5 +28,4 @@ public class ModuleDTOMapper {
to.configuration = from.getConfiguration().getProperties();
to.type = from.getTypeUID();
}
}

View File

@ -31,5 +31,4 @@ public class ModuleTypeDTO {
public String label;
public String description;
public List<ConfigDescriptionParameterDTO> configDescriptions;
}

View File

@ -37,5 +37,4 @@ public class RuleDTO {
public Set<String> tags;
public Visibility visibility;
public String description;
}

View File

@ -54,5 +54,4 @@ public class RuleDTOMapper {
to.visibility = from.getVisibility();
to.description = from.getDescription();
}
}

View File

@ -61,5 +61,4 @@ public class TriggerDTOMapper extends ModuleDTOMapper {
}
return triggers;
}
}

View File

@ -24,5 +24,4 @@ import org.openhab.core.automation.type.Output;
public class TriggerTypeDTO extends ModuleTypeDTO {
public List<Output> outputs;
}

View File

@ -71,5 +71,4 @@ public class TriggerTypeDTOMapper extends ModuleTypeDTOMapper {
triggerTypeDto.outputs = triggerType.getOutputs();
return triggerTypeDto;
}
}

View File

@ -44,5 +44,4 @@ public abstract class AbstractRuleRegistryEvent extends AbstractEvent {
public RuleDTO getRule() {
return this.rule;
}
}

View File

@ -44,5 +44,4 @@ public class RuleAddedEvent extends AbstractRuleRegistryEvent {
public String toString() {
return "Rule '" + getRule().uid + "' has been added.";
}
}

View File

@ -44,5 +44,4 @@ public class RuleRemovedEvent extends AbstractRuleRegistryEvent {
public String toString() {
return "Rule '" + getRule().uid + "' has been removed.";
}
}

View File

@ -66,5 +66,4 @@ public class RuleStatusInfoEvent extends AbstractEvent {
public String toString() {
return ruleId + " updated: " + statusInfo.toString();
}
}

View File

@ -55,5 +55,4 @@ public class RuleUpdatedEvent extends AbstractRuleRegistryEvent {
public String toString() {
return "Rule '" + getRule().uid + "' has been updated.";
}
}

View File

@ -41,5 +41,4 @@ public interface ActionHandler extends ModuleHandler {
*/
@Nullable
Map<String, Object> execute(Map<String, Object> context);
}

View File

@ -26,5 +26,4 @@ public abstract class BaseActionModuleHandler extends BaseModuleHandler<Action>
public BaseActionModuleHandler(Action module) {
super(module);
}
}

View File

@ -26,5 +26,4 @@ public abstract class BaseConditionModuleHandler extends BaseModuleHandler<Condi
public BaseConditionModuleHandler(Condition module) {
super(module);
}
}

View File

@ -41,5 +41,4 @@ public class BaseModuleHandler<T extends Module> implements ModuleHandler {
public void dispose() {
this.callback = null;
}
}

View File

@ -26,5 +26,4 @@ public class BaseTriggerModuleHandler extends BaseModuleHandler<Trigger> impleme
public BaseTriggerModuleHandler(Trigger module) {
super(module);
}
}

View File

@ -38,5 +38,4 @@ public interface ConditionHandler extends ModuleHandler {
* @return {@code true} if {@link Condition} is satisfied, {@code false} otherwise.
*/
public boolean isSatisfied(Map<String, Object> context);
}

View File

@ -36,5 +36,4 @@ public interface ModuleHandler {
* @param callback a {@link ModuleHandlerCallback} instance
*/
void setCallback(ModuleHandlerCallback callback);
}

View File

@ -67,5 +67,4 @@ public interface ModuleHandlerFactory {
* @param handler the {@link ModuleHandler} instance that is no longer needed.
*/
public void ungetHandler(Module module, String ruleUID, ModuleHandler handler);
}

View File

@ -45,5 +45,4 @@ public interface TriggerHandlerCallback extends ModuleHandlerCallback {
* </ul>
*/
public void triggered(Trigger trigger, Map<String, ?> context);
}

View File

@ -60,5 +60,4 @@ public class ConditionImpl extends ModuleImpl implements Condition {
public Map<String, String> getInputs() {
return inputs;
}
}

View File

@ -242,7 +242,6 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
public void runNow(String uid, boolean considerConditions, @Nullable Map<String, Object> context) {
RuleEngineImpl.this.runNow(uid, considerConditions, context);
}
};
/**
@ -1432,5 +1431,4 @@ public class RuleEngineImpl implements RuleManager, RegistryChangeListener<Modul
return outputName;
}
}
}

View File

@ -290,5 +290,4 @@ public class RuleImpl implements Rule {
}
return true;
}
}

View File

@ -660,5 +660,4 @@ public class RuleRegistryImpl extends AbstractRegistry<Rule, String, RuleProvide
public void updated(RuleTemplate oldElement, RuleTemplate element) {
// Do nothing - resolved rules are independent from templates
}
}

View File

@ -131,5 +131,4 @@ public class TriggerHandlerCallbackImpl implements TriggerHandlerCallback {
public void runNow(String uid, boolean considerConditions, Map<String, Object> context) {
re.runNow(uid, considerConditions, context);
}
}

View File

@ -29,5 +29,4 @@ public class TriggerImpl extends ModuleImpl implements Trigger {
@Nullable String description) {
super(id, typeUID, configuration, label, description);
}
}

View File

@ -192,5 +192,4 @@ public abstract class AbstractCommandProvider<@NonNull E> implements ServiceTrac
*/
protected abstract Set<E> importData(URL url, Parser<E> parser, InputStreamReader inputStreamReader)
throws ParsingException;
}

View File

@ -126,5 +126,4 @@ public abstract class AutomationCommand {
* parsing the parameters and options.
*/
protected abstract String parseOptionsAndParameters(String[] parameterValues);
}

View File

@ -103,5 +103,4 @@ public class AutomationCommandEnableRule extends AutomationCommand {
hasEnable = false;
}
}
}

View File

@ -187,5 +187,4 @@ public class AutomationCommandExport extends AutomationCommand {
}
return SUCCESS;
}
}

View File

@ -160,5 +160,4 @@ public class AutomationCommandImport extends AutomationCommand {
}
return SUCCESS;
}
}

View File

@ -400,5 +400,4 @@ public class AutomationCommandList extends AutomationCommand {
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More