You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Mark Vedder (JIRA)" <ji...@apache.org> on 2016/03/02 23:46:18 UTC
[jira] [Updated] (CONFIGURATION-620) User Guide: Invalid Code
Example
[ https://issues.apache.org/jira/browse/CONFIGURATION-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Vedder updated CONFIGURATION-620:
--------------------------------------
Attachment: CONFIGURATION-620.patch
Attaching patch file.
> User Guide: Invalid Code Example
> --------------------------------
>
> Key: CONFIGURATION-620
> URL: https://issues.apache.org/jira/browse/CONFIGURATION-620
> Project: Commons Configuration
> Issue Type: Bug
> Components: Documentation
> Affects Versions: 2.0-beta2
> Reporter: Mark Vedder
> Priority: Minor
> Labels: documentation, patch
> Attachments: CONFIGURATION-620.patch
>
>
> The first and third code examples on the _File-based Configurations_ page ({{howto_filebased.xml}}) are invalid. Both example create a {{FileBasedConfigurationBuilder}} with a Type parameter of {{Configuration}}:
> {code:java}
> FileBasedConfigurationBuilder<Configuration> builder =
> new FileBasedConfigurationBuilder<Configuration>(PropertiesConfiguration.class)
> . . .
> {code}
> However, the {{Configuration}} Type parameter is not within bounds of the {{FileBasedConfigurationBuilder}} class since the parameter must extend {{FileBasedConfiguration}}:
> {code:java}
> public class FileBasedConfigurationBuilder<T extends FileBasedConfiguration> extends BasicConfigurationBuilder<T>
> {code}
> Thus the examples need to be changed to:
> {code:java}
> FileBasedConfigurationBuilder<FileBasedConfiguration> builder =
> new FileBasedConfigurationBuilder<FileBasedConfiguration>(PropertiesConfiguration.class)
> . . .
> {code}
> I will attach a patch with the necessary corrections.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)