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

CustomCacheKeyGenerator key generator not hashing class or method names or params #100

Open
brucehyslop opened this issue Nov 19, 2021 · 0 comments · May be fixed by #101
Open

CustomCacheKeyGenerator key generator not hashing class or method names or params #100

brucehyslop opened this issue Nov 19, 2021 · 0 comments · May be fixed by #101

Comments

@brucehyslop
Copy link

The compilation of CustomCacheKeyGenerator.groovy CacheKey.hashCode() and TemporaryGrailsCacheKey.hashCode() implementation into bytecode ignores the targetClassName, targetMethodName & simpleKey

decompiled bytecode:

        public int hashCode() {
            int prime = 31;
            int result = 1;
            int var3 = prime * result;
            boolean var10000;
            if (this.simpleKey == null) {
                var10000 = false;
            } else {
                this.simpleKey.hashCode();
            }

            int var4 = prime * var3;
            if (this.targetClassName == null) {
                var10000 = false;
            } else {
                this.targetClassName.hashCode();
            }

            int var5 = prime * var4;
            if (this.targetMethodName == null) {
                var10000 = false;
            } else {
                this.targetMethodName.hashCode();
            }

            int var6 = prime * var5 + this.targetObjectHashCode;
            return var6;
        } 
@brucehyslop brucehyslop linked a pull request Nov 19, 2021 that will close this issue
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 a pull request may close this issue.

1 participant