From 81a0f0dc2f8c2516dff28de6edb9264d3b7267a9 Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Thu, 11 May 2006 11:19:16 +0000 Subject: [PATCH] Attempt to reinstate some of the invalid character tests git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2839 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/dictionary/constraint/ConstraintsTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/java/org/alfresco/repo/dictionary/constraint/ConstraintsTest.java b/source/java/org/alfresco/repo/dictionary/constraint/ConstraintsTest.java index 633266eaa9..8d6f34c0fc 100644 --- a/source/java/org/alfresco/repo/dictionary/constraint/ConstraintsTest.java +++ b/source/java/org/alfresco/repo/dictionary/constraint/ConstraintsTest.java @@ -16,6 +16,7 @@ */ package org.alfresco.repo.dictionary.constraint; +import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -23,6 +24,7 @@ import java.util.List; import junit.framework.TestCase; +import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.i18n.I18NUtil; import org.alfresco.repo.dictionary.DictionaryDAOTest; import org.alfresco.service.cmr.dictionary.Constraint; @@ -38,6 +40,7 @@ import org.alfresco.service.cmr.dictionary.DictionaryException; * * @author Derek Hulley */ +@SuppressWarnings("unused") public class ConstraintsTest extends TestCase { @Override @@ -229,10 +232,8 @@ public class ConstraintsTest extends TestCase public void testRegexConstraintFilename() throws Exception { // we assume UTF-8 - String expression = ".*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|\\xA3\\xAC\\%\\&\\+\\;]+.*"; - String invalidChars = "\"*\\>\\<\\?\\/\\:\\|\\¬\\£\\%\\&\\+\\;]+.*".getBytes("UTF-8")); + String invalidChars = new String("\"*\\>