Skip to content

Conversation

dhairya051
Copy link

I have reviewed this project as a University assignment and have gone through a few possibilities of refactoring, mentioning below all of them:

  1. Renaming: In header.java, in header constructor, the spelling of initialCapacity was wrongly mentioned as initialCapactiy.
    In MediaTypeDescriptor.java, I gave a meaningful name to the variable Object o and gave it a name as Object object and replaced where it was used.
  2. Extract Method: In Action.java, from private method parse(), I extracted a method call getTheParameters() which will get the raw parameters as a parameter and process it and give the processes parameters to ease the complexity of parse method.
  3. Pull Up variable: As AbstractDispatcherPool was super class of 2 classes i.e. AgentDispatcherPool and ServerDispatcherPool and this both classes has AtomicLong dispatcherPoolIndex and long dispatcherPoolSize. So I performed Pull Up varaible refactoring and declared them in super class as protected and made them accessible in both sub classes.
  4. Extract Class: I observed "Insufficient Modularization" design smell in ResponseParser.java, So I separated VirtualStateParser from ResponseParser which resulted in eliminating the "Insufficient Modularization" design smell.
  5. Move Variable: In RequestHeader.java, the variable XForwardedFor was declared which was used in only ServerActor.java, so I moved the variable to ServerActor.java class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant