This is an automated email from the ASF dual-hosted git repository. bdelacretaz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-dynamic-include.git
commit 5b022797a9cfcb3652ac690f21e3db3c75e1b21b Author: Bertrand Delacretaz <[email protected]> AuthorDate: Thu May 3 12:23:07 2018 +0200 SLING-7621 - minor tweaks and add missing license headers --- pom.xml | 2 +- .../apache/sling/dynamicinclude/Configuration.java | 4 ++-- .../dynamicinclude/pathmatcher/PathMatcher.java | 18 ++++++++++++++++++ .../pathmatcher/PrefixPathMatcher.java | 18 ++++++++++++++++++ .../dynamicinclude/pathmatcher/RegexPathMatcher.java | 18 ++++++++++++++++++ .../sling/dynamicinclude/ConfigurationTest.java | 20 +++++++++++++++++++- .../dynamicinclude/ConfigurationWhiteboardTest.java | 19 ++++++++++++++++++- 7 files changed, 94 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 6743856..bd61c0d 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ </parent> <artifactId>org.apache.sling.dynamic-include</artifactId> - <version>3.1.0-SNAPSHOT</version> + <version>3.0.1-SNAPSHOT</version> <packaging>bundle</packaging> <name>Apache Sling Dynamic Include</name> diff --git a/src/main/java/org/apache/sling/dynamicinclude/Configuration.java b/src/main/java/org/apache/sling/dynamicinclude/Configuration.java index 2aedebe..f3b80a9 100755 --- a/src/main/java/org/apache/sling/dynamicinclude/Configuration.java +++ b/src/main/java/org/apache/sling/dynamicinclude/Configuration.java @@ -146,10 +146,10 @@ public class Configuration { private PathMatcher choosePathMatcher(String pathPattern) { PathMatcher result; if (pathPattern.startsWith("^")) { - LOG.debug("Configured path value: {} is a regex experession. Picking RegexPathMatcher.", pathPattern); + LOG.debug("Configured path value: {} is a regexp - will use a RegexPathMatcher.", pathPattern); result = new RegexPathMatcher(pathPattern); } else { - LOG.debug("Configured path value: {} is not a regex experession. Picking PrefixPathMatcher.", pathPattern); + LOG.debug("Configured path value: {} is NOT a regexp - will use a PrefixPathMatcher.", pathPattern); result = new PrefixPathMatcher(pathPattern); } return result; diff --git a/src/main/java/org/apache/sling/dynamicinclude/pathmatcher/PathMatcher.java b/src/main/java/org/apache/sling/dynamicinclude/pathmatcher/PathMatcher.java index 9688e03..59a69cc 100644 --- a/src/main/java/org/apache/sling/dynamicinclude/pathmatcher/PathMatcher.java +++ b/src/main/java/org/apache/sling/dynamicinclude/pathmatcher/PathMatcher.java @@ -1,3 +1,21 @@ +/*- + * 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.sling.dynamicinclude.pathmatcher; public interface PathMatcher { diff --git a/src/main/java/org/apache/sling/dynamicinclude/pathmatcher/PrefixPathMatcher.java b/src/main/java/org/apache/sling/dynamicinclude/pathmatcher/PrefixPathMatcher.java index 315d101..cdd1077 100644 --- a/src/main/java/org/apache/sling/dynamicinclude/pathmatcher/PrefixPathMatcher.java +++ b/src/main/java/org/apache/sling/dynamicinclude/pathmatcher/PrefixPathMatcher.java @@ -1,3 +1,21 @@ +/*- + * 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.sling.dynamicinclude.pathmatcher; import org.apache.commons.lang.StringUtils; diff --git a/src/main/java/org/apache/sling/dynamicinclude/pathmatcher/RegexPathMatcher.java b/src/main/java/org/apache/sling/dynamicinclude/pathmatcher/RegexPathMatcher.java index f82a4b7..e52008b 100644 --- a/src/main/java/org/apache/sling/dynamicinclude/pathmatcher/RegexPathMatcher.java +++ b/src/main/java/org/apache/sling/dynamicinclude/pathmatcher/RegexPathMatcher.java @@ -1,3 +1,21 @@ +/*- + * 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.sling.dynamicinclude.pathmatcher; import java.util.regex.Pattern; diff --git a/src/test/java/org/apache/sling/dynamicinclude/ConfigurationTest.java b/src/test/java/org/apache/sling/dynamicinclude/ConfigurationTest.java index 9bdfda3..d430458 100644 --- a/src/test/java/org/apache/sling/dynamicinclude/ConfigurationTest.java +++ b/src/test/java/org/apache/sling/dynamicinclude/ConfigurationTest.java @@ -1,5 +1,23 @@ -package org.apache.sling.dynamicinclude; +/*- + * 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.sling.dynamicinclude; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/src/test/java/org/apache/sling/dynamicinclude/ConfigurationWhiteboardTest.java b/src/test/java/org/apache/sling/dynamicinclude/ConfigurationWhiteboardTest.java index 3208456..c32e4d9 100644 --- a/src/test/java/org/apache/sling/dynamicinclude/ConfigurationWhiteboardTest.java +++ b/src/test/java/org/apache/sling/dynamicinclude/ConfigurationWhiteboardTest.java @@ -1,3 +1,21 @@ +/*- + * 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.sling.dynamicinclude; import static org.apache.sling.dynamicinclude.Configuration.PROPERTY_FILTER_ENABLED; @@ -10,7 +28,6 @@ import static org.mockito.Mockito.when; import java.util.HashMap; import java.util.Map; -import java.util.regex.PatternSyntaxException; import org.apache.sling.api.SlingHttpServletRequest; import org.apache.sling.api.request.RequestPathInfo; import org.junit.Before; -- To stop receiving notification emails like this one, please contact [email protected].
