mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -25,8 +25,6 @@
|
|||||||
package org.alfresco.service.cmr.repository;
|
package org.alfresco.service.cmr.repository;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.nio.charset.Charset;
|
|
||||||
import java.nio.charset.IllegalCharsetNameException;
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
@@ -251,29 +249,6 @@ public class ContentData implements Serializable
|
|||||||
" content URL: " + contentUrl + "\n" +
|
" content URL: " + contentUrl + "\n" +
|
||||||
" mimetype: " + mimetype);
|
" 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user