You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by up...@apache.org on 2003/08/10 21:58:09 UTC
cvs commit: cocoon-2.1/src/java/org/apache/cocoon/environment/commandline LinkSamplingEnvironment.java
upayavira 2003/08/10 12:58:09
Modified: src/java/org/apache/cocoon/environment/commandline
LinkSamplingEnvironment.java
Log:
Make the CLI only report unique link count in a page (previously it reported every link, including repeated links, when using link view)
Should mean that link view and linkGathering both report the same number of links in a page
Revision Changes Path
1.3 +4 -2 cocoon-2.1/src/java/org/apache/cocoon/environment/commandline/LinkSamplingEnvironment.java
Index: LinkSamplingEnvironment.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/environment/commandline/LinkSamplingEnvironment.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LinkSamplingEnvironment.java 12 May 2003 13:26:17 -0000 1.2
+++ LinkSamplingEnvironment.java 10 Aug 2003 19:58:09 -0000 1.3
@@ -114,7 +114,9 @@
String line = buffer.readLine();
if (line == null)
break;
- list.add(line);
+ if (!list.contains(line)) {
+ list.add(line);
+ }
}
} finally {
// explictly close the input
Re: cvs commit: cocoon-2.1/src/java/org/apache/cocoon/environment/commandline
LinkSamplingEnvironment.java
Posted by Joerg Heinicke <jo...@gmx.de>.
upayavira@apache.org wrote:
> upayavira 2003/08/10 12:58:09
>
> Modified: src/java/org/apache/cocoon/environment/commandline
> LinkSamplingEnvironment.java
> Log:
> Make the CLI only report unique link count in a page (previously it reported every link, including repeated links, when using link view)
>
> Should mean that link view and linkGathering both report the same number of links in a page
Why not using a Set then? See patch as attachment.
Joerg