Skip to content
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

Unused code is causing an exception in Quarkus at startup #1838

Closed
DavideD opened this issue Jan 19, 2024 · 0 comments · Fixed by #1839
Closed

Unused code is causing an exception in Quarkus at startup #1838

DavideD opened this issue Jan 19, 2024 · 0 comments · Fixed by #1839
Milestone

Comments

@DavideD
Copy link
Member

DavideD commented Jan 19, 2024

See quarkusio/quarkus#38263

This is the code:

	// FIXME: We could add this method in ORM and override only this code
	protected MutationOperation createOperation(ValuesAnalysis valuesAnalysis, TableMutation<?> singleTableMutation) {
		MutationOperation operation = singleTableMutation.createMutationOperation( valuesAnalysis, factory() );
		if ( operation instanceof OptionalTableUpdateOperation ) {
			// We need to plug in our own reactive operation
			return new ReactiveOptionalTableUpdateOperation(
					operation.getMutationTarget(),
					(OptionalTableUpdate) singleTableMutation,
					factory()
			);
		}
		if ( operation instanceof DeleteOrUpsertOperation
				&& factory().getJdbcServices().getDialect() instanceof OracleDialect ) {
			OracleDialect dialect = ( (OracleDialect) factory().getJdbcServices().getDialect() );
			return dialect.createOptionalTableUpdateOperation(
					( (OptionalTableUpdate) operation ).getMutationTarget(),
					(OptionalTableUpdate) operation,
					factory()
			);
		}
		return operation;
	}

I suspect this is a leftover from some experiments.

A DeleteOrUpsertOperation cannot be cast to OptionalTableUpdate so I don't think this code is actually useful.

DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jan 19, 2024
This code causes a failure with Quarkus at start up:
quarkusio/quarkus#38263

CI stil works when I remove, and
a `DeleteOrUpsertOperation` cannot be cast to `OptionalTableUpdate`,
so I don't think this code is useful.
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jan 19, 2024
This code causes a failure with Quarkus at start up:
quarkusio/quarkus#38263

CI still works when I remove it, and a `DeleteOrUpsertOperation`
cannot be cast to `OptionalTableUpdate` anyway,
so I don't think this code is useful.
DavideD added a commit to DavideD/hibernate-reactive that referenced this issue Jan 19, 2024
This code causes a failure with Quarkus at start up:
quarkusio/quarkus#38263

CI still works when I remove it, and a `DeleteOrUpsertOperation`
cannot be cast to `OptionalTableUpdate` anyway.

So I don't think this code is useful.
@DavideD DavideD changed the title Unused code is causing an exception in Quarkus Unused code is causing an exception in Quarkus at startup Jan 19, 2024
DavideD added a commit that referenced this issue Jan 19, 2024
This code causes a failure with Quarkus at start up:
quarkusio/quarkus#38263

CI still works when I remove it, and a `DeleteOrUpsertOperation`
cannot be cast to `OptionalTableUpdate` anyway.

So I don't think this code is useful.
@DavideD DavideD modified the milestones: next, 2.2.2.Final Jan 24, 2024
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 a pull request may close this issue.

1 participant