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

Restricted Identifiers should not be used as Identifiers #1020

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,16 @@ private SelectQuery<Record> findPublicId() {
return query;
}

private Extension toPublicId(Record record) {
private Extension toPublicId(Record row) {
var namespace = new Namespace();
namespace.setId(record.get(NAMESPACE.ID));
namespace.setPublicId(record.get(NAMESPACE.PUBLIC_ID));
namespace.setName(record.get(NAMESPACE.NAME));
namespace.setId(row.get(NAMESPACE.ID));
namespace.setPublicId(row.get(NAMESPACE.PUBLIC_ID));
namespace.setName(row.get(NAMESPACE.NAME));

var extension = new Extension();
extension.setId(record.get(EXTENSION.ID));
extension.setPublicId(record.get(EXTENSION.PUBLIC_ID));
extension.setName(record.get(EXTENSION.NAME));
extension.setId(row.get(EXTENSION.ID));
extension.setPublicId(row.get(EXTENSION.PUBLIC_ID));
extension.setName(row.get(EXTENSION.NAME));
extension.setNamespace(namespace);
return extension;
}
Expand Down Expand Up @@ -148,22 +148,22 @@ private List<Extension> fetch(SelectQuery<Record> query) {
return query.fetch().map(this::toExtension);
}

private Extension toExtension(Record record) {
private Extension toExtension(Record row) {
var extension = new Extension();
extension.setId(record.get(EXTENSION.ID));
extension.setPublicId(record.get(EXTENSION.PUBLIC_ID));
extension.setName(record.get(EXTENSION.NAME));
extension.setAverageRating(record.get(EXTENSION.AVERAGE_RATING));
extension.setReviewCount(record.get(EXTENSION.REVIEW_COUNT));
extension.setDownloadCount(record.get(EXTENSION.DOWNLOAD_COUNT));
extension.setPublishedDate(record.get(EXTENSION.PUBLISHED_DATE));
extension.setLastUpdatedDate(record.get(EXTENSION.LAST_UPDATED_DATE));
extension.setId(row.get(EXTENSION.ID));
extension.setPublicId(row.get(EXTENSION.PUBLIC_ID));
extension.setName(row.get(EXTENSION.NAME));
extension.setAverageRating(row.get(EXTENSION.AVERAGE_RATING));
extension.setReviewCount(row.get(EXTENSION.REVIEW_COUNT));
extension.setDownloadCount(row.get(EXTENSION.DOWNLOAD_COUNT));
extension.setPublishedDate(row.get(EXTENSION.PUBLISHED_DATE));
extension.setLastUpdatedDate(row.get(EXTENSION.LAST_UPDATED_DATE));

var namespace = new Namespace();
namespace.setId(record.get(NAMESPACE.ID));
namespace.setPublicId(record.get(NAMESPACE.PUBLIC_ID));
namespace.setName(record.get(NAMESPACE.NAME));
namespace.setDisplayName(record.get(NAMESPACE.DISPLAY_NAME));
namespace.setId(row.get(NAMESPACE.ID));
namespace.setPublicId(row.get(NAMESPACE.PUBLIC_ID));
namespace.setName(row.get(NAMESPACE.NAME));
namespace.setDisplayName(row.get(NAMESPACE.DISPLAY_NAME));
extension.setNamespace(namespace);

return extension;
Expand Down Expand Up @@ -213,11 +213,11 @@ public List<SitemapRow> fetchSitemapRows() {
.join(EXTENSION).on(EXTENSION.NAMESPACE_ID.eq(NAMESPACE.ID))
.where(EXTENSION.ACTIVE.eq(true))
.fetch()
.map((record) -> {
.map((row) -> {
return new SitemapRow(
record.get(NAMESPACE.NAME),
record.get(EXTENSION.NAME),
record.get(LAST_UPDATED)
row.get(NAMESPACE.NAME),
row.get(EXTENSION.NAME),
row.get(LAST_UPDATED)
);
});
}
Expand Down Expand Up @@ -254,10 +254,10 @@ public List<Extension> findActiveExtensionsForUrls(Namespace namespace) {
.from(EXTENSION)
.where(EXTENSION.NAMESPACE_ID.eq(namespace.getId()))
.and(EXTENSION.ACTIVE.eq(true))
.fetch(record -> {
.fetch(row -> {
var extension = new Extension();
extension.setId(record.get(EXTENSION.ID));
extension.setName(record.get(EXTENSION.NAME));
extension.setId(row.get(EXTENSION.ID));
extension.setName(row.get(EXTENSION.NAME));
extension.setNamespace(namespace);
return extension;
});
Expand Down
Loading