Uploaded image for project: 'Spring Data Geode'
  1. Spring Data Geode
  2. DATAGEODE-329

Fix GemFireProperties.from(:String) IllegalArgumentException message

    XMLWordPrintable

    Details

      Description

      If GemFireProperties.from("invalid-property") is called with a invalid GemFire Property (as shown) then a MissingFormatArgumentException is thrown.

      java.util.MissingFormatArgumentException: Format specifier '%s'
      	at java.util.Formatter.format(Formatter.java:2519)
      	at java.util.Formatter.format(Formatter.java:2455)
      	at java.lang.String.format(String.java:2940)
      	at org.springframework.data.gemfire.util.RuntimeExceptionFactory.format(RuntimeExceptionFactory.java:163)
      	at org.springframework.data.gemfire.util.RuntimeExceptionFactory.newIllegalArgumentException(RuntimeExceptionFactory.java:63)
      	at org.springframework.data.gemfire.util.RuntimeExceptionFactory.newIllegalArgumentException(RuntimeExceptionFactory.java:47)
      	at org.springframework.data.gemfire.GemFireProperties.lambda$from$1(GemFireProperties.java:164)
          ....
      

      Since the invalid propertyName as not properly supplied to the IllegalArgumentException message of "[%s] is not a valid Apache Geode property" in .orElseThrow(() -> newIllegalArgumentException("[%s] is not a valid Apache Geode property")); as shown here.

        Attachments

          Activity

            People

            Assignee:
            jblum John Blum
            Reporter:
            jblum John Blum
            Last updater:
            Mark Paluch
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: