Skip to content

Conversation

dreab8
Copy link
Member

@dreab8 dreab8 commented Oct 11, 2025

Dropped Junit4 in packages:

  • org.hibernate.orm.test.annotations.configuration
  • org.hibernate.orm.test.annotations.derivedidentities.e1.b
  • org.hibernate.orm.test.annotations.derivedidentities.e1.b.specjmapid
  • org.hibernate.orm.test.annotations.derivedidentities.e1.b.specjmapid.lazy
  • org.hibernate.orm.test.annotations.derivedidentities.e1.c
  • org.hibernate.orm.test.annotations.derivedidentities.e4.b
  • org.hibernate.orm.test.annotations.derivedidentities.e5.c
  • org.hibernate.orm.test.annotations.duplicatedgenerator
  • org.hibernate.orm.test.annotations.entity
  • org.hibernate.orm.test.annotations.enumerated.mapkey
  • org.hibernate.orm.test.annotations.enumerated.ormXml
  • org.hibernate.orm.test.annotations.fetch
  • org.hibernate.orm.test.annotations.fetchprofile
  • org.hibernate.orm.test.annotations.formula
  • org.hibernate.orm.test.annotations.idmanytoone
  • org.hibernate.orm.test.annotations.idmanytoone.alphabetical
  • org.hibernate.orm.test.annotations.immutable
  • org.hibernate.orm.test.annotations.index.jpa
  • org.hibernate.orm.test.annotations.indexcoll
  • org.hibernate.orm.test.annotations.indexcoll.eager
  • org.hibernate.orm.test.annotations.join
  • org.hibernate.orm.test.annotations.loader
  • org.hibernate.orm.test.annotations.lob
  • org.hibernate.orm.test.annotations.lob.hhh4635
  • org.hibernate.orm.test.annotations.lob.locator
  • org.hibernate.orm.test.annotations.manytomany
  • org.hibernate.orm.test.annotations.manytomany.defaults

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


https://hibernate.atlassian.net/browse/HHH-19846

@dreab8 dreab8 force-pushed the HHH-19846 branch 2 times, most recently from 45025a8 to 239c0d9 Compare October 11, 2025 08:54
@dreab8 dreab8 force-pushed the HHH-19846 branch 2 times, most recently from 8d83cd4 to 7acfe10 Compare October 11, 2025 09:20
assertThat( tableA != null && tableB != null )
.describedAs( "Could not find the expected tables." )
.isTrue();
assertThat( tableA.getUniqueKeys().values().iterator().next().getName() )

Check warning

Code scanning / CodeQL

Dereferenced variable may be null Warning test

Variable
tableA
may be null at this access because of
this
assignment.
.describedAs( "Could not find the expected tables." )
.isTrue();
assertThat( tableA.getUniqueKeys().values().iterator().next().getName() )
.isNotEqualTo( tableB.getUniqueKeys().values().iterator().next().getName() );

Check warning

Code scanning / CodeQL

Dereferenced variable may be null Warning test

Variable
tableB
may be null at this access because of
this
assignment.
Comment on lines +37 to +53
PersonAddress _personAddress = scope.fromTransaction( entityManager -> {
Person person1 = new Person( "ABC-123" );
Person person2 = new Person( "DEF-456" );

Address address1 = new Address("12th Avenue", "12A", "4005A");
Address address2 = new Address("18th Avenue", "18B", "4007B");
Address address1 = new Address( "12th Avenue", "12A", "4005A" );
Address address2 = new Address( "18th Avenue", "18B", "4007B" );

entityManager.persist(person1);
entityManager.persist(person2);
entityManager.persist( person1 );
entityManager.persist( person2 );

entityManager.persist(address1);
entityManager.persist(address2);
entityManager.persist( address1 );
entityManager.persist( address2 );

PersonAddress personAddress = new PersonAddress(person1, address1);
entityManager.persist(personAddress);
PersonAddress personAddress = new PersonAddress( person1, address1 );
entityManager.persist( personAddress );
return personAddress;
});
} );

Check notice

Code scanning / CodeQL

Unread local variable Note test

Variable 'PersonAddress _personAddress' is never read.
Comment on lines 97 to 100
"select new " + TestEntity.class.getName() + "(id, '"
+ appendLiteral.replace( "'", "''" )
+ "') from TestEntity where id=:where_id",
+ appendLiteral.replace( "'", "''" )
+ "') from TestEntity where id=:where_id",

Check failure

Code scanning / CodeQL

Query built by concatenation with a possibly-untrusted string High test

Query built by concatenation with
this expression
, which may be untrusted.
session.close();
Definition d = new Definition();
scope.inTransaction( session -> {
Value value1 = new Value( d );

Check notice

Code scanning / CodeQL

Unread local variable Note test

Variable 'Value value1' is never read.
Parent() {}
public Parent(String name) {
this.name = name;
}
/**
* @return Returns the children.
*/
public Collection getChildren() {
public Collection<Child> getChildren() {

Check notice

Code scanning / CodeQL

Exposing internal representation Note test

getChildren exposes the internal representation stored in field children. The value may be modified
after this call to getChildren
.
getChildren exposes the internal representation stored in field children. The value may be modified
after this call to getChildren
.
getChildren exposes the internal representation stored in field children. The value may be modified
after this call to getChildren
.
getChildren exposes the internal representation stored in field children. The value may be modified
after this call to getChildren
.
@@ -47,19 +47,19 @@
this.sibling = sibling;
}

public Set getNonInverseChildren() {
public Set<MyChild> getNonInverseChildren() {

Check notice

Code scanning / CodeQL

Exposing internal representation Note generated test

getNonInverseChildren exposes the internal representation stored in field nonInverseChildren. The value may be modified
after this call to getNonInverseChildren
.
this.nonInverseChildren = nonInverseChildren;
}

public Set getInverseChildren() {
public Set<MyChild> getInverseChildren() {

Check notice

Code scanning / CodeQL

Exposing internal representation Note generated test

getInverseChildren exposes the internal representation stored in field inverseChildren. The value may be modified
after this call to getInverseChildren
.
}

@Test
public void testNullsEqual() {
Assert.assertTrue( EntityGraphs.areEqual( (EntityGraph<GraphParsingTestEntity>) null, (EntityGraph<GraphParsingTestEntity>) null ) );
public void testNullsEqual(EntityManagerFactoryScope scope) {

Check notice

Code scanning / CodeQL

Useless parameter Note test

The parameter 'scope' is never used.
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.

1 participant