diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/controller/GenController.java b/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/controller/GenController.java index 25c510be..a4509b28 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/controller/GenController.java +++ b/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/controller/GenController.java @@ -56,7 +56,7 @@ public class GenController extends BaseController { GenTable table = genTableService.selectGenTableById(tableId); List tables = genTableService.selectGenTableAll(); List list = genTableService.selectGenTableColumnListByTableId(tableId); - Map map = new HashMap(); + Map map = new HashMap<>(3); map.put("info", table); map.put("rows", list); map.put("tables", tables); diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/GenUtils.java b/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/GenUtils.java index 93762ae3..2e6b37b6 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/GenUtils.java +++ b/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/GenUtils.java @@ -178,7 +178,6 @@ public class GenUtils { * * @param replacementm 替换值 * @param searchList 替换列表 - * @return */ public static String replaceFirst(String replacementm, String[] searchList) { String text = replacementm; diff --git a/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/VelocityUtils.java b/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/VelocityUtils.java index e2d89c76..f5db391b 100644 --- a/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/VelocityUtils.java +++ b/ruoyi-modules/ruoyi-generator/src/main/java/org/dromara/generator/util/VelocityUtils.java @@ -109,7 +109,7 @@ public class VelocityUtils { * @return 模板列表 */ public static List getTemplateList(String tplCategory) { - List templates = new ArrayList(); + List templates = new ArrayList<>(); templates.add("vm/java/domain.java.vm"); templates.add("vm/java/vo.java.vm"); templates.add("vm/java/bo.java.vm"); @@ -208,7 +208,7 @@ public class VelocityUtils { */ public static HashSet getImportList(GenTable genTable) { List columns = genTable.getColumns(); - HashSet importList = new HashSet(); + HashSet importList = new HashSet<>(); for (GenTableColumn column : columns) { if (!column.isSuperColumn() && GenConstants.TYPE_DATE.equals(column.getJavaType())) { importList.add("java.util.Date");