Author: ajaquith
Date: Wed Feb 4 05:17:36 2009
New Revision: 740609
URL: http://svn.apache.org/viewvc?rev=740609&view=rev
Log:
Fixed a few failing unit tests; tweaked build.xml so tests run again.
Modified:
incubator/jspwiki/trunk/src/WebContent/WEB-INF/ (props changed)
incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
incubator/jspwiki/trunk/src/java/org/apache/wiki/action/WikiContextFactory.java
incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/SecurityVerifier.java
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/migrator/JSPWikiJspTransformer.java
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/migrator/JspDocument.java
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/HandlerInfo.java
incubator/jspwiki/trunk/tests/java/org/apache/wiki/parser/CreoleToJSPWikiTranslatorTest.java
incubator/jspwiki/trunk/tests/java/org/apache/wiki/plugin/DenouncePluginTest.java
incubator/jspwiki/trunk/tests/java/org/apache/wiki/ui/migrator/JspParserTest.java
Propchange: incubator/jspwiki/trunk/src/WebContent/WEB-INF/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Wed Feb 4 05:17:36 2009
@@ -0,0 +1 @@
+jspwiki.properties
Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java?rev=740609&r1=740608&r2=740609&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/Release.java Wed Feb 4
05:17:36 2009
@@ -77,7 +77,7 @@
* <p>
* If the build identifier is empty, it is not added.
*/
- public static final String BUILD = "60";
+ public static final String BUILD = "61";
/**
* This is the generic version string you should use
Modified:
incubator/jspwiki/trunk/src/java/org/apache/wiki/action/WikiContextFactory.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/action/WikiContextFactory.java?rev=740609&r1=740608&r2=740609&view=diff
==============================================================================
---
incubator/jspwiki/trunk/src/java/org/apache/wiki/action/WikiContextFactory.java
(original)
+++
incubator/jspwiki/trunk/src/java/org/apache/wiki/action/WikiContextFactory.java
Wed Feb 4 05:17:36 2009
@@ -452,7 +452,7 @@
*/
private void initSpecialPageRedirects( Properties properties )
{
- for( Map.Entry entry : properties.entrySet() )
+ for( Map.Entry<Object,Object> entry : properties.entrySet() )
{
String key = (String) entry.getKey();
if( key.startsWith( PROP_SPECIALPAGE ) )
Modified:
incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/SecurityVerifier.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/SecurityVerifier.java?rev=740609&r1=740608&r2=740609&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/SecurityVerifier.java
(original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/auth/SecurityVerifier.java
Wed Feb 4 05:17:36 2009
@@ -617,7 +617,7 @@
}
// See if we can find the LoginModule on the classpath
- Class c = null;
+ Class<?> c = null;
try
{
m_session.addMessage( INFO_JAAS, "The property '" +
AuthenticationManager.PROP_LOGIN_MODULE +
Modified:
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/migrator/JSPWikiJspTransformer.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/migrator/JSPWikiJspTransformer.java?rev=740609&r1=740608&r2=740609&view=diff
==============================================================================
---
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/migrator/JSPWikiJspTransformer.java
(original)
+++
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/migrator/JSPWikiJspTransformer.java
Wed Feb 4 05:17:36 2009
@@ -66,6 +66,7 @@
/**
* {...@inheritdoc}
*/
+ @SuppressWarnings("unchecked")
public void transform( Map<String, Object> sharedState, JspDocument doc )
{
List<Node> nodes = doc.getNodes();
@@ -197,13 +198,13 @@
* @param doc the JspDocument to check
* @param clazzes the classes to verify imports for
*/
- private void verifyImports( JspDocument doc, Class... clazzes )
+ private void verifyImports( JspDocument doc, Class<? extends Object>...
clazzes )
{
// Build the regex Pattern to search for, and a lookup Map
- Map<String,Class> classNames = new HashMap<String,Class>();
+ Map<String,Class<? extends Object>> classNames = new
HashMap<String,Class<? extends Object>>();
StringBuilder s = new StringBuilder();
s.append( '(' );
- for ( Class clazz : clazzes )
+ for ( Class<? extends Object> clazz : clazzes )
{
classNames.put( clazz.getSimpleName(), clazz );
s.append( clazz.getSimpleName() );
@@ -221,7 +222,7 @@
while( m.find() )
{
String found= m.group( 1 ).trim();
- Class foundClass = classNames.get( found );
+ Class<? extends Object> foundClass = classNames.get( found );
if ( foundClass != null )
{
if ( doc.addPageImportDirective( foundClass ) )
Modified:
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/migrator/JspDocument.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/migrator/JspDocument.java?rev=740609&r1=740608&r2=740609&view=diff
==============================================================================
---
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/migrator/JspDocument.java
(original)
+++
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/migrator/JspDocument.java
Wed Feb 4 05:17:36 2009
@@ -136,7 +136,7 @@
* @return <code>true</code> if an import was actually added,
<code>false</code>
* otherwise
*/
- public boolean addPageImportDirective( Class clazz )
+ public boolean addPageImportDirective( Class<? extends Object> clazz )
{
// No need to add it if it's already there
List<Tag> imports = getPageImport( clazz );
@@ -225,7 +225,7 @@
* @param clazz the class, interface or other type to match
* @return a list of all matching tags, which may be a zero-length list
*/
- public List<Tag> getPageImport( Class clazz )
+ public List<Tag> getPageImport( Class<? extends Object> clazz )
{
if( clazz == null )
{
Modified:
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/HandlerInfo.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/HandlerInfo.java?rev=740609&r1=740608&r2=740609&view=diff
==============================================================================
---
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/HandlerInfo.java
(original)
+++
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/HandlerInfo.java
Wed Feb 4 05:17:36 2009
@@ -430,12 +430,12 @@
{
if( hasOneParameter )
{
- Constructor c = m_permissionClass.getConstructor( new Class[]
{ String.class } );
+ Constructor<?> c = m_permissionClass.getConstructor( new
Class[] { String.class } );
perm = (Permission) c.newInstance( new Object[] { target } );
}
else
{
- Constructor c = m_permissionClass.getConstructor( new Class[]
{ String.class, String.class } );
+ Constructor<?> c = m_permissionClass.getConstructor( new
Class[] { String.class, String.class } );
perm = (Permission) c.newInstance( new Object[] { target,
actions } );
}
}
Modified:
incubator/jspwiki/trunk/tests/java/org/apache/wiki/parser/CreoleToJSPWikiTranslatorTest.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/parser/CreoleToJSPWikiTranslatorTest.java?rev=740609&r1=740608&r2=740609&view=diff
==============================================================================
---
incubator/jspwiki/trunk/tests/java/org/apache/wiki/parser/CreoleToJSPWikiTranslatorTest.java
(original)
+++
incubator/jspwiki/trunk/tests/java/org/apache/wiki/parser/CreoleToJSPWikiTranslatorTest.java
Wed Feb 4 05:17:36 2009
@@ -34,7 +34,7 @@
public class CreoleToJSPWikiTranslatorTest extends TestCase
{
- public static final String TEST_PROPERTIES =
"tests/com/ecyrd/jspwiki/parser/creole.properties";
+ public static final String TEST_PROPERTIES =
"tests/java/org/apache/wiki/parser/creole.properties";
public static void main(String[] args)
{
Modified:
incubator/jspwiki/trunk/tests/java/org/apache/wiki/plugin/DenouncePluginTest.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/plugin/DenouncePluginTest.java?rev=740609&r1=740608&r2=740609&view=diff
==============================================================================
---
incubator/jspwiki/trunk/tests/java/org/apache/wiki/plugin/DenouncePluginTest.java
(original)
+++
incubator/jspwiki/trunk/tests/java/org/apache/wiki/plugin/DenouncePluginTest.java
Wed Feb 4 05:17:36 2009
@@ -56,7 +56,7 @@
ClassLoader loader = Denounce.class.getClassLoader();
- InputStream in =
loader.getResourceAsStream("com/ecyrd/jspwiki/plugin/denounce.properties");
+ InputStream in =
loader.getResourceAsStream("org/apache/wiki/plugin/denounce.properties");
if (in == null) {
throw new IOException("No property file found! (Check the
installation, it should be there.)");
Modified:
incubator/jspwiki/trunk/tests/java/org/apache/wiki/ui/migrator/JspParserTest.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/ui/migrator/JspParserTest.java?rev=740609&r1=740608&r2=740609&view=diff
==============================================================================
---
incubator/jspwiki/trunk/tests/java/org/apache/wiki/ui/migrator/JspParserTest.java
(original)
+++
incubator/jspwiki/trunk/tests/java/org/apache/wiki/ui/migrator/JspParserTest.java
Wed Feb 4 05:17:36 2009
@@ -335,7 +335,7 @@
public void testParse() throws Exception
{
- File src = new File( "src/webdocs/LoginForm.jsp" );
+ File src = new File( "src/WebContent/LoginForm.jsp" );
String s = JspMigrator.readSource( src );
// Parse the contents of the file
@@ -386,7 +386,7 @@
assertEquals( 2, node.getLine() );
assertEquals( 1, node.getColumn() );
assertEquals( 80, node.getStart() );
- assertEquals( 191, node.getEnd() );
+ assertEquals( 189, node.getEnd() );
assertEquals( 0, node.getChildren().size() );
assertEquals( NodeType.EMPTY_ELEMENT_TAG, node.getType() );
assertEquals( NodeType.ROOT, node.getParent().getType() );
@@ -399,9 +399,9 @@
i++;
node = nodes.get( i );
assertEquals( 2, node.getLine() );
- assertEquals( 112, node.getColumn() );
- assertEquals( 191, node.getStart() );
- assertEquals( 192, node.getEnd() );
+ assertEquals( 110, node.getColumn() );
+ assertEquals( 189, node.getStart() );
+ assertEquals( 190, node.getEnd() );
assertEquals( 0, node.getChildren().size() );
assertEquals( NodeType.TEXT, node.getType() );
assertEquals( NodeType.ROOT, node.getParent().getType() );
@@ -413,8 +413,8 @@
node = nodes.get( i );
assertEquals( 3, node.getLine() );
assertEquals( 1, node.getColumn() );
- assertEquals( 192, node.getStart() );
- assertEquals( 256, node.getEnd() );
+ assertEquals( 190, node.getStart() );
+ assertEquals( 254, node.getEnd() );
assertEquals( 4, node.getChildren().size() );
assertEquals( NodeType.START_TAG, node.getType() );
assertEquals( NodeType.ROOT, node.getParent().getType() );
@@ -428,8 +428,8 @@
node = nodes.get( i );
assertEquals( 3, node.getLine() );
assertEquals( 65, node.getColumn() );
- assertEquals( 256, node.getStart() );
- assertEquals( 259, node.getEnd() );
+ assertEquals( 254, node.getStart() );
+ assertEquals( 257, node.getEnd() );
assertEquals( 0, node.getChildren().size() );
assertEquals( NodeType.TEXT, node.getType() );
assertEquals( NodeType.START_TAG, node.getParent().getType() );
@@ -441,8 +441,8 @@
node = nodes.get( i );
assertEquals( 4, node.getLine() );
assertEquals( 3, node.getColumn() );
- assertEquals( 259, node.getStart() );
- assertEquals( 300, node.getEnd() );
+ assertEquals( 257, node.getStart() );
+ assertEquals( 298, node.getEnd() );
assertEquals( 3, node.getChildren().size() );
assertEquals( NodeType.START_TAG, node.getType() );
assertEquals( NodeType.START_TAG, node.getParent().getType() );
@@ -456,8 +456,8 @@
node = nodes.get( i );
assertEquals( 4, node.getLine() );
assertEquals( 44, node.getColumn() );
- assertEquals( 300, node.getStart() );
- assertEquals( 305, node.getEnd() );
+ assertEquals( 298, node.getStart() );
+ assertEquals( 303, node.getEnd() );
assertEquals( 0, node.getChildren().size() );
assertEquals( NodeType.TEXT, node.getType() );
assertEquals( NodeType.START_TAG, node.getParent().getType() );
@@ -469,8 +469,8 @@
node = nodes.get( i );
assertEquals( 5, node.getLine() );
assertEquals( 5, node.getColumn() );
- assertEquals( 305, node.getStart() );
- assertEquals( 363, node.getEnd() );
+ assertEquals( 303, node.getStart() );
+ assertEquals( 361, node.getEnd() );
assertEquals( 0, node.getChildren().size() );
assertEquals( NodeType.EMPTY_ELEMENT_TAG, node.getType() );
assertEquals( NodeType.START_TAG, node.getParent().getType() );
@@ -484,8 +484,8 @@
node = nodes.get( i );
assertEquals( 5, node.getLine() );
assertEquals( 63, node.getColumn() );
- assertEquals( 363, node.getStart() );
- assertEquals( 366, node.getEnd() );
+ assertEquals( 361, node.getStart() );
+ assertEquals( 364, node.getEnd() );
assertEquals( 0, node.getChildren().size() );
assertEquals( NodeType.TEXT, node.getType() );
assertEquals( NodeType.START_TAG, node.getParent().getType() );
@@ -497,8 +497,8 @@
node = nodes.get( i );
assertEquals( 6, node.getLine() );
assertEquals( 3, node.getColumn() );
- assertEquals( 366, node.getStart() );
- assertEquals( 393, node.getEnd() );
+ assertEquals( 364, node.getStart() );
+ assertEquals( 391, node.getEnd() );
assertEquals( 0, node.getChildren().size() );
assertEquals( NodeType.END_TAG, node.getType() );
assertEquals( NodeType.START_TAG, node.getParent().getType() );
@@ -509,8 +509,8 @@
node = nodes.get( i );
assertEquals( 6, node.getLine() );
assertEquals( 30, node.getColumn() );
- assertEquals( 393, node.getStart() );
- assertEquals( 394, node.getEnd() );
+ assertEquals( 391, node.getStart() );
+ assertEquals( 392, node.getEnd() );
assertEquals( 0, node.getChildren().size() );
assertEquals( NodeType.TEXT, node.getType() );
assertEquals( NodeType.START_TAG, node.getParent().getType() );
@@ -522,8 +522,8 @@
node = nodes.get( i );
assertEquals( 7, node.getLine() );
assertEquals( 1, node.getColumn() );
- assertEquals( 394, node.getStart() );
- assertEquals( 418, node.getEnd() );
+ assertEquals( 392, node.getStart() );
+ assertEquals( 416, node.getEnd() );
assertEquals( 0, node.getChildren().size() );
assertEquals( NodeType.END_TAG, node.getType() );
assertEquals( NodeType.ROOT, node.getParent().getType() );
@@ -534,8 +534,8 @@
node = nodes.get( i );
assertEquals( 7, node.getLine() );
assertEquals( 25, node.getColumn() );
- assertEquals( 418, node.getStart() );
- assertEquals( 419, node.getEnd() );
+ assertEquals( 416, node.getStart() );
+ assertEquals( 417, node.getEnd() );
assertEquals( 0, node.getChildren().size() );
assertEquals( NodeType.TEXT, node.getType() );
assertEquals( NodeType.ROOT, node.getParent().getType() );