You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@any23.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2014/03/17 08:25:43 UTC

[jira] [Commented] (ANY23-179) Improve Javadoc and throwing of IllegalArgumentException in Any23#createDocumentSource

    [ https://issues.apache.org/jira/browse/ANY23-179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13937508#comment-13937508 ] 

Hudson commented on ANY23-179:
------------------------------

SUCCESS: Integrated in Any23-trunk #963 (See [https://builds.apache.org/job/Any23-trunk/963/])
ANY23-179 Improve Javadoc and throwing of IllegalArgumentException in Any23#createDocumentSource (lewismc: rev c891e7487f5aab4d28fa2c4ebbf4bc2e4888efce)
* core/src/main/java/org/apache/any23/Any23.java


> Improve Javadoc and throwing of IllegalArgumentException in Any23#createDocumentSource
> --------------------------------------------------------------------------------------
>
>                 Key: ANY23-179
>                 URL: https://issues.apache.org/jira/browse/ANY23-179
>             Project: Apache Any23
>          Issue Type: Improvement
>          Components: api
>    Affects Versions: 0.9.0
>            Reporter: Lewis John McGibbney
>            Priority: Minor
>             Fix For: 1.0.0
>
>         Attachments: ANY23-179.patch
>
>
> When one calls  org.apache.any23.Any23.createDocumentSource(String documentURI) we only do the following simple checks 
> documentURI.toLowerCase().startsWith("http:" || 'file:' || 'https:'...
> before picking the appropriate DocumentSource. 
> An improvement on this algorithm would be to add additional code to *attempt* to add the above protocol string's to the beginning of the documentURI after the above checks have been made. This way we carry out the same logical checks, in the same order but also make better attempts to find an appropriate DocumentSource before calling the IllegalArgumentException "Unsupported protocol for document URI: '%s' .", documentURI.
> An example would be if someone were to pass in the following documentURI 
> '/Downloads/github/Scottish-Technical-Standards--Domestic-/html_domestic/domestic/section6'
> In the above case this file happens to reside on the local file system however no 'file:' protocol has been added to the documentURI.



--
This message was sent by Atlassian JIRA
(v6.2#6252)