Uploaded image for project: 'Commons RNG'
  1. Commons RNG
  2. RNG-53

Prevent bad usage of internal class

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.1
    • sampling

    Description

      There are two issues with class SamplerBase class (in package o.a.c.rng.sampling.distribution):

      1. It allows inheritance.
      2. It introduces in the (protected) API methods that were meant for internal use only.

      By creating a subclass of SamplerBase, an application developer can access more methods than the intended API (i.e. the sample() method).

      A clean fix would involve a BC breaking of no consequence on bona fide users of the API (as there is no reason to call the protected methods from outside the package were the samplers are defined).

      A discussion is taking place on the ML.

      Attachments

        Activity

          People

            Unassigned Unassigned
            erans Gilles Sadowski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: