Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0-beta2
-
Patch
Description
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:
FileBasedConfigurationBuilder<Configuration> builder =
new FileBasedConfigurationBuilder<Configuration>(PropertiesConfiguration.class)
. . .
However, the Configuration Type parameter is not within bounds of the FileBasedConfigurationBuilder class since the parameter must extend FileBasedConfiguration:
public class FileBasedConfigurationBuilder<T extends FileBasedConfiguration> extends BasicConfigurationBuilder<T>
Thus the examples need to be changed to:
FileBasedConfigurationBuilder<FileBasedConfiguration> builder =
new FileBasedConfigurationBuilder<FileBasedConfiguration>(PropertiesConfiguration.class)
. . .
I will attach a patch with the necessary corrections.