Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BSA mockup for the design doc #2198

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

weiminyu
Copy link
Collaborator

@weiminyu weiminyu commented Oct 27, 2023

This change is Reviewable

@weiminyu weiminyu added the WIP Work in progress. Don't review yet. label Oct 27, 2023
@weiminyu weiminyu force-pushed the bsa-mockup branch 2 times, most recently from e418d3d to 3300559 Compare October 29, 2023 20:45
checkArgument(columns.size() == 2, "Invalid line: [%s]", line);
checkArgument(!Strings.isNullOrEmpty(columns.get(0)), "Missing label in line: [%s]", line);
ImmutableList<Long> orderIds =
ORDER_SPLITTER.splitToStream(line).map(Long::valueOf).collect(toImmutableList());

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException

Potential uncaught 'java.lang.NumberFormatException'.

public static Order deserialize(String text) {
List<String> items = SPLITTER.splitToList(text);
return of(Long.valueOf(items.get(0)), OrderType.valueOf(items.get(1)));

Check notice

Code scanning / CodeQL

Missing catch of NumberFormatException

Potential uncaught 'java.lang.NumberFormatException'.

void addUnblockableDomains(String data) {}

void removeUnblockableDomains(String data) {}

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'data' is never used.

public void reportOrderProcessingStatus(String data) {}

void addUnblockableDomains(String data) {}

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'data' is never used.
return null;
}

public void reportOrderProcessingStatus(String data) {}

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'data' is never used.
this.httpTransport = httpTransport;
}

Stream<String> fetchBlockList(BlockList listName) {

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'listName' is never used.
// Make sure add happens after remove. Ask BSA:
}

private void discoverNewReservedNames(String reservedListName) {

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'reservedListName' is never used.
return null;
}

class LazyBlockList implements Closeable {

Check notice

Code scanning / CodeQL

Inner class could be static

LazyBlockList should be made static, since the enclosing instance is not used.
String idToken =
new Gson()
.fromJson(
new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8),

Check warning

Code scanning / CodeQL

Potential input resource leak

This InputStreamReader is not always closed on method exit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work in progress. Don't review yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant