amir-jakoby / crawler-commons

Automatically exported from code.google.com/p/crawler-commons
0 stars 0 forks source link

[Sitemaps] Make SiteMapTool simpler by removing the Recursive flag #65

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Currently, we have a "recursive" flag which is always true.

I suggest removing it thus making the code simpler

Original issue reported on code.google.com by avrah...@gmail.com on 23 Jan 2015 at 8:00

GoogleCodeExporter commented 8 years ago

Original comment by avrah...@gmail.com on 23 Jan 2015 at 8:00

GoogleCodeExporter commented 8 years ago
Also add a "return" statement in the case where the number of arguments is less 
than one, so an non-needed NPE will be avoided

Original comment by avrah...@gmail.com on 23 Jan 2015 at 8:04

GoogleCodeExporter commented 8 years ago

Original comment by avrah...@gmail.com on 23 Jan 2015 at 8:09

GoogleCodeExporter commented 8 years ago
Attached a patch

Fixed the NPE issue
Removed the recursive flag
Upgraded javadocs

Original comment by avrah...@gmail.com on 23 Jan 2015 at 8:22

Attachments:

GoogleCodeExporter commented 8 years ago
Not sure that this makes sense

+ System.err.println("Usage: SiteMapTester [URL_TO_TEST] [MIME_TYPE] 
(Optional)");

What is optional? 

Original comment by lewis.mc...@gmail.com on 23 Jan 2015 at 3:34

GoogleCodeExporter commented 8 years ago
I meant that the second argument is optional.

yeah, in second thought it isn't clear.

I checked wikipedia and found the following:
http://en.wikipedia.org/wiki/Command-line_interface

It says the following:
angle brackets for required parameters: ping <hostname>
square brackets for optional parameters: mkdir [-p] <dirname>

So I will change the CLI accordingly.

Did you review the rest of the code ?

Original comment by avrah...@gmail.com on 24 Jan 2015 at 6:14

GoogleCodeExporter commented 8 years ago
Fixed in Revisions: r160/r161

Original comment by avrah...@gmail.com on 25 Jan 2015 at 9:19