Author: adietish
Date: 2010-12-22 13:07:43 -0500 (Wed, 22 Dec 2010)
New Revision: 27682
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/FieldMatcher.java
Log:
[JBIDE-7981] set filter to filter in case insensitive manner
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-22 18:07:23
UTC (rev 27681)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/ChangeLog 2010-12-22 18:07:43
UTC (rev 27682)
@@ -1,3 +1,8 @@
+2010-12-22 adietisheim <adietisheim@adietisheim-thinkpad>
+
+ * src/org/jboss/tools/deltacloud/core/FieldMatcher.java (FieldMatcher):
+ [JBIDE-7981] set filter to filter in case insensitive manner
+
2010-12-21 André Dietisheim <adietish(a)redhat.com>
* src/org/jboss/tools/deltacloud/core/client/unmarshal/KeysUnmarshaller.java:
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/FieldMatcher.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/FieldMatcher.java 2010-12-22
18:07:23 UTC (rev 27681)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.core/src/org/jboss/tools/deltacloud/core/FieldMatcher.java 2010-12-22
18:07:43 UTC (rev 27682)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.deltacloud.core;
import java.util.regex.Matcher;
@@ -4,15 +14,19 @@
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
+/**
+ * @author Jeff Johnston
+ * @author André Dietisheim
+ */
public class FieldMatcher implements IFieldMatcher {
private String rule;
private Pattern pattern;
-
+
public FieldMatcher(String rule) throws PatternSyntaxException {
this.rule = rule;
String regexRule = transform(rule);
- pattern = Pattern.compile(regexRule);
+ pattern = Pattern.compile(regexRule, Pattern.CASE_INSENSITIVE);
}
private String transform(String rule) {
@@ -30,13 +44,13 @@
}
return buffer.toString();
}
-
+
@Override
public boolean matches(String input) {
Matcher m = pattern.matcher(input);
return m.matches();
}
-
+
@Override
public String toString() {
return rule;