Skip to content

Commit

Permalink
Fix SAT errors/warnings in resources and tests (openhab#1178)
Browse files Browse the repository at this point in the history
Fixes SAT errors/warnings in resources and tests reported by SAT 0.8.0-SNAPSHOT.

Related to openhab/static-code-analysis#363

Signed-off-by: Wouter Born <github@maindrain.net>
  • Loading branch information
wborn authored and cweitkamp committed Nov 3, 2019
1 parent 1f9a6f6 commit f002a21
Show file tree
Hide file tree
Showing 64 changed files with 1,154 additions and 1,150 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
*/
public class AudioServletTest extends AbstractAudioServletTest {

private final String MEDIA_TYPE_AUDIO_WAV = "audio/wav";
private final String MEDIA_TYPE_AUDIO_OGG = "audio/ogg";
private final String MEDIA_TYPE_AUDIO_MPEG = "audio/mpeg";
private static final String MEDIA_TYPE_AUDIO_WAV = "audio/wav";
private static final String MEDIA_TYPE_AUDIO_OGG = "audio/ogg";
private static final String MEDIA_TYPE_AUDIO_MPEG = "audio/mpeg";

private final byte[] testByteArray = new byte[] { 0, 1, 2 };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
/**
* An {@link AudioSink} fake used for the tests.
*
* @author Petar Valchev - Initial contribution
* @author Christoph Weitkamp - Added examples for getSupportedFormats() and getSupportedStreams()
* @author Christoph Weitkamp - Added parameter to adjust the volume
* @author Wouter Born - Migrate tests from Groovy to Java
Expand Down
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
{
"conditions":[
{
"uid":"jsr223.ScriptedCondition",
"label":"Scripted condition",
"description":"allows the definition of a condition by a script",
"visibility": "EXPERT",
"configDescriptions":[
{
"name":"privId",
"type":"TEXT",
"description":"the identifier of the private method",
"required":true
}
]
}
],
"actions":[
{
"uid":"jsr223.ScriptedAction",
"label":"Scripted action",
"description":"allows the execution of a method defined by a script",
"visibility": "EXPERT",
"configDescriptions":[
{
"name":"privId",
"type":"TEXT",
"description":"the identifier of the private method",
"required":true
}
],
"outputs":[
{
"name":"result",
"type":"java.lang.Object",
"label":"result",
"description":"the script result.",
"reference":""
}
]
}
],
"triggers": [
{
"uid":"jsr223.ScriptedTrigger",
"label":"Scripted trigger",
"description":"allows the execution of a method defined by a script",
"visibility": "EXPERT",
"configDescriptions":[
{
"name":"privId",
"type":"TEXT",
"description":"the identifier of the private method",
"required":true
}
],
"outputs":[
{
"name":"triggerOutput",
"type":"java.lang.String",
"label":"TriggerOutput label",
"description":"Text from the trigger",
"reference":"consoleInput",
"defaultValue":"dtag"
}
]
}
]
{
"conditions": [
{
"uid": "jsr223.ScriptedCondition",
"label": "Scripted condition",
"description": "allows the definition of a condition by a script",
"visibility": "EXPERT",
"configDescriptions": [
{
"name": "privId",
"type": "TEXT",
"description": "the identifier of the private method",
"required": true
}
]
}
],
"actions": [
{
"uid": "jsr223.ScriptedAction",
"label": "Scripted action",
"description": "allows the execution of a method defined by a script",
"visibility": "EXPERT",
"configDescriptions": [
{
"name": "privId",
"type": "TEXT",
"description": "the identifier of the private method",
"required": true
}
],
"outputs": [
{
"name": "result",
"type": "java.lang.Object",
"label": "result",
"description": "the script result.",
"reference": ""
}
]
}
],
"triggers": [
{
"uid": "jsr223.ScriptedTrigger",
"label": "Scripted trigger",
"description": "allows the execution of a method defined by a script",
"visibility": "EXPERT",
"configDescriptions": [
{
"name": "privId",
"type": "TEXT",
"description": "the identifier of the private method",
"required": true
}
],
"outputs": [
{
"name": "triggerOutput",
"type": "java.lang.String",
"label": "TriggerOutput label",
"description": "Text from the trigger",
"reference": "consoleInput",
"defaultValue": "dtag"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
{
"triggers":[
{
"uid":"core.ChannelEventTrigger",
"label":"a trigger channel fires",
"description":"React on events from a trigger channel of a thing.",
"configDescriptions":[
{
"name":"channelUID",
"type":"TEXT",
"context":"channel",
"label":"Channel",
"description":"the id of the channel which should be observed for triggers",
"required":true,
"filterCriteria":[
{
"value": "TRIGGER",
"name": "kind"
}
]
},
{
"name":"event",
"type":"TEXT",
"label":"Event",
"description":"the event on the channel to react on",
"required":false
}
],
"outputs":[
{
"name":"event",
"type":"org.eclipse.smarthome.core.events.Event",
"description":"the event of the channel trigger",
"label":"Event",
"reference":"channelEventTriggerId.event"
}
]
}
]
"triggers": [
{
"uid": "core.ChannelEventTrigger",
"label": "a trigger channel fires",
"description": "React on events from a trigger channel of a thing.",
"configDescriptions": [
{
"name": "channelUID",
"type": "TEXT",
"context": "channel",
"label": "Channel",
"description": "the id of the channel which should be observed for triggers",
"required": true,
"filterCriteria": [
{
"value": "TRIGGER",
"name": "kind"
}
]
},
{
"name": "event",
"type": "TEXT",
"label": "Event",
"description": "the event on the channel to react on",
"required": false
}
],
"outputs": [
{
"name": "event",
"type": "org.eclipse.smarthome.core.events.Event",
"description": "the event of the channel trigger",
"label": "Event",
"reference": "channelEventTriggerId.event"
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"triggers":[
{
"uid":"timer.GenericCronTrigger",
"label":"Cron Trigger",
"description":"This triggers a rule based on a cron expression",
"configDescriptions":[
{
"name":"cronExpression",
"type":"TEXT",
"context":"cronexpression",
"label":"cron expression",
"description":"the cron expression",
"required":true
}
]
}
]
{
"triggers": [
{
"uid": "timer.GenericCronTrigger",
"label": "Cron Trigger",
"description": "This triggers a rule based on a cron expression",
"configDescriptions": [
{
"name": "cronExpression",
"type": "TEXT",
"context": "cronexpression",
"label": "cron expression",
"description": "the cron expression",
"required": true
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
{
"triggers":[
{
"uid":"core.GenericEventTrigger",
"label":"Basic Event Trigger",
"description":"Triggers Rules on Events",
"visibility":"HIDDEN",
"configDescriptions":[
{
"name":"eventTopic",
"type":"TEXT",
"label":"Topic",
"description":"This is the topic, the trigger will listen to: >>smarthome/*<<",
"required":true,
"default":"smarthome/*"
},
{
"name":"eventSource",
"type":"TEXT",
"label":"Source",
"description":"This is the source of the event (eg. item name)",
"required":true,
"default":""
},
{
"name":"eventTypes",
"type":"TEXT",
"label":"Event Type",
"description":"the event type, the trigger should listen to. Multiple types can be specified comma-separated",
"required":true,
"default":""
}
],
"outputs":[
{
"name":"event",
"type":"org.eclipse.smarthome.core.events.Event",
"label":"Event",
"description":"The events which was sent.",
"reference":"event"
}
]
}
]
"triggers": [
{
"uid": "core.GenericEventTrigger",
"label": "Basic Event Trigger",
"description": "Triggers Rules on Events",
"visibility": "HIDDEN",
"configDescriptions": [
{
"name": "eventTopic",
"type": "TEXT",
"label": "Topic",
"description": "This is the topic, the trigger will listen to: >>smarthome/*<<",
"required": true,
"default": "smarthome/*"
},
{
"name": "eventSource",
"type": "TEXT",
"label": "Source",
"description": "This is the source of the event (eg. item name)",
"required": true,
"default": ""
},
{
"name": "eventTypes",
"type": "TEXT",
"label": "Event Type",
"description": "the event type, the trigger should listen to. Multiple types can be specified comma-separated",
"required": true,
"default": ""
}
],
"outputs": [
{
"name": "event",
"type": "org.eclipse.smarthome.core.events.Event",
"label": "Event",
"description": "The events which was sent.",
"reference": "event"
}
]
}
]
}
Loading

0 comments on commit f002a21

Please sign in to comment.