Skip to content

Code cleanup and optimization#355

Merged
ok2c merged 5 commits into
apache:masterfrom
jkmcl:cleanup2
Jul 2, 2022
Merged

Code cleanup and optimization#355
ok2c merged 5 commits into
apache:masterfrom
jkmcl:cleanup2

Conversation

@jkmcl
Copy link
Copy Markdown
Contributor

@jkmcl jkmcl commented Jul 1, 2022

  • Make 2 public static fields final
  • Remove 1 unused private static final field
  • Replace Stack with LinkedList

jkmcl added 3 commits July 1, 2022 23:24
Replace Stack with LinkedList for better performance. Stack extends
Vector which is synchronized and LinkedList is not.
Comment thread httpcore5/src/main/java/org/apache/hc/core5/net/URIBuilder.java
@jkmcl jkmcl requested a review from michael-o July 1, 2022 16:52
* The minimum (shortest-lived) deadline.
*/
public static Deadline MIN_VALUE = new Deadline(INTERNAL_MIN_VALUE);
public static final Deadline MIN_VALUE = new Deadline(INTERNAL_MIN_VALUE);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jkmcl This breaks binary compatibility. See build failure in Travis C. URIBuilder optimization looks good, but two first commits look useless. Please drop them.

Copy link
Copy Markdown
Contributor Author

@jkmcl jkmcl Jul 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ok2c Sure, I've reverted those 2 commits. Please consider making Deadline.MIN_VALUE and Deadline.MAX_VALUE final in the future when the API is revised. Thanks

@jkmcl jkmcl requested a review from ok2c July 2, 2022 02:13
@ok2c ok2c merged commit 86ccd9b into apache:master Jul 2, 2022
@jkmcl jkmcl deleted the cleanup2 branch July 8, 2022 16:29
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.

3 participants