summaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorEric Barboni <skygo@apache.org>2014-04-11 01:25:50 +0200
committerEric Barboni <skygo@apache.org>2014-04-11 01:25:50 +0200
commit90c5e0eb20a1369b085dceb02e3f14adaf68ede5 (patch)
tree2129b14f03e6aaeb92a331fec59328cfa817736d /archiva-modules
parentef3ac5c1ee19180f8e1209f8961f07b0567f5226 (diff)
downloadarchiva-90c5e0eb20a1369b085dceb02e3f14adaf68ede5.tar.gz
archiva-90c5e0eb20a1369b085dceb02e3f14adaf68ede5.zip
add for loop
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/docs/RestDocsServlet.java21
1 files changed, 5 insertions, 16 deletions
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/docs/RestDocsServlet.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/docs/RestDocsServlet.java
index 22396bf32..4ee7f3ea3 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/docs/RestDocsServlet.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/docs/RestDocsServlet.java
@@ -34,7 +34,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
-import java.util.Iterator;
/**
* @author Olivier Lamy
@@ -71,17 +70,13 @@ public class RestDocsServlet
Elements links = body.select( "a[href]" );
- for ( Iterator<Element> elementIterator = links.iterator(); elementIterator.hasNext(); )
- {
- Element link = elementIterator.next();
+ for ( Element link : links ) {
link.attr( "href", "#" + startPath + "/" + link.attr( "href" ) );
}
Elements codes = body.select( "code" );
- for ( Iterator<Element> elementIterator = codes.iterator(); elementIterator.hasNext(); )
- {
- Element code = elementIterator.next();
+ for ( Element code : codes ) {
code.attr( "class", code.attr( "class" ) + " nice-code" );
}
@@ -89,25 +84,19 @@ public class RestDocsServlet
Elements headers = body.select( "h1" );
- for ( Iterator<Element> elementIterator = headers.iterator(); elementIterator.hasNext(); )
- {
- Element header = elementIterator.next();
+ for ( Element header : headers ) {
header.tagName( "h3" );
}
headers = body.select( "h2" );
- for ( Iterator<Element> elementIterator = headers.iterator(); elementIterator.hasNext(); )
- {
- Element header = elementIterator.next();
+ for ( Element header : headers ) {
header.tagName( "h4" );
}
headers = body.select( "h3" );
- for ( Iterator<Element> elementIterator = headers.iterator(); elementIterator.hasNext(); )
- {
- Element header = elementIterator.next();
+ for ( Element header : headers ) {
header.tagName( "h5" );
}