You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2007/11/12 23:23:28 UTC
svn commit: r594319 [30/40] - in /tapestry/tapestry5/trunk: ./
tapestry-annotations/
tapestry-annotations/src/main/java/org/apache/tapestry/beaneditor/
tapestry-annotations/src/site/ tapestry-component-report/
tapestry-component-report/src/main/java/or...
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ParserExperiment.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ParserExperiment.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ParserExperiment.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ParserExperiment.java Mon Nov 12 14:22:31 2007
@@ -1,32 +1,33 @@
-// Copyright 2006 The Apache Software Foundation
-//
-// Licensed 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.
-
-package org.apache.tapestry.internal.services;
+// Copyright 2006 The Apache Software Foundation
+//
+// Licensed 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.
-import java.io.BufferedInputStream;
-import java.net.URL;
-
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.Locator;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
+package org.apache.tapestry.internal.services;
-/** Used to experiment with namespace aware SAX parsers. */
+import org.xml.sax.Attributes;
+import org.xml.sax.InputSource;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import java.io.BufferedInputStream;
+import java.net.URL;
+
+/**
+ * Used to experiment with namespace aware SAX parsers.
+ */
public class ParserExperiment extends DefaultHandler
{
public static void main(String[] args) throws Exception
@@ -54,7 +55,7 @@
// Doesn't seem to do anything:
factory.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
-
+
// A non-validation parser is fine!
SAXParser parser = factory.newSAXParser();
@@ -179,7 +180,7 @@
@Override
public void unparsedEntityDecl(String name, String publicId, String systemId,
- String notationName) throws SAXException
+ String notationName) throws SAXException
{
log("unparsedEntityDecl", name, "publicId=" + publicId, "systemId=" + systemId);
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PersistentFieldBundleImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PersistentFieldBundleImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PersistentFieldBundleImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PersistentFieldBundleImplTest.java Mon Nov 12 14:22:31 2007
@@ -1,26 +1,26 @@
-// Copyright 2006 The Apache Software Foundation
-//
-// Licensed 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.
-
+// Copyright 2006 The Apache Software Foundation
+//
+// Licensed 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.
+
package org.apache.tapestry.internal.services;
-import java.util.Arrays;
-import java.util.Collection;
-
-import org.apache.tapestry.internal.test.InternalBaseTestCase;
-import org.apache.tapestry.services.PersistentFieldBundle;
-import org.apache.tapestry.services.PersistentFieldChange;
-import org.testng.annotations.Test;
+import org.apache.tapestry.internal.test.InternalBaseTestCase;
+import org.apache.tapestry.services.PersistentFieldBundle;
+import org.apache.tapestry.services.PersistentFieldChange;
+import org.testng.annotations.Test;
+
+import java.util.Arrays;
+import java.util.Collection;
public class PersistentFieldBundleImplTest extends InternalBaseTestCase
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PersistentFieldManagerImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PersistentFieldManagerImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PersistentFieldManagerImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PersistentFieldManagerImplTest.java Mon Nov 12 14:22:31 2007
@@ -14,22 +14,17 @@
package org.apache.tapestry.internal.services;
+import org.apache.tapestry.ComponentResources;
+import org.apache.tapestry.internal.test.InternalBaseTestCase;
import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newMap;
+import org.apache.tapestry.model.ComponentModel;
+import org.apache.tapestry.services.*;
+import org.testng.annotations.Test;
import java.util.Collection;
import java.util.Map;
-import org.apache.tapestry.ComponentResources;
-import org.apache.tapestry.internal.test.InternalBaseTestCase;
-import org.apache.tapestry.model.ComponentModel;
-import org.apache.tapestry.services.MetaDataLocator;
-import org.apache.tapestry.services.PersistentFieldBundle;
-import org.apache.tapestry.services.PersistentFieldChange;
-import org.apache.tapestry.services.PersistentFieldManager;
-import org.apache.tapestry.services.PersistentFieldStrategy;
-import org.testng.annotations.Test;
-
public class PersistentFieldManagerImplTest extends InternalBaseTestCase
{
@Test
@@ -101,7 +96,7 @@
verify();
}
-
+
public void strategy_name_is_case_insensitive()
{
String pageName = "foo.Bar";
@@ -131,7 +126,7 @@
manager.postChange(pageName, resources, fieldName, value);
- verify();
+ verify();
}
@Test
@@ -212,7 +207,7 @@
}
protected void train_findMeta(MetaDataLocator locator, String key,
- ComponentResources resources, String value)
+ ComponentResources resources, String value)
{
expect(locator.findMeta(key, resources)).andReturn(value).atLeastOnce();
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PersistentLocaleImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PersistentLocaleImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PersistentLocaleImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PersistentLocaleImplTest.java Mon Nov 12 14:22:31 2007
@@ -14,10 +14,6 @@
package org.apache.tapestry.internal.services;
-import java.io.IOException;
-import java.util.Locale;
-import java.util.Map;
-
import org.apache.tapestry.ioc.internal.util.CollectionFactory;
import org.apache.tapestry.services.Cookies;
import org.apache.tapestry.services.PersistentLocale;
@@ -25,6 +21,10 @@
import org.testng.Assert;
import org.testng.annotations.Test;
+import java.io.IOException;
+import java.util.Locale;
+import java.util.Map;
+
public class PersistentLocaleImplTest extends Assert
{
@Test
@@ -43,6 +43,7 @@
PersistentLocale persistentLocale = new PersistentLocaleImpl(cookieSource);
assertEquals(persistentLocale.get(), Locale.FRENCH);
}
+
@Test
public void get_none() throws IOException
{
@@ -59,6 +60,7 @@
PersistentLocale persistentLocale = new PersistentLocaleImpl(cookieSource);
assertNull(persistentLocale.get());
}
+
@Test
public void set() throws IOException
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PropertyConduitSourceImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PropertyConduitSourceImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PropertyConduitSourceImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/PropertyConduitSourceImplTest.java Mon Nov 12 14:22:31 2007
@@ -14,8 +14,6 @@
package org.apache.tapestry.internal.services;
-import java.io.Serializable;
-
import org.apache.tapestry.PropertyConduit;
import org.apache.tapestry.internal.bindings.PropBindingFactoryTest;
import org.apache.tapestry.internal.test.InternalBaseTestCase;
@@ -26,6 +24,8 @@
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
+
+import java.io.Serializable;
/**
* Most of the testing occurs inside {@link PropBindingFactoryTest} (due to historical reasons).
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/RequestEncodingInitializerImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/RequestEncodingInitializerImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/RequestEncodingInitializerImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/RequestEncodingInitializerImplTest.java Mon Nov 12 14:22:31 2007
@@ -51,7 +51,7 @@
replay();
RequestEncodingInitializer init = new RequestEncodingInitializerImpl(cache, locator,
- request);
+ request);
init.initializeRequestEncoding(pageName);
@@ -83,7 +83,7 @@
replay();
RequestEncodingInitializer init = new RequestEncodingInitializerImpl(cache, locator,
- request);
+ request);
init.initializeRequestEncoding(pageName);
@@ -91,7 +91,7 @@
}
protected final void train_findMeta(MetaDataLocator locator, String metaDataKey,
- InternalComponentResources resources, String metaDataValue)
+ InternalComponentResources resources, String metaDataValue)
{
expect(locator.findMeta(metaDataKey, resources)).andReturn(metaDataValue);
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/RequestImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/RequestImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/RequestImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/RequestImplTest.java Mon Nov 12 14:22:31 2007
@@ -14,17 +14,16 @@
package org.apache.tapestry.internal.services;
-import java.io.UnsupportedEncodingException;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
-
import org.apache.tapestry.internal.test.InternalBaseTestCase;
import org.apache.tapestry.services.Request;
import org.apache.tapestry.services.Session;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import java.io.UnsupportedEncodingException;
+
public class RequestImplTest extends InternalBaseTestCase
{
@Test
@@ -125,10 +124,10 @@
public Object[][] xhr_inputs()
{
return new Object[][]
- {
- { null, false },
- { "", false },
- { "some other value", false },
- { "XmlHttpRequest", true } };
+ {
+ {null, false},
+ {"", false},
+ {"some other value", false},
+ {"XmlHttpRequest", true}};
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ResourceCacheImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ResourceCacheImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ResourceCacheImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ResourceCacheImplTest.java Mon Nov 12 14:22:31 2007
@@ -14,15 +14,15 @@
package org.apache.tapestry.internal.services;
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-
import org.apache.tapestry.internal.events.InvalidationListener;
import org.apache.tapestry.internal.test.InternalBaseTestCase;
import org.apache.tapestry.ioc.Resource;
import org.apache.tapestry.services.ResourceDigestGenerator;
import org.testng.annotations.Test;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
public class ResourceCacheImplTest extends InternalBaseTestCase
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ResourceDigestGeneratorImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ResourceDigestGeneratorImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ResourceDigestGeneratorImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ResourceDigestGeneratorImplTest.java Mon Nov 12 14:22:31 2007
@@ -14,18 +14,13 @@
package org.apache.tapestry.internal.services;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.net.URL;
-import java.util.Arrays;
-
import org.apache.tapestry.internal.test.InternalBaseTestCase;
import org.apache.tapestry.services.ResourceDigestGenerator;
import org.testng.annotations.Test;
+
+import java.io.*;
+import java.net.URL;
+import java.util.Arrays;
public class ResourceDigestGeneratorImplTest extends InternalBaseTestCase
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ResourceStreamerImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ResourceStreamerImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ResourceStreamerImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ResourceStreamerImplTest.java Mon Nov 12 14:22:31 2007
@@ -14,22 +14,18 @@
package org.apache.tapestry.internal.services;
-import static org.easymock.EasyMock.anyInt;
-import static org.easymock.EasyMock.anyLong;
-import static org.easymock.EasyMock.eq;
-
-import java.io.IOException;
-
-import javax.servlet.ServletOutputStream;
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.tapestry.internal.test.InternalBaseTestCase;
import org.apache.tapestry.ioc.Resource;
import org.apache.tapestry.ioc.internal.util.ClasspathResource;
import org.apache.tapestry.services.Request;
import org.apache.tapestry.services.RequestGlobals;
import org.apache.tapestry.services.Response;
+import static org.easymock.EasyMock.*;
import org.testng.annotations.Test;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
/**
* Tests for the {@link ResourceStreamerImpl} class.
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/SessionImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/SessionImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/SessionImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/SessionImplTest.java Mon Nov 12 14:22:31 2007
@@ -14,15 +14,14 @@
package org.apache.tapestry.internal.services;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Enumeration;
-
-import javax.servlet.http.HttpSession;
-
import org.apache.tapestry.internal.test.InternalBaseTestCase;
import org.apache.tapestry.services.Session;
import org.testng.annotations.Test;
+
+import javax.servlet.http.HttpSession;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
public class SessionImplTest extends InternalBaseTestCase
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/SessionPersistentFieldStrategyTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/SessionPersistentFieldStrategyTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/SessionPersistentFieldStrategyTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/SessionPersistentFieldStrategyTest.java Mon Nov 12 14:22:31 2007
@@ -14,14 +14,14 @@
package org.apache.tapestry.internal.services;
-import java.util.Collection;
-import java.util.Iterator;
-
import org.apache.tapestry.internal.test.InternalBaseTestCase;
import org.apache.tapestry.services.PersistentFieldChange;
import org.apache.tapestry.services.Request;
import org.apache.tapestry.services.Session;
import org.testng.annotations.Test;
+
+import java.util.Collection;
+import java.util.Iterator;
public class SessionPersistentFieldStrategyTest extends InternalBaseTestCase
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/StaticFilesFilterTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/StaticFilesFilterTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/StaticFilesFilterTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/StaticFilesFilterTest.java Mon Nov 12 14:22:31 2007
@@ -14,18 +14,13 @@
package org.apache.tapestry.internal.services;
-import java.io.IOException;
-import java.net.URL;
-
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.tapestry.internal.test.InternalBaseTestCase;
-import org.apache.tapestry.services.Context;
-import org.apache.tapestry.services.Request;
-import org.apache.tapestry.services.RequestFilter;
-import org.apache.tapestry.services.RequestHandler;
-import org.apache.tapestry.services.Response;
+import org.apache.tapestry.services.*;
import org.testng.annotations.Test;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.net.URL;
public class StaticFilesFilterTest extends InternalBaseTestCase
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/TemplateParserImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/TemplateParserImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/TemplateParserImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/TemplateParserImplTest.java Mon Nov 12 14:22:31 2007
@@ -14,37 +14,22 @@
package org.apache.tapestry.internal.services;
-import static java.lang.String.format;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newSet;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.tapestry.internal.parser.AttributeToken;
-import org.apache.tapestry.internal.parser.BlockToken;
-import org.apache.tapestry.internal.parser.BodyToken;
-import org.apache.tapestry.internal.parser.CDATAToken;
-import org.apache.tapestry.internal.parser.CommentToken;
-import org.apache.tapestry.internal.parser.ComponentTemplate;
-import org.apache.tapestry.internal.parser.DTDToken;
-import org.apache.tapestry.internal.parser.EndElementToken;
-import org.apache.tapestry.internal.parser.ExpansionToken;
-import org.apache.tapestry.internal.parser.ParameterToken;
-import org.apache.tapestry.internal.parser.StartComponentToken;
-import org.apache.tapestry.internal.parser.StartElementToken;
-import org.apache.tapestry.internal.parser.TemplateToken;
-import org.apache.tapestry.internal.parser.TextToken;
-import org.apache.tapestry.internal.parser.TokenType;
+import org.apache.tapestry.internal.parser.*;
import org.apache.tapestry.internal.test.InternalBaseTestCase;
import org.apache.tapestry.ioc.Locatable;
import org.apache.tapestry.ioc.Location;
import org.apache.tapestry.ioc.Resource;
import org.apache.tapestry.ioc.internal.util.ClasspathResource;
+import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newSet;
import org.apache.tapestry.ioc.internal.util.TapestryException;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
+import static java.lang.String.format;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+
/**
* This is used to test the template parser ... and in some cases, the underlying behavior of the
* SAX APIs.
@@ -185,7 +170,9 @@
assertEquals(t.getText().trim(), "lt:< gt:> amp:&");
}
- /** Test disabled when not online. */
+ /**
+ * Test disabled when not online.
+ */
@Test(enabled = false)
public void html_entity()
{
@@ -567,27 +554,27 @@
public Object[][] parse_failure_data()
{
return new Object[][]
- {
- {
- "mixin_requires_id_or_type.tml",
- "You may not specify mixins for element <span> because it does not represent a component (which requires either an id attribute or a type attribute).",
- 2 },
- { "illegal_nesting_within_body_element.tml",
- "Element 'xyz' is nested within a Tapestry body element", 2 },
{
- "unexpected_attribute_in_parameter_element.tml",
- "Element <parameter> does not support an attribute named 'grok'. The only allowed attribute name is 'name'.",
- 4 },
- { "name_attribute_of_parameter_element_omitted.tml",
- "The name attribute of the <parameter> element must be specified.", 4 },
- { "name_attribute_of_parameter_element_blank.tml",
- "The name attribute of the <parameter> element must be specified.", 4 },
- {
- "unexpected_attribute_in_block_element.tml",
- "Element <block> does not support an attribute named 'name'. The only allowed attribute name is 'id'.",
- 3 },
+ {
+ "mixin_requires_id_or_type.tml",
+ "You may not specify mixins for element <span> because it does not represent a component (which requires either an id attribute or a type attribute).",
+ 2},
+ {"illegal_nesting_within_body_element.tml",
+ "Element 'xyz' is nested within a Tapestry body element", 2},
+ {
+ "unexpected_attribute_in_parameter_element.tml",
+ "Element <parameter> does not support an attribute named 'grok'. The only allowed attribute name is 'name'.",
+ 4},
+ {"name_attribute_of_parameter_element_omitted.tml",
+ "The name attribute of the <parameter> element must be specified.", 4},
+ {"name_attribute_of_parameter_element_blank.tml",
+ "The name attribute of the <parameter> element must be specified.", 4},
+ {
+ "unexpected_attribute_in_block_element.tml",
+ "Element <block> does not support an attribute named 'name'. The only allowed attribute name is 'id'.",
+ 3},
- };
+ };
}
@Test(dataProvider = "parse_failure_data")
@@ -600,11 +587,14 @@
}
catch (TapestryException ex)
{
- if (!ex.getMessage().contains(errorMessageSubstring)) { throw new AssertionError(
- format(
- "Message [%s] does not contain substring [%s].",
- ex.getMessage(),
- errorMessageSubstring)); }
+ if (!ex.getMessage().contains(errorMessageSubstring))
+ {
+ throw new AssertionError(
+ format(
+ "Message [%s] does not contain substring [%s].",
+ ex.getMessage(),
+ errorMessageSubstring));
+ }
assertEquals(ex.getLocation().getLine(), expectedLine);
}
@@ -614,10 +604,10 @@
public Object[][] doctype_parsed_correctly_data()
{
return new Object[][]
- {
- { "xhtml1_strict_doctype.tml" },
- { "xhtml1_transitional_doctype.tml" },
- { "xhtml1_frameset_doctype.tml" } };
+ {
+ {"xhtml1_strict_doctype.tml"},
+ {"xhtml1_transitional_doctype.tml"},
+ {"xhtml1_frameset_doctype.tml"}};
}
@Test(dataProvider = "doctype_parsed_correctly_data")
@@ -633,28 +623,28 @@
public Object[][] doctype_token_added_correctly_data()
{
return new Object[][]
- {
- { "xhtml1_strict_doctype.tml", "html", "-//W3C//DTD XHTML 1.0 Strict//EN",
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" },
- { "xhtml1_transitional_doctype.tml", "html",
- "-//W3C//DTD XHTML 1.0 Transitional//EN",
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" },
- { "xhtml1_frameset_doctype.tml", "html", "-//W3C//DTD XHTML 1.0 Frameset//EN",
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd" },
- { "html4_strict_doctype.tml", "HTML", "-//W3C//DTD HTML 4.01//EN",
- "http://www.w3.org/TR/html4/strict.dtd" },
- { "html4_transitional_doctype.tml", "HTML",
- "-//W3C//DTD HTML 4.01 Transitional//EN",
- "http://www.w3.org/TR/html4/loose.dtd" },
- { "html4_frameset_doctype.tml", "HTML", "-//W3C//DTD HTML 4.01 Frameset//EN",
- "http://www.w3.org/TR/html4/frameset.dtd" },
- { "system_doctype.xml", "foo", null,
- "src/test/resources/org/apache/tapestry/internal/services/simple.dtd" } };
+ {
+ {"xhtml1_strict_doctype.tml", "html", "-//W3C//DTD XHTML 1.0 Strict//EN",
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"},
+ {"xhtml1_transitional_doctype.tml", "html",
+ "-//W3C//DTD XHTML 1.0 Transitional//EN",
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"},
+ {"xhtml1_frameset_doctype.tml", "html", "-//W3C//DTD XHTML 1.0 Frameset//EN",
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"},
+ {"html4_strict_doctype.tml", "HTML", "-//W3C//DTD HTML 4.01//EN",
+ "http://www.w3.org/TR/html4/strict.dtd"},
+ {"html4_transitional_doctype.tml", "HTML",
+ "-//W3C//DTD HTML 4.01 Transitional//EN",
+ "http://www.w3.org/TR/html4/loose.dtd"},
+ {"html4_frameset_doctype.tml", "HTML", "-//W3C//DTD HTML 4.01 Frameset//EN",
+ "http://www.w3.org/TR/html4/frameset.dtd"},
+ {"system_doctype.xml", "foo", null,
+ "src/test/resources/org/apache/tapestry/internal/services/simple.dtd"}};
}
@Test(dataProvider = "doctype_token_added_correctly_data")
public void doctype_added_correctly(String fileName, String name, String publicId,
- String systemId) throws Exception
+ String systemId) throws Exception
{
List<TemplateToken> tokens = tokens(fileName);
DTDToken t2 = get(tokens, 0);
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/TranslatorSourceImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/TranslatorSourceImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/TranslatorSourceImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/TranslatorSourceImplTest.java Mon Nov 12 14:22:31 2007
@@ -14,14 +14,14 @@
package org.apache.tapestry.internal.services;
-import java.util.Collections;
-import java.util.Map;
-
import org.apache.tapestry.Translator;
import org.apache.tapestry.internal.test.InternalBaseTestCase;
import org.apache.tapestry.ioc.internal.util.CollectionFactory;
import org.apache.tapestry.services.TranslatorSource;
import org.testng.annotations.Test;
+
+import java.util.Collections;
+import java.util.Map;
public class TranslatorSourceImplTest extends InternalBaseTestCase
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/UnclaimedFieldWorkerTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/UnclaimedFieldWorkerTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/UnclaimedFieldWorkerTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/UnclaimedFieldWorkerTest.java Mon Nov 12 14:22:31 2007
@@ -14,16 +14,15 @@
package org.apache.tapestry.internal.services;
-import static org.apache.tapestry.services.TransformConstants.CONTAINING_PAGE_DID_DETACH_SIGNATURE;
-import static org.apache.tapestry.services.TransformConstants.CONTAINING_PAGE_DID_LOAD_SIGNATURE;
-
-import java.lang.reflect.Modifier;
-
import org.apache.tapestry.internal.test.InternalBaseTestCase;
import org.apache.tapestry.model.MutableComponentModel;
import org.apache.tapestry.services.ClassTransformation;
+import static org.apache.tapestry.services.TransformConstants.CONTAINING_PAGE_DID_DETACH_SIGNATURE;
+import static org.apache.tapestry.services.TransformConstants.CONTAINING_PAGE_DID_LOAD_SIGNATURE;
import org.testng.annotations.Test;
+import java.lang.reflect.Modifier;
+
public class UnclaimedFieldWorkerTest extends InternalBaseTestCase
{
@Test
@@ -84,7 +83,7 @@
}
protected final void train_getFieldModifiers(ClassTransformation transformation,
- String fieldName, int modifiers)
+ String fieldName, int modifiers)
{
expect(transformation.getFieldModifiers(fieldName)).andReturn(modifiers).atLeastOnce();
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ValidationMessagesSourceImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ValidationMessagesSourceImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ValidationMessagesSourceImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/ValidationMessagesSourceImplTest.java Mon Nov 12 14:22:31 2007
@@ -14,9 +14,6 @@
package org.apache.tapestry.internal.services;
-import java.util.Arrays;
-import java.util.Locale;
-
import org.apache.tapestry.ioc.MessageFormatter;
import org.apache.tapestry.ioc.Messages;
import org.apache.tapestry.ioc.Resource;
@@ -25,6 +22,9 @@
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
+
+import java.util.Arrays;
+import java.util.Locale;
public class ValidationMessagesSourceImplTest extends Assert
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/VisibilityBean.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/VisibilityBean.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/VisibilityBean.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/services/VisibilityBean.java Mon Nov 12 14:22:31 2007
@@ -1,25 +1,23 @@
-// Copyright 2006 The Apache Software Foundation
-//
-// Licensed 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.
-
+// Copyright 2006 The Apache Software Foundation
+//
+// Licensed 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.
+
package org.apache.tapestry.internal.services;
-import org.apache.tapestry.annotations.Retain;
+import org.apache.tapestry.annotations.Retain;
/**
* Used to test some issues related to visibility.
- *
- *
*/
public class VisibilityBean
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/structure/ComponentPageElementImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/structure/ComponentPageElementImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/structure/ComponentPageElementImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/structure/ComponentPageElementImplTest.java Mon Nov 12 14:22:31 2007
@@ -254,7 +254,7 @@
replay();
ComponentPageElementImpl cpe = new ComponentPageElementImpl(page, container, "myid", null,
- ins, coercer, null, l);
+ ins, coercer, null, l);
try
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/structure/InternalComponentResourcesImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/structure/InternalComponentResourcesImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/structure/InternalComponentResourcesImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/structure/InternalComponentResourcesImplTest.java Mon Nov 12 14:22:31 2007
@@ -42,7 +42,7 @@
replay();
InternalComponentResources resources = new InternalComponentResourcesImpl(element, null,
- ins, coercer, null);
+ ins, coercer, null);
resources.renderInformalParameters(writer);
@@ -68,7 +68,7 @@
replay();
InternalComponentResources resources = new InternalComponentResourcesImpl(element, null,
- ins, coercer, null);
+ ins, coercer, null);
resources.bindParameter("fred", binding);
@@ -103,7 +103,7 @@
replay();
InternalComponentResources resources = new InternalComponentResourcesImpl(element, null,
- ins, coercer, null);
+ ins, coercer, null);
resources.bindParameter("fred", binding);
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/structure/PageImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/structure/PageImplTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/structure/PageImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/structure/PageImplTest.java Mon Nov 12 14:22:31 2007
@@ -14,16 +14,15 @@
package org.apache.tapestry.internal.structure;
-import static org.easymock.EasyMock.contains;
-import static org.easymock.EasyMock.same;
-
-import java.util.Locale;
-
import org.apache.tapestry.internal.test.InternalBaseTestCase;
import org.apache.tapestry.runtime.PageLifecycleListener;
+import static org.easymock.EasyMock.contains;
+import static org.easymock.EasyMock.same;
import org.slf4j.Logger;
import org.testng.annotations.Test;
+import java.util.Locale;
+
public class PageImplTest extends InternalBaseTestCase
{
private final Locale _locale = Locale.ENGLISH;
@@ -71,7 +70,9 @@
verify();
}
- /** Also checks that listeners are invoked, even if the page is dirty. */
+ /**
+ * Also checks that listeners are invoked, even if the page is dirty.
+ */
@Test
public void detach_dirty_if_dirty_count_non_zero()
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/test/CodeEqTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/test/CodeEqTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/test/CodeEqTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/test/CodeEqTest.java Mon Nov 12 14:22:31 2007
@@ -30,12 +30,12 @@
public Object[][] stripValues()
{
return new Object[][]
- {
- { "foo", "foo" },
- { " foo\n", "foo" },
- { " foo \nbar\n\n \tbaz", "foo bar baz" },
- { "{\n bar();\n baz();\n if (gnip())\n {\n gnop();\n }\n}\n",
- "{bar(); baz(); if (gnip()){gnop();}}" } };
+ {
+ {"foo", "foo"},
+ {" foo\n", "foo"},
+ {" foo \nbar\n\n \tbaz", "foo bar baz"},
+ {"{\n bar();\n baz();\n if (gnip())\n {\n gnop();\n }\n}\n",
+ "{bar(); baz(); if (gnip()){gnop();}}"}};
}
@Test(enabled = false)
@@ -62,8 +62,8 @@
public Object[][] matchValues()
{
return new Object[][]
- {
- { "{ foo(); }", "{\n foo();\n}", true },
- { " foo();", "foo ();", false }, };
+ {
+ {"{ foo(); }", "{\n foo();\n}", true},
+ {" foo();", "foo ();", false},};
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/test/PageTesterContextTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/test/PageTesterContextTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/test/PageTesterContextTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/test/PageTesterContextTest.java Mon Nov 12 14:22:31 2007
@@ -14,12 +14,12 @@
package org.apache.tapestry.internal.test;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-
-import org.testng.Assert;
-import org.testng.annotations.Test;
public class PageTesterContextTest extends Assert
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/test/PageTesterSessionTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/test/PageTesterSessionTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/test/PageTesterSessionTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/test/PageTesterSessionTest.java Mon Nov 12 14:22:31 2007
@@ -1,25 +1,25 @@
-// Copyright 2006, 2007 The Apache Software Foundation
-//
-// Licensed 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.
-
+// Copyright 2006, 2007 The Apache Software Foundation
+//
+// Licensed 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.
+
package org.apache.tapestry.internal.test;
-import java.util.Arrays;
-import java.util.Collections;
-
-import org.testng.Assert;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
+import org.testng.Assert;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import java.util.Arrays;
+import java.util.Collections;
public class PageTesterSessionTest extends Assert
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/InheritedAnnotation.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/InheritedAnnotation.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/InheritedAnnotation.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/InheritedAnnotation.java Mon Nov 12 14:22:31 2007
@@ -14,18 +14,18 @@
package org.apache.tapestry.internal.transform;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.TYPE;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Target;
@Target(TYPE)
@Retention(RUNTIME)
@Documented
@Inherited
-public @interface InheritedAnnotation {
+public @interface InheritedAnnotation
+{
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/AbstractFoo.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/AbstractFoo.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/AbstractFoo.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/AbstractFoo.java Mon Nov 12 14:22:31 2007
@@ -1,23 +1,23 @@
-// Copyright 2006 The Apache Software Foundation
-//
-// Licensed 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.
-
+// Copyright 2006 The Apache Software Foundation
+//
+// Licensed 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.
+
package org.apache.tapestry.internal.transform.pages;
-import org.apache.tapestry.internal.services.FooInterface;
+import org.apache.tapestry.internal.services.FooInterface;
/**
- *
+ *
*/
public abstract class AbstractFoo implements FooInterface
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/BarImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/BarImpl.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/BarImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/BarImpl.java Mon Nov 12 14:22:31 2007
@@ -1,23 +1,23 @@
-// Copyright 2006 The Apache Software Foundation
-//
-// Licensed 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.
-
+// Copyright 2006 The Apache Software Foundation
+//
+// Licensed 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.
+
package org.apache.tapestry.internal.transform.pages;
-import org.apache.tapestry.internal.services.BarInterface;
+import org.apache.tapestry.internal.services.BarInterface;
/**
- *
+ *
*/
public class BarImpl extends FooImpl implements BarInterface
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/ChildClassInheritsAnnotation.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/ChildClassInheritsAnnotation.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/ChildClassInheritsAnnotation.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/ChildClassInheritsAnnotation.java Mon Nov 12 14:22:31 2007
@@ -1,23 +1,21 @@
-// Copyright 2006 The Apache Software Foundation
-//
-// Licensed 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.
-
+// Copyright 2006 The Apache Software Foundation
+//
+// Licensed 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.
+
package org.apache.tapestry.internal.transform.pages;
/**
* Used to check that Javassist does make child classes inherit class annotations.
- *
- *
*/
public class ChildClassInheritsAnnotation extends ParentClass
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/FooImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/FooImpl.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/FooImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/FooImpl.java Mon Nov 12 14:22:31 2007
@@ -1,23 +1,23 @@
-// Copyright 2006 The Apache Software Foundation
-//
-// Licensed 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.
-
+// Copyright 2006 The Apache Software Foundation
+//
+// Licensed 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.
+
package org.apache.tapestry.internal.transform.pages;
-import org.apache.tapestry.internal.services.FooInterface;
+import org.apache.tapestry.internal.services.FooInterface;
/**
- *
+ *
*/
public class FooImpl implements FooInterface
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/TargetObject.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/TargetObject.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/TargetObject.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/TargetObject.java Mon Nov 12 14:22:31 2007
@@ -1,23 +1,21 @@
-// Copyright 2006 The Apache Software Foundation
-//
-// Licensed 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.
-
+// Copyright 2006 The Apache Software Foundation
+//
+// Licensed 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.
+
package org.apache.tapestry.internal.transform.pages;
/**
* An empty object to which fields, methods and interfaces are added.
- *
- *
*/
public class TargetObject
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/TargetObjectSubclass.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/TargetObjectSubclass.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/TargetObjectSubclass.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/transform/pages/TargetObjectSubclass.java Mon Nov 12 14:22:31 2007
@@ -1,23 +1,21 @@
-// Copyright 2006 The Apache Software Foundation
-//
-// Licensed 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.
-
+// Copyright 2006 The Apache Software Foundation
+//
+// Licensed 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.
+
package org.apache.tapestry.internal.transform.pages;
/**
* A subclass for TargetObject, used to check that values can be inherited from a base class.
- *
- *
*/
public class TargetObjectSubclass extends TargetObject
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/Base64Tests.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/Base64Tests.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/Base64Tests.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/Base64Tests.java Mon Nov 12 14:22:31 2007
@@ -1,29 +1,28 @@
-// Copyright 2006 The Apache Software Foundation
-//
-// Licensed 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.
-
+// Copyright 2006 The Apache Software Foundation
+//
+// Licensed 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.
+
package org.apache.tapestry.internal.util;
-import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newMap;
-
-import java.io.EOFException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.Map;
-
-import org.testng.Assert;
-import org.testng.annotations.Test;
+import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newMap;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+import java.io.EOFException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.util.Map;
/**
* Tests for {@link Base64InputStream} and {@link Base64OutputStream}, etc.
@@ -86,7 +85,7 @@
public void checks_for_eof() throws Exception
{
String[] values =
- { "fred", "barney", "wilma" };
+ {"fred", "barney", "wilma"};
Base64ObjectOutputStream os = new Base64ObjectOutputStream();
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/ContentTypeTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/ContentTypeTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/ContentTypeTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/ContentTypeTest.java Mon Nov 12 14:22:31 2007
@@ -14,10 +14,10 @@
package org.apache.tapestry.internal.util;
-import java.util.List;
-
import org.testng.Assert;
import org.testng.annotations.Test;
+
+import java.util.List;
public class ContentTypeTest extends Assert
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/IntegerRangeTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/IntegerRangeTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/IntegerRangeTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/IntegerRangeTest.java Mon Nov 12 14:22:31 2007
@@ -14,10 +14,10 @@
package org.apache.tapestry.internal.util;
-import java.util.Iterator;
-
import org.testng.Assert;
import org.testng.annotations.Test;
+
+import java.util.Iterator;
public class IntegerRangeTest extends Assert
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/MethodInvocationBuilderTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/MethodInvocationBuilderTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/MethodInvocationBuilderTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/MethodInvocationBuilderTest.java Mon Nov 12 14:22:31 2007
@@ -1,26 +1,26 @@
-// Copyright 2006, 2007 The Apache Software Foundation
-//
-// Licensed 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.
-
+// Copyright 2006, 2007 The Apache Software Foundation
+//
+// Licensed 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.
+
package org.apache.tapestry.internal.util;
-import java.lang.reflect.Modifier;
-
-import org.apache.tapestry.MarkupWriter;
-import org.apache.tapestry.services.ClassTransformation;
-import org.apache.tapestry.services.TransformMethodSignature;
-import org.apache.tapestry.test.TapestryTestCase;
-import org.testng.annotations.Test;
+import org.apache.tapestry.MarkupWriter;
+import org.apache.tapestry.services.ClassTransformation;
+import org.apache.tapestry.services.TransformMethodSignature;
+import org.apache.tapestry.test.TapestryTestCase;
+import org.testng.annotations.Test;
+
+import java.lang.reflect.Modifier;
public class MethodInvocationBuilderTest extends TapestryTestCase
{
@@ -36,7 +36,7 @@
replay();
TransformMethodSignature sig = new TransformMethodSignature(Modifier.PUBLIC, "void", "myMethod", new String[]
- { MARKUP_WRITER_CLASS_NAME }, null);
+ {MARKUP_WRITER_CLASS_NAME}, null);
MethodInvocationBuilder invoker = new MethodInvocationBuilder();
@@ -55,7 +55,7 @@
replay();
TransformMethodSignature sig = new TransformMethodSignature(Modifier.PUBLIC, "void", "myMethod", new String[]
- { MARKUP_WRITER_CLASS_NAME }, null);
+ {MARKUP_WRITER_CLASS_NAME}, null);
MethodInvocationBuilder invoker = new MethodInvocationBuilder();
@@ -72,7 +72,7 @@
replay();
TransformMethodSignature sig = new TransformMethodSignature(Modifier.PUBLIC, "void", "myMethod", new String[]
- { MARKUP_WRITER_CLASS_NAME, LOCALE_CLASS_NAME }, null);
+ {MARKUP_WRITER_CLASS_NAME, LOCALE_CLASS_NAME}, null);
MethodInvocationBuilder invoker = new MethodInvocationBuilder();
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/URLChangeTrackerTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/URLChangeTrackerTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/URLChangeTrackerTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/internal/util/URLChangeTrackerTest.java Mon Nov 12 14:22:31 2007
@@ -14,11 +14,11 @@
package org.apache.tapestry.internal.util;
-import java.io.File;
-import java.net.URL;
-
import org.apache.tapestry.test.TapestryTestCase;
import org.testng.annotations.Test;
+
+import java.io.File;
+import java.net.URL;
public class URLChangeTrackerTest extends TapestryTestCase
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/json/JSONObjectTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/json/JSONObjectTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/json/JSONObjectTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/json/JSONObjectTest.java Mon Nov 12 14:22:31 2007
@@ -14,12 +14,12 @@
package org.apache.tapestry.json;
-import java.util.Arrays;
-
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
+import java.util.Arrays;
+
/**
* Tests JSONObject, particularily in terms of parsing and writing JSON streams.
*/
@@ -82,13 +82,13 @@
public Object[][] boolean_inputs()
{
return new Object[][]
- {
- { "true", true },
- { "TRUE", true },
- { "false", false },
- { "FALSE", false },
- { Boolean.TRUE, true },
- { Boolean.FALSE, false } };
+ {
+ {"true", true},
+ {"TRUE", true},
+ {"false", false},
+ {"FALSE", false},
+ {Boolean.TRUE, true},
+ {Boolean.FALSE, false}};
}
@Test
@@ -205,13 +205,13 @@
public Object[][] double_inputs()
{
return new Object[][]
- {
- { 3d, "3" },
- { -22.5d, "-22.5" },
- { 0d, "0" },
- { Double.NEGATIVE_INFINITY, "null" },
- { Double.POSITIVE_INFINITY, "null" },
- { Double.NaN, "null" }, };
+ {
+ {3d, "3"},
+ {-22.5d, "-22.5"},
+ {0d, "0"},
+ {Double.NEGATIVE_INFINITY, "null"},
+ {Double.POSITIVE_INFINITY, "null"},
+ {Double.NaN, "null"},};
}
@Test(dataProvider = "get_double_inputs")
@@ -228,10 +228,10 @@
public Object[][] getDoubleInputs()
{
return new Object[][]
- {
- { new Double(3.5), 3.5d },
- { new Long(1000), 1000d },
- { "-101.7", -101.7d } };
+ {
+ {new Double(3.5), 3.5d},
+ {new Long(1000), 1000d},
+ {"-101.7", -101.7d}};
}
@Test
@@ -284,10 +284,10 @@
public Object[][] get_int_inputs()
{
return new Object[][]
- {
- { "3", 3 },
- { new Long(97), 97 },
- { "-8.76", -8 } };
+ {
+ {"3", 3},
+ {new Long(97), 97},
+ {"-8.76", -8}};
}
@Test
@@ -391,7 +391,7 @@
Arrays.sort(names);
assertEquals(names, new String[]
- { "barney", "fred" });
+ {"barney", "fred"});
}
}
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/services/SyncCostBench.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/services/SyncCostBench.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/services/SyncCostBench.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/services/SyncCostBench.java Mon Nov 12 14:22:31 2007
@@ -1,26 +1,25 @@
-// Copyright 2006 The Apache Software Foundation
-//
-// Licensed 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.
-
+// Copyright 2006 The Apache Software Foundation
+//
+// Licensed 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.
+
package org.apache.tapestry.services;
-import static java.lang.String.format;
-import static java.lang.System.out;
-
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import org.apache.tapestry.ioc.internal.util.ConcurrentBarrier;
+import org.apache.tapestry.ioc.internal.util.ConcurrentBarrier;
+
+import static java.lang.String.format;
+import static java.lang.System.out;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
/**
* Tests single-thread synchronization overhead using different techniques. Note that we're fudging
@@ -28,23 +27,25 @@
* about read locks (which will be very common) than about write locks (very rare). Another concern
* is that hotspot is going to mess up our synchronization when it see we're not really doing
* anything multi-threaded.
- * <p>
+ * <p/>
* The results show that using the {@link org.apache.tapestry.internal.annotations.Concurrent}
* aspect (which used a {@link java.util.concurrent.locks.ReentrantReadWriteLock} under the covers)
* is about 4x as expensive as just using the synchronized keyword. There are some anomolous results
* ... for example, ReadWriteLockRunner is consistently slower than ReadWriteLockAspectRunner (one
* would expect it to be the other way around ... must be something about how AspectJ weaves the
* code ... and it's use of static methods in many cases).
- * <p>
+ * <p/>
* Well, the Concurrent aspect is gone, replaced with the {@link ConcurrentBarrier} utility.
*/
public class SyncCostBench
{
- /** Calculates a fibunacci series. */
+ /**
+ * Calculates a fibunacci series.
+ */
static class Worker implements Runnable
{
private long[] _series =
- { 1, 1 };
+ {1, 1};
public void run()
{
Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/services/TransformMethodSignatureTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/services/TransformMethodSignatureTest.java?rev=594319&r1=594318&r2=594319&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/services/TransformMethodSignatureTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry/services/TransformMethodSignatureTest.java Mon Nov 12 14:22:31 2007
@@ -14,15 +14,15 @@
package org.apache.tapestry.services;
+import org.apache.tapestry.ioc.internal.util.CollectionFactory;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
import java.lang.reflect.Modifier;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
-import org.apache.tapestry.ioc.internal.util.CollectionFactory;
-import org.testng.Assert;
-import org.testng.annotations.Test;
-
public class TransformMethodSignatureTest extends Assert
{
@@ -30,16 +30,16 @@
public void signature_toString()
{
TransformMethodSignature sig = new TransformMethodSignature(Modifier.PUBLIC, "int", "doSomething",
- new String[]
- { "java.lang.String", "int" }, new String[]
- { "java.lang.RuntimeException", "org.foo.FredException" });
+ new String[]
+ {"java.lang.String", "int"}, new String[]
+ {"java.lang.RuntimeException", "org.foo.FredException"});
assertEquals(
sig.toString(),
"public int doSomething(java.lang.String, int) throws java.lang.RuntimeException, org.foo.FredException");
sig = new TransformMethodSignature(Modifier.ABSTRACT + Modifier.PROTECTED, "boolean", "misoHapi",
- new String[0], new String[0]);
+ new String[0], new String[0]);
assertEquals(sig.toString(), "protected abstract boolean misoHapi()");
}
@@ -48,9 +48,9 @@
public void medium_description()
{
TransformMethodSignature sig = new TransformMethodSignature(Modifier.PUBLIC, "int", "doSomething",
- new String[]
- { "java.lang.String", "int" }, new String[]
- { "java.lang.RuntimeException", "org.foo.FredException" });
+ new String[]
+ {"java.lang.String", "int"}, new String[]
+ {"java.lang.RuntimeException", "org.foo.FredException"});
assertEquals(sig.getMediumDescription(), "doSomething(java.lang.String, int)");
}
@@ -78,17 +78,17 @@
public void getters()
{
TransformMethodSignature sig = new TransformMethodSignature(Modifier.PUBLIC, "int", "doSomething",
- new String[]
- { "java.lang.String", "int" }, new String[]
- { "java.lang.RuntimeException", "org.foo.FredException" });
+ new String[]
+ {"java.lang.String", "int"}, new String[]
+ {"java.lang.RuntimeException", "org.foo.FredException"});
assertEquals(sig.getModifiers(), Modifier.PUBLIC);
assertEquals(sig.getReturnType(), "int");
assertEquals(sig.getMethodName(), "doSomething");
assertEquals(sig.getParameterTypes(), new String[]
- { "java.lang.String", "int" });
+ {"java.lang.String", "int"});
assertEquals(sig.getExceptionTypes(), new String[]
- { "java.lang.RuntimeException", "org.foo.FredException" });
+ {"java.lang.RuntimeException", "org.foo.FredException"});
}
@Test
@@ -98,7 +98,7 @@
TransformMethodSignature bar = new TransformMethodSignature(Modifier.PUBLIC, "void", "bar", null, null);
TransformMethodSignature baz0 = new TransformMethodSignature(Modifier.PUBLIC, "void", "baz", null, null);
TransformMethodSignature baz1 = new TransformMethodSignature(Modifier.PUBLIC, "void", "baz", new String[]
- { "int" }, null);
+ {"int"}, null);
List<TransformMethodSignature> list = CollectionFactory.newList(Arrays.asList(foo, bar, baz0, baz1));
@@ -111,9 +111,9 @@
public void hash_code_and_equals()
{
TransformMethodSignature sig1 = new TransformMethodSignature(Modifier.PUBLIC, "int", "doSomething",
- new String[]
- { "int" }, new String[]
- { "org.foo.BarException" });
+ new String[]
+ {"int"}, new String[]
+ {"org.foo.BarException"});
int hashCode1 = sig1.hashCode();
// Check that same value returned each time.
@@ -121,9 +121,9 @@
assertEquals(sig1.hashCode(), hashCode1);
TransformMethodSignature sig2 = new TransformMethodSignature(Modifier.PUBLIC, "int", "doSomething",
- new String[]
- { "int" }, new String[]
- { "org.foo.BarException" });
+ new String[]
+ {"int"}, new String[]
+ {"org.foo.BarException"});
assertEquals(sig2.hashCode(), hashCode1);
assertEquals(sig2, sig1);
@@ -131,35 +131,35 @@
// Now work through the different properties, changing each one.
sig2 = new TransformMethodSignature(Modifier.PRIVATE, "int", "doSomething", new String[]
- { "int" }, new String[]
- { "org.foo.BarException" });
+ {"int"}, new String[]
+ {"org.foo.BarException"});
assertFalse(sig2.hashCode() == hashCode1);
assertFalse(sig2.equals(sig1));
sig2 = new TransformMethodSignature(Modifier.PUBLIC, "long", "doSomething", new String[]
- { "int" }, new String[]
- { "org.foo.BarException" });
+ {"int"}, new String[]
+ {"org.foo.BarException"});
assertFalse(sig2.hashCode() == hashCode1);
assertFalse(sig2.equals(sig1));
sig2 = new TransformMethodSignature(Modifier.PUBLIC, "int", "doSomethingElse", new String[]
- { "int" }, new String[]
- { "org.foo.BarException" });
+ {"int"}, new String[]
+ {"org.foo.BarException"});
assertFalse(sig2.hashCode() == hashCode1);
assertFalse(sig2.equals(sig1));
sig2 = new TransformMethodSignature(Modifier.PUBLIC, "int", "doSomething", new String[]
- { "long" }, new String[]
- { "org.foo.BarException" });
+ {"long"}, new String[]
+ {"org.foo.BarException"});
assertFalse(sig2.hashCode() == hashCode1);
assertFalse(sig2.equals(sig1));
sig2 = new TransformMethodSignature(Modifier.PUBLIC, "int", "doSomething", new String[]
- { "int" }, new String[0]);
+ {"int"}, new String[0]);
assertFalse(sig2.hashCode() == hashCode1);
assertFalse(sig2.equals(sig1));
@@ -170,7 +170,9 @@
assertFalse(sig1.equals(""));
}
- /** Tests the simple, no arguments constructor. */
+ /**
+ * Tests the simple, no arguments constructor.
+ */
@Test
public void short_constructor()
{