You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by cs...@apache.org on 2016/10/04 17:04:30 UTC
[1/2] aries-rsa git commit: [ARIES-1623] Fix for inner class not
matching pattern
Repository: aries-rsa
Updated Branches:
refs/heads/master 475f01328 -> b2e1d8711
[ARIES-1623] Fix for inner class not matching pattern
Project: http://git-wip-us.apache.org/repos/asf/aries-rsa/repo
Commit: http://git-wip-us.apache.org/repos/asf/aries-rsa/commit/e41310ac
Tree: http://git-wip-us.apache.org/repos/asf/aries-rsa/tree/e41310ac
Diff: http://git-wip-us.apache.org/repos/asf/aries-rsa/diff/e41310ac
Branch: refs/heads/master
Commit: e41310ac80eabd13e249161f930512eb64a500b6
Parents: 475f013
Author: David Norris <Hi...@gmail.com>
Authored: Fri Jun 24 17:00:52 2016 -0400
Committer: Christian Schneider <ch...@die-schneider.net>
Committed: Tue Oct 4 19:02:36 2016 +0200
----------------------------------------------------------------------
.../apache/aries/rsa/topologymanager/importer/FilterHelper.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/e41310ac/topology-manager/src/main/java/org/apache/aries/rsa/topologymanager/importer/FilterHelper.java
----------------------------------------------------------------------
diff --git a/topology-manager/src/main/java/org/apache/aries/rsa/topologymanager/importer/FilterHelper.java b/topology-manager/src/main/java/org/apache/aries/rsa/topologymanager/importer/FilterHelper.java
index 480ae46..77b0abb 100644
--- a/topology-manager/src/main/java/org/apache/aries/rsa/topologymanager/importer/FilterHelper.java
+++ b/topology-manager/src/main/java/org/apache/aries/rsa/topologymanager/importer/FilterHelper.java
@@ -20,11 +20,10 @@ package org.apache.aries.rsa.topologymanager.importer;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-
import org.osgi.framework.Constants;
public final class FilterHelper {
- private static final String OBJECTCLASS_EXPRESSION = ".*\\(" + Constants.OBJECTCLASS + "=([a-zA-Z_0-9.]+)\\).*";
+ private static final String OBJECTCLASS_EXPRESSION = ".*\\(" + Constants.OBJECTCLASS + "=([^)]+)\\).*";
private static final Pattern OBJECTCLASS_PATTERN = Pattern.compile(OBJECTCLASS_EXPRESSION);
private FilterHelper() {
[2/2] aries-rsa git commit: [ARIES-1623] Add test for inner class
Posted by cs...@apache.org.
[ARIES-1623] Add test for inner class
Project: http://git-wip-us.apache.org/repos/asf/aries-rsa/repo
Commit: http://git-wip-us.apache.org/repos/asf/aries-rsa/commit/b2e1d871
Tree: http://git-wip-us.apache.org/repos/asf/aries-rsa/tree/b2e1d871
Diff: http://git-wip-us.apache.org/repos/asf/aries-rsa/diff/b2e1d871
Branch: refs/heads/master
Commit: b2e1d8711123c7b481e51fd45fd364dc0f02a48f
Parents: e41310a
Author: Christian Schneider <ch...@die-schneider.net>
Authored: Tue Oct 4 19:04:13 2016 +0200
Committer: Christian Schneider <ch...@die-schneider.net>
Committed: Tue Oct 4 19:04:13 2016 +0200
----------------------------------------------------------------------
.../importer/FilterHelperTest.java | 45 ++++++++++++++++++++
1 file changed, 45 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/b2e1d871/topology-manager/src/test/java/org/apache/aries/rsa/topologymanager/importer/FilterHelperTest.java
----------------------------------------------------------------------
diff --git a/topology-manager/src/test/java/org/apache/aries/rsa/topologymanager/importer/FilterHelperTest.java b/topology-manager/src/test/java/org/apache/aries/rsa/topologymanager/importer/FilterHelperTest.java
new file mode 100644
index 0000000..5644073
--- /dev/null
+++ b/topology-manager/src/test/java/org/apache/aries/rsa/topologymanager/importer/FilterHelperTest.java
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.rsa.topologymanager.importer;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class FilterHelperTest {
+
+ @Test
+ public void testClass() {
+ testWithClassName(FilterHelperTest.class.getName());
+ }
+
+ @Test
+ public void testInnerClass() {
+ testWithClassName(InnerClass.class.getName());
+ }
+
+ private void testWithClassName(String className) {
+ String filter = String.format("(objectClass=%s)", className);
+ String objClass = FilterHelper.getObjectClass(filter);
+ Assert.assertEquals(className, objClass);
+ }
+
+ class InnerClass {
+ }
+
+}