mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
feedback from code review
This commit is contained in:
@ -56,7 +56,6 @@ public class ValueUtils
|
|||||||
|
|
||||||
private static final DateTimeFormatter dateTimeFormatter_yyyyMMddWithDashes = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
private static final DateTimeFormatter dateTimeFormatter_yyyyMMddWithDashes = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||||
private static final DateTimeFormatter dateTimeFormatter_MdyyyyWithSlashes = DateTimeFormatter.ofPattern("M/d/yyyy");
|
private static final DateTimeFormatter dateTimeFormatter_MdyyyyWithSlashes = DateTimeFormatter.ofPattern("M/d/yyyy");
|
||||||
private static final DateTimeFormatter dateTimeFormatter_MdyyWithSlashes = DateTimeFormatter.ofPattern("M/d/yyyy");
|
|
||||||
private static final DateTimeFormatter dateTimeFormatter_yyyyMMdd = DateTimeFormatter.ofPattern("yyyyMMdd");
|
private static final DateTimeFormatter dateTimeFormatter_yyyyMMdd = DateTimeFormatter.ofPattern("yyyyMMdd");
|
||||||
|
|
||||||
|
|
||||||
@ -451,7 +450,7 @@ public class ValueUtils
|
|||||||
private static LocalDate tryLocalDateParsers(String s)
|
private static LocalDate tryLocalDateParsers(String s)
|
||||||
{
|
{
|
||||||
DateTimeParseException lastException = null;
|
DateTimeParseException lastException = null;
|
||||||
for(DateTimeFormatter dateTimeFormatter : List.of(dateTimeFormatter_yyyyMMddWithDashes, dateTimeFormatter_MdyyyyWithSlashes, dateTimeFormatter_yyyyMMdd, dateTimeFormatter_MdyyWithSlashes))
|
for(DateTimeFormatter dateTimeFormatter : List.of(dateTimeFormatter_yyyyMMddWithDashes, dateTimeFormatter_MdyyyyWithSlashes, dateTimeFormatter_yyyyMMdd))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
</File>
|
</File>
|
||||||
</Appenders>
|
</Appenders>
|
||||||
<Loggers>
|
<Loggers>
|
||||||
<Logger name="org.apache.log4j.xml" additivity="false" />
|
|
||||||
<Logger name="org.mongodb.driver" level="WARN" />
|
<Logger name="org.mongodb.driver" level="WARN" />
|
||||||
<Logger name="org.eclipse.jetty" level="INFO" />
|
<Logger name="org.eclipse.jetty" level="INFO" />
|
||||||
<Logger name="io.javalin" level="INFO" />
|
<Logger name="io.javalin" level="INFO" />
|
||||||
|
@ -334,4 +334,20 @@ class StringUtilsTest extends BaseTest
|
|||||||
assertEquals("a", StringUtils.emptyToNull("a"));
|
assertEquals("a", StringUtils.emptyToNull("a"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
@Test
|
||||||
|
void testAppendIncrementingSuffix()
|
||||||
|
{
|
||||||
|
assertEquals("test (1)", StringUtils.appendIncrementingSuffix("test"));
|
||||||
|
assertEquals("test (2)", StringUtils.appendIncrementingSuffix("test (1)"));
|
||||||
|
assertEquals("test (a) (1)", StringUtils.appendIncrementingSuffix("test (a)"));
|
||||||
|
assertEquals("test (a32) (1)", StringUtils.appendIncrementingSuffix("test (a32)"));
|
||||||
|
assertEquals("test ((2)) (1)", StringUtils.appendIncrementingSuffix("test ((2))"));
|
||||||
|
assertEquals("test ((2)) (101)", StringUtils.appendIncrementingSuffix("test ((2)) (100)"));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -212,7 +212,7 @@ public class BaseAPIActionUtil
|
|||||||
catch(QNotFoundException qnfe)
|
catch(QNotFoundException qnfe)
|
||||||
{
|
{
|
||||||
LOG.info("Not found", qnfe);
|
LOG.info("Not found", qnfe);
|
||||||
throw new QException("Error executing get: " + qnfe.getMessage(), qnfe);
|
throw (qnfe);
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch(Exception e)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user