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 2011/11/02 00:12:35 UTC

svn commit: r1196381 - in /tapestry/tapestry5/trunk/tapestry-core/src/main: java/org/apache/tapestry5/internal/model/ resources/org/apache/tapestry5/internal/model/

Author: hlship
Date: Tue Nov  1 23:12:34 2011
New Revision: 1196381

URL: http://svn.apache.org/viewvc?rev=1196381&view=rev
Log:
Remove class ModelMessages

Removed:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/ModelMessages.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/internal/model/ModelStrings.properties
Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/MutableComponentModelImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/MutableEmbeddedComponentModelImpl.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/MutableComponentModelImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/MutableComponentModelImpl.java?rev=1196381&r1=1196380&r2=1196381&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/MutableComponentModelImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/MutableComponentModelImpl.java Tue Nov  1 23:12:34 2011
@@ -188,7 +188,7 @@ public final class MutableComponentModel
         if (embeddedComponents == null)
             embeddedComponents = CollectionFactory.newCaseInsensitiveMap();
         else if (embeddedComponents.containsKey(id))
-            throw new IllegalArgumentException(ModelMessages.duplicateComponentId(id, this.componentClassName));
+            throw new IllegalArgumentException(String.format("Embedded component '%s' has already been defined for component class %s.", id, this.componentClassName));
 
         MutableEmbeddedComponentModel embedded = new MutableEmbeddedComponentModelImpl(id, type, componentClassName,
                 this.componentClassName, inheritInformalParameters, location);
@@ -231,7 +231,7 @@ public final class MutableComponentModel
             result = parentModel.getFieldPersistenceStrategy(fieldName);
 
         if (result == null)
-            throw new IllegalArgumentException(ModelMessages.missingPersistentField(fieldName));
+            throw new IllegalArgumentException(String.format("No field persistence strategy has been defined for field '%s'.", fieldName));
 
         return result;
     }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/MutableEmbeddedComponentModelImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/MutableEmbeddedComponentModelImpl.java?rev=1196381&r1=1196380&r2=1196381&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/MutableEmbeddedComponentModelImpl.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/model/MutableEmbeddedComponentModelImpl.java Tue Nov  1 23:12:34 2011
@@ -1,4 +1,4 @@
-// Copyright 2006, 2008, 2009, 2010 The Apache Software Foundation
+// Copyright 2006, 2008, 2009, 2010, 2011 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.
@@ -76,7 +76,7 @@ public class MutableEmbeddedComponentMod
         if (parameters == null)
             parameters = CollectionFactory.newMap();
         else if (parameters.containsKey(name))
-            throw new IllegalArgumentException(ModelMessages.duplicateParameterValue(name, id, declaredClass));
+            throw new IllegalArgumentException(String.format("A value for parameter '%s' of embedded component %s (of component class %s) has already been provided.", name, id, declaredClass));
 
         parameters.put(name, value);
     }
@@ -119,7 +119,7 @@ public class MutableEmbeddedComponentMod
         else
         {
             if (mixinClassNames.contains(mixinClassName))
-                throw new IllegalArgumentException(ModelMessages.duplicateMixin(mixinClassName, id));
+                throw new IllegalArgumentException(String.format("Mixin %s (for component %s) has already been defined.", mixinClassName, id));
         }
 
         mixinClassNames.add(mixinClassName);