Skip to content

Conversation

wwillard7800
Copy link
Contributor

Impact

  • Bug fix (non-breaking change which fixes expected existing functionality)
  • Enhancement/New feature (adds functionality without impacting existing logic)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Things to be aware of

Things to worry about

Additional Context

//
private void validateChangeSetId(String changeSetId, String line, int count) throws ChangeLogParseException {
String parsed = changeSetId.replace(":","").replace(" ","");
if (StringUtil.isEmpty(parsed)) {

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation Note

Invoking
StringUtil.isEmpty
should be avoided because it has been deprecated.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of replacing " " we could use StringUtils.isBlank() that would handle it for us.

Comment on lines 722 to 724
//
// If the change set ID is empty after removing colons and blank spaces then it is invalid
//
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this an actual javadoc not a comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

//
private void validateChangeSetId(String changeSetId, String line, int count) throws ChangeLogParseException {
String parsed = changeSetId.replace(":","").replace(" ","");
if (StringUtil.isEmpty(parsed)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of replacing " " we could use StringUtils.isBlank() that would handle it for us.

@filipelautert filipelautert merged commit b52c892 into master Oct 3, 2024
35 checks passed
@filipelautert filipelautert deleted the DAT-18687 branch October 3, 2024 20:57
filipelautert pushed a commit that referenced this pull request Oct 9, 2024
* WIP

DAT-18687

* Handle blank change set IDs

DAT-18687

* Add JavaDoc and another test

---------

Co-authored-by: suryaaki2 <80348493+suryaaki2@users.noreply.github.com>
filipelautert added a commit that referenced this pull request Oct 28, 2024
* changed code, started with test

* Base tests

* Modify tests

* working on the groovy test

* test: change order of stream closing and file deletion (#6380)

* DAT-18563 :: Unhide tag parameter for UpdateTestingRollback command (#6330)

- Unhide tag parameter for UpdateTestingRollback command.
- Update command test.
- Added integration test.

* Removed usage of deprecated isEmpty() method (#6205)

Removed usage of deprecated isEmpty method

Co-authored-by: Daniel Mallorga <75833793+MalloD12@users.noreply.github.com>
Co-authored-by: Daniel Mallorga <dmallorga@liquibase.com>
Co-authored-by: filipe <flautert@liquibase.org>

* #6281 fix NPE when default value is null (#6287)

Sample:
```java
java.lang.NullPointerException: Cannot invoke "String.replaceAll(String, String)" because "defaultValue" is null
	at liquibase.snapshot.jvm.ColumnSnapshotGenerator.readDefaultValue(ColumnSnapshotGenerator.java:571)
	at liquibase.snapshot.jvm.ColumnSnapshotGenerator.readColumn(ColumnSnapshotGenerator.java:291)
	at liquibase.snapshot.jvm.ColumnSnapshotGenerator.addTo(ColumnSnapshotGenerator.java:204)
	at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:78)
	at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:49)
```

* #6264 avoid ignoring the caught exception (#6288)

* delete unused class UnknownConfigurationType

* init field DatabaseIncapableOfOperation.operation

it was not assigned in constructor; thus it was always NULL.

P.S. This field is not used, so it should be removed.

* #6264 avoid ignoring the caught exception

I found all places where IDEA shows warning "catch block may ignore exception", and fixed many of them.

* Adressing issue #6331, small changes to pom.xml files to reduce warnings shown in building (#6332)

Use ${project.version} instead of ${version}; same goes for ${build.finalName}, which is recommended to switch to ${project.build.finalName}.  Finally, use version for `maven-jar-plugin` consistently.

Co-authored-by: Carlo Dapor <carlo.dapor@mimacom.com>

* DAT-18743: dry-run: add current_branch_name (#6382)

* missing ending fi statement

* add simple logic, if the branch is neither "release" nor "master," it sets branch to the current branch name.

* populate the value of the branch in dry-run-release.yml and pass it as outputs

* populate the value of the branch in dry-run-release.yml and pass it as outputs

---------

Co-authored-by: Sayali M <sayali@Sayalis-MacBook-Pro>

* DAT-18329: comment out pieces of code that builds the Mac Installer (#6379)

* comment out pieces of code that build the Mac Installer

* delete macOS from install4j software and results produced are commented out

* remove mac references

---------

Co-authored-by: Sayali M <sayali@Sayalis-MacBook-Pro>

* Handle Oracle blank schema names DAT-18199 (#6305)

* Handle Oracle blank schema names

DAT-18199

* Added comment DAT-18199

* Tweak last fix

DAT-18199

* Another fix for the last fix

DAT-18199

---------

Co-authored-by: suryaaki2 <80348493+suryaaki2@users.noreply.github.com>

* DAT-18191 and DAT-18192 - Fix classpath loading and incorrect configuration for addForeignKeyConstraint (#6109)

* fix: do not call DatabaseFactory before classpath parameter is evaluated by command line

* chore: document changes/ refactor code

* chore: remove offending method

* fix: how sqlite supports initiallyDeferred and deferred if it doesn't work with addForeignKey ?!

* fix: typo

* Handle blank change set ID DAT-18687 (#6359)

* WIP

DAT-18687

* Handle blank change set IDs

DAT-18687

* Add JavaDoc and another test

---------

Co-authored-by: suryaaki2 <80348493+suryaaki2@users.noreply.github.com>

* allow replaceIfExists in Postgres procedures (DAT-18495) (#6350)

* allow replaceIfExists in Postgres procedures

* reduce code duplication

* CreateProcedure definition test updated to include postgresql as a supported database.

---------

Co-authored-by: obovsunivskyii <baqaua@gmail.com>
Co-authored-by: Daniel Mallorga <dmallorga@liquibase.com>
Co-authored-by: suryaaki2 <80348493+suryaaki2@users.noreply.github.com>

* fix CreateProcedureChange not working with mariadb (DAT-18495) (#6389)

* Bump groovy.version from 4.0.22 to 4.0.23 (#6319)

Bumps `groovy.version` from 4.0.22 to 4.0.23.

Updates `org.apache.groovy:groovy-bom` from 4.0.22 to 4.0.23
- [Commits](https://github.com/apache/groovy/commits)

Updates `org.apache.groovy:groovy-all` from 4.0.22 to 4.0.23
- [Commits](https://github.com/apache/groovy/commits)

---
updated-dependencies:
- dependency-name: org.apache.groovy:groovy-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.apache.groovy:groovy-all
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add support for include columns in indexes (#6138)

* Update ABOUT.txt

* trying to get include columns to work with indexes

* Update ABOUT.txt

* Now with passing tests

* got creating indexes to work properly. Still need to get generate changelog to work

* got the generate-changelog command working with indexes that include columns

* cleanup unnecesary changes in the diff

* Added include field to the xsd

* updated to use booleanutils

* switched to non deprecated method

* Added unit test coverage for index include feature

* put generator into an if statement based on database

* put more sections behind ifs on db type

* do not strip "classpath:" when normalizing the path (#5894)

This PR introduces an alternative behavior for sub-resource path resolution, namely if a root resource path starts with the classpath: prefix, it would preserve that prefix when resolving sub-resource locations. This behavior is activated with liquibase.preserveClasspathPrefixInNormalizedPaths property (it must be set to true), or via LIQUIBASE_PRESERVE_CLASSPATH_PREFIX_IN_NORMALIZED_PATHS variable or --preserve-classpath-prefix-in-normalized-paths CLI option. This feature allows to implement custom ResourceAccessors that work with abstract URLs without being directly tied to the filesystem, such as the one in Bootique.io.

* Handle Snowflake add NOT NULL constraint DAT-18798 (#6391)

* Fix generated SQL for Snowflake NOT NULL constraint

DAT-18798

* Handle Snowflake NOT NULL constraint

DAT-18798

---------

Co-authored-by: obovsunivskyii <baqaua@gmail.com>

* chore: changes to make the test work - as it will be a PreparedStatement it needs to be supportsBatchUpdates - and as we are offline we need to override it.

* Remove print statement

* changed code, started with test

* Base tests

* Modify tests

* working on the groovy test

* chore: changes to make the test work - as it will be a PreparedStatement it needs to be supportsBatchUpdates - and as we are offline we need to override it.

* Remove print statement

* Changed string for the oracle clob test

* Update names.csv

* chore: take isRelativeToChangelogFile into account when evaluating the file location.

* chore: fix variable name and tests

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: tatibeans <tatiana.f.ganz@gmail.com>
Co-authored-by: Steven Massaro <steven.massaro.web@gmail.com>
Co-authored-by: Daniel Mallorga <75833793+MalloD12@users.noreply.github.com>
Co-authored-by: Anton Erofeev <antonerofeev11@gmail.com>
Co-authored-by: Daniel Mallorga <dmallorga@liquibase.com>
Co-authored-by: filipe <flautert@liquibase.org>
Co-authored-by: Andrei Solntsev <andrei.solntsev@gmail.com>
Co-authored-by: catull <catull@users.noreply.github.com>
Co-authored-by: Carlo Dapor <carlo.dapor@mimacom.com>
Co-authored-by: Sayali Mohadikar <76010603+sayaliM0412@users.noreply.github.com>
Co-authored-by: Sayali M <sayali@Sayalis-MacBook-Pro>
Co-authored-by: Wesley Willard <wwillard@liquibase.com>
Co-authored-by: suryaaki2 <80348493+suryaaki2@users.noreply.github.com>
Co-authored-by: obovsunivskyii <baqaua@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Stephen Atwell <78044713+stephenatwell@users.noreply.github.com>
Co-authored-by: Andrus Adamchik <aadamchik@gmail.com>
Co-authored-by: filipe <flautert@liquibase.com>
Co-authored-by: rberezen <ruslan.berezenskyi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants