Skip to content

Fix domain file ID comparison#212

Merged
mad-sol-dev merged 2 commits into
mainfrom
codex/update-finddomainfilebyid-type-comparison
Nov 25, 2025
Merged

Fix domain file ID comparison#212
mad-sol-dev merged 2 commits into
mainfrom
codex/update-finddomainfilebyid-type-comparison

Conversation

@mad-sol-dev
Copy link
Copy Markdown
Owner

Summary

  • update domain file lookup to compare file IDs using consistent types

Testing

  • mvn -q -DskipTests compile (fails: unable to download maven-resources-plugin due to HTTP 403)

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 2671 to 2674
private DomainFile findDomainFileById(DomainFolder folder, long domainFileId) {
for (DomainFile file : folder.getFiles()) {
if (file.getFileID() == domainFileId) {
if (String.valueOf(domainFileId).equals(file.getFileID())) {
return file;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Domain file lookup always misses by ID

The new comparison in findDomainFileById converts the numeric domainFileId to a String and compares it to file.getFileID(). In the Ghidra API DomainFile.getFileID() returns a long, so this call becomes String.equals(Long), which is always false. As a result, any request that supplies a valid domain_file_id will now fail to find the file and fall through to the warning/null path, breaking ID-based lookups.

Useful? React with 👍 / 👎.

@mad-sol-dev mad-sol-dev merged commit 4659885 into main Nov 25, 2025
@mad-sol-dev mad-sol-dev deleted the codex/update-finddomainfilebyid-type-comparison branch November 25, 2025 10:34
mad-sol-dev added a commit that referenced this pull request Jan 9, 2026
…ebyid-type-comparison

Fix domain file ID comparison
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant