Skip to content

Remove dead code in CTInnerNode#refine#131

Merged
kostis merged 1 commit intomainfrom
remove-dead-code
Jan 28, 2026
Merged

Remove dead code in CTInnerNode#refine#131
kostis merged 1 commit intomainfrom
remove-dead-code

Conversation

@FredrikTaquist
Copy link
Collaborator

The following code

		for (ShortPrefix u : shorts) {
			if (!(u instanceof ShortPrefix)) {
				leaves.get(u).elevatePrefix(u, oracle, inputs);
			}
		}

in the method CTInnerNode#refine does not do anything since it will never be the case that u is not an instance of ShortPrefix. The intent is to make sure that prefixes which are short remain short after being sifted into the classification tree following refinement. Since this is already handled by ClassificationTree#refine, it is not necessary to have that check here. This PR therefore removes the code.

@kostis
Copy link
Collaborator

kostis commented Jan 28, 2026

LGTM.

@kostis kostis merged commit c607431 into main Jan 28, 2026
4 checks passed
@kostis kostis deleted the remove-dead-code branch January 28, 2026 14:02
kostis added a commit that referenced this pull request Feb 2, 2026
kostis added a commit that referenced this pull request Feb 16, 2026
kostis added a commit that referenced this pull request Mar 6, 2026
* Fix some Javadoc comments

* Add missing Override annotations

* Remove a redundant control flow continue statement

* Fix an erroneous boxed primitive equality comparison

* Remove public from methods which are effectively private

* Remove some unnecessary parentheses

* Make a public constant array private

* Remove two unused methods

* Simplify code by using instanceof with a variable

* Add an extra assertion to a test

* Remove or comment out some unnecessary code from tests

* Add a missing toString() call

* Sanitize the compareTo comparison to be zero

It's an implementation detail whether compareTo returns {-1, 0, 1} or
some other value, so all comparisons should be against zero.

* Add missing cases in two switch statements

* Remove unused code from tests

* Remove unused, and often confusing, code

* Use Integer.hashCode() instead of Objects,hashCode()

* Replace uses of LinkedList with ArrayList or ArrayDeque

These libraries are more efficient in most cases.
In a few places where this was not possible, some @SuppressWarning
annotations were used instead.

* Remove the suppression of the BadInstanceof check

* Fix unchecked exceptions in test files

* Remove some unused code after #131

* Suppress warnings of IterableAndIterator

* Suppress warnings of NonApiType(s)

* Convert some statement switches to expression switches

* Substitute comparisons of reference equality by value equality

* Add a missing toString()

* Use String.split() with two arguments instead of one
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