mirror of
https://github.com/danieldemus/openhab-core.git
synced 2026-07-29 12:34:22 +02:00
SAT: Reduce warnings, add suppressions (#4863)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ import org.slf4j.LoggerFactory;
|
||||
* This {@link org.openhab.core.items.MetadataProvider} keeps metadata provided by scripts during runtime.
|
||||
* This ensures that metadata is not kept on reboot, but has to be provided by the scripts again.
|
||||
*
|
||||
* @author Florian Hotze
|
||||
* @author Florian Hotze - Initial contribution
|
||||
*/
|
||||
@NonNullByDefault
|
||||
@Component(immediate = true, service = { ScriptedMetadataProvider.class, MetadataProvider.class })
|
||||
|
||||
+4
-4
@@ -97,13 +97,13 @@ public class XmlToTranslationsConverter {
|
||||
|
||||
private Stream<TranslationsGroup> translateConfigDescription(ConfigDescription configDescription,
|
||||
@Nullable String configKeyPrefix) {
|
||||
String UID = configDescription.getUID().toString();
|
||||
if (processedURIs.contains(UID)) {
|
||||
String uid = configDescription.getUID().toString();
|
||||
if (processedURIs.contains(uid)) {
|
||||
return Stream.empty();
|
||||
}
|
||||
processedURIs.add(UID);
|
||||
processedURIs.add(uid);
|
||||
String keyPrefix = configKeyPrefix != null ? configKeyPrefix
|
||||
: UID.replaceFirst(":", ".config.").replace(":", ".");
|
||||
: uid.replaceFirst(":", ".config.").replace(":", ".");
|
||||
Builder<TranslationsGroup> streamBuilder = Stream.builder();
|
||||
configDescriptionGroupParameters(keyPrefix, configDescription.getParameterGroups()).forEach(streamBuilder::add);
|
||||
configDescriptionParameters(keyPrefix, configDescription.getParameters()).forEach(streamBuilder::add);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<suppress files=".+org.openhab.core.config.discovery.mdns.internal.MDNSDiscoveryService.java|.+org.openhab.core.config.discovery.upnp.internal.UpnpDiscoveryService.java|.+org.openhab.core.io.console.eclipse.internal.ConsoleSupportEclipse.java|.+org.openhab.core.io.console.rfc147.internal.CommandWrapper.java|.+org.openhab.core.library.unit.BinaryPrefix.java|.+org.openhab.core.library.unit.MetricPrefix.java" checks="MethodNameCheck"/>
|
||||
|
||||
<!--suppress local variable naming check to stay consistent with the usual convention when calculating xyY/RGB/HSB conversion -->
|
||||
<suppress files=".+org.openhab.core.util.ColorUtil.java" checks="LocalVariableNameCheck" />
|
||||
<suppress files=".+org.openhab.core.util.ColorUtil.java" checks="LocalVariableNameCheck|LocalFinalVariableNameCheck" />
|
||||
|
||||
<!-- Add suppression as discussed in https://github.com/openhab/static-code-analysis/issues/265 -->
|
||||
<suppress files=".+org.openhab.core.common.registry.AbstractRegistry.java" checks="DeclarativeServicesDependencyInjectionCheck"/>
|
||||
@@ -33,4 +33,11 @@
|
||||
<suppress files=".+org.openhab.core.transform.AbstractFileTransformationService.java" checks="DeclarativeServicesDependencyInjectionCheck"/>
|
||||
<suppress files=".+org.openhab.core.automation.internal.commands.AbstractCommandProvider.java" checks="DeclarativeServicesDependencyInjectionCheck"/>
|
||||
<suppress files=".+org.openhab.core.automation.sample.rest.api.internal.Activator.java" checks="DeclarativeServicesDependencyInjectionCheck"/>
|
||||
|
||||
<!-- API: public interface introduced this way -->
|
||||
<suppress files=".+org.openhab.core.internal.library.unit.CurrencyService.java" checks="StaticVariableNameCheck"/>
|
||||
<suppress files=".+org.openhab.core.thing.ThingStatusDetail.java" checks="MemberNameCheck"/>
|
||||
<!-- technical reasons, causes other issues if changed -->
|
||||
<suppress files=".+org.openhab.core.tools.UpgradeTool.java" checks="AvoidStarImportCheck"/>
|
||||
<suppress files=".+org.openhab.core.auth.client.oauth2.OAuthClientService.java" checks="JavadocMethodStyleCheck"/>
|
||||
</suppressions>
|
||||
|
||||
Reference in New Issue
Block a user