Skip to content

Commit

Permalink
[router] Refactored several allocation-heavy paths in Alpini (#827)
Browse files Browse the repository at this point in the history
This includes removing Optionals and some stream functions.

Also removed some unused headers from error responses.

Deleted a bunch of unused code and its associated tests.
  • Loading branch information
FelixGV authored Jan 26, 2024
1 parent c7ee0ff commit cb2a0a5
Show file tree
Hide file tree
Showing 66 changed files with 307 additions and 8,306 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;


/**
Expand Down Expand Up @@ -51,8 +50,6 @@ default Headers set(Iterable<Map.Entry<String, String>> entries) {

Iterator<Map.Entry<CharSequence, CharSequence>> iteratorCharSequence();

<T> Optional<T> unwrap(Class<T> type);

Headers EMPTY_HEADERS = new Headers() {
@Override
public boolean isEmpty() {
Expand Down Expand Up @@ -99,11 +96,6 @@ public Iterator<Map.Entry<CharSequence, CharSequence>> iteratorCharSequence() {
return Collections.emptyIterator();
}

@Override
public <T> Optional<T> unwrap(Class<T> type) {
return Optional.empty();
}

@Override
public Iterator<Map.Entry<String, String>> iterator() {
return Collections.emptyIterator();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.linkedin.alpini.router.api;
package com.linkedin.alpini.base.misc;

/**
* @author Antony T Curtis {@literal <[email protected]>}
Expand Down
Loading

0 comments on commit cb2a0a5

Please sign in to comment.