Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-2844

PropertyUtil should not silently ignore syntax errors in a property file

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.2.2.0
    • Fix Version/s: None
    • Component/s: Services
    • Labels:
      None
    • Urgency:
      Normal

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dyret Dyre Tjeldvoll
              • Votes:
                1 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: