Commit 2df1177ed92855c632000abb6d39dac33cc29ab1

Authored by Andrii Shvaika
1 parent 8f63eb52

Replace StringUtils with our implementation

  1 +/**
  2 + * Copyright © 2016-2021 The Thingsboard Authors
  3 + *
  4 + * Licensed under the Apache License, Version 2.0 (the "License");
  5 + * you may not use this file except in compliance with the License.
  6 + * You may obtain a copy of the License at
  7 + *
  8 + * http://www.apache.org/licenses/LICENSE-2.0
  9 + *
  10 + * Unless required by applicable law or agreed to in writing, software
  11 + * distributed under the License is distributed on an "AS IS" BASIS,
  12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 + * See the License for the specific language governing permissions and
  14 + * limitations under the License.
  15 + */
  16 +package org.thingsboard.server.common.data;
  17 +
  18 +public class StringUtils {
  19 +
  20 + public static boolean isEmpty(String source) {
  21 + return source == null || source.isEmpty();
  22 + }
  23 +
  24 + public static boolean isNotEmpty(String source) {
  25 + return source != null && !source.isEmpty();
  26 + }
  27 +}
... ...
... ... @@ -16,7 +16,7 @@
16 16 package org.thingsboard.server.common.data.event;
17 17
18 18 import lombok.Data;
19   -import org.eclipse.leshan.core.util.StringUtils;
  19 +import org.thingsboard.server.common.data.StringUtils;
20 20
21 21 @Data
22 22 public abstract class DebugEvent implements EventFilter {
... ...
... ... @@ -16,7 +16,7 @@
16 16 package org.thingsboard.server.common.data.event;
17 17
18 18 import lombok.Data;
19   -import org.eclipse.leshan.core.util.StringUtils;
  19 +import org.thingsboard.server.common.data.StringUtils;
20 20
21 21 @Data
22 22 public class ErrorEventFilter implements EventFilter {
... ...
... ... @@ -16,7 +16,7 @@
16 16 package org.thingsboard.server.common.data.event;
17 17
18 18 import lombok.Data;
19   -import org.eclipse.leshan.core.util.StringUtils;
  19 +import org.thingsboard.server.common.data.StringUtils;
20 20
21 21 @Data
22 22 public class LifeCycleEventFilter implements EventFilter {
... ...
... ... @@ -16,7 +16,7 @@
16 16 package org.thingsboard.server.common.data.event;
17 17
18 18 import lombok.Data;
19   -import org.eclipse.leshan.core.util.StringUtils;
  19 +import org.thingsboard.server.common.data.StringUtils;
20 20
21 21 @Data
22 22 public class StatisticsEventFilter implements EventFilter {
... ...