Uploaded image for project: 'Joshua (Retired)'
  1. Joshua (Retired)
  2. JOSHUA-293

EdgePhraseSimilarityFF suffers from poor design

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • 6.2
    • None
    • None

    Description

      aside: should a "cleanup" category or similar be used for these?

      EdgePhraseSimilarityFF opens resources that cannot be closed:

      • There is no method that attempts to clean up or close the resources opened
      • There is no implementation of AutoCloseable or similar to indicate that resources need to be closed
      • It is only ever instantiated via reflection, so the interface used will never allow the AutoCloseable interface (should it be added) to be seen

      Additionally, it tries to read a host/port from configuration, but this will always fail if a second object is invoked with the exact same config as the socket will be in use already. It explicitly overrides Cloneable, however, which is odd, given that it will almost certainly fail.

      Perhaps the functionality desired with the socket and readers should be moved to another class that takes in an EdgePhraseSimilarityFF object as a parameter and properly handles the management of resources.

      Attachments

        Activity

          People

            Unassigned Unassigned
            maxthomas Max Thomas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: