Low-level encoding checks could possibly require a patch.

Created AR-1546 for this rather than make any assumptions.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6114 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-06-26 22:18:12 +00:00
parent 467bc8d3c8
commit 678dff7539

View File

@@ -25,8 +25,6 @@
package org.alfresco.service.cmr.repository;
import java.io.Serializable;
import java.nio.charset.Charset;
import java.nio.charset.IllegalCharsetNameException;
import java.util.Locale;
import java.util.StringTokenizer;
@@ -251,29 +249,6 @@ public class ContentData implements Serializable
" content URL: " + contentUrl + "\n" +
" mimetype: " + mimetype);
}
// Chekc that the encoding is present if the URL is present
if (encoding == null)
{
throw new IllegalArgumentException("\n" +
"The content encoding must be set whenever the URL is set: \n" +
" content URL: " + contentUrl + "\n" +
" encoding: " + encoding);
}
}
// Check the encoding
if (encoding != null)
{
try
{
Charset.forName(encoding);
}
catch (IllegalCharsetNameException e)
{
throw new IllegalArgumentException("\n" +
"The content encoding is not supported by the server: \n" +
" encoding: " + encoding);
}
}
}