Conversation
- Class.newInstance() -> getDeclaredConstructor().newInstance() - Jackson: set MapperFeature through JsonMapper.builder() instead of on a built ObjectMapper (JsonUtil and the Activiti resources) - OSGi LogEntry.getLevel() -> getLogLevel(), mapping AUDIT and TRACE too - OrientDB: db.save(doc) and the internal index manager API - commons-io FileUtils.write with an explicit charset - Log the client certificate subject via getSubjectX500Principal() - Drop the no-op BoneCP setReleaseHelperThreads() Resolves CodeQL alerts OpenIdentityPlatform#54-OpenIdentityPlatform#56, OpenIdentityPlatform#58, OpenIdentityPlatform#59, OpenIdentityPlatform#65-OpenIdentityPlatform#68, OpenIdentityPlatform#73, OpenIdentityPlatform#76-OpenIdentityPlatform#83, OpenIdentityPlatform#86-OpenIdentityPlatform#92.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Third note-level CodeQL batch:
java/deprecated-call. 22 alerts replaced 1:1 with the current API, 5 dismissed with reasons; the 9 boxed-constructor ones (#60–#64, #69–#72) are already covered by #212.Class.newInstance()getDeclaredConstructor().newInstance(); the specific catches inAuditServiceImpl/AuthenticationServicewidened toReflectiveOperationException(the other three sites already caughtException).MapperFeature.SORT_PROPERTIES_ALPHABETICALLYis applied throughJsonMapper.builder()—configure/enable(MapperFeature)on a builtObjectMapperhas been deprecated since 2.13.JsonUtilplus the five Activiti resources; the other features stay as they were.LogEntry.getLevel()getLogLevel()with aswitchover theLogLevelenum. Minor behavioural improvement:AUDITnow logs at error andTRACEat trace instead of both falling into the "unknown level" warn branch.ODocument.save()db.save(doc)(the session is in scope at all four sites).getIndexManagerInternal()with the session-takingdropIndex(db, …)/getClassInvolvedIndexes(db, …).FileUtils.writeStandardCharsets.UTF_8.X509Certificate.getSubjectDN()(log line)getSubjectX500Principal().setReleaseHelperThreads(5)Dismissed:
getSubjectDN().getName()— that string is theauthenticationIdexisting deployments map client-certificate users by.X500Principal.getName()renders attributes outside RFC 1779 (EMAILADDRESS,UID, …) as OIDs, so switching would change the identity of existing users. Kept for compatibility.new ODatabaseDocumentTx(url)— retained by OrientDB 3.2 for compatibility; moving the pool/connection code to theOrientDB()/ODatabaseSessionAPI (URL split into environment + database name) is a separate task for this legacy module.visitMethodInsn— false positive:openidm-shellcompiles againstasm-all 3.3.1, where the 4-argument form is the only signature and is not deprecated (the 5-argument overload does not compile there). An ASM upgrade would be its own change.Test plan
save/index-manager changes), util 55, workflow-activiti 1 — 0 failures; httpcontext, servlet-registrator, custom-scripted-connector-bundler compile (no tests)