修复sonar规范问题
Showing
| ... | ... | @@ -126,15 +126,15 @@ public class MaskUtil implements Serializable { |
| Map map = new HashMap(DEFAULT_MAP_CAPACITY); | ||
| map.put("姓名", "王海鹰"); | ||
| // map.put("身份证号", "372925199008075158"); | ||
| // map.put("手机号", "15000101879"); | ||
| // map.put("电话", "021-61341606"); | ||
| // map.put("邮箱", "wanghaiying@zork.com"); | ||
| // map.put("住址", "上海市浦东新区碧波路690号1弄"); | ||
| // map.put("住址2", "上海市浦东新区张江微电子港304-2室"); | ||
| // map.put("ip地址", "192.168.70.2"); | ||
| // map.put("mac地址", "3c-78-43-25-80-bd"); | ||
| // map.put("message", "王海鹰,372925199008075158#15000101879"); | ||
| map.put("身份证号", "372925199008075158"); | ||
| map.put("手机号", "15000101879"); | ||
| map.put("电话", "021-61341606"); | ||
| map.put("邮箱", "wanghaiying@zork.com"); | ||
| map.put("住址", "上海市浦东新区碧波路690号1弄"); | ||
| map.put("住址2", "上海市浦东新区张江微电子港304-2室"); | ||
| map.put("ip地址", "192.168.70.2"); | ||
|
||
| map.put("mac地址", "3c-78-43-25-80-bd"); | ||
| map.put("message", "王海鹰,372925199008075158#15000101879"); | ||
| map.put("messid", "0000011404342B32233DDCDA"); | ||
| map.put("bsflag", "0000011404342B32233DDCDA"); | ||
| map.put("normalFields", "13811110000-110101199003075517-上海市浦东新区张江微电子港-zorkdata@163.com-123456789-wanghaiying123-王海鹰-192.168.1.1-00-50-56-C0-00-08-6227002470170278192"); | ||
| ... | ... | |
-
SonarQube analysis reported 149 issues
-
🚫 19 critical -
⚠ 80 major -
🔽 49 minor -
ℹ 1 info
Watch the comments in this conversation to review them.
Top 30 extra issues
Note: The following issues were found on lines that were not modified in the commit. Because these issues can't be reported as line comments, they are summarized here:
-
🚫 Move constants to a class or enum.📘 -
🚫 Move constants to a class or enum.📘 -
🚫 Move constants to a class or enum.📘 -
🚫 Add a nested comment explaining why this method is empty, throw an UnsupportedOperationException or complete the implementation.📘 -
🚫 Change this "try" to a try-with-resources. (sonar.java.source not set. Assuming 7 or greater.)📘 -
🚫 Refactor this code to not throw exceptions in finally blocks.📘 -
🚫 Refactor this code to not throw exceptions in finally blocks.📘 -
🚫 Make "patterns" private or transient.📘 -
🚫 Define a constant instead of duplicating this literal "序列化失败" 15 times.📘 -
🚫 Define a constant instead of duplicating this literal " {\n" 7 times.📘 -
🚫 [Define a constant instead of duplicating this literal " "type": \n" 7 times.📘 -
🚫 Define a constant instead of duplicating this literal " "string",\n" 4 times.📘 -
🚫 Define a constant instead of duplicating this literal " "null"\n" 4 times.📘 -
🚫 [Define a constant instead of duplicating this literal " ]\n" 7 times.](https://git.zorkdata.com/wanghaiying/transactionlogmask/blob/f32f595c6afdc62d4c48f8b4c50824fb6175ef8a/src/main/java/com/zorkdata/datamask/util/avro/LogAvroMacroDef.java#L20)📘 -
🚫 Define a constant instead of duplicating this literal " },\n" 6 times.📘 -
🚫 Define a constant instead of duplicating this literal " "null",\n" 3 times.📘 -
🚫 Define a constant instead of duplicating this literal " {\n" 3 times.📘 -
🚫 Define a constant instead of duplicating this literal " "type": "map",\n" 3 times.📘 -
🚫 Define a constant instead of duplicating this literal " }\n" 3 times.📘 -
⚠ Define and throw a dedicated exception instead of using a generic one.📘 -
⚠ Remove this unused "source" private field.📘 -
⚠ Remove this unused "hdfsSrc" private field.📘 -
⚠ Remove this unused "hdfsDest" private field.📘 -
⚠ Remove this unused "core" private field.📘 -
⚠ Remove this unused "date" private field.📘 -
⚠ Remove this unused "startTime" private field.📘 -
⚠ Remove this unused "endTime" private field.📘 -
⚠ Remove this unused "servers" private field.📘 -
⚠ Remove this unused "zookeeper" private field.📘 -
⚠ Remove this unused "topic" private field.📘
- ... 118 more
-