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 2006/08/04 19:29:57 UTC
svn commit: r428790 - in /tapestry/tapestry5/tapestry-core/trunk/src:
main/java/org/apache/tapestry/ main/java/org/apache/tapestry/internal/
main/java/org/apache/tapestry/internal/ioc/
main/java/org/apache/tapestry/internal/ioc/services/ main/java/org/...
Author: hlship
Date: Fri Aug 4 10:29:55 2006
New Revision: 428790
URL: http://svn.apache.org/viewvc?rev=428790&view=rev
Log:
Create Tapestry 5 versions of HiveMind's Messages interface. This eliminates HiveMind dependencies, except inside the template parsing code.
Convert .properties files to use java.util.Formatter conventions (i.e., %s instead of {0})
Move a couple of implementation files out of public packages and into internal packages.
Added:
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/MessageFormatter.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/Messages.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/MessageFormatterImpl.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/MessagesImpl.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/IdMatcherImpl.java
- copied, changed from r428069, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IdMatcherImpl.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/LogSourceImpl.java
- copied, changed from r428069, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/LogSourceImpl.java
tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/MessageFormatterImplTest.java
tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/MessagesImplTest.java
tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/TargetMessages.java
tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/ioc/LogSourceImplTest.java
- copied, changed from r428069, tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/ioc/LogSourceImplTest.java
tapestry/tapestry5/tapestry-core/trunk/src/test/resources/org/apache/tapestry/internal/TargetStrings.properties
Removed:
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IdMatcherImpl.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/LogSourceImpl.java
tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/ioc/LogSourceImplTest.java
Modified:
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/DecoratorDefImpl.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/IOCMessages.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/ModuleImpl.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/ClassFactoryClassPool.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/ClassFactoryImpl.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/FilterMethodAnalyzer.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/ServiceMessages.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/parser/ParserMessages.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/transform/FieldEncapsulation.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/transform/TransformMessages.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/Orderer.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/UtilMessages.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IOCConstants.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/OrIdMatcher.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/RegistryBuilder.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/ServiceLocator.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/ClassFab.java
tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/UtilMessages.java
tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/ioc/IOCStrings.properties
tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/ioc/services/ServiceStrings.properties
tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/parser/ParserStrings.properties
tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/transform/TransformStrings.properties
tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/util/UtilStrings.properties
tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/util/UtilStrings.properties
tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/ioc/IdMatcherImplTest.java
tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/ioc/services/PropertyAccessImplTest.java
tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/ioc/services/PropertyShadowBuilderImplTest.java
Added: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/MessageFormatter.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/MessageFormatter.java?rev=428790&view=auto
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/MessageFormatter.java (added)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/MessageFormatter.java Fri Aug 4 10:29:55 2006
@@ -0,0 +1,34 @@
+// 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;
+
+/**
+ * Obtained from a {@link org.apache.tapestry.Messages}, used to format messages for a specific
+ * localized message key.
+ *
+ * @author Howard M. Lewis Ship
+ */
+public interface MessageFormatter
+{
+ /**
+ * Formats the message. The arguments are passed to {@link java.util.Formatter} as is with one
+ * exception: Object of type {@link Throwable} are converted to their
+ * {@link Throwable#getMessage()} (or, if that is null, to the name of the class).
+ *
+ * @param args
+ * @return formatted string
+ */
+ String format(Object... args);
+}
Added: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/Messages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/Messages.java?rev=428790&view=auto
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/Messages.java (added)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/Messages.java Fri Aug 4 10:29:55 2006
@@ -0,0 +1,52 @@
+// 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;
+
+/**
+ * Provides access to a messages catalog, a set of properties files that provide localized messages
+ * for a particular locale. The message catalog consists of keys and values and follows the
+ * semantics of a Java {@link java.util.ResourceBundle} with some changes.
+ *
+ * @author Howard M. Lewis Ship
+ */
+public interface Messages
+{
+ /** Returns true if the bundle contains the named key. */
+ boolean contains(String key);
+
+ /**
+ * Returns the localized message for the given key. If catalog does not contain such a key, then
+ * a modified version of the key is returned (converted to upper case and enclosed in brackets).
+ *
+ * @param key
+ * @return localized message for key, or placeholder
+ */
+ String get(String key);
+
+ /**
+ * Returns a formatter for the message, which can be used to substitute arguments (as per
+ * {@link java.util.Formatter}.
+ *
+ * @param key
+ * @return formattable object
+ */
+ MessageFormatter getFormatter(String key);
+
+ /**
+ * Convienience for accessing a formatter and formatting a localized message with arguments.
+ */
+
+ String format(String key, Object... args);
+}
Added: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/MessageFormatterImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/MessageFormatterImpl.java?rev=428790&view=auto
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/MessageFormatterImpl.java (added)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/MessageFormatterImpl.java Fri Aug 4 10:29:55 2006
@@ -0,0 +1,52 @@
+// 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;
+
+import org.apache.tapestry.MessageFormatter;
+
+/**
+ * @author Howard M. Lewis Ship
+ */
+public class MessageFormatterImpl implements MessageFormatter
+{
+ private final String _format;
+
+ public MessageFormatterImpl(String format)
+ {
+ _format = format;
+ }
+
+ public String format(Object... args)
+ {
+ for (int i = 0; i < args.length; i++)
+ {
+ Object arg = args[i];
+
+ if (Throwable.class.isInstance(arg))
+ {
+ Throwable t = (Throwable) arg;
+ String message = t.getMessage();
+
+ args[i] = message != null ? message : t.getClass().getName();
+ }
+ }
+
+ // Might be tempting to create a Formatter object and just keep reusing it ... but
+ // Formatters are not threadsafe.
+
+ return String.format(_format, args);
+ }
+
+}
Added: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/MessagesImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/MessagesImpl.java?rev=428790&view=auto
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/MessagesImpl.java (added)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/MessagesImpl.java Fri Aug 4 10:29:55 2006
@@ -0,0 +1,116 @@
+// 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;
+
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
+import java.util.Set;
+
+import org.apache.tapestry.MessageFormatter;
+import org.apache.tapestry.Messages;
+import org.apache.tapestry.internal.annotations.Concurrent;
+
+import static org.apache.tapestry.util.CollectionFactory.newMap;
+import static org.apache.tapestry.util.CollectionFactory.newSet;
+
+/**
+ * Implementation of {@link org.apache.tapestry.Messages} based around a
+ * {@link java.util.ResourceBundle}.
+ *
+ * @author Howard M. Lewis Ship
+ */
+@Concurrent
+public class MessagesImpl implements Messages
+{
+ private final ResourceBundle _bundle;
+
+ private final Set<String> _keys = newSet();
+
+ /** String key to MF instance. */
+ private Map<String, MessageFormatter> _cache = newMap();
+
+ /**
+ * Finds the messages for a given Messages utility class. Strings the trailing "Messages" and
+ * replaces it with "Strings" to form the base path. Loads the bundle using the default locale,
+ * and the class' class loader.
+ *
+ * @param forClass
+ * @return Messages for the class
+ */
+ public static Messages forClass(Class forClass)
+ {
+ String className = forClass.getName();
+ String stringsClassName = className.replaceAll("Messages$", "Strings");
+
+ ResourceBundle bundle = ResourceBundle.getBundle(
+ stringsClassName,
+ Locale.getDefault(),
+ forClass.getClassLoader());
+
+ return new MessagesImpl(bundle);
+ }
+
+ public MessagesImpl(ResourceBundle bundle)
+ {
+ _bundle = bundle;
+
+ // Our best (threadsafe) chance to determine all the available keys.
+ Enumeration<String> e = _bundle.getKeys();
+ while (e.hasMoreElements())
+ _keys.add(e.nextElement());
+ }
+
+ public boolean contains(String key)
+ {
+ return _keys.contains(key);
+ }
+
+ public String get(String key)
+ {
+ if (_keys.contains(key))
+ return _bundle.getString(key);
+
+ return "[" + key.toUpperCase() + "]";
+ }
+
+ @Concurrent.Read
+ public MessageFormatter getFormatter(String key)
+ {
+ MessageFormatter result = _cache.get(key);
+
+ if (result == null)
+ result = fillInCache(key);
+
+ return result;
+ }
+
+ @Concurrent.Write
+ private MessageFormatter fillInCache(String key)
+ {
+ String format = get(key);
+ MessageFormatter result = new MessageFormatterImpl(format);
+
+ _cache.put(key, result);
+
+ return result;
+ }
+
+ public String format(String key, Object... args)
+ {
+ return getFormatter(key).format(args);
+ }
+}
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/DecoratorDefImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/DecoratorDefImpl.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/DecoratorDefImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/DecoratorDefImpl.java Fri Aug 4 10:29:55 2006
@@ -20,7 +20,6 @@
import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.util.InternalUtils;
import org.apache.tapestry.ioc.IdMatcher;
-import org.apache.tapestry.ioc.IdMatcherImpl;
import org.apache.tapestry.ioc.OrIdMatcher;
import org.apache.tapestry.ioc.ServiceDecorator;
import org.apache.tapestry.ioc.ServiceResources;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/IOCMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/IOCMessages.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/IOCMessages.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/IOCMessages.java Fri Aug 4 10:29:55 2006
@@ -18,8 +18,8 @@
import java.lang.reflect.Type;
import java.util.List;
-import org.apache.hivemind.Messages;
-import org.apache.hivemind.impl.MessageFormatter;
+import org.apache.tapestry.Messages;
+import org.apache.tapestry.internal.MessagesImpl;
import org.apache.tapestry.internal.annotations.Utility;
import org.apache.tapestry.ioc.def.ContributionDef;
import org.apache.tapestry.ioc.def.ServiceDef;
@@ -33,7 +33,7 @@
@Utility
public final class IOCMessages
{
- private static final Messages MESSAGES = new MessageFormatter(IOCMessages.class);
+ private static final Messages MESSAGES = MessagesImpl.forClass(IOCMessages.class);
static String buildMethodConflict(Method conflict, String existing)
{
@@ -64,7 +64,7 @@
public static String builderLocked()
{
- return MESSAGES.getMessage("builder-locked");
+ return MESSAGES.get("builder-locked");
}
public static String moduleIdConflict(String id)
@@ -88,11 +88,6 @@
.format("instantiate-builder-error", builderClass.getName(), moduleId, cause);
}
- static String proxyToString(String serviceId, Class serviceInterface)
- {
- return MESSAGES.format("proxy-to-string", serviceId, serviceInterface.getName());
- }
-
static String builderMethodError(Method method, String serviceId, Throwable cause)
{
return MESSAGES.format("builder-method-error", asString(method), serviceId, cause);
@@ -150,8 +145,12 @@
static String decoratorReturnedWrongType(Method method, String serviceId, Object returned,
Class serviceInterface)
{
- return MESSAGES.format("decorator-returned-wrong-type", new Object[]
- { asString(method), serviceId, returned, serviceInterface.getName() });
+ return MESSAGES.format(
+ "decorator-returned-wrong-type",
+ asString(method),
+ serviceId,
+ returned,
+ serviceInterface.getName());
}
static String creatingService(String serviceId)
@@ -205,15 +204,19 @@
static String contributionWrongValueType(String serviceId, ContributionDef def,
Class actualClass, Class expectedClass)
{
- return MESSAGES.format("contribution-wrong-value-type", new Object[]
- { serviceId, def, actualClass.getName(), expectedClass.getName() });
+ return MESSAGES.format("contribution-wrong-value-type", serviceId, def, actualClass
+ .getName(), expectedClass.getName());
}
static String contributionWrongKeyType(String serviceId, ContributionDef def,
Class actualClass, Class expectedClass)
{
- return MESSAGES.format("contribution-wrong-key-type", new Object[]
- { serviceId, def, actualClass.getName(), expectedClass.getName() });
+ return MESSAGES.format(
+ "contribution-wrong-key-type",
+ serviceId,
+ def,
+ actualClass.getName(),
+ expectedClass.getName());
}
static String tooManyConfigurationParameters(Method method)
Copied: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/IdMatcherImpl.java (from r428069, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IdMatcherImpl.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/IdMatcherImpl.java?p2=tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/IdMatcherImpl.java&p1=tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IdMatcherImpl.java&r1=428069&r2=428790&rev=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IdMatcherImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/IdMatcherImpl.java Fri Aug 4 10:29:55 2006
@@ -12,7 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package org.apache.tapestry.ioc;
+package org.apache.tapestry.internal.ioc;
+
+import org.apache.tapestry.ioc.GlobPatternMatcher;
+import org.apache.tapestry.ioc.IdMatcher;
/**
* Used to match input values (as fully qualified ids) to a pattern. The pattern is split into two
Copied: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/LogSourceImpl.java (from r428069, tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/LogSourceImpl.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/LogSourceImpl.java?p2=tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/LogSourceImpl.java&p1=tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/LogSourceImpl.java&r1=428069&r2=428790&rev=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/LogSourceImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/LogSourceImpl.java Fri Aug 4 10:29:55 2006
@@ -12,10 +12,11 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package org.apache.tapestry.ioc;
+package org.apache.tapestry.internal.ioc;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.tapestry.ioc.LogSource;
/**
* Simple wrapper around {@link org.apache.commons.logging.LogFactory}. The concept here is that
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/ModuleImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/ModuleImpl.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/ModuleImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/ModuleImpl.java Fri Aug 4 10:29:55 2006
@@ -37,6 +37,7 @@
import org.apache.tapestry.ioc.services.MethodSignature;
import org.apache.tapestry.util.BodyBuilder;
+import static java.lang.String.format;
import static org.apache.tapestry.util.CollectionFactory.newList;
import static org.apache.tapestry.util.CollectionFactory.newMap;
import static org.apache.tapestry.util.CollectionFactory.newSet;
@@ -282,9 +283,9 @@
String serviceId = resources.getServiceId();
Class serviceInterface = resources.getServiceInterface();
- String description = IOCMessages.proxyToString(serviceId, serviceInterface);
+ String toString = format("<Proxy for %s(%s)>", serviceId, serviceInterface.getName());
- return createProxyInstance(creator, serviceId, serviceInterface, description);
+ return createProxyInstance(creator, serviceId, serviceInterface, toString);
}
private Object createProxyInstance(ServiceCreator creator, String serviceId,
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/ClassFactoryClassPool.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/ClassFactoryClassPool.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/ClassFactoryClassPool.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/ClassFactoryClassPool.java Fri Aug 4 10:29:55 2006
@@ -29,7 +29,7 @@
/**
* Used to ensure that {@link javassist.ClassPool#appendClassPath(javassist.ClassPath)} is invoked
* with a synchronized lock. Additionally, wraps around a shared
- * {@link org.apache.hivemind.service.impl.ClassFactoryClassLoader}.
+ * {@link org.apache.tapestry.internal.ioc.services.ClassFactoryClassLoader}.
*
* @author Howard Lewis Ship
*/
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/ClassFactoryImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/ClassFactoryImpl.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/ClassFactoryImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/ClassFactoryImpl.java Fri Aug 4 10:29:55 2006
@@ -18,8 +18,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.hivemind.service.ClassFabUtils;
import org.apache.tapestry.ioc.services.ClassFab;
+import org.apache.tapestry.ioc.services.ClassFabUtils;
import org.apache.tapestry.ioc.services.ClassFactory;
/**
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/FilterMethodAnalyzer.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/FilterMethodAnalyzer.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/FilterMethodAnalyzer.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/FilterMethodAnalyzer.java Fri Aug 4 10:29:55 2006
@@ -17,9 +17,9 @@
import org.apache.tapestry.ioc.services.MethodSignature;
/**
- * Used by {@link org.apache.hivemind.lib.pipeline.PipelineAssembler} to analyze service interface
- * methods against filter interface methods to find the position of the extra service parameter (in
- * the filter method).
+ * Used by {@link org.apache.tapestry.internal.ioc.services.PipelineBuilderImpl} to analyze service
+ * interface methods against filter interface methods to find the position of the extra service
+ * parameter (in the filter method).
*
* @author Howard Lewis Ship
*/
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/ServiceMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/ServiceMessages.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/ServiceMessages.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/ioc/services/ServiceMessages.java Fri Aug 4 10:29:55 2006
@@ -16,8 +16,8 @@
import javassist.CtClass;
-import org.apache.hivemind.Messages;
-import org.apache.hivemind.impl.MessageFormatter;
+import org.apache.tapestry.Messages;
+import org.apache.tapestry.internal.MessagesImpl;
import org.apache.tapestry.internal.annotations.Utility;
import org.apache.tapestry.ioc.services.MethodSignature;
import org.apache.tapestry.ioc.services.ThreadCleanupListener;
@@ -28,7 +28,7 @@
@Utility
final class ServiceMessages
{
- private final static Messages MESSAGES = new MessageFormatter(ServiceMessages.class);
+ private final static Messages MESSAGES = MessagesImpl.forClass(ServiceMessages.class);
static String unableToAddMethod(MethodSignature signature, CtClass ctClass, Throwable cause)
{
@@ -103,8 +103,12 @@
static String propertyTypeMismatch(String propertyName, Class sourceClass, Class propertyType,
Class expectedType)
{
- return MESSAGES.format("property-type-mismatch", new Object[]
- { propertyName, sourceClass.getName(), propertyType.getName(), expectedType.getName() });
+ return MESSAGES.format(
+ "property-type-mismatch",
+ propertyName,
+ sourceClass.getName(),
+ propertyType.getName(),
+ expectedType.getName());
}
static String extraFilterMethod(MethodSignature sig, Class filterInterface,
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/parser/ParserMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/parser/ParserMessages.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/parser/ParserMessages.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/parser/ParserMessages.java Fri Aug 4 10:29:55 2006
@@ -14,9 +14,9 @@
package org.apache.tapestry.internal.parser;
-import org.apache.hivemind.Messages;
import org.apache.hivemind.Resource;
-import org.apache.hivemind.impl.MessageFormatter;
+import org.apache.tapestry.Messages;
+import org.apache.tapestry.internal.MessagesImpl;
import org.apache.tapestry.internal.annotations.Utility;
/**
@@ -25,7 +25,7 @@
@Utility
final class ParserMessages
{
- private static final Messages MESSAGES = new MessageFormatter(ParserMessages.class);
+ private static final Messages MESSAGES = MessagesImpl.forClass(ParserMessages.class);
static String newParserError(Resource resource, Throwable cause)
{
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/transform/FieldEncapsulation.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/transform/FieldEncapsulation.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/transform/FieldEncapsulation.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/transform/FieldEncapsulation.java Fri Aug 4 10:29:55 2006
@@ -17,8 +17,7 @@
import javassist.CannotCompileException;
import javassist.expr.FieldAccess;
-import org.apache.hivemind.ApplicationRuntimeException;
-import org.apache.hivemind.util.Defense;
+import static org.apache.tapestry.util.Defense.notNull;
class FieldEncapsulation
{
@@ -28,8 +27,8 @@
FieldEncapsulation(String readMethodName, String writeMethodName)
{
- Defense.notNull(readMethodName, "readMethodName");
- Defense.notNull(writeMethodName, "writeMethodName");
+ notNull(readMethodName, "readMethodName");
+ notNull(writeMethodName, "writeMethodName");
_readMethodName = readMethodName;
_writeMethodName = writeMethodName;
@@ -46,7 +45,7 @@
}
catch (CannotCompileException ex)
{
- throw new ApplicationRuntimeException(ex);
+ throw new RuntimeException(ex);
}
}
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/transform/TransformMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/transform/TransformMessages.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/transform/TransformMessages.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/transform/TransformMessages.java Fri Aug 4 10:29:55 2006
@@ -16,8 +16,8 @@
import javassist.CtClass;
-import org.apache.hivemind.Messages;
-import org.apache.hivemind.impl.MessageFormatter;
+import org.apache.tapestry.Messages;
+import org.apache.tapestry.internal.MessagesImpl;
import org.apache.tapestry.internal.annotations.Utility;
import org.apache.tapestry.transform.MethodSignature;
@@ -27,7 +27,7 @@
@Utility
final class TransformMessages
{
- private static final Messages MESSAGES = new MessageFormatter(TransformMessages.class);
+ private static final Messages MESSAGES = MessagesImpl.forClass(TransformMessages.class);
static String noConstructorFound(Class instanceClass)
{
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/Orderer.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/Orderer.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/Orderer.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/Orderer.java Fri Aug 4 10:29:55 2006
@@ -21,9 +21,9 @@
import org.apache.commons.logging.Log;
import org.apache.tapestry.internal.annotations.OneShot;
import org.apache.tapestry.internal.annotations.SuppressNullCheck;
+import org.apache.tapestry.internal.ioc.IdMatcherImpl;
import org.apache.tapestry.ioc.IOCUtilities;
import org.apache.tapestry.ioc.IdMatcher;
-import org.apache.tapestry.ioc.IdMatcherImpl;
import org.apache.tapestry.ioc.OrIdMatcher;
import org.apache.tapestry.ioc.Orderable;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/UtilMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/UtilMessages.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/UtilMessages.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/UtilMessages.java Fri Aug 4 10:29:55 2006
@@ -16,8 +16,8 @@
import java.net.URL;
-import org.apache.hivemind.Messages;
-import org.apache.hivemind.impl.MessageFormatter;
+import org.apache.tapestry.Messages;
+import org.apache.tapestry.internal.MessagesImpl;
import org.apache.tapestry.internal.annotations.Utility;
/**
@@ -26,7 +26,7 @@
@Utility
final class UtilMessages
{
- private static final Messages MESSAGES = new MessageFormatter(UtilMessages.class);
+ private static final Messages MESSAGES = MessagesImpl.forClass(UtilMessages.class);
static String unableToReadLastModified(URL url, Throwable cause)
{
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IOCConstants.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IOCConstants.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IOCConstants.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IOCConstants.java Fri Aug 4 10:29:55 2006
@@ -25,8 +25,8 @@
public static final String DEFAULT_LIFECYCLE = "singleton";
/**
- * Used to obtain the {@link org.apache.hivemind.service.ClassFactory} service, which is crucial
- * when creating new classes for proxies and the like.
+ * Used to obtain the {@link org.apache.tapestry.ioc.services.ClassFactory} service, which is
+ * crucial when creating runtime classes for proxies and the like.
*/
public static final String CLASS_FACTORY_SERVICE_ID = "tapestry.ioc.ClassFactory";
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/OrIdMatcher.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/OrIdMatcher.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/OrIdMatcher.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/OrIdMatcher.java Fri Aug 4 10:29:55 2006
@@ -21,7 +21,7 @@
*
* @author Howard M. Lewis Ship
*/
-public class OrIdMatcher implements IdMatcher
+public final class OrIdMatcher implements IdMatcher
{
private final IdMatcher[] _matchers;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/RegistryBuilder.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/RegistryBuilder.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/RegistryBuilder.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/RegistryBuilder.java Fri Aug 4 10:29:55 2006
@@ -23,6 +23,7 @@
import org.apache.tapestry.internal.annotations.OneShot;
import org.apache.tapestry.internal.ioc.DefaultModuleDefImpl;
import org.apache.tapestry.internal.ioc.IOCMessages;
+import org.apache.tapestry.internal.ioc.LogSourceImpl;
import org.apache.tapestry.internal.ioc.RegistryImpl;
import org.apache.tapestry.ioc.annotations.SubModule;
import org.apache.tapestry.ioc.def.ModuleDef;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/ServiceLocator.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/ServiceLocator.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/ServiceLocator.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/ServiceLocator.java Fri Aug 4 10:29:55 2006
@@ -16,7 +16,7 @@
/**
* Defines an object which can provide access to services defined within a
- * {@link org.apache.hivemind.Registry}. Services are accessed via service id, or (when
+ * {@link org.apache.tapestry.ioc.Registry}. Services are accessed via service id, or (when
* appropriate) by just service interface. The Registry itself implements this interface, as does
* {@link org.apache.tapestry.ioc.ServiceResources}.
*
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/ClassFab.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/ClassFab.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/ClassFab.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/ClassFab.java Fri Aug 4 10:29:55 2006
@@ -14,8 +14,6 @@
package org.apache.tapestry.ioc.services;
-import org.apache.hivemind.ApplicationRuntimeException;
-
/**
* Used when fabricating a new class. Represents a wrapper around the Javassist library.
* <p>
@@ -69,7 +67,7 @@
* defines the name, return type, parameters and exceptions thrown
* @param body
* The body of the method.
- * @throws ApplicationRuntimeException
+ * @throws RuntimeException
* if a method with that signature has already been added, or if there is a
* Javassist compilation error
*/
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/UtilMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/UtilMessages.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/UtilMessages.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/UtilMessages.java Fri Aug 4 10:29:55 2006
@@ -14,8 +14,8 @@
package org.apache.tapestry.util;
-import org.apache.hivemind.Messages;
-import org.apache.hivemind.impl.MessageFormatter;
+import org.apache.tapestry.Messages;
+import org.apache.tapestry.internal.MessagesImpl;
import org.apache.tapestry.internal.annotations.Utility;
/**
@@ -26,7 +26,7 @@
@Utility
final class UtilMessages
{
- private static final Messages MESSAGES = new MessageFormatter(UtilMessages.class);
+ private static final Messages MESSAGES = MessagesImpl.forClass(UtilMessages.class);
static String parameterWasNull(String parameterName)
{
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/ioc/IOCStrings.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/ioc/IOCStrings.properties?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/ioc/IOCStrings.properties (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/ioc/IOCStrings.properties Fri Aug 4 10:29:55 2006
@@ -12,59 +12,58 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-build-method-conflict=Service building method {0} conflicts with (has the same name as, but different parameters than) \
- previously seen method {1} and has been ignored.
-build-method-wrong-return-type=Method {0} is named like a service builder method, \
- but the return type ({1}) is not acceptible (try an interface). \
+build-method-conflict=Service building method %s conflicts with (has the same name as, but different parameters than) \
+ previously seen method %s and has been ignored.
+build-method-wrong-return-type=Method %s is named like a service builder method, \
+ but the return type (%s) is not acceptible (try an interface). \
The method has been ignored.
-decorator-method-wrong-return-type=Method {0} is named like a service decorator method, \
- but the return type ({1}) is not acceptible (try Object). The method has been ignored.
-missing-service=Service ''{0}'' does not exist.
+decorator-method-wrong-return-type=Method %s is named like a service decorator method, \
+ but the return type (%s) is not acceptible (try Object). The method has been ignored.
+missing-service=Service '%s' does not exist.
builder-locked=The Registry Builder has created the Registry, further operations are not allowed.
-module-id-conflict=Module ''{0}'' has already been defined. The duplicate definition will be ignored.
-no-such-module=Module ''{0}'' does not exist. Please ensure that the JAR file for the module is on the classpath.
-service-wrong-interface=Service ''{0}'' implements interface {1}, which is not compatible with the requested type {2}.
-instantiate-builder-error=Unable to instantiate class {0} as builder for module ''{1}'': {2}
-proxy-to-string=<Proxy for {0}({1})>
-builder-method-error=Error invoking service builder method {0} (for service ''{1}''): {2}
-decorator-method-error=Error invoking service decorator method {0} (for service ''{1}''): {2}
-builder-method-returned-null=Builder method {0} (for service ''{1}'') returned null.
-service-is-private=Service ''{0}'' is private, and may not be referenced outside of its containing module.
-no-service-matches-type=No (visible) service implements the interface {0}.
-many-service-matches=Service interface {0} is matched by {1,number} (visible) services: {2}. \
+module-id-conflict=Module '%s' has already been defined. The duplicate definition will be ignored.
+no-such-module=Module '%s' does not exist. Please ensure that the JAR file for the module is on the classpath.
+service-wrong-interface=Service '%s' implements interface %s, which is not compatible with the requested type %s.
+instantiate-builder-error=Unable to instantiate class %s as builder for module '%s': %s
+builder-method-error=Error invoking service builder method %s (for service '%s'): %s
+decorator-method-error=Error invoking service decorator method %s (for service '%s'): %s
+builder-method-returned-null=Builder method %s (for service '%s') returned null.
+service-is-private=Service '%s' is private, and may not be referenced outside of its containing module.
+no-service-matches-type=No (visible) service implements the interface %s.
+many-service-matches=Service interface %s is matched by %d (visible) services: %s. \
Automatic dependency resolution requires that exactly one service implement the interface.
-unknown-lifecycle=Unknown service lifecycle ''{0}''.
+unknown-lifecycle=Unknown service lifecycle '%s'.
decorator-method-needs-delegate-parameter=Decorator methods must a parameter for the service delegate \
(i.e., the object the created interceptor will delegate to). \
- Method {0} does not include such a parameter, and has been ignored.
-decorator-returned-wrong-type=Decorator method {0} (invoked for service ''{1}'') returned {2}, \
- which is not assignable to the {3} service interface.
-creating-service=Creating service ''{0}''.
-invoking-method=Invoking method {0}.
-recursive-service-build=Construction of service ''{0}'' has failed due to recursion: \
+ Method %s does not include such a parameter, and has been ignored.
+decorator-returned-wrong-type=Decorator method %s (invoked for service '%s') returned %s, \
+ which is not assignable to the %s service interface.
+creating-service=Creating service '%s'.
+invoking-method=Invoking method %s.
+recursive-service-build=Construction of service '%s' has failed due to recursion: \
the service depends on itself in some way. \
- Please check {1} for references to another service that is itself dependent on service ''{0}''.
-contribution-wrong-return-type=Method {0} is named like a service contributor method, \
- but the return type ({1}) is not appropriate (try void). The return value will be ignored.
-too-many-contribution-parameters=Service contribution method {0} contains more than one parameter of type Configuration, \
+ Please check %s for references to another service that is itself dependent on service '%1$s'.
+contribution-wrong-return-type=Method %s is named like a service contributor method, \
+ but the return type (%s) is not appropriate (try void). The return value will be ignored.
+too-many-contribution-parameters=Service contribution method %s contains more than one parameter of type Configuration, \
OrderedConfiguration, or MappedConfiguration. Exactly one such parameter is required for a service contribution method. \
The method has been ignored.
-too-many-configuration-parameters=Service builder method {0} contains more than one parameter of type \
+too-many-configuration-parameters=Service builder method %s contains more than one parameter of type \
Collection, List, or Map. Parameters of this type are the way in which service configuration values, \
collected from service contributor methods, are provided to the service builder. \
Services are only allowed a single configuration. Unexpected results or failures may occur.
-no-contribution-parameter=Service contribution method {0} does not contain a parameter of type \
+no-contribution-parameter=Service contribution method %s does not contain a parameter of type \
Configuration, OrderedConfiguration or MappedConfiguration. This parameter is how the method \
make contributions into the service's configuration. The method has been ignored.
-contribution-method-error=Error invoking service contribution method {0}: {1}
-contribution-was-null=Service contribution (to service ''{0}'', by {1}) was null and has been ignored.
-contribution-key-was-null=Key for service contribution (to service ''{0}'', by {1}) was null and has been ignored.
-contribution-wrong-value-type=Service contribution (to service ''{0}'', by {1}) was an instance of {2}, \
- but {3} was expected. The contribution has been ignored.
-contribution-wrong-key-type=Key for service contribution (to service ''{0}'', by {1}) was an instance of {2}, \
- but {3} was expected. The contribution has been ignored.
-contribution-duplicate-key=Service contribution (to service ''{0}'', by {1}) conflicts with \
- existing contribution (by {2}) and has been ignored.
-generic-type-not-supported=Generic type ''{0}'' is not supported. Only simple parameterized lists are \
+contribution-method-error=Error invoking service contribution method %s: %s
+contribution-was-null=Service contribution (to service '%s', by %s) was null and has been ignored.
+contribution-key-was-null=Key for service contribution (to service '%s', by %s) was null and has been ignored.
+contribution-wrong-value-type=Service contribution (to service '%s', by %s) was an instance of %s, \
+ but %s was expected. The contribution has been ignored.
+contribution-wrong-key-type=Key for service contribution (to service '%s', by %s) was an instance of %s, \
+ but %s was expected. The contribution has been ignored.
+contribution-duplicate-key=Service contribution (to service '%s', by %s) conflicts with \
+ existing contribution (by %s) and has been ignored.
+generic-type-not-supported=Generic type '%s' is not supported. Only simple parameterized lists are \
supported.
-error-building-service=Error building service proxy for service ''{0}'' (at {1}): {2}
\ No newline at end of file
+error-building-service=Error building service proxy for service '%s' (at %s): %s
\ No newline at end of file
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/ioc/services/ServiceStrings.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/ioc/services/ServiceStrings.properties?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/ioc/services/ServiceStrings.properties (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/ioc/services/ServiceStrings.properties Fri Aug 4 10:29:55 2006
@@ -12,19 +12,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-unable-to-add-method=Unable to add method {0} to class {1}: {2}
-unable-to-add-constructor=Unable to add constructor to class {0}: {1}
-unable-to-create-class=Unable to create class {0} as subclass of {1}: {2}
-unable-to-lookup-class=Unable to lookup class {0}: {1}
-unable-to-write-class=Unable to create class {0}: {1}
-duplicate-method-in-class=Attempt to redefine method {0} of class {1}.
-logging-interceptor=<Logging interceptor for {0}({1})>
-thread-cleanup-error=Error invoking listener {0}: {1}
-no-such-property=Class {0} does not contain a property named ''{1}''.
-read-not-supported=Class {0} does not provide an accessor ('getter') method for property ''{1}''.
-write-not-supported=Class {0} does not provide an mutator ('setter') method for property ''{1}''.
-read-failure=Error reading property ''{0}'' of {1}: {2}
-write-failure=Error updating property ''{0}'' of {1}: {2}
-property-type-mismatch=Property ''{0}'' of class {1} is of type {2}, which is not assignable to type {3}.
-extra-filter-method=Method {0} of filter interface {1} does not have a matching method in {2}.
-unmatched-service-method=Method {0} has no match in filter interface {1}.
+unable-to-add-method=Unable to add method %s to class %s: %s
+unable-to-add-constructor=Unable to add constructor to class %s: %s
+unable-to-create-class=Unable to create class %s as subclass of %s: %s
+unable-to-lookup-class=Unable to lookup class %s: %s
+unable-to-write-class=Unable to create class %s: %s
+duplicate-method-in-class=Attempt to redefine method %s of class %s.
+logging-interceptor=<Logging interceptor for %s(%s)>
+thread-cleanup-error=Error invoking listener %s: %s
+no-such-property=Class %s does not contain a property named '%s'.
+read-not-supported=Class %s does not provide an accessor ('getter') method for property '%s'.
+write-not-supported=Class %s does not provide an mutator ('setter') method for property '%s'.
+read-failure=Error reading property '%s' of %s: %s
+write-failure=Error updating property '%s' of %s: %s
+property-type-mismatch=Property '%s' of class %s is of type %s, which is not assignable to type %s.
+extra-filter-method=Method %s of filter interface %s does not have a matching method in %s.
+unmatched-service-method=Method %s has no match in filter interface %s.
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/parser/ParserStrings.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/parser/ParserStrings.properties?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/parser/ParserStrings.properties (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/parser/ParserStrings.properties Fri Aug 4 10:29:55 2006
@@ -12,6 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-new-parser-error=Failure obtaining a SAX parser for resource {0}: {1}
-missing-template-resource=Template resource {0} does not exist.
-template-parse-error=Failure parsing template {0}: {1}
+new-parser-error=Failure obtaining a SAX parser for resource %s: %s
+missing-template-resource=Template resource %s does not exist.
+template-parse-error=Failure parsing template %s: %s
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/transform/TransformStrings.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/transform/TransformStrings.properties?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/transform/TransformStrings.properties (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/transform/TransformStrings.properties Fri Aug 4 10:29:55 2006
@@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-no-constructor-found=Unable to find an applicable constructor for class {0}.
-missing-declared-field=Class {0} does not contain a field named ''{1}''.
-error-adding-method=Error adding method {1} to class {0}: {2}
-field-already-claimed=Field {0} of class {1} is already claimed by {2} and can not be claimed by {3}.
-no-declared-method=Class {1} does not declare method ''{0}''.
-incorrect-class-for-instantiator=Unable to create a component instantiator for class {0} because class {1} was provided instead.
-class-not-transformed=Class {0} was not transformed for use as a component; either it does not have the @ComponentClass annotation, or was not in a package subject to component transformation.
\ No newline at end of file
+no-constructor-found=Unable to find an applicable constructor for class %s.
+missing-declared-field=Class %s does not contain a field named '%s'.
+error-adding-method=Error adding method %s to class %s: %s
+field-already-claimed=Field %s of class %s is already claimed by %s and can not be claimed by %s.
+no-declared-method=Class %s does not declare method '%s'.
+incorrect-class-for-instantiator=Unable to create a component instantiator for class %s because class %s was provided instead.
+class-not-transformed=Class %s was not transformed for use as a component; either it does not have the @ComponentClass annotation, or was not in a package subject to component transformation.
\ No newline at end of file
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/util/UtilStrings.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/util/UtilStrings.properties?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/util/UtilStrings.properties (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/util/UtilStrings.properties Fri Aug 4 10:29:55 2006
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-unable-to-read-last-modified=Unable to read last modified time stamp of resource {0}: {1}
-dependency-cycle=Unable to add ''{0}'' as a dependency of ''{1}'', as that forms a dependency cycle (''{1}'' depends on itself via ''{0}''). The dependency has been ignored.
-duplicate-orderer=Could not add object with duplicate id ''{0}''. The duplicate object has been ignored.
-constraint-format=Could not parse ordering constraint ''{0}'' (for ''{1}''). The constraint has been ignored.
\ No newline at end of file
+unable-to-read-last-modified=Unable to read last modified time stamp of resource %s: %s
+dependency-cycle=Unable to add '%s' as a dependency of '%s', as that forms a dependency cycle ('%<s' depends on itself via '%1$s'). The dependency has been ignored.
+duplicate-orderer=Could not add object with duplicate id '%s'. The duplicate object has been ignored.
+constraint-format=Could not parse ordering constraint '%s' (for '%s'). The constraint has been ignored.
\ No newline at end of file
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/util/UtilStrings.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/util/UtilStrings.properties?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/util/UtilStrings.properties (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/util/UtilStrings.properties Fri Aug 4 10:29:55 2006
@@ -12,5 +12,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-parameter-was-null=Parameter {0} was null.
-parameter-was-blank=Parameter {0} was null or contained only whitespace.
\ No newline at end of file
+parameter-was-null=Parameter %s was null.
+parameter-was-blank=Parameter %s was null or contained only whitespace.
\ No newline at end of file
Added: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/MessageFormatterImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/MessageFormatterImplTest.java?rev=428790&view=auto
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/MessageFormatterImplTest.java (added)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/MessageFormatterImplTest.java Fri Aug 4 10:29:55 2006
@@ -0,0 +1,59 @@
+// 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;
+
+import org.apache.tapestry.internal.test.InternalBaseTestCase;
+import org.testng.annotations.Test;
+
+/**
+ * @author Howard M. Lewis Ship
+ */
+public class MessageFormatterImplTest extends InternalBaseTestCase
+{
+ private String run(String format, Object... args)
+ {
+ return new MessageFormatterImpl(format).format(args);
+ }
+
+ @Test
+ public void standard_args()
+ {
+ assertEquals(run("Tapestry is %s.", "cool"), "Tapestry is cool.");
+ assertEquals(run("Tapestry release #%d.", 5), "Tapestry release #5.");
+ assertEquals(
+ run("%s is %s at version %d.", "Tapestry", "cool", 5),
+ "Tapestry is cool at version 5.");
+ }
+
+ @Test
+ public void throwable_argument()
+ {
+ Throwable t = new RuntimeException("Just didn't feel right.");
+
+ assertEquals(
+ run("%s failed: %s", "Something", t),
+ "Something failed: Just didn't feel right.");
+ }
+
+ @Test
+ public void throwable_argument_with_null_message()
+ {
+ Throwable t = new NullPointerException();
+
+ assertEquals(
+ run("%s failed: %s", "Something", t),
+ "Something failed: java.lang.NullPointerException");
+ }
+}
Added: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/MessagesImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/MessagesImplTest.java?rev=428790&view=auto
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/MessagesImplTest.java (added)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/MessagesImplTest.java Fri Aug 4 10:29:55 2006
@@ -0,0 +1,78 @@
+// 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;
+
+import org.apache.tapestry.MessageFormatter;
+import org.apache.tapestry.Messages;
+import org.apache.tapestry.test.BaseTestCase;
+import org.testng.annotations.Test;
+
+/**
+ * @author Howard M. Lewis Ship
+ */
+public class MessagesImplTest extends BaseTestCase
+{
+ private final Messages _messages = MessagesImpl.forClass(TargetMessages.class);
+
+ @Test
+ public void contains_key()
+ {
+ assertTrue(_messages.contains("no-args"));
+ assertFalse(_messages.contains("xyzzyx"));
+ }
+
+ @Test
+ public void get_message_from_catalog()
+ {
+ assertEquals(_messages.get("no-args"), "No arguments.");
+ assertEquals(_messages.get("something-failed"), "Something failed: %s");
+ }
+
+ @Test
+ public void get_unknown_message_from_catalog()
+ {
+ assertEquals(_messages.get("does-not-exist"), "[DOES-NOT-EXIST]");
+ }
+
+ @Test
+ public void format_message()
+ {
+ assertEquals(_messages.format("result", "good"), "The result is 'good'.");
+ }
+
+ @Test
+ public void get_formatter()
+ {
+ MessageFormatter mf = _messages.getFormatter("result");
+
+ assertEquals(mf.format("great"), "The result is 'great'.");
+ }
+
+ @Test
+ public void formatters_are_cached()
+ {
+ MessageFormatter mf1 = _messages.getFormatter("result");
+ MessageFormatter mf2 = _messages.getFormatter("result");
+
+ assertSame(mf2, mf1);
+ }
+
+ @Test
+ public void format_unknown_key()
+ {
+ assertEquals(_messages.format("rezult", "good"), "[REZULT]");
+ }
+
+}
Added: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/TargetMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/TargetMessages.java?rev=428790&view=auto
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/TargetMessages.java (added)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/TargetMessages.java Fri Aug 4 10:29:55 2006
@@ -0,0 +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.
+
+package org.apache.tapestry.internal;
+
+import org.apache.tapestry.internal.annotations.Utility;
+
+/**
+ * Used with {@link org.apache.tapestry.internal.MessagesImplTest}.
+ *
+ * @author Howard M. Lewis Ship
+ */
+@Utility
+public class TargetMessages
+{
+
+}
Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/ioc/IdMatcherImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/ioc/IdMatcherImplTest.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/ioc/IdMatcherImplTest.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/ioc/IdMatcherImplTest.java Fri Aug 4 10:29:55 2006
@@ -16,7 +16,6 @@
import org.apache.tapestry.internal.test.InternalBaseTestCase;
import org.apache.tapestry.ioc.IdMatcher;
-import org.apache.tapestry.ioc.IdMatcherImpl;
import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
Copied: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/ioc/LogSourceImplTest.java (from r428069, tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/ioc/LogSourceImplTest.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/ioc/LogSourceImplTest.java?p2=tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/ioc/LogSourceImplTest.java&p1=tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/ioc/LogSourceImplTest.java&r1=428069&r2=428790&rev=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/ioc/LogSourceImplTest.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/ioc/LogSourceImplTest.java Fri Aug 4 10:29:55 2006
@@ -12,11 +12,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package org.apache.tapestry.ioc;
+package org.apache.tapestry.internal.ioc;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.tapestry.internal.test.InternalBaseTestCase;
+import org.apache.tapestry.ioc.LogSource;
import org.testng.annotations.Test;
/**
Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/ioc/services/PropertyAccessImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/ioc/services/PropertyAccessImplTest.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/ioc/services/PropertyAccessImplTest.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/ioc/services/PropertyAccessImplTest.java Fri Aug 4 10:29:55 2006
@@ -206,7 +206,7 @@
catch (UnsupportedOperationException ex)
{
assertEquals(ex.getMessage(), "Class " + CLASS_NAME
- + "$Bean does not provide an mutator (setter) method for property 'class'.");
+ + "$Bean does not provide an mutator ('setter') method for property 'class'.");
}
}
@@ -226,7 +226,7 @@
ex.getMessage(),
"Class "
+ CLASS_NAME
- + "$Bean does not provide an accessor (getter) method for property 'writeOnly'.");
+ + "$Bean does not provide an accessor ('getter') method for property 'writeOnly'.");
}
}
Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/ioc/services/PropertyShadowBuilderImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/ioc/services/PropertyShadowBuilderImplTest.java?rev=428790&r1=428789&r2=428790&view=diff
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/ioc/services/PropertyShadowBuilderImplTest.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/ioc/services/PropertyShadowBuilderImplTest.java Fri Aug 4 10:29:55 2006
@@ -156,7 +156,7 @@
ex.getMessage(),
"Class "
+ CLASS_NAME
- + "$FooHolder does not provide an accessor (getter) method for property 'writeOnly'.");
+ + "$FooHolder does not provide an accessor ('getter') method for property 'writeOnly'.");
}
}
}
Added: tapestry/tapestry5/tapestry-core/trunk/src/test/resources/org/apache/tapestry/internal/TargetStrings.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/resources/org/apache/tapestry/internal/TargetStrings.properties?rev=428790&view=auto
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/resources/org/apache/tapestry/internal/TargetStrings.properties (added)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/resources/org/apache/tapestry/internal/TargetStrings.properties Fri Aug 4 10:29:55 2006
@@ -0,0 +1,17 @@
+# 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.
+
+no-args=No arguments.
+something-failed=Something failed: %s
+result=The result is '%s'.
\ No newline at end of file