https://bz.apache.org/bugzilla/show_bug.cgi?id=61308

            Bug ID: 61308
           Summary: Refactoring of JMeterUtils
           Product: JMeter
           Version: 3.0
          Hardware: PC
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Main
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Hello everyone.
I was analyzing the modularization of some classes, and I identified that the
class JMeterUtils has an opportunity for cohesion improvement. 
The class SaveService was in the same situation and the problem was solved as
follows: The OldSaveService class was created, and several get() and set()
methods that were used only to configure the class parameters were moved from
SaveService to OldSaveService. 
The new class was then accessed through an instance variable in SaveService.
This strategy has cleaned and improved SaveService cohesion.
With this in mind, I would recommend creating a new class: JMeterUtilsConfig ,
and moving the following methods:

getLocalHostDetails
getParsedLabel
getResStringDefault
getJMeterCopyright
getPatternCache
setLocale
getResString
getResourceFileAsText
getSearchPaths
getHashtable
getJMeterHome
getLocale
getPattern
getLocaleString
getProperty
getJMeterBinDir
getMatcher
getVisualizers
getJMeterVersion
getVector
getLocalHostIP
getXMLParser
getPropDefault
getAlias
setProperty
getControllers
getHiDPIScaleFactor
getHiDPIMode
getTestSamples
getImage
setJMeterHome
getJMeterProperties
getLocalHostName
getLocalHostFullName
getRandomInt
getTimers
getProperties

from the JMeterUtils.
Those parameters accessed by an instance variable in the JMeterUtils.
Moreover, the orthogonality is the design would be enhanced.

What do you think about that?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to