From 85939ebe670c5114a31c02fedb3ef6dc2cc1c2f7 Mon Sep 17 00:00:00 2001 From: Wagner Date: Tue, 3 Dec 2024 13:09:10 -0700 Subject: [PATCH] LMSA-9412 code cleanup --- package.json | 2 +- .../lms/coursesetupwizard/config/ApplicationConfig.java | 3 --- .../lms/coursesetupwizard/service/PopupDateUtil.java | 9 ++------- src/test/resources/application-csw.properties | 1 - 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index df1e3b8..0524f5f 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "path": "0.12.7", "standard": "17.1.0", "style-loader": "^4.0.0", - "webpack": "5.91.0", + "webpack": "5.94.0", "webpack-cli": "5.1.4" }, "dependencies": { diff --git a/src/main/java/edu/iu/uits/lms/coursesetupwizard/config/ApplicationConfig.java b/src/main/java/edu/iu/uits/lms/coursesetupwizard/config/ApplicationConfig.java index df95f5d..1b35f1b 100644 --- a/src/main/java/edu/iu/uits/lms/coursesetupwizard/config/ApplicationConfig.java +++ b/src/main/java/edu/iu/uits/lms/coursesetupwizard/config/ApplicationConfig.java @@ -37,10 +37,8 @@ import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity; import org.springframework.web.servlet.config.annotation.EnableWebMvc; -import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; -import org.springframework.web.util.pattern.PathPatternParser; @Configuration @EnableWebMvc @@ -62,5 +60,4 @@ public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/app/jsreact/**").addResourceLocations("classpath:/META-INF/resources/jsreact/").resourceChain(true); registry.addResourceHandler("/app/jsrivet/**").addResourceLocations("classpath:/META-INF/resources/jsrivet/").resourceChain(true); } - } diff --git a/src/main/java/edu/iu/uits/lms/coursesetupwizard/service/PopupDateUtil.java b/src/main/java/edu/iu/uits/lms/coursesetupwizard/service/PopupDateUtil.java index 2dd2c6b..8a550f5 100644 --- a/src/main/java/edu/iu/uits/lms/coursesetupwizard/service/PopupDateUtil.java +++ b/src/main/java/edu/iu/uits/lms/coursesetupwizard/service/PopupDateUtil.java @@ -83,9 +83,9 @@ public static Date validateDate(String dateInput, String dateFormat, String time } /** - * Check if valid popup date. Throws IllegalArgumentException with vaildation failure details + * Check if valid popup date. Throws IllegalArgumentException with validation failure details * @param popupDate - * @param dateFormat + * @param dateFormat - used for the returned error message only to describe your expected format */ public static void validate(Date popupDate, String dateFormat) { Date now = new Date(); @@ -117,9 +117,4 @@ private static Date string2Date(String dateString, @NonNull String formatString, return null; } - public static String date2String(Date date, @NonNull String formatString) { - SimpleDateFormat formatter = new SimpleDateFormat(formatString); - return formatter.format(date); - } - } diff --git a/src/test/resources/application-csw.properties b/src/test/resources/application-csw.properties index b94270e..204d9b9 100644 --- a/src/test/resources/application-csw.properties +++ b/src/test/resources/application-csw.properties @@ -7,4 +7,3 @@ spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect spring.jpa.generate-ddl=true spring.datasource.type=org.springframework.jdbc.datasource.DriverManagerDataSource -