[jboss-cvs] JBossAS SVN: r78215 - trunk/profileservice/src/main/org/jboss/profileservice/management.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Sep 8 18:36:22 EDT 2008
Author: scott.stark at jboss.org
Date: 2008-09-08 18:36:22 -0400 (Mon, 08 Sep 2008)
New Revision: 78215
Modified:
trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
trunk/profileservice/src/main/org/jboss/profileservice/management/messages.properties
Log:
JBAS-5625, require metavalues to be passed in for updates
Modified: trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java 2008-09-08 22:35:15 UTC (rev 78214)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/ManagementViewImpl.java 2008-09-08 22:36:22 UTC (rev 78215)
@@ -912,11 +912,17 @@
// since currently get always returns MetaValue, but we see some cases
// where plain Serializable is enough
Serializable serializable;
- MetaValue metaValue;
Object value = prop.getValue();
- if (value instanceof MetaValue)
+ if ((value instanceof MetaValue) == false)
{
- metaValue = (MetaValue)value;
+ formatter.applyPattern(i18n.getString("ManagementView.InvalidPropertyValue")); //$NON-NLS-1$
+ Object[] args = {prop.getName(), value.getClass()};
+ String msg = formatter.format(args);
+ throw new IllegalArgumentException(msg);
+ }
+ MetaValue metaValue = (MetaValue)value;
+ /*
+ {
MetaType metaType = metaValue.getMetaType();
if (metaType.isSimple())
serializable = ((SimpleValue)metaValue).getValue();
@@ -930,7 +936,8 @@
serializable = (Serializable)value;
metaValue = SimpleValueSupport.wrap(serializable);
}
- ctxProp.setValue(serializable);
+ */
+ ctxProp.setValue(metaValue);
Object componentName = getComponentName(ctxProp);
if (componentName != null)
dispatcher.set(componentName, ctxProp.getName(), metaValue);
Modified: trunk/profileservice/src/main/org/jboss/profileservice/management/messages.properties
===================================================================
--- trunk/profileservice/src/main/org/jboss/profileservice/management/messages.properties 2008-09-08 22:35:15 UTC (rev 78214)
+++ trunk/profileservice/src/main/org/jboss/profileservice/management/messages.properties 2008-09-08 22:36:22 UTC (rev 78215)
@@ -6,4 +6,5 @@
ManagementView.InvalidTemplateKey=Failed to map key: {0} to managed attachments for deployment
ManagementView.InvalidTemplateProperty=Failed to map property: {0} to managed properties for deployment
ManagementView.InvalidTemplatePropertyMO=Property: {0} does not use ManagedObjectImpl
-ManagementView.InvalidComponentName=Name: {0} does not map to existing ManagedComponet in ManagedDeployment: {1}
\ No newline at end of file
+ManagementView.InvalidComponentName=Name: {0} does not map to existing ManagedComponet in ManagedDeployment: {1}
+ManagementView.InvalidPropertyValue=Property: {0} value type is not a MetaValue, type: {1}
More information about the jboss-cvs-commits
mailing list