Author: bayard
Date: Tue Nov 7 13:44:07 2006
New Revision: 472289
URL: http://svn.apache.org/viewvc?view=rev&rev=472289
Log:
Used Lang checkstyle config. Fixed the ones that looked worrisome - dbutils has
a lot of @see tags and checkstyle gets whiney in those situations. Added
package.htmls.
Added:
jakarta/commons/proper/dbutils/trunk/checkstyle.xml (with props)
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/package.html
(with props)
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/package.html
(with props)
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/package.html
(with props)
Modified:
jakarta/commons/proper/dbutils/trunk/project.properties
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/DbUtils.java
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java
jakarta/commons/proper/dbutils/trunk/xdocs/navigation.xml
Added: jakarta/commons/proper/dbutils/trunk/checkstyle.xml
URL:
http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/checkstyle.xml?view=auto&rev=472289
==============================================================================
--- jakarta/commons/proper/dbutils/trunk/checkstyle.xml (added)
+++ jakarta/commons/proper/dbutils/trunk/checkstyle.xml Tue Nov 7 13:44:07 2006
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
+
+<!-- commons lang customization of default Checkstyle behavior -->
+<module name="Checker">
+ <property name="localeLanguage" value="en"/>
+ <module name="PackageHtml"/>
+ <module name="TreeWalker">
+ <module name="TabCharacter"/>
+ <module name="AvoidStarImport"/>
+ <module name="RedundantImport"/>
+ <module name="UnusedImports"/>
+ <module name="NeedBraces"/>
+ <module name="RedundantThrows">
+ <property name="allowUnchecked" value="true"/>
+ </module>
+ <module name="LineLength">
+ <property name="max" value="120"/>
+ </module>
+ <module name="JavadocMethod">
+ <property name="allowUndeclaredRTE" value="true"/>
+ </module>
+ </module>
+</module>
+
+
Propchange: jakarta/commons/proper/dbutils/trunk/checkstyle.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jakarta/commons/proper/dbutils/trunk/project.properties
URL:
http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/project.properties?view=diff&rev=472289&r1=472288&r2=472289
==============================================================================
--- jakarta/commons/proper/dbutils/trunk/project.properties (original)
+++ jakarta/commons/proper/dbutils/trunk/project.properties Tue Nov 7 13:44:07
2006
@@ -16,6 +16,7 @@
#
maven.changelog.factory=org.apache.maven.svnlib.SvnChangeLogFactory
+maven.checkstyle.properties=checkstyle.xml
# Jar Manifest Additional Attributes
maven.jar.manifest.attributes.list=Implementation-Vendor-Id,X-Compile-Source-JDK,X-Compile-Target-JDK
Modified:
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java
URL:
http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java?view=diff&rev=472289&r1=472288&r2=472289
==============================================================================
---
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java
(original)
+++
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java
Tue Nov 7 13:44:07 2006
@@ -367,10 +367,10 @@
*
* @param props The bean property descriptors.
*
+ * @throws SQLException
+ *
* @return An int[] with column index to property index mappings. The 0th
* element is meaningless because JDBC column indexing starts at 1.
- *
- * @throws SQLException
*/
protected int[] mapColumnsToProperties(ResultSetMetaData rsmd,
PropertyDescriptor[] props) throws SQLException {
@@ -414,11 +414,11 @@
* @param propType The bean property type that this column needs to be
* converted into.
*
+ * @throws SQLException
+ *
* @return The object from the <code>ResultSet</code> at the given column
* index after optional type processing or <code>null</code> if the column
* value was SQL NULL.
- *
- * @throws SQLException
*/
protected Object processColumn(ResultSet rs, int index, Class propType)
throws SQLException {
Modified:
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/DbUtils.java
URL:
http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/DbUtils.java?view=diff&rev=472289&r1=472288&r2=472289
==============================================================================
---
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/DbUtils.java
(original)
+++
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/DbUtils.java
Tue Nov 7 13:44:07 2006
@@ -158,10 +158,22 @@
}
}
+ /**
+ * Print the stack trace for a SQLException to STDERR.
+ *
+ * @param e SQLException to print stack trace of
+ */
public static void printStackTrace(SQLException e) {
printStackTrace(e, new PrintWriter(System.err));
}
+ /**
+ * Print the stack trace for a SQLException to a
+ * specified PrintWriter.
+ *
+ * @param e SQLException to print stack trace of
+ * @param pw PrintWriter to print to
+ */
public static void printStackTrace(SQLException e, PrintWriter pw) {
SQLException next = e;
@@ -174,10 +186,21 @@
}
}
+ /**
+ * Print warnings on a Connection to STDERR.
+ *
+ * @param conn Connection to print warnings from
+ */
public static void printWarnings(Connection conn) {
printWarnings(conn, new PrintWriter(System.err));
}
+ /**
+ * Print warnings on a Connection to a specified PrintWriter.
+ *
+ * @param conn Connection to print warnings from
+ * @param pw PrintWriter to print to
+ */
public static void printWarnings(Connection conn, PrintWriter pw) {
if (conn != null) {
try {
Modified:
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java
URL:
http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java?view=diff&rev=472289&r1=472288&r2=472289
==============================================================================
---
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java
(original)
+++
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java
Tue Nov 7 13:44:07 2006
@@ -187,7 +187,8 @@
*/
protected Connection prepareConnection() throws SQLException {
if(this.getDataSource() == null) {
- throw new SQLException("QueryRunner requires a DataSource to be
invoked in this way, or a Connection should be passed in");
+ throw new SQLException("QueryRunner requires a DataSource to be " +
+ "invoked in this way, or a Connection should be passed in");
}
return this.getDataSource().getConnection();
}
Added:
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/package.html
URL:
http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/package.html?view=auto&rev=472289
==============================================================================
---
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/package.html
(added)
+++
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/package.html
Tue Nov 7 13:44:07 2006
@@ -0,0 +1,21 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<html>
+<body>
+<p>Implementations of the org.apache.commons.dbutils.ResultSetHandler
interface. </p>
+</body>
+</html>
Propchange:
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/package.html
------------------------------------------------------------------------------
svn:eol-style = native
Added:
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/package.html
URL:
http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/package.html?view=auto&rev=472289
==============================================================================
---
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/package.html
(added)
+++
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/package.html
Tue Nov 7 13:44:07 2006
@@ -0,0 +1,22 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<html>
+<body>
+<p>DbUtils is a small set of classes designed to make working with JDBC
easier. JDBC resource cleanup code is mundane, error prone work so these
classes abstract out all of the cleanup tasks from your code leaving you with
what you really wanted to do with JDBC in the first place: query and update
data. </p>
+<p>This package contains the core classes and interfaces - DbUtils,
QueryRunner and the ResultSetHandler interface should be your first items of
interest. </p>
+</body>
+</html>
Propchange:
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/package.html
------------------------------------------------------------------------------
svn:eol-style = native
Added:
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/package.html
URL:
http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/package.html?view=auto&rev=472289
==============================================================================
---
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/package.html
(added)
+++
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/package.html
Tue Nov 7 13:44:07 2006
@@ -0,0 +1,21 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<html>
+<body>
+<p>Wrappers that add functionality to java.sql classes. </p>
+</body>
+</html>
Propchange:
jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/package.html
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jakarta/commons/proper/dbutils/trunk/xdocs/navigation.xml
URL:
http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/xdocs/navigation.xml?view=diff&rev=472289&r1=472288&r2=472289
==============================================================================
--- jakarta/commons/proper/dbutils/trunk/xdocs/navigation.xml (original)
+++ jakarta/commons/proper/dbutils/trunk/xdocs/navigation.xml Tue Nov 7
13:44:07 2006
@@ -33,10 +33,11 @@
<menu name="Commons DbUtils">
<item name="Overview" href="/index.html"/>
<item name="Examples" href="/examples.html"/>
- <item name="Javadoc" href="apidocs/index.html"/>
+ <item name="Latest Javadoc" href="apidocs/index.html"/>
<item name="Mailing lists" href="/mail-lists.html"/>
<item name="Team" href="/team-list.html"/>
<item name="Latest Source" href="/cvs-usage.html"/>
+ <item name="Release History" href="/changes-report.html"/>
<item name="Downloads"
href="http://jakarta.apache.org/site/downloads/downloads_commons-dbutils.cgi"/>
</menu>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]