- fixing relativePath in poms cache, intake, quartz, parser, security, testcontainer
- intake: update parser, use in test pool2, add log4j2 for next testcontainer
- parser: formatting, dependency fixes, site skin update
- testcontainer: add and use log4j2 avalon adapter in yaafi testcontainer, use more JUnit 5
- moved README.txt to READMe.md in root
git-svn-id: https://svn.apache.org/repos/asf/turbine/fulcrum/trunk/parser@1890285 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index 8892aa1..ab00590 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,6 +20,7 @@
<groupId>org.apache.turbine</groupId>
<artifactId>turbine-parent</artifactId>
<version>8</version>
+ <relativePath></relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -115,18 +116,17 @@
<artifactId>commons-lang3</artifactId>
<version>3.9</version>
</dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-pool2</artifactId>
- <version>2.7.0</version>
- </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-pool2</artifactId>
+ <version>2.7.0</version>
+ </dependency>
+ <!-- fulcrum-pool is required even if not used due to optional fall-back -->
<dependency>
<groupId>org.apache.fulcrum</groupId>
<artifactId>fulcrum-pool</artifactId>
<version>1.0.5</version>
- <optional>true</optional>
</dependency>
-
<!-- testing dependencies -->
<dependency>
<groupId>org.apache.fulcrum</groupId>
diff --git a/src/java/org/apache/fulcrum/parser/BaseValueParser.java b/src/java/org/apache/fulcrum/parser/BaseValueParser.java
index fbcf8d2..9107cf8 100644
--- a/src/java/org/apache/fulcrum/parser/BaseValueParser.java
+++ b/src/java/org/apache/fulcrum/parser/BaseValueParser.java
@@ -81,10 +81,10 @@
private Logger logger;
/** String values which would evaluate to Boolean.TRUE */
- private static final String[] trueValues = {"TRUE","T","YES","Y","1","ON"};
+ private static final String[] TRUE_VALUES = {"TRUE","T","YES","Y","1","ON"};
/** String values which would evaluate to Boolean.FALSE */
- private static final String[] falseValues = {"FALSE","F","NO","N","0","OFF"};
+ private static final String[] FALSE_VALUES = {"FALSE","F","NO","N","0","OFF"};
/**
* The character encoding to use when converting to byte arrays
@@ -167,7 +167,7 @@
/**
* Recycles the parser.
*/
- public void recycle()
+ public final void recycle()
{
recycle(DEFAULT_CHARACTER_ENCODING);
}
@@ -177,7 +177,7 @@
*
* @param characterEncoding the character encoding.
*/
- public void recycle(String characterEncoding)
+ public final void recycle(String characterEncoding)
{
setCharacterEncoding(characterEncoding);
}
@@ -205,7 +205,7 @@
* Set the character encoding that will be used by this ValueParser.
*/
@Override
- public void setCharacterEncoding(String s)
+ public final void setCharacterEncoding(String s)
{
characterEncoding = s;
}
@@ -223,7 +223,7 @@
* Set the locale that will be used by this ValueParser.
*/
@Override
- public void setLocale(Locale l)
+ public final void setLocale(Locale l)
{
locale = l;
setDateFormat(DateFormat.getDateInstance(DateFormat.SHORT, locale));
@@ -234,7 +234,7 @@
* Get the locale that will be used by this ValueParser.
*/
@Override
- public Locale getLocale()
+ public final Locale getLocale()
{
return locale;
}
@@ -243,7 +243,7 @@
* Set the date format that will be used by this ValueParser.
*/
@Override
- public void setDateFormat(DateFormat df)
+ public final void setDateFormat(DateFormat df)
{
dateFormat = df;
}
@@ -462,18 +462,18 @@
if (StringUtils.isNotEmpty(value))
{
for (int cnt = 0;
- cnt < Math.max(trueValues.length, falseValues.length); cnt++)
+ cnt < Math.max(TRUE_VALUES.length, FALSE_VALUES.length); cnt++)
{
// Short-cut evaluation or bust!
- if (cnt < trueValues.length &&
- value.equalsIgnoreCase(trueValues[cnt]))
+ if (cnt < TRUE_VALUES.length &&
+ value.equalsIgnoreCase(TRUE_VALUES[cnt]))
{
result = Boolean.TRUE;
break;
}
- if (cnt < falseValues.length &&
- value.equalsIgnoreCase(falseValues[cnt]))
+ if (cnt < FALSE_VALUES.length &&
+ value.equalsIgnoreCase(FALSE_VALUES[cnt]))
{
result = Boolean.FALSE;
break;
@@ -1406,7 +1406,7 @@
* the bean property and the parameter is looked for.
*
* @param bean An Object.
- * @exception Exception a generic exception.
+ * @throws Exception a generic exception.
*/
@Override
public void setProperties(Object bean) throws Exception
@@ -1486,7 +1486,7 @@
*
* @param bean An Object.
* @param prop A PropertyDescriptor.
- * @exception Exception a generic exception.
+ * @@throws Exception a generic exception.
*/
protected void setProperty(Object bean,
PropertyDescriptor prop)
diff --git a/src/java/org/apache/fulcrum/parser/DefaultCookieParser.java b/src/java/org/apache/fulcrum/parser/DefaultCookieParser.java
index 2441d62..9b1abc0 100644
--- a/src/java/org/apache/fulcrum/parser/DefaultCookieParser.java
+++ b/src/java/org/apache/fulcrum/parser/DefaultCookieParser.java
@@ -140,7 +140,7 @@
* Set a persistent cookie on the client that will expire
* after a maximum age (given in seconds).
*/
- public void set(String name, String value, int seconds_age)
+ public void set(String name, String value, int secondsAge)
{
if (response == null)
{
@@ -148,7 +148,7 @@
}
Cookie cookie = new Cookie(name, value);
- cookie.setMaxAge(seconds_age);
+ cookie.setMaxAge(secondsAge);
cookie.setPath(request.getServletPath());
response.addCookie(cookie);
}
diff --git a/src/site/site.xml b/src/site/site.xml
index b8c0bcb..4858e6f 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -17,11 +17,27 @@
specific language governing permissions and limitations
under the License.
-->
-<project name="Fulcrum Parser">
+<project xmlns="http://maven.apache.org/DECORATION/1.4.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/DECORATION/1.4.0 http://maven.apache.org/xsd/decoration-1.4.0.xsd"
+ name="Fulcrum Parser">
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-fluido-skin</artifactId>
+ <version>1.8</version>
+ </skin>
+
<body>
<menu name="Overview">
<item name="Main" href="/index.html"/>
</menu>
</body>
+
+ <custom>
+ <fluidoSkin>
+ <topBarEnabled>false</topBarEnabled>
+ <sideBarEnabled>true</sideBarEnabled>
+ </fluidoSkin>
+ </custom>
</project>
diff --git a/src/test/TestComponentConfig.xml b/src/test/TestComponentConfig.xml
index 23fd3dc..83ee8a4 100644
--- a/src/test/TestComponentConfig.xml
+++ b/src/test/TestComponentConfig.xml
@@ -19,13 +19,13 @@
-->
<componentConfig>
<parser>
- <parameterEncoding>utf-8</parameterEncoding>
- <automaticUpload>true</automaticUpload>
- <pool2>
+ <parameterEncoding>utf-8</parameterEncoding>
+ <automaticUpload>true</automaticUpload>
+ <pool2>
<!-- cft. defaults in org.apache.commons.pool2.impl.BaseObjectPoolConfig and GenericKeyedObjectPoolConfig -->
- <maxTotal>2048</maxTotal>
- <blockWhenExhausted>false</blockWhenExhausted>
- <maxWaitMillis>100</maxWaitMillis>
- </pool2>
+ <maxTotal>2048</maxTotal>
+ <blockWhenExhausted>false</blockWhenExhausted>
+ <maxWaitMillis>100</maxWaitMillis>
+ </pool2>
</parser>
</componentConfig>
diff --git a/src/test/TestComponentConfigWithFulcrumPool.xml b/src/test/TestComponentConfigWithFulcrumPool.xml
index 2f727ff..bb1a5a1 100644
--- a/src/test/TestComponentConfigWithFulcrumPool.xml
+++ b/src/test/TestComponentConfigWithFulcrumPool.xml
@@ -19,8 +19,8 @@
-->
<componentConfig>
<parser>
- <parameterEncoding>utf-8</parameterEncoding>
- <automaticUpload>true</automaticUpload>
- <fulcrumPool>true</fulcrumPool>
+ <parameterEncoding>utf-8</parameterEncoding>
+ <automaticUpload>true</automaticUpload>
+ <fulcrumPool>true</fulcrumPool>
</parser>
</componentConfig>