On Mon, 25 Nov 2024 07:45:01 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> Updates to the java.xml module following the SecurityManager removal. >> Refactor to remove doPrivilege calls >> Refactor to eliminate dead code assuming getSecurityManager() == null >> Refactor to drop use of AccessControlContext >> Remove (most) references to SecurityException >> Remove error messages that refer to security manager. >> Update copyrights and @LastModified dates >> >> Each commit focuses on a particular kind of change (if that's any help when >> reviewing) > > src/java.xml/share/classes/jdk/xml/internal/Utils.java line 46: > >> 44: String val = SecuritySupport.getSystemProperty("jaxp.debug"); >> 45: // Allow simply setting the prop to turn on debug >> 46: debug = val != null && !"false".equals(val); > > It might be that java.xml takes several passes to clean up but I assume the > SecuritySupport.getSystemProperty methods can be removed and use-sites > changed to use System.getProperty. I'll see what I can do with a bulk, find/replace. > src/java.xml/share/classes/org/xml/sax/helpers/XMLReaderFactory.java line 248: > >> 246: } else { >> 247: return null; >> 248: } > > In passing, the Iterator isn't needed here, this block can be reduced > to`return ServiceLoader.load(type, cl).findFirst().orElse(null);` Will update ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22334#discussion_r1856857265 PR Review Comment: https://git.openjdk.org/jdk/pull/22334#discussion_r1856857205