Projects >> hibernate-orm >>cc6d271f31606d8e407167570a8a9c1517df7a9f

Chunk
Conflicting content
	}

	@Override
<<<<<<< HEAD
	public CacheEntry destructure(Map map, SessionFactoryImplementor factory) {
		boolean lazyPropertiesUnfetched = (Boolean) map.get( "_lazyPropertiesUnfetched" );
		String subclass = (String) map.get( "_subclass" );
		Object version = map.get( "_version" );
		EntityPersister subclassPersister = factory.getEntityPersister( subclass );
		String[] names = subclassPersister.getPropertyNames();
		Serializable[] state = new Serializable[names.length];
=======
	public Object destructure(Object structured, SessionFactoryImplementor factory) {
		final Map map = (Map) structured;
		final boolean lazyPropertiesUnfetched = (Boolean) map.get( "_lazyPropertiesUnfetched" );
		final String subclass = (String) map.get( "_subclass" );
		final Object version = map.get( "_version" );
		final EntityPersister subclassPersister = factory.getEntityPersister( subclass );
		final String[] names = subclassPersister.getPropertyNames();
		final Serializable[] state = new Serializable[names.length];
>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
		for ( int i = 0; i < names.length; i++ ) {
			state[i] = (Serializable) map.get( names[i] );
		}
Solution content
	}

	@Override
	public CacheEntry destructure(Map map, SessionFactoryImplementor factory) {
		boolean lazyPropertiesUnfetched = (Boolean) map.get( "_lazyPropertiesUnfetched" );
		String subclass = (String) map.get( "_subclass" );
		Object version = map.get( "_version" );
		EntityPersister subclassPersister = factory.getEntityPersister( subclass );
		String[] names = subclassPersister.getPropertyNames();
		Serializable[] state = new Serializable[names.length];
		for ( int i = 0; i < names.length; i++ ) {
			state[i] = (Serializable) map.get( names[i] );
		}
File
StructuredCacheEntry.java
Developer's decision
Version 1
Kind of conflict
Cast expression
Method invocation
Method signature
Variable
Chunk
Conflicting content
<<<<<<< HEAD
	@LogMessage(level = INFO)
	@Message( value = "'javax.persistence.validation.mode' named multiple values : %s", id = 448 )
	void multipleValidationModes(String modes);
	@Message(value = "@CollectionTable and @JoinTable specified on the same attribute. Check %s#%s", id = 449)
	String collectionTableAndJoinTableUsedTogether(String entityName, String propertyName);

	@Message(value = "@CollectionTable annotation without a @ElementCollection. Check %s#%s", id = 450)
	String collectionTableWithoutElementCollection(String entityName, String propertyName);

	@Message(value = "@JoinTable annotation without an association. Check %s#%s", id = 451)
	String joinTableForNonAssociationAttribute(String entityName, String propertyName);

	@LogMessage( level = ERROR )
	@Message( value = "Illegal argument on static metamodel field injection : %s#%s; expected type :  %s; encountered type : %s", id = 452 )
	void illegalArgumentOnStaticMetamodelFieldInjection( String metamodelClassName,
														 String attributeName,
														 String attributeJavaType,
														 String metamodelFieldJavaType );

	@LogMessage( level = ERROR )
	@Message( value = "Unable to locate static metamodel field : %s#%s", id = 453 )
	void unableToLocateStaticMetamodelField( String metamodelClassName,
											 String attributeName );


	@Message(value = "The access type of class %s is AccessType.FIELD. To override the access for an attribute " +
			"@Access has to be placed on the property (getter)", id = 454)
	String accessTypeOverrideShouldBeAnnotatedOnProperty( String className );

	@Message(value = "The access type of class %s is AccessType.FIELD. To override the access for an attribute " +
			"@Access has to be placed on the property (getter) with an access type of AccessType.PROPERTY. " +
			"Using AccessType.FIELD on the property has no effect", id = 455)
	String accessTypeOverrideShouldBeProperty( String className );

	@Message(value = "The access type of class %s is AccessType.PROPERTY. To override the access for a field " +
			"@Access has to be placed on the field ", id = 456)
	String accessTypeOverrideShouldBeAnnotatedOnField( String className );

	@Message(value = "The access type of class %s is AccessType.PROPERTY. To override the access for a field " +
			"@Access has to be placed on the field with an access type of AccessType.FIELD. " +
			"Using AccessType.PROPERTY on the field has no effect", id = 457)
	String accessTypeOverrideShouldBeField( String className );

	@LogMessage(level = WARN)
	@Message(value = "Exception while loading a class or resource found during scanning", id = 458)
	void unableToLoadScannedClassOrResource(@Cause Exception e);
	
	@LogMessage(level = WARN)
	@Message(value = "Exception while discovering OSGi service implementations : %s", id = 459)
	void unableToDiscoverOsgiService(String service, @Cause Exception e);
=======
>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
}
Solution content
	@LogMessage(level = INFO)
	@Message( value = "'javax.persistence.validation.mode' named multiple values : %s", id = 448 )
	void multipleValidationModes(String modes);

	@Message(value = "@CollectionTable and @JoinTable specified on the same attribute. Check %s#%s", id = 449)
	String collectionTableAndJoinTableUsedTogether(String entityName, String propertyName);

	@Message(value = "@CollectionTable annotation without a @ElementCollection. Check %s#%s", id = 450)
	String collectionTableWithoutElementCollection(String entityName, String propertyName);

	@Message(value = "@JoinTable annotation without an association. Check %s#%s", id = 451)
	String joinTableForNonAssociationAttribute(String entityName, String propertyName);

	@LogMessage( level = ERROR )
	@Message( value = "Illegal argument on static metamodel field injection : %s#%s; expected type :  %s; encountered type : %s", id = 452 )
	void illegalArgumentOnStaticMetamodelFieldInjection( String metamodelClassName,
														 String attributeName,
														 String attributeJavaType,
														 String metamodelFieldJavaType );

	@LogMessage( level = ERROR )
	@Message( value = "Unable to locate static metamodel field : %s#%s", id = 453 )
	void unableToLocateStaticMetamodelField( String metamodelClassName,
											 String attributeName );


	@Message(value = "The access type of class %s is AccessType.FIELD. To override the access for an attribute " +
			"@Access has to be placed on the property (getter)", id = 454)
	String accessTypeOverrideShouldBeAnnotatedOnProperty( String className );

	@Message(value = "The access type of class %s is AccessType.FIELD. To override the access for an attribute " +
			"@Access has to be placed on the property (getter) with an access type of AccessType.PROPERTY. " +
			"Using AccessType.FIELD on the property has no effect", id = 455)
	String accessTypeOverrideShouldBeProperty( String className );

	@Message(value = "The access type of class %s is AccessType.PROPERTY. To override the access for a field " +
			"@Access has to be placed on the field ", id = 456)
	String accessTypeOverrideShouldBeAnnotatedOnField( String className );

	@Message(value = "The access type of class %s is AccessType.PROPERTY. To override the access for a field " +
			"@Access has to be placed on the field with an access type of AccessType.FIELD. " +
			"Using AccessType.PROPERTY on the field has no effect", id = 457)
	String accessTypeOverrideShouldBeField( String className );

	@LogMessage(level = WARN)
	@Message(value = "Exception while loading a class or resource found during scanning", id = 458)
	void unableToLoadScannedClassOrResource(@Cause Exception e);
	
	@LogMessage(level = WARN)
	@Message(value = "Exception while discovering OSGi service implementations : %s", id = 459)
	void unableToDiscoverOsgiService(String service, @Cause Exception e);
}
File
CoreMessageLogger.java
Developer's decision
Version 1
Kind of conflict
Method interface
Chunk
Conflicting content
	}

		return type;
<<<<<<< HEAD
	@Override
	public String toString() {
		return "ElementPropertyMapping{" +
				"elementColumns=" + Arrays.toString( elementColumns ) +
				", type=" + type +
				'}';
	}
}
=======
}
>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
Solution content
		return type;
	}

	@Override
	public String toString() {
		return "ElementPropertyMapping{" +
				"elementColumns=" + Arrays.toString( elementColumns ) +
				", type=" + type +
				'}';
	}
}
File
ElementPropertyMapping.java
Developer's decision
Version 1
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
	private CompositeType componentIdType;
	private Class factory;
	private boolean overridesEquals;
<<<<<<< HEAD
=======

>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
	@Override
	public void postInstantiate(
			final String entityName,
Solution content
	private CompositeType componentIdType;
	private Class factory;
	private boolean overridesEquals;

	@Override
	public void postInstantiate(
			final String entityName,
File
JavassistProxyFactory.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
		this.factory = JavassistLazyInitializer.getProxyFactory( persistentClass, this.interfaces );
		this.overridesEquals = ReflectHelper.overridesEquals(persistentClass);
	}
<<<<<<< HEAD
=======

>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
	@Override
	public HibernateProxy getProxy(
			Serializable id,
Solution content
		this.factory = JavassistLazyInitializer.getProxyFactory( persistentClass, this.interfaces );
		this.overridesEquals = ReflectHelper.overridesEquals(persistentClass);
	}

	@Override
	public HibernateProxy getProxy(
			Serializable id,
File
JavassistProxyFactory.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
		ValidatorFactory vf = configuration.buildValidatorFactory();
		cfg.getProperties().put( "javax.persistence.validation.factory", vf );
	}
<<<<<<< HEAD
	
	@Override
	protected void prepareStandardServiceRegistryBuilder(StandardServiceRegistryBuilder serviceRegistryBuilder) {
		final MessageInterpolator messageInterpolator = new MessageInterpolator() {

			public String interpolate(String s, Context context) {
				return "Oops";
			}

			public String interpolate(String s, Context context, Locale locale) {
				return interpolate( s, context );
			}
		};
		final javax.validation.Configuration configuration = Validation.byDefaultProvider().configure();
		configuration.messageInterpolator( messageInterpolator );
		ValidatorFactory vf = configuration.buildValidatorFactory();
		serviceRegistryBuilder.applySetting( "javax.persistence.validation.factory", vf );
	}
}
=======
}
>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
Solution content
		ValidatorFactory vf = configuration.buildValidatorFactory();
		cfg.getProperties().put( "javax.persistence.validation.factory", vf );
	}

	@Override
	protected void prepareStandardServiceRegistryBuilder(StandardServiceRegistryBuilder serviceRegistryBuilder) {
		final MessageInterpolator messageInterpolator = new MessageInterpolator() {

			public String interpolate(String s, Context context) {
				return "Oops";
			}

			public String interpolate(String s, Context context, Locale locale) {
				return interpolate( s, context );
			}
		};
		final javax.validation.Configuration configuration = Validation.byDefaultProvider().configure();
		configuration.messageInterpolator( messageInterpolator );
		ValidatorFactory vf = configuration.buildValidatorFactory();
		serviceRegistryBuilder.applySetting( "javax.persistence.validation.factory", vf );
	}
}
File
BeanValidationProvidedFactoryTest.java
Developer's decision
Version 1
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
						   SessionFactoryImplementor factory, Mapping cfg) throws HibernateException {
		super( persistentClass, cache, naturalIdRegionAccessStrategy, factory, cfg );
	}
<<<<<<< HEAD

	public EntityPersister(EntityBinding entityBinding, EntityRegionAccessStrategy cacheAccessStrategy, NaturalIdRegionAccessStrategy naturalIdRegionAccessStrategy, SessionFactoryImplementor factory, Mapping mapping)
			throws HibernateException {
		super( entityBinding, cacheAccessStrategy, naturalIdRegionAccessStrategy, factory, mapping );
	}
}
=======
}
>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
Solution content
						   SessionFactoryImplementor factory, Mapping cfg) throws HibernateException {
		super( persistentClass, cache, naturalIdRegionAccessStrategy, factory, cfg );
	}

	public EntityPersister(EntityBinding entityBinding, EntityRegionAccessStrategy cacheAccessStrategy, NaturalIdRegionAccessStrategy naturalIdRegionAccessStrategy, SessionFactoryImplementor factory, Mapping mapping)
			throws HibernateException {
		super( entityBinding, cacheAccessStrategy, naturalIdRegionAccessStrategy, factory, mapping );
	}
}
File
EntityPersister.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Chunk
Conflicting content
	public String[] getMappings() {
		return new String[] { "immutable/entitywithmutablecollection/inverse/ContractVariationOneToManyJoin.hbm.xml" };
	}
<<<<<<< HEAD

	@Test
	@Override
	public void testOneToManyCollectionOptimisticLockingWithUpdate() {
		super.testOneToManyCollectionOptimisticLockingWithUpdate();
	}
=======
>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
}
Solution content
	public String[] getMappings() {
		return new String[] { "immutable/entitywithmutablecollection/inverse/ContractVariationOneToManyJoin.hbm.xml" };
	}
}
File
EntityWithInverseOneToManyJoinTest.java
Developer's decision
Version 2
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
	public String[] getMappings() {
		return new String[] { "immutable/entitywithmutablecollection/noninverse/ContractVariationOneToManyJoin.hbm.xml" };
	}
<<<<<<< HEAD

	@Test
	@Override
	public void testOneToManyCollectionOptimisticLockingWithUpdate() {
		super.testOneToManyCollectionOptimisticLockingWithUpdate();
	}
=======
>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
}
Solution content
	public String[] getMappings() {
		return new String[] { "immutable/entitywithmutablecollection/noninverse/ContractVariationOneToManyJoin.hbm.xml" };
	}
}
File
EntityWithNonInverseOneToManyJoinTest.java
Developer's decision
Version 2
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
	public String[] getMappings() {
		return new String[] { "immutable/entitywithmutablecollection/noninverse/ContractVariationVersionedOneToManyJoin.hbm.xml" };
	}
<<<<<<< HEAD

	@Test
	@Override
	public void testOneToManyCollectionOptimisticLockingWithUpdate() {
		super.testOneToManyCollectionOptimisticLockingWithUpdate();
	}
=======
>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
}
Solution content
	public String[] getMappings() {
		return new String[] { "immutable/entitywithmutablecollection/noninverse/ContractVariationVersionedOneToManyJoin.hbm.xml" };
	}
}
File
VersionedEntityWithNonInverseOneToManyJoinTest.java
Developer's decision
Version 2
Kind of conflict
Annotation
Method declaration
Chunk
Conflicting content
	@Test
    @RequiresDialectFeature( NonIdentityGeneratorChecker.class )
<<<<<<< HEAD
    @SkipForDialect( value = {PostgreSQL81Dialect.class}, jiraKey = "HHH-6704")
	@SuppressWarnings( {"UnnecessaryBoxing"})
=======
    @SkipForDialect( value = {PostgreSQL81Dialect.class, PostgreSQLDialect.class}, jiraKey = "HHH-6704")
>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
	public void testInsert() throws HibernateException, SQLException {
		Session s = openSession();
		s.beginTransaction();
Solution content
	@Test
    @RequiresDialectFeature( NonIdentityGeneratorChecker.class )
    @SkipForDialect( value = {PostgreSQL81Dialect.class}, jiraKey = "HHH-6704")
	public void testInsert() throws HibernateException, SQLException {
		Session s = openSession();
		s.beginTransaction();
File
CustomSQLTest.java
Developer's decision
Combination
Kind of conflict
Annotation
Chunk
Conflicting content
import static org.junit.Assert.fail;


<<<<<<< HEAD
@SuppressWarnings( {"UnnecessaryBoxing"})
@FailureExpectedWithNewMetamodel
=======
>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
public class ParentChildTest extends LegacyTestCase {
	@Override
	public String[] getMappings() {
Solution content
import static org.junit.Assert.fail;


@FailureExpectedWithNewMetamodel
public class ParentChildTest extends LegacyTestCase {
	@Override
	public String[] getMappings() {
File
ParentChildTest.java
Developer's decision
Combination
Kind of conflict
Annotation
Chunk
Conflicting content
 *
 * @author Steve Ebersole
 */
<<<<<<< HEAD
@SuppressWarnings({ "UnnecessaryBoxing", "UnnecessaryUnboxing" })
@FailureExpectedWithNewMetamodel
=======
>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
public class NativeSQLQueriesTest extends BaseCoreFunctionalTestCase {
	@Override
	public String[] getMappings() {
Solution content
 *
 * @author Steve Ebersole
 */
@FailureExpectedWithNewMetamodel
public class NativeSQLQueriesTest extends BaseCoreFunctionalTestCase {
	@Override
	public String[] getMappings() {
File
NativeSQLQueriesTest.java
Developer's decision
Combination
Kind of conflict
Annotation
Chunk
Conflicting content
/**
 * @author Gavin King
 */
<<<<<<< HEAD
@SuppressWarnings("ForLoopReplaceableByForEach")
=======
@SuppressWarnings("unchecked")
>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
public class UnionSubclassTest extends BaseCoreFunctionalTestCase {
	@Override
	public String[] getMappings() {
Solution content
/**
 * @author Gavin King
 */
@SuppressWarnings("ForLoopReplaceableByForEach")
public class UnionSubclassTest extends BaseCoreFunctionalTestCase {
	@Override
	public String[] getMappings() {
File
UnionSubclassTest.java
Developer's decision
Version 1
Kind of conflict
Annotation
Chunk
Conflicting content
			.setFetchMode("location.beings", FetchMode.JOIN)
			.list();

<<<<<<< HEAD
		for (int i=0; i>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
			assertTrue( Hibernate.isInitialized( h.getLocation() ) );
			assertTrue( Hibernate.isInitialized( h.getLocation().getBeings() ) );
			s.delete( h );
Solution content
			.setFetchMode("location.beings", FetchMode.JOIN)
			.list();

		for ( Object aList : list ) {
			Human h = (Human) aList;
			assertTrue( Hibernate.isInitialized( h.getLocation() ) );
			assertTrue( Hibernate.isInitialized( h.getLocation().getBeings() ) );
			s.delete( h );
File
UnionSubclassTest.java
Developer's decision
Version 2
Kind of conflict
Cast expression
For statement
Variable
Chunk
Conflicting content
		assertFalse( Hibernate.isInitialized( gavin.getThings() ) );
		assertEquals( ( (Thing) gavin.getThings().get(0) ).getDescription(), "some thing" );
		s.clear();
<<<<<<< HEAD

		thing = (Thing) s.get( Thing.class, new Long( thing.getId() ) );
=======
		
		thing = (Thing) s.get( Thing.class, thing.getId() );
>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
		assertFalse( Hibernate.isInitialized( thing.getOwner() ) );
		assertEquals( thing.getOwner().getIdentity(), "gavin" );
Solution content
		assertFalse( Hibernate.isInitialized( gavin.getThings() ) );
		assertEquals( ( (Thing) gavin.getThings().get(0) ).getDescription(), "some thing" );
		s.clear();
		thing = (Thing) s.get( Thing.class, thing.getId() );
		assertFalse( Hibernate.isInitialized( thing.getOwner() ) );
		assertEquals( thing.getOwner().getIdentity(), "gavin" );
File
UnionSubclassTest.java
Developer's decision
Version 2
Kind of conflict
Cast expression
Variable
Chunk
Conflicting content
		gavin = (Human) s.get( Human.class, gavin.getId() );
		atl = (Location) s.get( Location.class, atl.getId() );
<<<<<<< HEAD

=======
		
>>>>>>> 1825a4762c487135f0dd11b34c417210eb6ba100
 		atl.addBeing(gavin);
		assertEquals( 1, s.createQuery("from Human h where h.location.name like '%GA'").list().size() );
		s.delete(gavin);
Solution content
		gavin = (Human) s.get( Human.class, gavin.getId() );
		atl = (Location) s.get( Location.class, atl.getId() );
 		atl.addBeing(gavin);
		assertEquals( 1, s.createQuery("from Human h where h.location.name like '%GA'").list().size() );
		s.delete(gavin);
File
UnionSubclassTest.java
Developer's decision
Version 1
Kind of conflict
Blank