Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4156

ReflectiveRelMetadataProvider constructor should throw an exception (instead of assertion) when called with an empty map

    XMLWordPrintableJSON

    Details

      Description

      ReflectiveRelMetadataProvider's constructor verifies that it is not created with an empty map, using an assertion. However, this is not the most reliable way of verifying this situation, since assertions can be deactivated. In such scenario, we could silently end up having an invalid ReflectiveRelMetadataProvider, with no actual methods attached.
      Also, since the map is private and has no getter, there is no way for a caller module to verify this situation on its side.
      For this reason, it is proposed a minor change: replace the assertion with an IllegalArgumentException, which will work in 100% of the cases and will always prevent constructing an invalid ReflectiveRelMetadataProvider.

        Attachments

          Activity

            People

            • Assignee:
              rubenql Ruben Q L
              Reporter:
              rubenql Ruben Q L
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 50m
                1h 50m