Skip to content

Comments

extract additional methods in SecurityHandler to reduce checks number#424

Open
valerybokov wants to merge 1 commit intoapache:trunkfrom
valerybokov:refactor-SecurityHandler
Open

extract additional methods in SecurityHandler to reduce checks number#424
valerybokov wants to merge 1 commit intoapache:trunkfrom
valerybokov:refactor-SecurityHandler

Conversation

@valerybokov
Copy link

I've extracted several methods because the decryptDictionary(COSDictionary, long, long) method has type checks (old code, line 616), and the decrypt(COSBase, long, long) method has the same type checks. So, there is double type check in the code. The new implementation of the decryptDictionary method calls overloads of the decrypt method for each type (COSString, COSArray, COSDictionary) to avoid double type check.

Perhaps all of these new methods should be made public (or all of them private). You're the one in charge.

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.

1 participant