REM:
1.修改DDoS攻击类型与迪普攻击类型的转换
2.删除多余注释
This commit is contained in:
chenlinghy 2020-09-22 18:59:11 +08:00
parent 3d50cdacb7
commit 5f35720c93
2 changed files with 9 additions and 7 deletions

View File

@ -6,7 +6,6 @@ package com.dispose.common;
* @author <huangxin@cmhi.chinamoblie.com>
*/
public enum DisposeCapacityType implements BaseEnum {
//1.清洗,2.压制,3.高防
/**
* The Cleanup.
*/

View File

@ -103,10 +103,13 @@ public enum DpTechAttackType implements BaseEnum {
* @return the long
*/
public static Long formDdosAttackTypeMaks(Long ddosAttackMask) {
return getTypeMaskFromAttackType(DDoSAttackType.maskToDdosAttackType(ddosAttackMask)
.stream()
.flatMap(DpTechAttackType::fromDdosAttackTypeValue)
.distinct().toArray(DpTechAttackType[]::new));
List<DpTechAttackType> dpTechAttackTypes = new ArrayList<>();
for(DDoSAttackType a : DDoSAttackType.maskToDdosAttackType(ddosAttackMask)) {
dpTechAttackTypes.addAll(DpTechAttackType.fromDdosAttackTypeValue(a));
}
return getTypeMaskFromAttackType(dpTechAttackTypes.stream().distinct().toArray(DpTechAttackType[]::new));
}
/**
@ -133,7 +136,7 @@ public enum DpTechAttackType implements BaseEnum {
* @param type the type
* @return the stream
*/
public static Stream<DpTechAttackType> fromDdosAttackTypeValue(DDoSAttackType type) {
public static List<DpTechAttackType> fromDdosAttackTypeValue(DDoSAttackType type) {
List<DpTechAttackType> attackList = new ArrayList<>();
switch (type) {
@ -219,7 +222,7 @@ public enum DpTechAttackType implements BaseEnum {
break;
}
return attackList.stream();
return attackList;
}
/**