updated parent pom (and fixed issues reported by Checkstyle)
git-svn-id: https://svn.apache.org/repos/asf/maven/doxia/doxia-tools/trunk@1710402 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index 89fce4c..ad25765 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
<parent>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-tools</artifactId>
- <version>2</version>
+ <version>4-SNAPSHOT</version>
<relativePath>../doxia-tools/pom.xml</relativePath>
</parent>
diff --git a/src/main/java/org/apache/maven/doxia/linkcheck/validation/Anchors.java b/src/main/java/org/apache/maven/doxia/linkcheck/validation/Anchors.java
index c29bc82..9bf3803 100644
--- a/src/main/java/org/apache/maven/doxia/linkcheck/validation/Anchors.java
+++ b/src/main/java/org/apache/maven/doxia/linkcheck/validation/Anchors.java
@@ -1,22 +1,24 @@
-/**
- *
- * 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.maven.doxia.linkcheck.validation;
+/*
+ * 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.
+ */
+
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -35,7 +37,8 @@
*/
public static boolean matchesAnchor( String content, String anchor )
{
- if ( content != null && anchor.length() > 0 ) {
+ if ( content != null && anchor.length() > 0 )
+ {
// can use name or id attributes and also can use single or double quotes with whitespace around the =
String regex = "(?i)(name|id)(?-i)\\s*=\\s*('|\")" + escapeBrackets( anchor ) + "('|\")";
Pattern pattern = Pattern.compile( regex );
diff --git a/src/main/java/org/apache/maven/doxia/linkcheck/validation/OnlineHTTPLinkValidator.java b/src/main/java/org/apache/maven/doxia/linkcheck/validation/OnlineHTTPLinkValidator.java
index c3bbb03..87f8a5b 100644
--- a/src/main/java/org/apache/maven/doxia/linkcheck/validation/OnlineHTTPLinkValidator.java
+++ b/src/main/java/org/apache/maven/doxia/linkcheck/validation/OnlineHTTPLinkValidator.java
@@ -151,7 +151,8 @@
// Some web servers don't allow the default user-agent sent by httpClient
System.setProperty( HttpMethodParams.USER_AGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" );
- this.cl.getParams().setParameter( HttpMethodParams.USER_AGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" );
+ this.cl.getParams().setParameter( HttpMethodParams.USER_AGENT,
+ "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" );
String link = lvi.getLink();
String anchor = "";