Skip to content

Conversation

@katzyn
Copy link
Contributor

@katzyn katzyn commented Aug 27, 2022

  1. LOB import with RUNSCRIPT … FROM_1X is fixed. Closes Improper FROM_1X implementation corrupts some BLOBs during migration #3604.
  2. MySQL compatibility functions now handle NULL arguments properly. Closes [MySQL] UNIX_TIMESTAMP should return NULL #3607.
  3. Registration of FilePathDisk doesn't use reflection any more. This default implementation is expected to be always available.

}) {
try {
FilePath p = (FilePath) Class.forName(c).getDeclaredConstructor().newInstance();
p = (FilePath) Class.forName(c).getDeclaredConstructor().newInstance();
Copy link
Contributor

Choose a reason for hiding this comment

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

UnsafeReflectiveConstructionCast: Prefer asSubclass instead of casting the result of newInstance, to detect classes of incorrect type before invoking their constructors.This way, if the class is of the incorrect type,it will throw an exception before invoking its constructor.


Suggested change
p = (FilePath) Class.forName(c).getDeclaredConstructor().newInstance();
p = Class.forName(c).asSubclass(FilePath.class).getDeclaredConstructor().newInstance();

Reply with "@sonatype-lift help" for info about LiftBot commands.
Reply with "@sonatype-lift ignore" to tell LiftBot to leave out the above finding from this PR.
Reply with "@sonatype-lift ignoreall" to tell LiftBot to leave out all the findings from this PR and from the status bar in Github.

When talking to LiftBot, you need to refresh the page to see its response. Click here to get to know more about LiftBot commands.


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sonatype-lift ignore

Copy link
Contributor

Choose a reason for hiding this comment

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

I've recorded this as ignored for this pull request.
If you change your mind, just comment @sonatype-lift unignore.

@katzyn katzyn merged commit c4f9f8e into h2database:master Aug 27, 2022
@katzyn katzyn deleted the compatibility branch August 27, 2022 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MySQL] UNIX_TIMESTAMP should return NULL Improper FROM_1X implementation corrupts some BLOBs during migration

1 participant