Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Commit

Permalink
Some nullness fixes for Automation (#4438)
Browse files Browse the repository at this point in the history
extends #4290

Signed-off-by: Ana Dimova <a.dimova@prosyst.bg>
  • Loading branch information
adimova authored and kaikreuzer committed Oct 24, 2017
1 parent 4049898 commit 29f9a70
Show file tree
Hide file tree
Showing 29 changed files with 805 additions and 754 deletions.

Large diffs are not rendered by default.

Expand Up @@ -47,16 +47,12 @@ public class RulePredicates {
public static String getPrefix(Rule rule) {
if (null != rule) {
final String uid = rule.getUID();
if (null != uid) {
final int index = uid.indexOf(PREFIX_SEPARATOR);

// only when a delimiter was found and the prefix is not empty
if (0 < index) {
return uid.substring(0, index);
}
final int index = uid.indexOf(PREFIX_SEPARATOR);
// only when a delimiter was found and the prefix is not empty
if (0 < index) {
return uid.substring(0, index);
}
}

return null;
}

Expand Down
Expand Up @@ -11,24 +11,24 @@
import org.eclipse.smarthome.automation.type.ModuleType;

/**
* Defines visibility values of {@link ModuleType}s and {@link Template}s
* Defines visibility values of {@link Rule}s, {@link ModuleType}s and {@link Template}s
*
* @author Yordan Mihaylov - Initial Contribution
*
*/
public enum Visibility {
/**
* The UI has to show this object.
* The UI has always to show an object with such visibility.
*/
VISIBLE,

/**
* The UI has to hide this object.
* The UI has always to hide an object with such visibility.
*/
HIDDEN,

/**
* The UI has to show this object only to experts.
* The UI has to show an object with such visibility only to experts.
*/
EXPERT

Expand Down

0 comments on commit 29f9a70

Please sign in to comment.