removed 2 sun-libraries

git-svn-id: https://svn.libreccm.org/ccm/trunk@3586 8810af33-2d31-482b-a856-94f89814c4df
master
konermann 2015-08-26 15:26:38 +00:00
parent 1858a37bae
commit 82013214d9
2 changed files with 8 additions and 13 deletions

View File

@ -22,11 +22,12 @@ import com.arsdigita.util.Assert;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import org.apache.log4j.Logger;
import sun.net.www.protocol.http.HttpURLConnection;
//import sun.net.www.protocol.http.HttpURLConnection;
/**
* HttpHTMLProvider
@ -64,10 +65,8 @@ class HttpHTMLProvider
// setup local request password for possible use in validating
// request
HttpURLConnection con = new HttpURLConnection(url, url.getHost(), url.getPort());
//HttpURLConnection con = (HttpURLConnection) url.openConnection();
//con.setRequestMethod("GET");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("GET");
// set passwords (cookies) on request if required (allows increased
// security)

View File

@ -5,7 +5,6 @@ import com.arsdigita.london.importer.DomainObjectMapper;
import com.arsdigita.cms.BinaryAsset;
import com.arsdigita.cms.CMS;
import com.arsdigita.cms.ContentBundle;
import com.arsdigita.cms.ContentItem;
import com.arsdigita.cms.ContentType;
import com.arsdigita.domain.DomainObject;
@ -37,9 +36,11 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Stack;
import org.apache.commons.codec.DecoderException;
import org.apache.log4j.Logger;
import org.xml.sax.Attributes;
import sun.misc.BASE64Decoder;
//import sun.misc.BASE64Decoder;
import org.apache.commons.codec.binary.Base64;
/**
* Core importer class, handling the <cms:item> XML subblock.
@ -646,16 +647,11 @@ public class ItemParser extends DomainObjectParser {
if (atts != null && atts.get(ENCODING_ATTR) != null) {
String encoding = (String) atts.get(ENCODING_ATTR);
if (ENCODING_BASE64.equals(encoding)) {
BASE64Decoder decoder = new BASE64Decoder();
try {
byte[] content = decoder.decodeBuffer(value);
byte[] content = Base64.decodeBase64(value.getBytes());
dobj.put(key, content);
debugLog("Successfully loaded base64 encoded BLOB"
+ ", length: " + content.length + " bytes");
return;
} catch (IOException ioe) {
throw new UncheckedWrapperException(ioe);
}
} else {
s_log.error("Don't know how to handle encoding: " + encoding);
return;