Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1563

Better parameter validation on StoreCache.pinAll() method

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0-beta2, 2.0.0
    • 2.1.0
    • datacache
    • None

    Description

      Validation of the second parameter on StoreCache.pinAll could be better. Currently, we assume that the list of oids provided are valid ids for the Class instances being cached. But, if the collection of Objects passed in are not actual ids, then we end up reserving spots in the cache that never get utilized.

      /**

      • Pin the data for the given oids to the cache.
        */
        public void pinAll(Class cls, Object... oids);

      Since the Class type is also passed in, we should be able to validate that the oids passed in are valid. At a minimum, checking if they are oids in the first place would be a good catch. Currently, we do nothing.

      Attachments

        Activity

          People

            curtisr7 Richard G. Curtis
            kwsutter Kevin W. Sutter
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: