r1978: Replaced use of sun.misc.BASE64Decoder with org.apache.commons.codec.binary.Base64.

fedorahosted r2017 und hb r283 sind jetzt synchron.

git-svn-id: https://svn.libreccm.org/ccm/trunk@275 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2009-10-04 17:03:07 +00:00
parent e1985286b0
commit 027ab4f252
1 changed files with 13 additions and 13 deletions

View File

@ -18,13 +18,21 @@
*/
package com.arsdigita.formbuilder;
import com.arsdigita.formbuilder.parameters.PersistentParameterListener;
import com.arsdigita.formbuilder.util.FormBuilderUtil;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import org.apache.commons.codec.binary.Base64;
import org.apache.log4j.Logger;
import com.arsdigita.bebop.FormData;
import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.bebop.form.Widget;
import com.arsdigita.bebop.parameters.ParameterModel;
import com.arsdigita.domain.DataObjectNotFoundException;
import com.arsdigita.formbuilder.parameters.PersistentParameterListener;
import com.arsdigita.formbuilder.util.FormBuilderUtil;
import com.arsdigita.persistence.DataAssociation;
import com.arsdigita.persistence.DataAssociationCursor;
import com.arsdigita.persistence.DataObject;
@ -32,14 +40,6 @@ import com.arsdigita.persistence.OID;
import com.arsdigita.persistence.metadata.ObjectType;
import com.arsdigita.util.UncheckedWrapperException;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.Iterator;
import java.util.ArrayList;
import org.apache.log4j.Logger;
/**
* This class is responsible for persisting attributes common to
@ -211,7 +211,7 @@ public abstract class PersistentWidget extends PersistentComponent {
objectStream.writeObject(defaultValue);
// stringValue = new String(byteStream.toByteArray(), "ISO-8859-1");
stringValue = new sun.misc.BASE64Encoder().encode(byteStream.toByteArray());
stringValue = new String(new Base64().encode(byteStream.toByteArray()));
s_log.debug("setDefaultValue serializing object " + defaultValue.toString() +
@ -287,7 +287,7 @@ public abstract class PersistentWidget extends PersistentComponent {
// This is a serialized object - resurrect it
// from the String
java.io.ByteArrayInputStream byteStream =
new java.io.ByteArrayInputStream((new sun.misc.BASE64Decoder()).decodeBuffer(defaultValue));
new java.io.ByteArrayInputStream(new Base64().decode(defaultValue.getBytes()));
//((String)defaultValue).getBytes("ISO-8859-1"));