-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix filename in dbcl incorrectly generated during 4.31.0 (#6712) #6716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* fix filename that was incorrect generated during 4.31.0 * chore: refactor and javadocs * chore: more javadocs * fix nullpointer; use correct method for logicalFilePath; logs * chore comments * fix another nullpointer * chore: adding integration tests * fix test title
} | ||
|
||
private String getFilePath(ChangeSet changeSet) { | ||
if (StringUtil.isNotEmpty(changeSet.getStoredFilePath())) { |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
StringUtil.isNotEmpty
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 7 months ago
To fix the problem, we need to replace the usage of the deprecated StringUtil.isNotEmpty
method with its recommended alternative. The StringUtil.isNotEmpty
method has been deprecated in favor of StringUtil.isNotNullOrEmpty
. We will update the code to use StringUtil.isNotNullOrEmpty
instead.
- Locate the usage of
StringUtil.isNotEmpty
in thegetFilePath
method. - Replace
StringUtil.isNotEmpty
withStringUtil.isNotNullOrEmpty
. - Ensure that the functionality remains the same by checking if the file path is not null or empty.
-
Copy modified line R46
@@ -45,3 +45,3 @@ | ||
private String getFilePath(ChangeSet changeSet) { | ||
if (StringUtil.isNotEmpty(changeSet.getStoredFilePath())) { | ||
if (StringUtil.isNotNullOrEmpty(changeSet.getStoredFilePath())) { | ||
return changeSet.getStoredFilePath(); |
} else { | ||
ChangeLogHistoryService changeLogService = Scope.getCurrentScope().getSingleton(ChangeLogHistoryServiceFactory.class).getChangeLogService(database); | ||
try { | ||
changeLogService.replaceFilePath(changeSet, ranChangeSet.getChangeLog()); |
Check notice
Code scanning / CodeQL
Deprecated method or constructor invocation Note
ChangeLogHistoryService.replaceFilePath
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 7 months ago
To fix the problem, we need to replace the usage of the deprecated method replaceFilePath
with the recommended alternative. According to the deprecation notice, the alternative method to use is replacePath
. We will update the code to use replacePath
instead of replaceFilePath
.
-
Copy modified line R264
@@ -263,3 +263,3 @@ | ||
try { | ||
changeLogService.replaceFilePath(changeSet, ranChangeSet.getChangeLog()); | ||
changeLogService.replacePath(changeSet, ranChangeSet.getChangeLog()); | ||
} catch (DatabaseException e) { |
) (liquibase#6716) fix filename that was incorrect generated during 4.31.0 (liquibase#6712) * fix filename that was incorrect generated during 4.31.0 * chore: refactor and javadocs * chore: more javadocs * fix nullpointer; use correct method for logicalFilePath; logs * chore comments * fix another nullpointer * chore: adding integration tests * fix test title Co-authored-by: suryaaki2 <80348493+suryaaki2@users.noreply.github.com>
Impact
Description
Improvement of fix #6716 , providing backwards compatibility