Skip to content

Automated cleanup refactoring#436

Open
nbauma109 wants to merge 1 commit into
masterfrom
refactor/cleanup
Open

Automated cleanup refactoring#436
nbauma109 wants to merge 1 commit into
masterfrom
refactor/cleanup

Conversation

@nbauma109

Copy link
Copy Markdown
Owner

This pull request contains cleanup changes generated by Eclipse headless cleanup action.

Copilot AI review requested due to automatic review settings July 6, 2026 21:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 317 to +321
try (PreparedStatement link = conn.prepareStatement("""
INSERT INTO jar_locations(root_handle, path, last_modified, file_length, jar_id)
VALUES(?, ?, ?, ?, ?)
VALUES(?, ?, ?, ?, ?)
ON CONFLICT(root_handle, path) DO UPDATE SET
last_modified = excluded.last_modified,
file_length = excluded.file_length,
jar_id = excluded.jar_id""")) { //$NON-NLS-1$
link.setString(1, rootHandle);
link.setString(2, path);
link.setLong(3, lastModified);
link.setLong(4, fileLength);
link.setInt(5, jarId);
link.executeUpdate();
}
return new JarRegistration(jarId, needsIndexing);
last_modified = excluded.last_modified,
Comment on lines +334 to +338
int jarId() {
return jarId;
}

boolean ownsConnection() {
return ownsConnection;
}
boolean ownsConnection() {
Comment on lines 112 to +116
stmt.executeUpdate("""
INSERT INTO jars(id, root_handle, path, last_modified, file_length, runtime_version, file_crc,
content_hash)
VALUES(1, '=canonical', '/tmp/test.jar', 1, 1, 21, 1, 'fixture-hash')"""); //$NON-NLS-1$
stmt.executeUpdate("""
INSERT INTO jar_locations(root_handle, path, last_modified, file_length, jar_id)
VALUES('=canonical', '/tmp/test.jar', 1, 1, 1)"""); //$NON-NLS-1$
stmt.executeUpdate("""
INSERT INTO strings(id, value) VALUES
(1, 'alpha'), (2, 'beta'), (3, 'pkg.beta'), (4, 'pkg.Gamma'),
(5, '=canonical/pkg/Type.class')"""); //$NON-NLS-1$
stmt.executeUpdate("""
INSERT INTO entries(jar_id, kind, declaration, access_flags, type_category,
element_handle_id, name_id, qualified_name_id) VALUES
(1, 1, 0, 0, 0, 5, 1, 1),
(1, 1, 0, 0, 0, 0, 2, 3),
(1, 1, 0, 0, 0, 0, 1, 3),
(1, 1, 0, 0, 0, 0, 4, 4)"""); //$NON-NLS-1$
stmt.executeUpdate("""
Comment on lines +150 to +154
// entries uses integer ids into strings instead of storing text inline,
// cutting per-row size from ~280 bytes (7 text columns) to ~56 bytes (7 ints).
stmt.execute("""
CREATE INDEX IF NOT EXISTS idx_entries_name
ON entries(jar_id, kind, name_id)"""); //$NON-NLS-1$
// Most member entries use the same value for name and
// qualified_name. Their qualified-name lookup is already
// covered by idx_entries_name, so do not duplicate those rows
// in a second, often very large, index. Dropping the old index
// also migrates existing databases on first startup.
stmt.execute("DROP INDEX IF EXISTS idx_entries_qname"); //$NON-NLS-1$
CREATE TABLE IF NOT EXISTS entries (
id INTEGER PRIMARY KEY,
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.96721% with 22 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.48%. Comparing base (0f431ce) to head (22b3015).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
.../nbauma109/decompiler/search/SqliteEntryStore.java 81.51% 8 Missing and 14 partials ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master     #436   +/-   ##
=========================================
  Coverage     69.48%   69.48%           
  Complexity      941      941           
=========================================
  Files           151      151           
  Lines         17307    17307           
  Branches       2392     2392           
=========================================
  Hits          12025    12025           
  Misses         3999     3999           
  Partials       1283     1283           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

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.

2 participants