Skip to content

Commit b8f0621

Browse files
devondragonclaude
andcommitted
Fix deprecated RoleHierarchyImpl.fromHierarchy() API usage
Replace deprecated RoleHierarchyImpl.fromHierarchy() with the new constructor and setHierarchy() method to eliminate compilation warnings. - Changed from: RoleHierarchyImpl.fromHierarchy(hierarchyString) - Changed to: new RoleHierarchyImpl() + setHierarchy(hierarchyString) - All tests pass, functionality unchanged 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 823e25e commit b8f0621

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/digitalsanctuary/spring/user/security/WebSecurityConfig.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,8 @@ public RoleHierarchy roleHierarchy() {
266266
log.error("WebSecurityConfig.roleHierarchy: rolesAndPrivilegesConfig.getRoleHierarchyString() is null!");
267267
return null;
268268
}
269-
RoleHierarchyImpl roleHierarchy = RoleHierarchyImpl.fromHierarchy(rolesAndPrivilegesConfig.getRoleHierarchyString());
269+
RoleHierarchyImpl roleHierarchy = new RoleHierarchyImpl();
270+
roleHierarchy.setHierarchy(rolesAndPrivilegesConfig.getRoleHierarchyString());
270271
log.debug("WebSecurityConfig.roleHierarchy: roleHierarchy: {}", roleHierarchy.toString());
271272
return roleHierarchy;
272273
}

0 commit comments

Comments
 (0)