Author: julien_viet
Date: 2010-02-24 06:47:22 -0500 (Wed, 24 Feb 2010)
New Revision: 1841
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java
Log:
fix xml unmarshalling
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java 2010-02-24
11:39:32 UTC (rev 1840)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java 2010-02-24
11:47:22 UTC (rev 1841)
@@ -51,6 +51,7 @@
import org.jibx.runtime.BindingDirectory;
import org.jibx.runtime.IBindingFactory;
import org.jibx.runtime.IUnmarshallingContext;
+import org.jibx.runtime.impl.UnmarshallingContext;
import java.io.ByteArrayInputStream;
import java.util.Comparator;
@@ -294,8 +295,9 @@
String out = IOUtil.getStreamContentAsString(confManager_.getInputStream(path));
ByteArrayInputStream is = new
ByteArrayInputStream(out.getBytes("UTF-8"));
IBindingFactory bfact = BindingDirectory.getFactory(Container.class);
- IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
- Container container = Container.class.cast(uctx.unmarshalDocument(is, null));
+ UnmarshallingContext uctx =
(UnmarshallingContext)bfact.createUnmarshallingContext();
+ uctx.setDocument(is, null, "UTF-8", false);
+ Container container = (Container)uctx.unmarshalElement();
generateStorageName(container);
return container;
}