geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwo...@apache.org
Subject svn commit: r884001 - /geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/codec/BPNullMetadata.java
Date Wed, 25 Nov 2009 07:20:25 GMT
Author: rwonly
Date: Wed Nov 25 07:20:24 2009
New Revision: 884001

URL: http://svn.apache.org/viewvc?rev=884001&view=rev
Log:
update BPNullMetadata, thanks Siqi for the patch!

Modified:
    geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/codec/BPNullMetadata.java

Modified: geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/codec/BPNullMetadata.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/codec/BPNullMetadata.java?rev=884001&r1=884000&r2=884001&view=diff
==============================================================================
--- geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/codec/BPNullMetadata.java
(original)
+++ geronimo/sandbox/rex/org.apache.geronimo.blueprint.jmx.impl/src/main/java/org/apache/geronimo/blueprint/jmx/impl/codec/BPNullMetadata.java
Wed Nov 25 07:20:24 2009
@@ -1,17 +1,29 @@
 package org.apache.geronimo.blueprint.jmx.impl.codec;
 
 import javax.management.openmbean.CompositeData;
+import javax.management.openmbean.CompositeDataSupport;
+import javax.management.openmbean.OpenDataException;
 
+import org.apache.geronimo.blueprint.jmx.BlueprintMetadataMBean;
 import org.osgi.service.blueprint.reflect.NullMetadata;
 
 public class BPNullMetadata implements BPMetadata, TransferObject {
-    public BPNullMetadata(CompositeData component) {
+    public BPNullMetadata(CompositeData Null) {
+    	//do nothing ?
     }
 
-    public BPNullMetadata(NullMetadata component) {
+    public BPNullMetadata(NullMetadata Null) {
+    	//do nothing ?
     }
 
     public CompositeData asCompositeData() {
-        return null;
+        try {
+			return new CompositeDataSupport(
+					BlueprintMetadataMBean.NULL_METADATA_TYPE,
+					new String[]{BlueprintMetadataMBean.PLACEHOLDER},
+					new Object[]{null});
+		} catch (OpenDataException e) {
+			throw new RuntimeException(e);
+		}
     }
 }



Mime
View raw message