This is an automated email from the ASF dual-hosted git repository.
lprimak pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shiro.git
The following commit(s) were added to refs/heads/main by this push:
new 141a13d9 bugfix(Jakarta EE): Jetty without CDI should not fail on
initialization
141a13d9 is described below
commit 141a13d9bd7db5c6172bdc8b921ebc541f953bd1
Author: lprimak <[email protected]>
AuthorDate: Wed Mar 15 01:22:33 2023 -0400
bugfix(Jakarta EE): Jetty without CDI should not fail on initialization
---
.../src/main/java/org/apache/shiro/ee/listeners/IniEnvironment.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/listeners/IniEnvironment.java
b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/listeners/IniEnvironment.java
index 8545f856..512a1399 100644
---
a/support/jakarta-ee/src/main/java/org/apache/shiro/ee/listeners/IniEnvironment.java
+++
b/support/jakarta-ee/src/main/java/org/apache/shiro/ee/listeners/IniEnvironment.java
@@ -65,7 +65,8 @@ public class IniEnvironment extends IniWebEnvironment {
}
private byte[] generateCipherKey() {
- var cipherKeySupplier =
Beans.getReference(CipherKeySupplier.class);
+ var cipherKeySupplier = Beans.getManager() == null ? null
+ : Beans.getReference(CipherKeySupplier.class);
if (cipherKeySupplier == null || isBlank(cipherKeySupplier.get()))
{
return cipherService.get().generateNewKey().getEncoded();
} else {