Skip to content

Commit

Permalink
Avoid NPE when warning generated for multiply injected rule - fixes B…
Browse files Browse the repository at this point in the history
…YTEMAN-424
  • Loading branch information
adinn committed Oct 3, 2022
1 parent 5647147 commit a9ea95c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agent/src/main/java/org/jboss/byteman/agent/RuleScript.java
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ public synchronized boolean recordCompile(Rule rule, String triggerClass, ClassL
for (Transform transform : transformSet.getTransforms()) {
// transform may not employ the same rule
// but it may have the same key.
if(transform.getRule().getKey() == rule.getKey()) {
Rule transformRule = transform.getRule();
if (transformRule != null && transformRule.getKey() == rule.getKey()) {
transform.setCompiled(successful, detail);
boolean isInstalled = transformSet.isInstalled();
// record this as the latest rule to be installed
Expand Down

0 comments on commit a9ea95c

Please sign in to comment.