db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dyre Tjeldvoll (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2844) PropertyUtil should not silently ignore syntax errors in a property file
Date Wed, 20 Jun 2007 08:49:25 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12506454
] 

Dyre Tjeldvoll commented on DERBY-2844:
---------------------------------------

Actually, this problems shows up in more than one place. It is also present in 
org/apache/derby/impl/store/raw/data/BaseDataFileFactory.getIntParameter(
String      parameterName, 
    Properties  properties, 
    int         defaultValue, 
    int         minimumValue, 
    int         maximumValue) 
  
And this is what causes the pageCacheSize setting to be silently modified.

> PropertyUtil should not silently ignore syntax errors in a property file
> ------------------------------------------------------------------------
>
>                 Key: DERBY-2844
>                 URL: https://issues.apache.org/jira/browse/DERBY-2844
>             Project: Derby
>          Issue Type: Improvement
>          Components: Services
>    Affects Versions: 10.2.2.0
>            Reporter: Dyre Tjeldvoll
>
> public static int handleInt(String value, int min, int max, int defaultValue) 
> will silently catch a NumberFormatException if there is a syntax error in the property
value string.
> It should either throw an exception 
> (as public static int intPropertyValue(String p, Serializable v, int minValue, int maxValue,
int defaultValue) throws StandardException) does, or at least 
> print a warning about the property being ignored and the default value being substituted.
> Currently, if you put the following in your derby.properties (which is not that unreasonable):
> derby.storage.pageCacheSize=25000  # Need a bigger page cache
> you get the default value of 1000, with absolutely no warning.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message