Browse Source
Merge pull request #1110 from thingsboard/typo-fix
Fixed exception msg
pull/1112/head
VoBa
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
2 deletions
-
dao/src/main/java/org/thingsboard/server/dao/asset/BaseAssetService.java
-
dao/src/main/java/org/thingsboard/server/dao/device/DeviceServiceImpl.java
|
|
|
@ -54,6 +54,7 @@ import java.util.ArrayList; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.Comparator; |
|
|
|
import java.util.List; |
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import static org.thingsboard.server.common.data.CacheConstants.ASSET_CACHE; |
|
|
|
@ -141,7 +142,7 @@ public class BaseAssetService extends AbstractEntityService implements AssetServ |
|
|
|
if (entityViews != null && !entityViews.isEmpty()) { |
|
|
|
throw new DataValidationException("Can't delete asset that is assigned to entity views!"); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (ExecutionException | InterruptedException e) { |
|
|
|
log.error("Exception while finding entity views for assetId [{}]", assetId, e); |
|
|
|
throw new RuntimeException("Exception while finding entity views for assetId [" + assetId + "]", e); |
|
|
|
} |
|
|
|
|
|
|
|
@ -58,6 +58,7 @@ import java.util.Collections; |
|
|
|
import java.util.Comparator; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Optional; |
|
|
|
import java.util.concurrent.ExecutionException; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import static org.thingsboard.server.common.data.CacheConstants.DEVICE_CACHE; |
|
|
|
@ -158,7 +159,7 @@ public class DeviceServiceImpl extends AbstractEntityService implements DeviceSe |
|
|
|
if (entityViews != null && !entityViews.isEmpty()) { |
|
|
|
throw new DataValidationException("Can't delete device that is assigned to entity views!"); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (ExecutionException | InterruptedException e) { |
|
|
|
log.error("Exception while finding entity views for deviceId [{}]", deviceId, e); |
|
|
|
throw new RuntimeException("Exception while finding entity views for deviceId [" + deviceId + "]", e); |
|
|
|
} |
|
|
|
|