From 20fd195204065b3b07a339dd6804950026f7a10a Mon Sep 17 00:00:00 2001 From: Dave Brosius Date: Sat, 2 Dec 2023 22:41:29 -0500 Subject: [PATCH] guard against npes, due to both Akka and Pekko not usually used together --- src/main/java/com/mebigfatguy/fbcontrib/detect/AkkaIssues.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/mebigfatguy/fbcontrib/detect/AkkaIssues.java b/src/main/java/com/mebigfatguy/fbcontrib/detect/AkkaIssues.java index 72abebb7..2b19e976 100644 --- a/src/main/java/com/mebigfatguy/fbcontrib/detect/AkkaIssues.java +++ b/src/main/java/com/mebigfatguy/fbcontrib/detect/AkkaIssues.java @@ -98,7 +98,8 @@ public void sawOpcode(int seen) { if ("route".equals(methodName) || "concat".equals(methodName)) { String clsName = getClassConstantOperand(); JavaClass cls = Repository.lookupClass(clsName); - if (cls.instanceOf(akkaRouteDirectivesClass) || cls.instanceOf(pekkoRouteDirectivesClass)) { + if ((hasAkka && cls.instanceOf(akkaRouteDirectivesClass)) + || (hasPekko && cls.instanceOf(pekkoRouteDirectivesClass))) { OpcodeStack.Item itm = null; int bogusSize = -1; if ("route".equals(methodName)) {