diff --git a/hibernate-core/src/main/antlr/hql-sql.g b/hibernate-core/src/main/antlr/hql-sql.g index 17a9d8ece3..baa5e1de05 100644 --- a/hibernate-core/src/main/antlr/hql-sql.g +++ b/hibernate-core/src/main/antlr/hql-sql.g @@ -470,7 +470,7 @@ aggregateExpr // Establishes the list of aliases being used by this query. fromClause { // NOTE: This references the INPUT AST! (see http://www.antlr.org/doc/trees.html#Action%20Translation) - // the ouput AST (#fromClause) has not been built yet. + // the output AST (#fromClause) has not been built yet. prepareFromClauseInputTree(#fromClause_in); } : #(f:FROM { pushFromClause(#fromClause,f); handleClauseStart( FROM ); } fromElementList ) { diff --git a/hibernate-core/src/main/antlr/hql.g b/hibernate-core/src/main/antlr/hql.g index 31d75fe683..321dda67a8 100644 --- a/hibernate-core/src/main/antlr/hql.g +++ b/hibernate-core/src/main/antlr/hql.g @@ -162,7 +162,7 @@ tokens } /** - * This method is overriden in the sub class in order to provide the + * This method is overridden in the sub class in order to provide the * 'keyword as identifier' hack. * @param token The token to retry as an identifier. * @param ex The exception to throw if it cannot be retried as an identifier. @@ -547,7 +547,7 @@ aliasedExpression // // Note that the above precedence levels map to the rules below... // Once you have a precedence chart, writing the appropriate rules as below -// is usually very straightfoward +// is usually very straightforward logicalExpression : expression @@ -1032,7 +1032,7 @@ NUM_INT ( // hex // the 'e'|'E' and float suffix stuff look // like hex digits, hence the (...)+ doesn't - // know when to stop: ambig. ANTLR resolves + // know when to stop: ambiguous. ANTLR resolves // it correctly by matching immediately. It // is therefore ok to hush warning. options { warnWhenFollowAmbig=false; } diff --git a/hibernate-core/src/main/antlr/sql-gen.g b/hibernate-core/src/main/antlr/sql-gen.g index 031586a1e0..99b413de54 100644 --- a/hibernate-core/src/main/antlr/sql-gen.g +++ b/hibernate-core/src/main/antlr/sql-gen.g @@ -177,7 +177,7 @@ insertStatement ; setClause - // Simply re-use comparisionExpr, because it already correctly defines the EQ rule the + // Simply re-use comparisonExpr, because it already correctly defines the EQ rule the // way it is needed here; not the most aptly named, but ah : #( SET { out(" set "); } comparisonExpr[false] ( { out(", "); } comparisonExpr[false] )* ) ; diff --git a/hibernate-core/src/main/java/org/hibernate/UnknownProfileException.java b/hibernate-core/src/main/java/org/hibernate/UnknownProfileException.java index 67ce26ca29..22967bad3b 100644 --- a/hibernate-core/src/main/java/org/hibernate/UnknownProfileException.java +++ b/hibernate-core/src/main/java/org/hibernate/UnknownProfileException.java @@ -20,7 +20,7 @@ public class UnknownProfileException extends HibernateException { * @param name The profile name that was unknown. */ public UnknownProfileException(String name) { - super( "Unknow fetch profile [" + name + "]" ); + super( "Unknown fetch profile [" + name + "]" ); this.name = name; } diff --git a/hibernate-core/src/main/java/org/hibernate/action/internal/EntityUpdateAction.java b/hibernate-core/src/main/java/org/hibernate/action/internal/EntityUpdateAction.java index ea46dd973d..2560cdb966 100644 --- a/hibernate-core/src/main/java/org/hibernate/action/internal/EntityUpdateAction.java +++ b/hibernate-core/src/main/java/org/hibernate/action/internal/EntityUpdateAction.java @@ -228,7 +228,7 @@ public class EntityUpdateAction extends EntityAction { session ); if ( persister.hasUpdateGeneratedProperties() ) { - // this entity defines proeprty generation, so process those generated + // this entity defines property generation, so process those generated // values... persister.processUpdateGeneratedProperties( id, instance, state, session ); if ( persister.isVersionPropertyGenerated() ) { diff --git a/hibernate-core/src/main/java/org/hibernate/boot/internal/MetadataBuilderImpl.java b/hibernate-core/src/main/java/org/hibernate/boot/internal/MetadataBuilderImpl.java index f0e281d5b2..ea9edffb91 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/internal/MetadataBuilderImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/internal/MetadataBuilderImpl.java @@ -121,7 +121,7 @@ public class MetadataBuilderImpl implements MetadataBuilderImplementor, TypeCont this.sources = sources; this.options = new MetadataBuildingOptionsImpl( serviceRegistry ); this.bootstrapContext = new BootstrapContextImpl( serviceRegistry, options ); - //this is needed only fro implementig deprecated method + //this is needed only for implementing deprecated method options.setBootstrapContext( bootstrapContext ); for ( MetadataSourcesContributor contributor : diff --git a/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/ResultSetMappingBinder.java b/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/ResultSetMappingBinder.java index eb88399059..7ea5f74ff3 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/ResultSetMappingBinder.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/ResultSetMappingBinder.java @@ -164,7 +164,7 @@ public abstract class ResultSetMappingBinder { int queryReturnPosition) { String alias = rtnSource.getAlias(); if ( StringHelper.isEmpty( alias ) ) { - // hack-around as sqlquery impl depend on having a key. + // hack-around as sqlquery impl depends on having a key. alias = "alias_" + queryReturnPosition; } final String entityName = context.determineEntityName( diff --git a/hibernate-core/src/main/java/org/hibernate/boot/registry/BootstrapServiceRegistryBuilder.java b/hibernate-core/src/main/java/org/hibernate/boot/registry/BootstrapServiceRegistryBuilder.java index fc27ce7ee3..a9710133b4 100644 --- a/hibernate-core/src/main/java/org/hibernate/boot/registry/BootstrapServiceRegistryBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/boot/registry/BootstrapServiceRegistryBuilder.java @@ -208,7 +208,7 @@ public class BootstrapServiceRegistryBuilder { final ClassLoaderService classLoaderService; if ( providedClassLoaderService == null ) { // Use a set. As an example, in JPA, OsgiClassLoader may be in both - // the providedClassLoaders and the overridenClassLoader. + // the providedClassLoaders and the overriddenClassLoader. final Set classLoaders = new HashSet(); if ( providedClassLoaders != null ) { diff --git a/hibernate-core/src/main/java/org/hibernate/bytecode/enhance/internal/javassist/MappedSuperclassEnhancer.java b/hibernate-core/src/main/java/org/hibernate/bytecode/enhance/internal/javassist/MappedSuperclassEnhancer.java index fd77951792..4f0a780206 100644 --- a/hibernate-core/src/main/java/org/hibernate/bytecode/enhance/internal/javassist/MappedSuperclassEnhancer.java +++ b/hibernate-core/src/main/java/org/hibernate/bytecode/enhance/internal/javassist/MappedSuperclassEnhancer.java @@ -32,7 +32,7 @@ public class MappedSuperclassEnhancer extends PersistentAttributesEnhancer { super.enhance( managedCtClass ); } - // Generate 'template' methods for each attribute. This will be overriden by the actual entities + // Generate 'template' methods for each attribute. This will be overridden by the actual entities @Override protected CtMethod generateFieldReader( diff --git a/hibernate-core/src/main/java/org/hibernate/bytecode/enhance/internal/javassist/PersistentAttributesEnhancer.java b/hibernate-core/src/main/java/org/hibernate/bytecode/enhance/internal/javassist/PersistentAttributesEnhancer.java index 17e70f2416..c28aec4936 100644 --- a/hibernate-core/src/main/java/org/hibernate/bytecode/enhance/internal/javassist/PersistentAttributesEnhancer.java +++ b/hibernate-core/src/main/java/org/hibernate/bytecode/enhance/internal/javassist/PersistentAttributesEnhancer.java @@ -400,7 +400,7 @@ public class PersistentAttributesEnhancer extends EnhancerImpl { String toArrayMethod = isMap ? "values().toArray()" : "toArray()"; // only remove elements not in the new collection or else we would loose those elements - // don't use iterator to avoid ConcurrentModException + // don't use iterator to avoid ConcurrentModificationException fieldWriter.insertBefore( String.format( " if (this.%3$s != null && %1$s) {%n" + @@ -561,7 +561,7 @@ public class PersistentAttributesEnhancer extends EnhancerImpl { managedCtClass.addInterface( compositeOwnerCtClass ); if ( enhancementContext.isCompositeClass( managedCtClass ) ) { - // if a composite have a embedded field we need to implement the TRACKER_CHANGER_NAME method as well + // if a composite has an embedded field we need to implement the TRACKER_CHANGER_NAME method as well MethodWriter.write( managedCtClass, "public void %1$s(String name) {%n" + diff --git a/hibernate-core/src/main/java/org/hibernate/bytecode/enhance/spi/interceptor/EnhancementHelper.java b/hibernate-core/src/main/java/org/hibernate/bytecode/enhance/spi/interceptor/EnhancementHelper.java index 7c509cfe32..89ad60a17f 100644 --- a/hibernate-core/src/main/java/org/hibernate/bytecode/enhance/spi/interceptor/EnhancementHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/bytecode/enhance/spi/interceptor/EnhancementHelper.java @@ -129,7 +129,7 @@ public class EnhancementHelper { finally { if ( isTempSession ) { try { - // Commit the JDBC transaction is we started one. + // Commit the JDBC transaction if we started one. if ( !isJta ) { BytecodeLogger.LOGGER.debug( "Enhancement interception Helper#performWork committing transaction on temporary Session" ); session.getTransaction().commit(); diff --git a/hibernate-core/src/main/java/org/hibernate/cache/cfg/internal/DomainDataRegionConfigImpl.java b/hibernate-core/src/main/java/org/hibernate/cache/cfg/internal/DomainDataRegionConfigImpl.java index 36cef8d90a..1020c6c63f 100644 --- a/hibernate-core/src/main/java/org/hibernate/cache/cfg/internal/DomainDataRegionConfigImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/cache/cfg/internal/DomainDataRegionConfigImpl.java @@ -117,7 +117,7 @@ public class DomainDataRegionConfigImpl implements DomainDataRegionConfig { } - // todo (6.0) : `EntityPersister` and `CollectionPersister` references here should be replaces with `EntityHierarchy` and `PersistentCollectionDescriptor` + // todo (6.0) : `EntityPersister` and `CollectionPersister` references here should be replaced with `EntityHierarchy` and `PersistentCollectionDescriptor` // // todo : although ^^, couldn't this just be the boot-time model? Is there a specific need for it to be the run-time model? // that would alleviate the difference between 5.3 and 6.0 from the SPI POV diff --git a/hibernate-core/src/main/java/org/hibernate/cache/internal/NaturalIdCacheKey.java b/hibernate-core/src/main/java/org/hibernate/cache/internal/NaturalIdCacheKey.java index e6b89f82ea..01d6e80547 100644 --- a/hibernate-core/src/main/java/org/hibernate/cache/internal/NaturalIdCacheKey.java +++ b/hibernate-core/src/main/java/org/hibernate/cache/internal/NaturalIdCacheKey.java @@ -86,7 +86,7 @@ public class NaturalIdCacheKey implements Serializable { @Override public String initialize() { //Complex toString is needed as naturalIds for entities are not simply based on a single value like primary keys - //the only same way to differentiate the keys is to included the disassembled values in the string. + //the only same way to differentiate the keys is to include the disassembled values in the string. final StringBuilder toStringBuilder = new StringBuilder().append( entityName ).append( "##NaturalId[" ); for ( int i = 0; i < naturalIdValues.length; i++ ) { diff --git a/hibernate-core/src/main/java/org/hibernate/cache/internal/RegionFactoryInitiator.java b/hibernate-core/src/main/java/org/hibernate/cache/internal/RegionFactoryInitiator.java index d2261b7330..ef712e5dcc 100644 --- a/hibernate-core/src/main/java/org/hibernate/cache/internal/RegionFactoryInitiator.java +++ b/hibernate-core/src/main/java/org/hibernate/cache/internal/RegionFactoryInitiator.java @@ -83,7 +83,7 @@ public class RegionFactoryInitiator implements StandardServiceInitiator> implementors = selector.getRegisteredStrategyImplementors( RegionFactory.class ); if ( setting == null && implementors.size() != 1 ) { - // if either are explicitly defined as TRUE we need a RegionFactory + // if either is explicitly defined as TRUE we need a RegionFactory if ( ( useSecondLevelCache != null && useSecondLevelCache == TRUE ) || ( useQueryCache != null && useQueryCache == TRUE ) ) { throw new CacheException( "Caching was explicitly requested, but no RegionFactory was defined and there is not a single registered RegionFactory" ); diff --git a/hibernate-core/src/main/java/org/hibernate/cache/spi/entry/StandardCacheEntryImpl.java b/hibernate-core/src/main/java/org/hibernate/cache/spi/entry/StandardCacheEntryImpl.java index 2d88392db5..d724b21fa0 100644 --- a/hibernate-core/src/main/java/org/hibernate/cache/spi/entry/StandardCacheEntryImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/cache/spi/entry/StandardCacheEntryImpl.java @@ -77,7 +77,7 @@ public class StandardCacheEntryImpl implements CacheEntry { @Override public Serializable[] getDisassembledState() { // todo: this was added to support initializing an entity's EntityEntry snapshot during reattach; - // this should be refactored to instead expose a method to assemble a EntityEntry based on this + // this should be refactored to instead expose a method to assemble an EntityEntry based on this // state for return. return disassembledState; } diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java b/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java index 9ec2044926..2336265597 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/AnnotationBinder.java @@ -537,7 +537,7 @@ public final class AnnotationBinder { LOG.unsupportedMappedSuperclassWithEntityInheritance( clazzToProcess.getName() ); } - //TODO: be more strict with secondarytable allowance (not for ids, not for secondary table join columns etc) + //TODO: be more strict with secondary table allowance (not for ids, not for secondary table join columns etc) InheritanceState inheritanceState = inheritanceStatePerClass.get( clazzToProcess ); AnnotatedClassType classType = context.getMetadataCollector().getClassType( clazzToProcess ); @@ -1032,7 +1032,7 @@ public final class AnnotationBinder { ); AccessType propertyAccessor = entityBinder.getPropertyAccessor( compositeClass ); //In JPA 2, there is a shortcut if the IdClass is the Pk of the associated class pointed to by the id - //it ought to be treated as an embedded and not a real IdClass (at least in the Hibernate's internal way + //it ought to be treated as an embedded and not a real IdClass (at least in the Hibernate's internal way) final boolean isFakeIdClass = isIdClassPkOfTheAssociatedEntity( elementsToProcess, compositeClass, @@ -1589,7 +1589,7 @@ public final class AnnotationBinder { } } if ( isRequiredAnnotationPresent ) { - //create a PropertyData fpr the specJ property holding the mapping + //create a PropertyData for the specJ property holding the mapping PropertyData specJPropertyData = new PropertyInferredData( declaringClass, //same dec @@ -2032,7 +2032,7 @@ public final class AnnotationBinder { } { Column[] keyColumns = null; - //JPA 2 has priority and has different default column values, differenciate legacy from JPA 2 + //JPA 2 has priority and has different default column values, differentiate legacy from JPA 2 Boolean isJPA2 = null; if ( property.isAnnotationPresent( MapKeyColumn.class ) ) { isJPA2 = Boolean.TRUE; @@ -2063,7 +2063,7 @@ public final class AnnotationBinder { } { JoinColumn[] joinKeyColumns = null; - //JPA 2 has priority and has different default column values, differenciate legacy from JPA 2 + //JPA 2 has priority and has different default column values, differentiate legacy from JPA 2 Boolean isJPA2 = null; if ( property.isAnnotationPresent( MapKeyJoinColumns.class ) ) { isJPA2 = Boolean.TRUE; @@ -2565,7 +2565,7 @@ public final class AnnotationBinder { } associationTableBinder.setUniqueConstraints( uniqueConstraints ); associationTableBinder.setJpaIndex( jpaIndexes ); - //set check constaint in the second pass + //set check constraint in the second pass annJoins = joins.length == 0 ? null : joins; annInverseJoins = inverseJoins == null || inverseJoins.length == 0 ? null : inverseJoins; } @@ -2603,7 +2603,7 @@ public final class AnnotationBinder { boolean isIdentifierMapper, MetadataBuildingContext buildingContext, boolean isComponentEmbedded, - boolean isId, //is a identifier + boolean isId, //is an identifier Map inheritanceStatePerClass, String referencedEntityName, //is a component who is overridden by a @MapsId Ejb3JoinColumn[] columns) { @@ -2750,7 +2750,7 @@ public final class AnnotationBinder { //add elements of the embeddable superclass XClass superClass = xClassProcessed.getSuperclass(); while ( superClass != null && superClass.isAnnotationPresent( MappedSuperclass.class ) ) { - //FIXME: proper support of typevariables incl var resolved at upper levels + //FIXME: proper support of type variables incl var resolved at upper levels propContainer = new PropertyContainer( superClass, xClassProcessed, propertyAccessor ); addElementsOfClass( classElements, propContainer, buildingContext ); superClass = superClass.getSuperclass(); @@ -3061,7 +3061,7 @@ public final class AnnotationBinder { final JoinColumn joinColumn = property.getAnnotation( JoinColumn.class ); final JoinColumns joinColumns = property.getAnnotation( JoinColumns.class ); - //Make sure that JPA1 key-many-to-one columns are read only tooj + //Make sure that JPA1 key-many-to-one columns are read only too boolean hasSpecjManyToOne=false; if ( context.getBuildingOptions().isSpecjProprietarySyntaxEnabled() ) { String columnName = ""; @@ -3213,7 +3213,7 @@ public final class AnnotationBinder { KeyValue identifier = propertyHolder.getIdentifier(); if ( identifier == null ) { //this is a @OneToOne in an @EmbeddedId (the persistentClass.identifier is not set yet, it's being built) - //by definition the PK cannot refers to itself so it cannot map to itself + //by definition the PK cannot refer to itself so it cannot map to itself mapToPK = false; } else { @@ -3550,7 +3550,7 @@ public final class AnnotationBinder { InheritanceState state = new InheritanceState( clazz, inheritanceStatePerClass, buildingContext ); if ( superclassState != null ) { //the classes are ordered thus preventing an NPE - //FIXME if an entity has subclasses annotated @MappedSperclass wo sub @Entity this is wrong + //FIXME if an entity has subclasses annotated @MappedSuperclass wo sub @Entity this is wrong superclassState.setHasSiblings( true ); InheritanceState superEntityState = InheritanceState.getInheritanceStateOfSuperEntity( clazz, inheritanceStatePerClass diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/BinderHelper.java b/hibernate-core/src/main/java/org/hibernate/cfg/BinderHelper.java index 3e7ea54c68..78d04445be 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/BinderHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/BinderHelper.java @@ -311,7 +311,7 @@ public class BinderHelper { columnsList.append( ") " ); if ( associatedEntity != null ) { - //overidden destination + //overridden destination columnsList.append( "of " ) .append( associatedEntity.getEntityName() ) .append( "." ) @@ -438,7 +438,7 @@ public class BinderHelper { || "embedded".equals( property.getPropertyAccessorName() ) ) { return; } -// FIXME cannot use subproperties becasue the caller needs top level properties +// FIXME cannot use subproperties because the caller needs top level properties // if ( property.isComposite() ) { // Iterator subProperties = ( (Component) property.getValue() ).getPropertyIterator(); // while ( subProperties.hasNext() ) { @@ -459,7 +459,7 @@ public class BinderHelper { } /** - * Retrieve the property by path in a recursive way, including IndetifierProperty in the loop + * Retrieve the property by path in a recursive way, including IdentifierProperty in the loop * If propertyName is null or empty, the IdentifierProperty is returned */ public static Property findPropertyByName(PersistentClass associatedClass, String propertyName) { @@ -685,7 +685,7 @@ public class BinderHelper { if ( gen == null ) { throw new AnnotationException( "Unknown named generator (@GeneratedValue#generatorName): " + generatorName ); } - //This is quite vague in the spec but a generator could override the generate choice + //This is quite vague in the spec but a generator could override the generator choice String identifierGeneratorStrategy = gen.getStrategy(); //yuk! this is a hack not to override 'AUTO' even if generator is set final boolean avoidOverriding = diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/ComponentPropertyHolder.java b/hibernate-core/src/main/java/org/hibernate/cfg/ComponentPropertyHolder.java index 4a5d78296f..3626566180 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/ComponentPropertyHolder.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/ComponentPropertyHolder.java @@ -58,7 +58,7 @@ import org.hibernate.mapping.Table; * @author Emmanuel Bernard */ public class ComponentPropertyHolder extends AbstractPropertyHolder { - //TODO introduce a overrideTable() method for columns held by sec table rather than the hack + //TODO introduce an overrideTable() method for columns held by sec table rather than the hack // joinsPerRealTableName in ClassPropertyHolder private Component component; private boolean isOrWithinEmbeddedId; diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/Ejb3Column.java b/hibernate-core/src/main/java/org/hibernate/cfg/Ejb3Column.java index 7b86d9308b..90f6916920 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/Ejb3Column.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/Ejb3Column.java @@ -632,7 +632,7 @@ public class Ejb3Column { } } - //must only be called after all setters are defined and before bind + //must only be called after all setters are defined and before binding private void extractDataFromPropertyData(PropertyData inferredData) { if ( inferredData != null ) { XProperty property = inferredData.getProperty(); diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/Ejb3JoinColumn.java b/hibernate-core/src/main/java/org/hibernate/cfg/Ejb3JoinColumn.java index 5e1f19e871..9dc1c1d84e 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/Ejb3JoinColumn.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/Ejb3JoinColumn.java @@ -419,7 +419,7 @@ public class Ejb3JoinColumn extends Ejb3Column { PersistentClass persistentClass, Map joins, Map inheritanceStatePerClass) { - // TODO shouldn't we deduce the classname from the persistentclasS? + // TODO shouldn't we deduce the classname from the persistentClass? this.propertyHolder = PropertyHolderBuilder.buildPropertyHolder( persistentClass, joins, diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/InheritanceState.java b/hibernate-core/src/main/java/org/hibernate/cfg/InheritanceState.java index 3a49dd778e..029862bb97 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/InheritanceState.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/InheritanceState.java @@ -302,7 +302,7 @@ public class InheritanceState { org.hibernate.mapping.MappedSuperclass parentSuperclass = mappedSuperclass; final Class type = buildingContext.getBootstrapContext().getReflectionManager() .toClass( classesToProcessForMappedSuperclass.get( index ) ); - //add MAppedSuperclass if not already there + //add MappedSuperclass if not already there mappedSuperclass = buildingContext.getMetadataCollector().getMappedSuperclass( type ); if ( mappedSuperclass == null ) { mappedSuperclass = new org.hibernate.mapping.MappedSuperclass( parentSuperclass, superEntity ); diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/OneToOneSecondPass.java b/hibernate-core/src/main/java/org/hibernate/cfg/OneToOneSecondPass.java index 37e0a5e40d..8ccb797cbd 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/OneToOneSecondPass.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/OneToOneSecondPass.java @@ -48,7 +48,7 @@ public class OneToOneSecondPass implements SecondPass { private String cascadeStrategy; private Ejb3JoinColumn[] joinColumns; - //that suck, we should read that from the property mainly + //that sucks, we should read that from the property mainly public OneToOneSecondPass( String mappedBy, String ownerEntity, diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/PropertyPreloadedData.java b/hibernate-core/src/main/java/org/hibernate/cfg/PropertyPreloadedData.java index e83e5927c2..a4f2ab6902 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/PropertyPreloadedData.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/PropertyPreloadedData.java @@ -51,7 +51,7 @@ public class PropertyPreloadedData implements PropertyData { } public XClass getDeclaringClass() { - //Preloaded properties are artificial wrapper for colleciton element accesses + //Preloaded properties are artificial wrapper for collection element accesses //and idClass creation, ignore. return null; } diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java index ff48ca5a90..c577158085 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/CollectionBinder.java @@ -554,11 +554,11 @@ public abstract class CollectionBinder { collection.setInverse( isMappedBy ); - //many to many may need some second pass informations + //many to many may need some second pass information if ( !oneToMany && isMappedBy ) { metadataCollector.addMappedBy( getCollectionType().getName(), mappedBy, propertyName ); } - //TODO reducce tableBinder != null and oneToMany + //TODO reduce tableBinder != null and oneToMany XClass collectionType = getCollectionType(); if ( inheritanceStatePerClass == null) throw new AssertionFailure( "inheritanceStatePerClass not set" ); SecondPass sp = getSecondPass( diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/MapBinder.java b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/MapBinder.java index 32d35bf9e9..e4c16b9a37 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/MapBinder.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/MapBinder.java @@ -185,7 +185,7 @@ public class MapBinder extends CollectionBinder { } else { //this is a true Map mapping - //TODO ugly copy/pastle from CollectionBinder.bindManyToManySecondPass + //TODO ugly copy/paste from CollectionBinder.bindManyToManySecondPass String mapKeyType; Class target = void.class; /* @@ -322,7 +322,7 @@ public class MapBinder extends CollectionBinder { column.setTable( mapValue.getCollectionTable() ); } elementBinder.setColumns( elementColumns ); - //do not call setType as it extract the type from @Type + //do not call setType as it extracts the type from @Type //the algorithm generally does not apply for map key anyway elementBinder.setKey(true); elementBinder.setType( @@ -338,7 +338,7 @@ public class MapBinder extends CollectionBinder { } //FIXME pass the Index Entity JoinColumns if ( !collection.isOneToMany() ) { - //index column shoud not be null + //index column should not be null for (Ejb3JoinColumn col : mapKeyManyToManyColumns) { col.forceNotNull(); } diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/PropertyBinder.java b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/PropertyBinder.java index 83c3f0c34a..a039776e89 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/PropertyBinder.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/PropertyBinder.java @@ -212,8 +212,8 @@ public class PropertyBinder { private Property bind(Property prop) { if (isId) { final RootClass rootClass = ( RootClass ) holder.getPersistentClass(); - //if an xToMany, it as to be wrapped today. - //FIXME this pose a problem as the PK is the class instead of the associated class which is not really compliant with the spec + //if an xToMany, it has to be wrapped today. + //FIXME this poses a problem as the PK is the class instead of the associated class which is not really compliant with the spec if ( isXToMany || entityBinder.wrapIdsInEmbeddedComponents() ) { Component identifier = (Component) rootClass.getIdentifier(); if (identifier == null) { diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/SimpleValueBinder.java b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/SimpleValueBinder.java index 2f55aec0ad..6808459c11 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/SimpleValueBinder.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/SimpleValueBinder.java @@ -384,7 +384,7 @@ public class SimpleValueBinder { this.explicitType = explicitType; } - //FIXME raise an assertion failure if setResolvedTypeMapping(String) and setResolvedTypeMapping(Type) are use at the same time + //FIXME raise an assertion failure if setResolvedTypeMapping(String) and setResolvedTypeMapping(Type) are used at the same time public void setExplicitType(Type typeAnn) { if ( typeAnn != null ) { @@ -500,7 +500,7 @@ public class SimpleValueBinder { simpleValue.setTypeParameters( typeDef.getParametersAsProperties() ); } if ( typeParameters != null && typeParameters.size() != 0 ) { - //explicit type params takes precedence over type def params + //explicit type params take precedence over type def params simpleValue.setTypeParameters( typeParameters ); } simpleValue.setTypeName( type ); diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/reflection/JPAOverriddenAnnotationReader.java b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/reflection/JPAOverriddenAnnotationReader.java index 78ba00db08..b40d2e531c 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/annotations/reflection/JPAOverriddenAnnotationReader.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/annotations/reflection/JPAOverriddenAnnotationReader.java @@ -1377,7 +1377,7 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader { } } if ( elementsForProperty.size() == 0 && defaults.canUseJavaAnnotations() ) { - //we have nothing, so Java annotations might occurs + //we have nothing, so Java annotations might occur Annotation annotation = getPhysicalAnnotation( Version.class ); if ( annotation != null ) { annotationList.add( annotation ); @@ -2614,7 +2614,7 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader { } else { throw new AnnotationException( - "Unknown DiscrimiatorType in XML: " + value + " (" + SCHEMA_VALIDATION + ")" + "Unknown DiscriminatorType in XML: " + value + " (" + SCHEMA_VALIDATION + ")" ); } } @@ -2869,7 +2869,7 @@ public class JPAOverriddenAnnotationReader implements AnnotationReader { secondaryTables.add( AnnotationFactory.create( annotation ) ); } /* - * You can't have both secondary table in XML and Java, + * You can't have both secondary tables in XML and Java, * since there would be no way to "remove" a secondary table */ if ( secondaryTables.size() == 0 && defaults.canUseJavaAnnotations() ) { diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationIntegrator.java b/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationIntegrator.java index e4a8a2f4a3..f2524f7144 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationIntegrator.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/beanvalidation/BeanValidationIntegrator.java @@ -146,7 +146,7 @@ public class BeanValidationIntegrator implements Integrator { } else { // otherwise check the validation modes - // todo : in many ways this duplicates thew checks done on the TypeSafeActivator when a ValidatorFactory could not be obtained + // todo : in many ways this duplicates the checks done on the TypeSafeActivator when a ValidatorFactory could not be obtained validateMissingBeanValidationApi( modes ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java b/hibernate-core/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java index 56bb0b6c5b..047f414d44 100644 --- a/hibernate-core/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java +++ b/hibernate-core/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java @@ -752,7 +752,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers // AST in ORM 5+, handling this type of condition is either extremely difficult or impossible. Forcing // recreation isn't ideal, but not really any other option in ORM 4. // Selecting a type used in where part of update statement - // (must match condidion in org.hibernate.persister.collection.BasicCollectionPersister.doUpdateRows). + // (must match condition in org.hibernate.persister.collection.BasicCollectionPersister#doUpdateRows). // See HHH-9474 Type whereType; if ( persister.hasIndex() ) { diff --git a/hibernate-core/src/main/java/org/hibernate/context/internal/ThreadLocalSessionContext.java b/hibernate-core/src/main/java/org/hibernate/context/internal/ThreadLocalSessionContext.java index 40b6832e5c..c8e9caf7b5 100644 --- a/hibernate-core/src/main/java/org/hibernate/context/internal/ThreadLocalSessionContext.java +++ b/hibernate-core/src/main/java/org/hibernate/context/internal/ThreadLocalSessionContext.java @@ -108,7 +108,7 @@ public class ThreadLocalSessionContext extends AbstractCurrentSessionContext { } private boolean needsWrapping(Session session) { - // try to make sure we don't wrap and already wrapped session + // try to make sure we don't wrap an already wrapped session if ( Proxy.isProxyClass( session.getClass() ) ) { final InvocationHandler invocationHandler = Proxy.getInvocationHandler( session ); if ( invocationHandler != null && TransactionProtectionWrapper.class.isInstance( invocationHandler ) ) { @@ -182,7 +182,7 @@ public class ThreadLocalSessionContext extends AbstractCurrentSessionContext { SESSION_PROXY_INTERFACES, wrapper ); - // yick! need this for proper serialization/deserialization handling... + // yuck! need this for proper serialization/deserialization handling... wrapper.setWrapped( wrapped ); return wrapped; } @@ -315,7 +315,7 @@ public class ThreadLocalSessionContext extends AbstractCurrentSessionContext { else if ( "getStatistics".equals( methodName ) || "isOpen".equals( methodName ) || "getListeners".equals( methodName ) ) { - // allow these to go through the the real session no matter what + // allow these to go through the real session no matter what LOG.tracef( "Allowing invocation [%s] to proceed to real session", methodName ); } else if ( !realSession.isOpen() ) { diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java index 81b4f38c07..2c087e2ca3 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/AbstractHANADialect.java @@ -428,7 +428,7 @@ public abstract class AbstractHANADialect extends Dialect { // stream passed in via // PreparedStatement.setCharacterStream(int,Reader,long) // after the stream has been processed. this causes problems later if we are - // using non-contexual lob creation and HANA then closes our StringReader. + // using non-contextual lob creation and HANA then closes our StringReader. // see test case LobLocatorTest private static class HANAClobTypeDescriptor extends ClobTypeDescriptor { @@ -932,8 +932,7 @@ public abstract class AbstractHANADialect extends Dialect { registerHanaKeywords(); - // createBlob() and createClob() are not supported by the HANA JDBC - // driver + // createBlob() and createClob() are not supported by the HANA JDBC driver getDefaultProperties().setProperty( AvailableSettings.NON_CONTEXTUAL_LOB_CREATION, "true" ); // getGeneratedKeys() is not supported by the HANA JDBC driver diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/AbstractTransactSQLDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/AbstractTransactSQLDialect.java index 36f9cd928f..5c7b6a81dd 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/AbstractTransactSQLDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/AbstractTransactSQLDialect.java @@ -143,7 +143,7 @@ abstract class AbstractTransactSQLDialect extends Dialect { @Override public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map keyColumnNames) { - // TODO: merge additional lockoptions support in Dialect.applyLocksToSql + // TODO: merge additional lock options support in Dialect.applyLocksToSql final Iterator itr = aliasedLockOptions.getAliasLockIterator(); final StringBuilder buffer = new StringBuilder( sql ); diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/DB2Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/DB2Dialect.java index 3ff66a3812..124876597f 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/DB2Dialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/DB2Dialect.java @@ -438,7 +438,7 @@ public class DB2Dialect extends Dialect { /** * {@inheritDoc} *

- * NOTE : DB2 is know to support parameters in the SELECT clause, but only in casted form + * NOTE : DB2 is known to support parameters in the SELECT clause, but only in casted form * (see {@link #requiresCastingOfParametersInSelectClause()}). */ @Override @@ -566,7 +566,7 @@ public class DB2Dialect extends Dialect { // we have one of: // * ASC + NULLS LAST // * DESC + NULLS FIRST - // so just drop the null precedence. *NOTE: we could pass along the null precedence here, + // so just drop the null precedence. *NOTE*: we could pass along the null precedence here, // but only DB2 9.7 or greater understand it; dropping it is more portable across DB2 versions return super.renderOrderByElement( expression, collation, order, NullPrecedence.NONE ); } diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/IngresDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/IngresDialect.java index 9bc7973e9b..bd97084f5c 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/IngresDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/IngresDialect.java @@ -163,7 +163,7 @@ public class IngresDialect extends Dialect { getDefaultProperties().setProperty( Environment.USE_GET_GENERATED_KEYS, "false" ); // There is no support for a native boolean type that accepts values // of true, false or unknown. Using the tinyint type requires - // substitions of true and false. + // substitutions of true and false. getDefaultProperties().setProperty( Environment.QUERY_SUBSTITUTIONS, "true=1,false=0" ); } diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/InterbaseDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/InterbaseDialect.java index 96eb77691c..89958c5142 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/InterbaseDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/InterbaseDialect.java @@ -42,7 +42,7 @@ public class InterbaseDialect extends Dialect { }; /** - * Constructs a InterbaseDialect + * Constructs an InterbaseDialect */ public InterbaseDialect() { super(); diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java index 0027263e19..242212b618 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java @@ -60,7 +60,7 @@ public class SybaseASE15Dialect extends SybaseDialect { registerFunction( "coalesce", new VarArgsSQLFunction( "coalesce(", ",", ")" ) ); registerFunction( "col_length", new SQLFunctionTemplate( StandardBasicTypes.INTEGER, "col_length(?1, ?2)" ) ); registerFunction( "col_name", new SQLFunctionTemplate( StandardBasicTypes.STRING, "col_name(?1, ?2)" ) ); - // Sybase has created current_date and current_time inplace of getdate() + // Sybase has created current_date and current_time in place of getdate() registerFunction( "current_time", new NoArgSQLFunction( "current_time", StandardBasicTypes.TIME ) ); registerFunction( "current_date", new NoArgSQLFunction( "current_date", StandardBasicTypes.DATE ) ); diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/function/AbstractAnsiTrimEmulationFunction.java b/hibernate-core/src/main/java/org/hibernate/dialect/function/AbstractAnsiTrimEmulationFunction.java index d08d897a72..2382ecb0ed 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/function/AbstractAnsiTrimEmulationFunction.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/function/AbstractAnsiTrimEmulationFunction.java @@ -44,7 +44,7 @@ public abstract class AbstractAnsiTrimEmulationFunction implements SQLFunction { @Override public final String render(Type argumentType, List args, SessionFactoryImplementor factory) throws QueryException { // According to both the ANSI-SQL and JPA specs, trim takes a variable number of parameters between 1 and 4. - // at least one paramer (trimSource) is required. From the SQL spec: + // at least one parameter (trimSource) is required. From the SQL spec: // // ::= // TRIM diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/function/StandardAnsiSqlAggregationFunctions.java b/hibernate-core/src/main/java/org/hibernate/dialect/function/StandardAnsiSqlAggregationFunctions.java index f4f710bd6e..2e6b8591cf 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/function/StandardAnsiSqlAggregationFunctions.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/function/StandardAnsiSqlAggregationFunctions.java @@ -157,7 +157,7 @@ public class StandardAnsiSqlAggregationFunctions { public Type getReturnType(Type firstArgumentType, Mapping mapping) { final int jdbcType = determineJdbcTypeCode( firstArgumentType, mapping ); - // First allow the actual type to control the return value; the underlying sqltype could + // First allow the actual type to control the return value; the underlying sql type could // actually be different if ( firstArgumentType == StandardBasicTypes.BIG_INTEGER ) { return StandardBasicTypes.BIG_INTEGER; diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/identity/Chache71IdentityColumnSupport.java b/hibernate-core/src/main/java/org/hibernate/dialect/identity/Chache71IdentityColumnSupport.java index 400982b2ab..44f4ac7957 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/identity/Chache71IdentityColumnSupport.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/identity/Chache71IdentityColumnSupport.java @@ -19,7 +19,7 @@ public class Chache71IdentityColumnSupport extends IdentityColumnSupportImpl { @Override public boolean hasDataTypeInIdentityColumn() { - // Whether this dialect has an Identity clause added to the data type or a completely seperate identity + // Whether this dialect has an Identity clause added to the data type or a completely separate identity // data type return true; } diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/pagination/CUBRIDLimitHandler.java b/hibernate-core/src/main/java/org/hibernate/dialect/pagination/CUBRIDLimitHandler.java index 7fee33d78f..8e2f69014b 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/pagination/CUBRIDLimitHandler.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/pagination/CUBRIDLimitHandler.java @@ -18,7 +18,7 @@ public class CUBRIDLimitHandler extends AbstractLimitHandler { public static final CUBRIDLimitHandler INSTANCE = new CUBRIDLimitHandler(); private CUBRIDLimitHandler() { - // NOP + // NOOP } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/pagination/FirstLimitHandler.java b/hibernate-core/src/main/java/org/hibernate/dialect/pagination/FirstLimitHandler.java index 72af896aaa..430b634f28 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/pagination/FirstLimitHandler.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/pagination/FirstLimitHandler.java @@ -17,7 +17,7 @@ public class FirstLimitHandler extends LegacyFirstLimitHandler { public static final FirstLimitHandler INSTANCE = new FirstLimitHandler(); private FirstLimitHandler() { - // NOP + // NOOP } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/pagination/LegacyFirstLimitHandler.java b/hibernate-core/src/main/java/org/hibernate/dialect/pagination/LegacyFirstLimitHandler.java index dbf6dca837..62dfb2e419 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/pagination/LegacyFirstLimitHandler.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/pagination/LegacyFirstLimitHandler.java @@ -18,7 +18,7 @@ public class LegacyFirstLimitHandler extends AbstractLimitHandler { public static final LegacyFirstLimitHandler INSTANCE = new LegacyFirstLimitHandler(); LegacyFirstLimitHandler() { - // NOP + // NOOP } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/pagination/NoopLimitHandler.java b/hibernate-core/src/main/java/org/hibernate/dialect/pagination/NoopLimitHandler.java index b67a670dc2..c11a21ae68 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/pagination/NoopLimitHandler.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/pagination/NoopLimitHandler.java @@ -21,7 +21,7 @@ public class NoopLimitHandler extends AbstractLimitHandler { public static final NoopLimitHandler INSTANCE = new NoopLimitHandler(); private NoopLimitHandler() { - // NOP + // NOOP } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/pagination/SQL2008StandardLimitHandler.java b/hibernate-core/src/main/java/org/hibernate/dialect/pagination/SQL2008StandardLimitHandler.java index 54df6bc8a7..0ef5649126 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/pagination/SQL2008StandardLimitHandler.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/pagination/SQL2008StandardLimitHandler.java @@ -21,7 +21,7 @@ public class SQL2008StandardLimitHandler extends AbstractLimitHandler { * Constructs a SQL2008StandardLimitHandler */ private SQL2008StandardLimitHandler() { - // NOP + // NOOP } @Override diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/pagination/SQLServer2005LimitHandler.java b/hibernate-core/src/main/java/org/hibernate/dialect/pagination/SQLServer2005LimitHandler.java index daed5489f0..789f6c3c22 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/pagination/SQLServer2005LimitHandler.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/pagination/SQLServer2005LimitHandler.java @@ -60,7 +60,7 @@ public class SQLServer2005LimitHandler extends AbstractLimitHandler { * Constructs a SQLServer2005LimitHandler */ public SQLServer2005LimitHandler() { - // NOP + // NOOP } @Override @@ -363,7 +363,7 @@ public class SQLServer2005LimitHandler extends AbstractLimitHandler { } else { // rather than taking the first match, we now iterate all matches - // until we determine a match that isn't considered "ignorable'. + // until we determine a match that isn't considered "ignorable". while ( matcher.find() && matcher.groupCount() > 0 ) { final int position = matcher.start(); if ( !isPositionIgnorable( ignoreRangeList, position ) ) { diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/Collections.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/Collections.java index 2683657b8e..e474b6bad8 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/internal/Collections.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/Collections.java @@ -279,7 +279,7 @@ public final class Collections { } if ( loadedPersister != null ) { - // we will need to remove ye olde entries + // we will need to remove the old entries entry.setDoremove( true ); if ( entry.isDorecreate() ) { LOG.trace( "Forcing collection initialization" ); diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/ForeignKeys.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/ForeignKeys.java index 814cccf238..5e1b545c31 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/internal/ForeignKeys.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/ForeignKeys.java @@ -258,7 +258,7 @@ public final class ForeignKeys { return true; } - // todo : shouldnt assumed be revered here? + // todo : shouldn't assumed be reversed here? return !isTransient( entityName, entity, assumed, session ); } diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/Nullability.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/Nullability.java index 6c28d7ca8a..1d3a48b829 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/internal/Nullability.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/Nullability.java @@ -81,9 +81,9 @@ public final class Nullability { * * * In the previous implementation, not-null stuffs where checked - * filtering by level one only updateable + * filtering by level one only updatable * or insertable columns. So setting a sub component as update="false" - * has no effect on not-null check if the main component had good checkeability + * has no effect on not-null check if the main component had good checkability * In this implementation, we keep this feature. * However, I never see any documentation mentioning that, but it's for * sure a limitation. @@ -104,7 +104,7 @@ public final class Nullability { GenerationTiming.NEVER == inMemoryValueGenerationStrategies[i].getGenerationTiming() ) { final Object value = values[i]; if ( !nullability[i] && value == null ) { - //check basic level one nullablilty + //check basic level one nullability throw new PropertyValueException( "not-null property references a null or transient value", persister.getEntityName(), diff --git a/hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java b/hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java index ed0a5dc862..16e71d913c 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/internal/StatefulPersistenceContext.java @@ -352,7 +352,7 @@ public class StatefulPersistenceContext implements PersistenceContext { return dbValue; } else { - // for a mutable natural there is a likelihood that the the information will already be + // for a mutable natural id there is a likelihood that the information will already be // snapshot-cached. final int[] props = persister.getNaturalIdentifierProperties(); final Object[] entitySnapshot = getDatabaseSnapshot( id, persister ); @@ -530,8 +530,8 @@ public class StatefulPersistenceContext implements PersistenceContext { When a virtual method is called via an interface the JVM needs to resolve which concrete implementation to call. This takes CPU cycles and is a performance penalty. It also prevents method - in-ling which further degrades performance. Casting to an implementation and making a direct method call - removes the virtual call, and allows the methods to be in-lined. In this critical code path, it has a very + inlining which further degrades performance. Casting to an implementation and making a direct method call + removes the virtual call, and allows the methods to be inlined. In this critical code path, it has a very large impact on performance to make virtual method calls. */ if (persister.getEntityEntryFactory() instanceof MutableEntityEntryFactory) { @@ -1957,7 +1957,7 @@ public class StatefulPersistenceContext implements PersistenceContext { persister = locateProperPersister( persister ); - // 'justAddedLocally' is meant to handle the case where we would get double stats jounaling + // 'justAddedLocally' is meant to handle the case where we would get double stats journaling // from a single load event. The first put journal would come from the natural id resolution; // the second comes from the entity loading. In this condition, we want to avoid the multiple // 'put' stats incrementing. @@ -2164,7 +2164,7 @@ public class StatefulPersistenceContext implements PersistenceContext { // todo : couple of things wrong here: // 1) should be using access strategy, not plain evict.. - // 2) should prefer session-cached values if any (requires interaction from removeLocalNaturalIdCrossReference + // 2) should prefer session-cached values if any (requires interaction from removeLocalNaturalIdCrossReference) persister = locateProperPersister( persister ); final NaturalIdDataAccess naturalIdCacheAccessStrategy = persister.getNaturalIdCacheAccessStrategy(); diff --git a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultFlushEntityEventListener.java b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultFlushEntityEventListener.java index 1f0a604902..ced996e913 100644 --- a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultFlushEntityEventListener.java +++ b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultFlushEntityEventListener.java @@ -529,7 +529,7 @@ public class DefaultFlushEntityEventListener implements FlushEntityEventListener int[] dirty = persister.resolveAttributeIndexes( ( (SelfDirtinessTracker) entity ).$$_hibernate_getDirtyAttributes() ); // HHH-12051 - filter non-updatable attributes - // TODO: add Updateability to EnhancementContext and skip dirty tracking of those attributes + // TODO: add Updatability to EnhancementContext and skip dirty tracking of those attributes int count = 0; for ( int i : dirty ) { if ( persister.getPropertyUpdateability()[i] ) { @@ -573,7 +573,7 @@ public class DefaultFlushEntityEventListener implements FlushEntityEventListener boolean dirtyCheckPossible = true; if ( dirtyProperties == null ) { - // Interceptor returned null, so do the dirtycheck ourself, if possible + // Interceptor returned null, so do the dirty check ourself, if possible try { session.getEventListenerManager().dirtyCalculationStart(); diff --git a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultMergeEventListener.java b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultMergeEventListener.java index 0749eb0d97..11a78e2cb2 100644 --- a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultMergeEventListener.java +++ b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultMergeEventListener.java @@ -415,7 +415,7 @@ public class DefaultMergeEventListener extends AbstractSaveEventListener impleme // // This second condition is a special case which allows // an entity to be merged during the same transaction - // (though during a seperate operation) in which it was + // (though during a separate operation) in which it was // originally persisted/saved boolean changed = !persister.getVersionType().isSame( persister.getVersion( target ), diff --git a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultReplicateEventListener.java b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultReplicateEventListener.java index c7c65da7c5..10a919183f 100644 --- a/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultReplicateEventListener.java +++ b/hibernate-core/src/main/java/org/hibernate/event/internal/DefaultReplicateEventListener.java @@ -106,7 +106,7 @@ public class DefaultReplicateEventListener extends AbstractSaveEventListener imp ); // if can replicate, will result in a SQL UPDATE - // else do nothing (don't even reassociate object!) + // else do nothing (don't even re-associate object!) if ( canReplicate ) { performReplication( entity, id, realOldVersion, persister, replicationMode, source ); } diff --git a/hibernate-core/src/main/java/org/hibernate/event/internal/DirtyCollectionSearchVisitor.java b/hibernate-core/src/main/java/org/hibernate/event/internal/DirtyCollectionSearchVisitor.java index 79fbf5a9a3..73fb564b6e 100644 --- a/hibernate-core/src/main/java/org/hibernate/event/internal/DirtyCollectionSearchVisitor.java +++ b/hibernate-core/src/main/java/org/hibernate/event/internal/DirtyCollectionSearchVisitor.java @@ -40,12 +40,12 @@ public class DirtyCollectionSearchVisitor extends AbstractVisitor { final PersistentCollection persistentCollection; if ( type.isArrayType() ) { persistentCollection = session.getPersistenceContextInternal().getCollectionHolder( collection ); - // if no array holder we found an unwrappered array (this can't occur, + // if no array holder we found an unwrapped array (this can't occur, // because we now always call wrap() before getting to here) // return (ah==null) ? true : searchForDirtyCollections(ah, type); } else { - // if not wrappered yet, its dirty (this can't occur, because + // if not wrapped yet, its dirty (this can't occur, because // we now always call wrap() before getting to here) // return ( ! (obj instanceof PersistentCollection) ) ? //true : searchForDirtyCollections( (PersistentCollection) obj, type ); diff --git a/hibernate-core/src/main/java/org/hibernate/event/internal/OnLockVisitor.java b/hibernate-core/src/main/java/org/hibernate/event/internal/OnLockVisitor.java index 3cbb86ae47..4ca7cd2333 100644 --- a/hibernate-core/src/main/java/org/hibernate/event/internal/OnLockVisitor.java +++ b/hibernate-core/src/main/java/org/hibernate/event/internal/OnLockVisitor.java @@ -45,26 +45,26 @@ public class OnLockVisitor extends ReattachVisitor { if ( isOwnerUnchanged( persistentCollection, persister, extractCollectionKeyFromOwner( persister ) ) ) { // a "detached" collection that originally belonged to the same entity if ( persistentCollection.isDirty() ) { - throw new HibernateException( "reassociated object has dirty collection" ); + throw new HibernateException( "re-associated object has dirty collection" ); } reattachCollection( persistentCollection, type ); } else { // a "detached" collection that belonged to a different entity - throw new HibernateException( "reassociated object has dirty collection reference" ); + throw new HibernateException( "re-associated object has dirty collection reference" ); } } else { // a collection loaded in the current session // can not possibly be the collection belonging // to the entity passed to update() - throw new HibernateException( "reassociated object has dirty collection reference" ); + throw new HibernateException( "re-associated object has dirty collection reference" ); } } else { // brand new collection //TODO: or an array!! we can't lock objects with arrays now?? - throw new HibernateException( "reassociated object has dirty collection reference (or an array)" ); + throw new HibernateException( "re-associated object has dirty collection reference (or an array)" ); } return null; diff --git a/hibernate-core/src/main/java/org/hibernate/event/internal/ProxyVisitor.java b/hibernate-core/src/main/java/org/hibernate/event/internal/ProxyVisitor.java index cf715aeb73..c462d5dd12 100644 --- a/hibernate-core/src/main/java/org/hibernate/event/internal/ProxyVisitor.java +++ b/hibernate-core/src/main/java/org/hibernate/event/internal/ProxyVisitor.java @@ -72,7 +72,7 @@ public abstract class ProxyVisitor extends AbstractVisitor { } else { if ( !isCollectionSnapshotValid( collection ) ) { - throw new HibernateException( "could not reassociate uninitialized transient collection" ); + throw new HibernateException( "could not re-associate uninitialized transient collection" ); } CollectionPersister collectionPersister = session.getFactory() .getCollectionPersister( collection.getRole() ); diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/HqlLexer.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/HqlLexer.java index 0ef03d0cda..6c28fe6368 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/HqlLexer.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/HqlLexer.java @@ -44,13 +44,13 @@ class HqlLexer extends HqlBaseLexer { @Override public void panic() { - //overriden to avoid System.exit + //overridden to avoid System.exit panic( "CharScanner: panic" ); } @Override public void panic(String s) { - //overriden to avoid System.exit + //overridden to avoid System.exit throw new QueryException( s ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/HqlSqlWalker.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/HqlSqlWalker.java index bdb8ced180..5943b7ffb1 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/HqlSqlWalker.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/HqlSqlWalker.java @@ -795,7 +795,7 @@ public class HqlSqlWalker extends HqlSqlBaseWalker implements ErrorReporter, Par } // After that, process the JOINs. - // Invoke a delegate to do the work, as this is farily complex. + // Invoke a delegate to do the work, as this is fairly complex. JoinProcessor joinProcessor = new JoinProcessor( this ); joinProcessor.processJoins( qn ); @@ -952,7 +952,7 @@ public class HqlSqlWalker extends HqlSqlBaseWalker implements ErrorReporter, Par parameterSpecs.add( 0, paramSpec ); if ( sessionFactoryHelper.getFactory().getDialect().requiresCastingOfParametersInSelectClause() ) { - // we need to wrtap the param in a cast() + // we need to wrap the param in a cast() MethodNode versionMethodNode = (MethodNode) getASTFactory().create( HqlSqlTokenTypes.METHOD_CALL, "(" @@ -1348,7 +1348,7 @@ public class HqlSqlWalker extends HqlSqlBaseWalker implements ErrorReporter, Par } public boolean isShallowQuery() { - // select clauses for insert statements should alwasy be treated as shallow + // select clauses for insert statements should always be treated as shallow return getStatementType() == INSERT || queryTranslatorImpl.isShallowQuery(); } diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/QueryTranslatorImpl.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/QueryTranslatorImpl.java index 09376e282e..fb36f64f1d 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/QueryTranslatorImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/QueryTranslatorImpl.java @@ -198,7 +198,7 @@ public class QueryTranslatorImpl implements FilterTranslator { // command executions. // // Possible to just move the sql generation for dml stuff, but for - // consistency-sake probably best to just move responsiblity for + // consistency-sake probably best to just move responsibility for // the generation phase completely into the delegates // (QueryLoader/StatementExecutor) themselves. Also, not sure why // QueryLoader currently even has a dependency on this at all; does @@ -538,7 +538,7 @@ public class QueryTranslatorImpl implements FilterTranslator { @Override public void validateScrollability() throws HibernateException { // Impl Note: allows multiple collection fetches as long as the - // entire fecthed graph still "points back" to a single + // entire fetched graph still "points back" to a single // root entity for return errorIfDML(); diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/SqlGenerator.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/SqlGenerator.java index 1ea2c5b1b4..709ebee290 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/SqlGenerator.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/SqlGenerator.java @@ -337,7 +337,7 @@ public class SqlGenerator extends SqlGeneratorBase implements ErrorReporter { @Override protected void fromFragmentSeparator(AST a) { - // check two "adjecent" nodes at the top of the from-clause tree + // check two "adjacent" nodes at the top of the from-clause tree AST next = a.getNextSibling(); if ( next == null || !hasText( a ) ) { return; @@ -373,7 +373,7 @@ public class SqlGenerator extends SqlGeneratorBase implements ErrorReporter { else if ( right.getRealOrigin() == left || ( right.getRealOrigin() != null && right.getRealOrigin() == left.getRealOrigin() ) ) { // right represents a joins originating from left; or - // both right and left reprersent joins originating from the same FromElement + // both right and left represent joins originating from the same FromElement if ( right.getJoinSequence() != null && right.getJoinSequence().isThetaStyle() ) { writeCrossJoinSeparator(); } diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/AbstractNullnessCheckNode.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/AbstractNullnessCheckNode.java index 225a579a0e..7f9d81cd05 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/AbstractNullnessCheckNode.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/AbstractNullnessCheckNode.java @@ -25,7 +25,7 @@ public abstract class AbstractNullnessCheckNode extends UnaryLogicOperatorNode { @Override public void initialize() { // TODO : this really needs to be delayed until after we definitively know the operand node type; - // where this is currently a problem is parameters for which where we cannot unequivocally + // where this is currently a problem is parameters for which we cannot unequivocally // resolve an expected type Type operandType = extractDataType( getOperand() ); if ( operandType == null ) { @@ -135,7 +135,7 @@ public abstract class AbstractNullnessCheckNode extends UnaryLogicOperatorNode { return splits; } else { - throw new HibernateException( "dont know how to extract row value elements from node : " + operand ); + throw new HibernateException( "don't know how to extract row value elements from node : " + operand ); } } } diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/BinaryArithmeticOperatorNode.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/BinaryArithmeticOperatorNode.java index a9182fec78..f9ba3c4136 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/BinaryArithmeticOperatorNode.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/BinaryArithmeticOperatorNode.java @@ -167,7 +167,7 @@ public class BinaryArithmeticOperatorNode extends AbstractSelectExpression boolean rhsIsDateTime = isDateTimeType( rhType ); // handle the (assumed) valid cases: - // #1 - the only valid datetime addition synatx is one or the other is a datetime (but not both) + // #1 - the only valid datetime addition syntax is one or the other is a datetime (but not both) if ( getType() == HqlSqlTokenTypes.PLUS ) { // one or the other needs to be a datetime for us to get into this method in the first place... return lhsIsDateTime ? lhType : rhType; diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/BinaryLogicOperatorNode.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/BinaryLogicOperatorNode.java index 17e11d06f1..88ce4b46cf 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/BinaryLogicOperatorNode.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/BinaryLogicOperatorNode.java @@ -67,7 +67,7 @@ public class BinaryLogicOperatorNode extends AbstractSelectExpression implements protected final void mutateRowValueConstructorSyntaxesIfNecessary(Type lhsType, Type rhsType) { // TODO : this really needs to be delayed until after we definitively know all node types - // where this is currently a problem is parameters for which where we cannot unequivocally + // where this is currently a problem is parameters for which we cannot unequivocally // resolve an expected type SessionFactoryImplementor sessionFactory = getSessionFactoryHelper().getFactory(); if ( lhsType != null && rhsType != null ) { diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/CollectionSizeNode.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/CollectionSizeNode.java index a8f868ea66..2017d1288b 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/CollectionSizeNode.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/CollectionSizeNode.java @@ -53,7 +53,7 @@ public class CollectionSizeNode extends SqlNode implements SelectExpression { // where = alias_. // Note that `collectionPropertyMapping.toColumns(.., COLLECTION_SIZE)` returns the complete `count(...)` SQL - // expression, hence he expectation for a single expression regardless of the number of columns in the key. + // expression, hence the expectation for a single expression regardless of the number of columns in the key. final String collectionTableAlias = collectionOwnerFromElement.getFromClause() .getAliasGenerator() diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/ComponentJoin.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/ComponentJoin.java index a44391c5f1..8a1aee5279 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/ComponentJoin.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/ComponentJoin.java @@ -121,7 +121,7 @@ public class ComponentJoin extends FromElement { public String renderScalarIdentifierSelect(int i) { String[] cols = getBasePropertyMapping().toColumns( getTableAlias(), getComponentProperty() ); StringBuilder buf = new StringBuilder(); - // For property references generate . as + // For property references generate . as for ( int j = 0; j < cols.length; j++ ) { final String column = cols[j]; if ( j > 0 ) { diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/DotNode.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/DotNode.java index 426b5c6838..a976147c92 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/DotNode.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/DotNode.java @@ -162,7 +162,7 @@ public class DotNode extends FromReferenceNode implements DisplayableNode, Selec // Set the attributes of the property reference expression. String propName = property.getText(); propertyName = propName; - // If the uresolved property path isn't set yet, just use the property name. + // If the unresolved property path isn't set yet, just use the property name. if ( propertyPath == null ) { propertyPath = propName; } @@ -559,7 +559,7 @@ public class DotNode extends FromReferenceNode implements DisplayableNode, Selec return true; } - // otherwise (subquery case) dont reuse the fromElement if we are processing the from-clause of the subquery + // otherwise (subquery case) don't reuse the fromElement if we are processing the from-clause of the subquery return getWalker().getCurrentClauseType() != SqlTokenTypes.FROM; } diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/EntityJoinFromElement.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/EntityJoinFromElement.java index 3f09232112..5e60e6a1d7 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/EntityJoinFromElement.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/EntityJoinFromElement.java @@ -176,7 +176,7 @@ public class EntityJoinFromElement extends FromElement { else { // We know there is a fromFragment and that we shouldn't render a table group // This means the entity is polymorphic and the entity join is an inner join - // We move the with clause stuff to the where clause but still need to have a valid on condition + // We move the with clause stuff to the where clause but still need to have a valid condition buffer.append( "1=1" ); buffer.append( fromFragment ); diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/FromElement.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/FromElement.java index 91237a8955..969c1507ba 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/FromElement.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/FromElement.java @@ -413,7 +413,7 @@ public class FromElement extends HqlSqlWalkerNode implements DisplayableNode, Pa else if ( !getWalker().isInFrom() ) { // HHH-276 : implied joins in a subselect where clause - The destination needs to be added // to the destination's from clause. - getFromClause().addChild( this ); // Not sure if this is will fix everything, but it works. + getFromClause().addChild( this ); // Not sure if this will fix everything, but it works. } else { // Otherwise, the destination node was implied by the FROM clause and the FROM clause processor @@ -612,7 +612,7 @@ public class FromElement extends HqlSqlWalkerNode implements DisplayableNode, Pa } public void setInProjectionList(boolean inProjectionList) { - // Do nothing, eplicit from elements are *always* in the projection list. + // Do nothing, explicit from elements are *always* in the projection list. } public boolean inProjectionList() { diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/FromElementType.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/FromElementType.java index 8f88d417e0..23e8ce656f 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/FromElementType.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/FromElementType.java @@ -364,7 +364,7 @@ class FromElementType { } this.queryableCollection = queryableCollection; if ( !queryableCollection.isOneToMany() ) { - // For many-to-many joins, use the tablename from the queryable collection for the default text. + // For many-to-many joins, use the table name from the queryable collection for the default text. fromElement.setText( queryableCollection.getTableName() + " " + getTableAlias() ); } } @@ -553,7 +553,7 @@ class FromElementType { // indexed, many-to-many collections must be treated specially here if the property to // be mapped touches on the index as we must adjust the alias to use the alias from - // the association table (which i different than the one passed in) + // the association table (which is different than the one passed in) if ( queryableCollection.isManyToMany() && queryableCollection.hasIndex() && SPECIAL_MANY2MANY_TREATMENT_FUNCTION_NAMES.contains( propertyName ) ) { diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/IdentNode.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/IdentNode.java index 26e5d0ee4d..e037ef2e80 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/IdentNode.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/IdentNode.java @@ -48,7 +48,7 @@ public class IdentNode extends FromReferenceNode implements SelectExpression { public void resolveIndex(AST parent) throws SemanticException { // An ident node can represent an index expression if the ident // represents a naked property ref - // *Note: this makes the assumption (which is currently the case + // *Note*: this makes the assumption (which is currently the case // in the hql-sql grammar) that the ident is first resolved // itself (addrExpr -> resolve()). The other option, if that // changes, is to call resolve from here; but it is @@ -373,7 +373,7 @@ public class IdentNode extends FromReferenceNode implements SelectExpression { public void setScalarColumnText(int i) throws SemanticException { if (nakedPropertyRef) { - // do *not* over-write the column text, as that has already been + // do *not* overwrite the column text, as that has already been // "rendered" during resolve ColumnHelper.generateSingleScalarColumn(this, i); } diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/IntoClause.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/IntoClause.java index 02c38142d4..71e6f1b06f 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/IntoClause.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/IntoClause.java @@ -203,13 +203,13 @@ public class IntoClause extends HqlSqlWalkerNode implements DisplayableNode { // really there are two situations where it should be ok to allow the insertion // into properties defined on a superclass: // 1) union-subclass with an abstract root entity - // 2) discrim-subclass + // 2) discriminator-subclass // // #1 is handled already because of the fact that // UnionSubclassPersister alreay always returns 0 // for this call... // - // we may want to disallow it for discrim-subclass just for + // we may want to disallow it for discriminator-subclass just for // consistency-sake (currently does not work anyway)... return persister.getSubclassPropertyTableNumber( propertyName ) != 0; } diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/MapKeyEntityFromElement.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/MapKeyEntityFromElement.java index d6624c25c8..dd1996fed7 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/MapKeyEntityFromElement.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/MapKeyEntityFromElement.java @@ -72,7 +72,7 @@ public class MapKeyEntityFromElement extends FromElement { rhsAlias ); -// String[] joinColumns = determineJoinColuns( collectionPersister, joinTableAlias ); +// String[] joinColumns = determineJoinColumns( collectionPersister, joinTableAlias ); // todo : assumes columns, no formulas String[] joinColumns = collectionPersister.getIndexColumnNames( collectionFromElement.getCollectionTableAlias() ); diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/SelectClause.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/SelectClause.java index 033ebbf1ab..17c7e7e99e 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/SelectClause.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/tree/SelectClause.java @@ -117,7 +117,7 @@ public class SelectClause extends SelectExpressionList { throw new IllegalStateException( "SelectClause was already prepared!" ); } - //explicit = true; // This is an explict Select. + //explicit = true; // This is an explicit Select. //ArrayList sqlResultTypeList = new ArrayList(); ArrayList queryReturnTypeList = new ArrayList(); @@ -177,7 +177,7 @@ public class SelectClause extends SelectExpressionList { } } - //init the aliases, after initing the constructornode + //init the aliases, after initiating the constructorNode initAliases( selectExpressions ); if ( !getWalker().isShallowQuery() ) { @@ -196,7 +196,7 @@ public class SelectClause extends SelectExpressionList { FromElement origin = null; if ( fromElement.getRealOrigin() == null ) { // work around that crazy issue where the tree contains - // "empty" FromElements (no text); afaict, this is caused + // "empty" FromElements (no text); AFAICT, this is caused // by FromElementFactory.createCollectionJoin() if ( fromElement.getOrigin() == null ) { throw new QueryException( "Unable to determine origin of join fetch [" + fromElement.getDisplayText() + "]" ); diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/ColumnHelper.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/ColumnHelper.java index b946ea87f2..572a3fa800 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/ColumnHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/ColumnHelper.java @@ -43,7 +43,7 @@ public final class ColumnHelper { ASTFactory factory = node.getASTFactory(); AST n = node; n.setText( sqlColumns[0] ); // Use the DOT node to emit the first column name. - // Create the column names, folled by the column aliases. + // Create the column names, filled by the column aliases. for ( int j = 0; j < sqlColumns.length; j++ ) { if ( j > 0 ) { n = ASTUtil.createSibling( factory, SqlTokenTypes.SQL_TOKEN, sqlColumns[j], n ); diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/JoinProcessor.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/JoinProcessor.java index bc7d3cb3d9..0382929e75 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/JoinProcessor.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/JoinProcessor.java @@ -228,7 +228,7 @@ public class JoinProcessor implements SqlTokenTypes { while ( liter.hasNext() ) { FromElement fromElement = liter.next(); - // We found an implied from element that is used in the WITH clause of another from element, so it need to become part of it's join sequence + // We found an implied from element that is used in the WITH clause of another from element, so it need to become part of its join sequence if ( fromElement instanceof ImpliedFromElement && fromElement.getOrigin().getWithClauseFragment() != null && fromElement.getOrigin().getWithClauseFragment().contains( fromElement.getTableAlias() ) ) { diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/SessionFactoryHelper.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/SessionFactoryHelper.java index 9fb7b590c0..355632ae98 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/SessionFactoryHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/ast/util/SessionFactoryHelper.java @@ -75,7 +75,7 @@ public class SessionFactoryHelper { if ( persister.getDiscriminatorType() != null ) { String discrimColumnName = persister.getDiscriminatorColumnName(); // Needed the "clazz_" check to work around union-subclasses - // TODO : is there a way to tell whether a persister is truly discrim-column based inheritence? + // TODO : is there a way to tell whether a persister is truly discriminator-column based inheritance? if ( discrimColumnName != null && !"clazz_".equals( discrimColumnName ) ) { return true; } diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/FromParser.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/FromParser.java index 604fa394ca..f25a2e7b80 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/FromParser.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/FromParser.java @@ -165,7 +165,7 @@ public class FromParser implements Parser { // (AS is always optional, for consistency with SQL/OQL) // process the "new" HQL style where aliases are assigned - // _after_ the class name or path expression ie. using + // _after_ the class name or path expression, ie. using // the AS construction if ( entityName != null ) { @@ -315,8 +315,8 @@ public class FromParser implements Parser { public void end(QueryTranslatorImpl q) { if ( afterMemberDeclarations ) { - //The exception throwned by the AST query translator contains the error token location, represented by line and column, - //but it hard to get that info here. + //The exception thrown by the AST query translator contains the error token location, represented by line and column, + //but it is hard to get that info here. throw new QueryException( "alias not specified for IN" ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/PathExpressionParser.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/PathExpressionParser.java index bfbd803dc8..46b69e3fbe 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/PathExpressionParser.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/PathExpressionParser.java @@ -30,13 +30,13 @@ import org.hibernate.type.Type; public class PathExpressionParser implements Parser { //TODO: this class does too many things! we need a different - //kind of path expression parser for each of the diffferent + //kind of path expression parser for each of the different //ways in which path expressions can occur //We should actually rework this class to not implement Parser //and just process path expressions in the most convenient way. - //The class is now way to complex! + //The class is now way too complex! private int dotcount; private String currentName; diff --git a/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/QueryTranslatorImpl.java b/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/QueryTranslatorImpl.java index ab68bd667b..584108151f 100644 --- a/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/QueryTranslatorImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/hql/internal/classic/QueryTranslatorImpl.java @@ -834,7 +834,7 @@ public class QueryTranslatorImpl extends BasicLoader implements FilterTranslator //there _was_ a select clause Iterator iter = scalarSelectTokens.iterator(); int c = 0; - boolean nolast = false; //real hacky... + boolean nolast = false; //really hacky... int parenCount = 0; // used to count the nesting of parentheses while ( iter.hasNext() ) { Object next = iter.next(); diff --git a/hibernate-core/src/main/java/org/hibernate/id/AbstractUUIDGenerator.java b/hibernate-core/src/main/java/org/hibernate/id/AbstractUUIDGenerator.java index b9226b338e..edb29441f8 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/AbstractUUIDGenerator.java +++ b/hibernate-core/src/main/java/org/hibernate/id/AbstractUUIDGenerator.java @@ -40,7 +40,7 @@ public abstract class AbstractUUIDGenerator implements IdentifierGenerator { /** * Unique across JVMs on this machine (unless they load this class - * in the same quater second - very unlikely) + * in the same quarter second - very unlikely) */ protected int getJVM() { return JVM; diff --git a/hibernate-core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java b/hibernate-core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java index 7dfbe44da6..6c7c1000d8 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java +++ b/hibernate-core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java @@ -318,7 +318,7 @@ public class MultipleHiLoPerTableGenerator implements PersistentIdentifierGenera if ( table == null ) { table = namespace.createTable( qualifiedTableName.getObjectName(), false ); - // todo : note sure the best solution here. do we add the columns if missing? other? + // todo : not sure the best solution here. do we add the columns if missing? other? table.setPrimaryKey( new PrimaryKey( table ) ); final Column pkColumn = new ExportableColumn( diff --git a/hibernate-core/src/main/java/org/hibernate/id/enhanced/HiLoOptimizer.java b/hibernate-core/src/main/java/org/hibernate/id/enhanced/HiLoOptimizer.java index 1cf6806254..603323123a 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/enhanced/HiLoOptimizer.java +++ b/hibernate-core/src/main/java/org/hibernate/id/enhanced/HiLoOptimizer.java @@ -89,7 +89,7 @@ public class HiLoOptimizer extends AbstractOptimizer { } // upperLimit defines the upper end of the bucket values generationState.upperLimit = generationState.lastSourceValue.copy().multiplyBy( incrementSize ).increment(); - // initialize value to the low end of the bucket + // initialize value to the lower end of the bucket generationState.value = generationState.upperLimit.copy().subtract( incrementSize ); } else if ( ! generationState.upperLimit.gt( generationState.value ) ) { diff --git a/hibernate-core/src/main/java/org/hibernate/id/enhanced/NoopOptimizer.java b/hibernate-core/src/main/java/org/hibernate/id/enhanced/NoopOptimizer.java index ad3a8200b6..8b51695034 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/enhanced/NoopOptimizer.java +++ b/hibernate-core/src/main/java/org/hibernate/id/enhanced/NoopOptimizer.java @@ -34,7 +34,7 @@ public final class NoopOptimizer extends AbstractOptimizer { // IMPL NOTE : this method is called concurrently and is // not synchronized. It is very important to work on the // local variable: the field lastSourceValue is not - // reliable as it might be mutated by multipled threads. + // reliable as it might be mutated by multiple threads. // The lastSourceValue field is only accessed by tests, // so this is not a concern. IntegralDataTypeHolder value = callback.getNextValue(); diff --git a/hibernate-core/src/main/java/org/hibernate/id/enhanced/PooledOptimizer.java b/hibernate-core/src/main/java/org/hibernate/id/enhanced/PooledOptimizer.java index 057aac0a8c..59e90f1cc3 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/enhanced/PooledOptimizer.java +++ b/hibernate-core/src/main/java/org/hibernate/id/enhanced/PooledOptimizer.java @@ -72,7 +72,7 @@ public class PooledOptimizer extends AbstractOptimizer implements InitialValueAw if ( generationState.hiValue == null ) { generationState.value = callback.getNextValue(); // unfortunately not really safe to normalize this - // to 1 as an initial value like we do the others + // to 1 as an initial value like we do for the others // because we would not be able to control this if // we are using a sequence... if ( generationState.value.lt( 1 ) ) { diff --git a/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java b/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java index 47e5a69bd0..5a96109195 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java +++ b/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java @@ -737,7 +737,7 @@ public class TableGenerator implements PersistentIdentifierGenerator, Configurab if ( table == null ) { table = namespace.createTable( qualifiedTableName.getObjectName(), false ); - // todo : note sure the best solution here. do we add the columns if missing? other? + // todo : not sure the best solution here. do we add the columns if missing? other? final Column segmentColumn = new ExportableColumn( database, table, diff --git a/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java b/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java index 03c61d9d5b..9ad4e9f156 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java @@ -197,7 +197,7 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont this.transactionCoordinator = sharedOptions.getTransactionCoordinator(); this.jdbcCoordinator = sharedOptions.getJdbcCoordinator(); - // todo : "wrap" the transaction to no-op comit/rollback attempts? + // todo : "wrap" the transaction to no-op commit/rollback attempts? this.currentHibernateTransaction = sharedOptions.getTransaction(); if ( sharedOptions.shouldAutoJoinTransactions() ) { @@ -243,7 +243,7 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont private StatementInspector interpret(StatementInspector statementInspector) { if ( statementInspector == null ) { // If there is no StatementInspector specified, map to the call - // to the (deprecated) Interceptor #onPrepareStatement method + // to the (deprecated) Interceptor#onPrepareStatement method return (StatementInspector) interceptor::onPrepareStatement; } return statementInspector; @@ -286,7 +286,7 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont @Override public UUID getSessionIdentifier() { if ( this.sessionIdentifier == null ) { - //Lazily initialized: otherwise all the UUID generations will cause of significant amount of contention. + //Lazily initialized: otherwise all the UUID generations will cause significant amount of contention. this.sessionIdentifier = StandardRandomStrategy.INSTANCE.generateUUID( null ); } return sessionIdentifier; @@ -853,7 +853,7 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont } } else if ( queryPlan.getTranslators()[0].getReturnTypes().length == 1 ) { - // if we have only a single return expression, its java type should match with the requested type + // if we have only a single return expression, its java type should match the requested type final Type queryResultType = queryPlan.getTranslators()[0].getReturnTypes()[0]; if ( !resultClass.isAssignableFrom( queryResultType.getReturnedClass() ) ) { throw new IllegalArgumentException( diff --git a/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java b/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java index 4d7488ceef..abff16817f 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java @@ -447,7 +447,7 @@ public class SessionFactoryImpl implements SessionFactoryImplementor { public Session openSession() throws HibernateException { final CurrentTenantIdentifierResolver currentTenantIdentifierResolver = getCurrentTenantIdentifierResolver(); - //We can only use reuse the defaultSessionOpenOptions as a constant when there is no TenantIdentifierResolver + //We can only reuse the defaultSessionOpenOptions as a constant when there is no TenantIdentifierResolver if ( currentTenantIdentifierResolver != null ) { return this.withOptions().openSession(); } @@ -458,7 +458,7 @@ public class SessionFactoryImpl implements SessionFactoryImplementor { public Session openTemporarySession() throws HibernateException { final CurrentTenantIdentifierResolver currentTenantIdentifierResolver = getCurrentTenantIdentifierResolver(); - //We can only use reuse the defaultSessionOpenOptions as a constant when there is no TenantIdentifierResolver + //We can only reuse the defaultSessionOpenOptions as a constant when there is no TenantIdentifierResolver if ( currentTenantIdentifierResolver != null ) { return buildTemporarySessionOpenOptions() .openSession(); @@ -1088,7 +1088,7 @@ public class SessionFactoryImpl implements SessionFactoryImplementor { return interceptor; } - // prefer the SF-scoped interceptor, prefer that to any Session-scoped interceptor prototype + // prefer the SessionFactory-scoped interceptor, prefer that to any Session-scoped interceptor prototype final Interceptor optionsInterceptor = options.getInterceptor(); if ( optionsInterceptor != null && optionsInterceptor != EmptyInterceptor.INSTANCE ) { return optionsInterceptor; @@ -1299,7 +1299,7 @@ public class SessionFactoryImpl implements SessionFactoryImplementor { @SuppressWarnings("unchecked") public T connectionReleaseMode(ConnectionReleaseMode connectionReleaseMode) { // NOTE : Legacy behavior (when only ConnectionReleaseMode was exposed) was to always acquire a - // Connection using ConnectionAcquisitionMode.AS_NEEDED.. + // Connection using ConnectionAcquisitionMode.AS_NEEDED. final PhysicalConnectionHandlingMode handlingMode = PhysicalConnectionHandlingMode.interpret( ConnectionAcquisitionMode.AS_NEEDED, @@ -1367,7 +1367,7 @@ public class SessionFactoryImpl implements SessionFactoryImplementor { @SuppressWarnings("unchecked") public T clearEventListeners() { if ( listeners == null ) { - //Needs to initialize explicitly to an empty list as otherwise "null" immplies the default listeners will be applied + //Needs to initialize explicitly to an empty list as otherwise "null" implies the default listeners will be applied this.listeners = new ArrayList( 3 ); } else { diff --git a/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java b/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java index 0ea06c1f23..8be3794dfa 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/SessionImpl.java @@ -1915,7 +1915,7 @@ public class SessionImpl } // Since isLookupByNaturalKey is true there can be only one CriterionEntry and getCriterion() will - // return an instanceof NaturalIdentifier + // return an instance of NaturalIdentifier final CriterionEntry criterionEntry = criteria.iterateExpressionEntries().next(); final NaturalIdentifier naturalIdentifier = (NaturalIdentifier) criterionEntry.getCriterion(); @@ -1936,7 +1936,7 @@ public class SessionImpl final Object naturalIdValue = naturalIdValues.get( naturalIdProperty ); if ( naturalIdValue == null ) { - // A NaturalId property is missing from the critera query, can't use NaturalIdLoadAccess + // A NaturalId property is missing from the criteria query, can't use NaturalIdLoadAccess return null; } @@ -3323,7 +3323,7 @@ public class SessionImpl return loadAccess.load( (Serializable) primaryKey ); } catch ( EntityNotFoundException ignored ) { - // DefaultLoadEventListener.returnNarrowedProxy may throw ENFE (see HHH-7861 for details), + // DefaultLoadEventListener#returnNarrowedProxy() may throw ENFE (see HHH-7861 for details), // which find() should not throw. Find() should return null if the entity was not found. if ( log.isDebugEnabled() ) { String entityName = entityClass != null ? entityClass.getName(): null; @@ -3345,7 +3345,7 @@ public class SessionImpl } catch ( JDBCException e ) { if ( accessTransaction().isActive() && accessTransaction().getRollbackOnly() ) { - // Assume this is the similar to the WildFly / IronJacamar "feature" described under HHH-12472. + // Assume this is similar to the WildFly / IronJacamar "feature" described under HHH-12472. // Just log the exception and return null. if ( log.isDebugEnabled() ) { log.debug( "JDBCException was thrown for a transaction marked for rollback; " + @@ -3788,9 +3788,9 @@ public class SessionImpl loadQueryInfluencers = (LoadQueryInfluencers) ois.readObject(); - // LoadQueryInfluencers.getEnabledFilters() tries to validate each enabled - // filter, which will fail when called before FilterImpl.afterDeserialize( factory ); - // Instead lookup the filter by name and then call FilterImpl.afterDeserialize( factory ). + // LoadQueryInfluencers#getEnabledFilters() tries to validate each enabled + // filter, which will fail when called before FilterImpl#afterDeserialize( factory ); + // Instead lookup the filter by name and then call FilterImpl#afterDeserialize( factory ). for ( String filterName : loadQueryInfluencers.getEnabledFilterNames() ) { ( (FilterImpl) loadQueryInfluencers.getEnabledFilter( filterName ) ).afterDeserialize( getFactory() ); } diff --git a/hibernate-core/src/main/java/org/hibernate/internal/util/StringHelper.java b/hibernate-core/src/main/java/org/hibernate/internal/util/StringHelper.java index 31e9d81841..1299b5648b 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/util/StringHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/util/StringHelper.java @@ -156,7 +156,7 @@ public final class StringHelper { // enclosed in parentheses (HHH-10383) // Examples: // 1) "... IN (?1", we assume that "?1" does not need to be enclosed because there - // there is already a right-parenthesis; we assume there will be a matching right-parenthesis. + // is already a right-parenthesis; we assume there will be a matching right-parenthesis. // 2) "... IN ?1", we assume that "?1" needs to be enclosed in parentheses, because there // is no left-parenthesis. @@ -441,8 +441,8 @@ public final class StringHelper { if ( string == null ) { return 0; } - // Impl note: takes advantage of the fact that an escpaed single quote - // embedded within a quote-block can really be handled as two seperate + // Impl note: takes advantage of the fact that an escaped single quote + // embedded within a quote-block can really be handled as two separate // quote-blocks for the purposes of this method... int count = 0; int stringLength = string.length(); @@ -601,7 +601,7 @@ public final class StringHelper { */ private static String cleanAlias(String alias) { char[] chars = alias.toCharArray(); - // short cut check... + // shortcut check... if ( !Character.isLetter( chars[0] ) ) { for ( int i = 1; i < chars.length; i++ ) { // as soon as we encounter our first letter, return the substring diff --git a/hibernate-core/src/main/java/org/hibernate/internal/util/type/PrimitiveWrapperHelper.java b/hibernate-core/src/main/java/org/hibernate/internal/util/type/PrimitiveWrapperHelper.java index 733c9fe518..dc2f9d7de6 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/util/type/PrimitiveWrapperHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/util/type/PrimitiveWrapperHelper.java @@ -242,7 +242,7 @@ public final class PrimitiveWrapperHelper { return (PrimitiveWrapperDescriptor) DoubleDescriptor.INSTANCE; } - // most likely void.class, which we can't really handle here + // most likely Void.class, which we can't really handle here throw new IllegalArgumentException( "Unrecognized wrapper type class : " + wrapperClass.getName() ); } diff --git a/hibernate-core/src/main/java/org/hibernate/internal/util/xml/ErrorLogger.java b/hibernate-core/src/main/java/org/hibernate/internal/util/xml/ErrorLogger.java index 07bd1f540a..9ba04a315c 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/util/xml/ErrorLogger.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/util/xml/ErrorLogger.java @@ -31,7 +31,7 @@ public class ErrorLogger implements ErrorHandler, Serializable { ErrorLogger.class.getName() ); - // lazily initalized + // lazily initialized private List errors; private String file; diff --git a/hibernate-core/src/main/java/org/hibernate/jpa/boot/internal/EntityManagerFactoryBuilderImpl.java b/hibernate-core/src/main/java/org/hibernate/jpa/boot/internal/EntityManagerFactoryBuilderImpl.java index afc4ffb3ea..aa280a13f1 100644 --- a/hibernate-core/src/main/java/org/hibernate/jpa/boot/internal/EntityManagerFactoryBuilderImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/jpa/boot/internal/EntityManagerFactoryBuilderImpl.java @@ -199,7 +199,7 @@ public class EntityManagerFactoryBuilderImpl implements EntityManagerFactoryBuil Map mergedIntegrationSettings = null; Properties properties = persistenceUnit.getProperties(); if ( properties != null ) { - // original integratin setting entries take precedence + // original integration setting entries take precedence mergedIntegrationSettings = new HashMap( properties ); mergedIntegrationSettings.putAll( integrationSettings ); } @@ -884,7 +884,7 @@ public class EntityManagerFactoryBuilderImpl implements EntityManagerFactoryBuil // `IS_JTA_TXN_COORD` is a value set during `#normalizeTransactionCoordinator` to indicate whether // the execution environment "is JTA" as best as it can tell.. // - // we use this value when JTA was not explicitly specified in regards the DataSource + // we use this value when JTA was not explicitly specified in regards to the DataSource final boolean isJtaTransactionCoordinator = (boolean) mergedSettings.configurationValues.remove( IS_JTA_TXN_COORD ); final boolean isJta = useJtaDataSource == null ? isJtaTransactionCoordinator : useJtaDataSource; diff --git a/hibernate-core/src/main/java/org/hibernate/jpa/internal/enhance/EnhancingClassTransformerImpl.java b/hibernate-core/src/main/java/org/hibernate/jpa/internal/enhance/EnhancingClassTransformerImpl.java index 25346bba16..65e2f76c87 100644 --- a/hibernate-core/src/main/java/org/hibernate/jpa/internal/enhance/EnhancingClassTransformerImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/jpa/internal/enhance/EnhancingClassTransformerImpl.java @@ -36,7 +36,7 @@ public class EnhancingClassTransformerImpl implements ClassTransformer { byte[] classfileBuffer) throws IllegalClassFormatException { // The first design had the enhancer as a class variable. That approach had some goods and bads. - // We don't had to create an enhancer for each class, but on the other end it would stay in memory forever. + // We don't have to create an enhancer for each class, but on the other end it would stay in memory forever. // It also assumed that all calls come from the same class loader, which is fair, but this makes it more robust. try { diff --git a/hibernate-core/src/main/java/org/hibernate/jpa/internal/util/XmlHelper.java b/hibernate-core/src/main/java/org/hibernate/jpa/internal/util/XmlHelper.java index 3269811cc1..80057bb386 100644 --- a/hibernate-core/src/main/java/org/hibernate/jpa/internal/util/XmlHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/jpa/internal/util/XmlHelper.java @@ -38,7 +38,7 @@ public final class XmlHelper { return null; } // getElementsByTagName gives the corresponding elements in the whole - // descendance. We want only children + // descendants. We want only children NodeList children = element.getChildNodes(); ArrayList goodChildren = new ArrayList(); diff --git a/hibernate-core/src/main/java/org/hibernate/loader/Loader.java b/hibernate-core/src/main/java/org/hibernate/loader/Loader.java index c0af913a8b..ca27b446ad 100644 --- a/hibernate-core/src/main/java/org/hibernate/loader/Loader.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/Loader.java @@ -1975,7 +1975,7 @@ public abstract class Loader { final String result = persister.getSubclassForDiscriminatorValue( discriminatorValue ); if ( result == null ) { - //woops we got an instance of another class hierarchy branch + //whoops we got an instance of another class hierarchy branch throw new WrongClassException( "Discriminator: " + discriminatorValue, id, diff --git a/hibernate-core/src/main/java/org/hibernate/loader/criteria/CriteriaLoader.java b/hibernate-core/src/main/java/org/hibernate/loader/criteria/CriteriaLoader.java index 6a8b9e5120..6ca047fb1c 100644 --- a/hibernate-core/src/main/java/org/hibernate/loader/criteria/CriteriaLoader.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/criteria/CriteriaLoader.java @@ -49,7 +49,7 @@ public class CriteriaLoader extends OuterJoinLoader { // interface //NOTE: unlike all other Loaders, this one is NOT - // multithreaded, or cacheable!! + // multi-threaded, or cacheable!! private final CriteriaQueryTranslator translator; private final Set querySpaces; diff --git a/hibernate-core/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java b/hibernate-core/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java index fffd36b346..0d88f8b8a5 100755 --- a/hibernate-core/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java @@ -213,7 +213,7 @@ public class CriteriaQueryTranslator implements CriteriaQuery { } if ( parent.equals( rootCriteria ) ) { - // if its the root criteria, we are done + // if it's the root criteria, we are done return path; } else { @@ -255,7 +255,7 @@ public class CriteriaQueryTranslator implements CriteriaQuery { final AssociationType atype = (AssociationType) type; final CollectionType ctype = type.isCollectionType() ? (CollectionType)type : null; final Type elementType = (ctype != null) ? ctype.getElementType( sessionFactory ) : null; - // is the association a collection of components or value-types? (i.e a colloction of valued types?) + // is the association a collection of components or value-types? (i.e a collection of valued types?) if ( ctype != null && elementType.isComponentType() ) { provider = new ComponentCollectionCriteriaInfoProvider( helper.getCollectionPersister(ctype.getRole()) ); } diff --git a/hibernate-core/src/main/java/org/hibernate/loader/custom/CustomLoader.java b/hibernate-core/src/main/java/org/hibernate/loader/custom/CustomLoader.java index e30802a143..d8d84ddd83 100644 --- a/hibernate-core/src/main/java/org/hibernate/loader/custom/CustomLoader.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/custom/CustomLoader.java @@ -52,7 +52,7 @@ import org.hibernate.type.Type; */ public class CustomLoader extends Loader { - // Currently *not* cachable if autodiscover types is in effect (e.g. "select * ...") + // Currently *not* cacheable if auto-discover types are in effect (e.g. "select * ...") private final String sql; private final Set querySpaces = new HashSet<>(); diff --git a/hibernate-core/src/main/java/org/hibernate/loader/custom/sql/SQLQueryParser.java b/hibernate-core/src/main/java/org/hibernate/loader/custom/sql/SQLQueryParser.java index 216d72a0cf..73efc374e5 100755 --- a/hibernate-core/src/main/java/org/hibernate/loader/custom/sql/SQLQueryParser.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/custom/sql/SQLQueryParser.java @@ -74,8 +74,8 @@ public class SQLQueryParser { return processedSql; } - // TODO: should "record" how many properties we have reffered to - and if we - // don't get'em'all we throw an exception! Way better than trial and error ;) + // TODO: should "record" how many properties we have referred to - and if we + // don't get them all we throw an exception! Way better than trial and error ;) protected String substituteBrackets(String sqlQuery) throws QueryException { if ( PREPARED_STATEMENT_PATTERN.matcher( sqlQuery.trim() ).matches() ) { @@ -94,7 +94,7 @@ public class SQLQueryParser { break; } - // apend everything up until the next encountered open brace + // append everything up until the next encountered open brace result.append( sqlQuery.substring( curr, left ) ); if ( ( right = sqlQuery.indexOf( '}', left + 1 ) ) < 0 ) { @@ -206,7 +206,7 @@ public class SQLQueryParser { else { String[] columnAliases; - // Let return-propertys override whatever the persister has for aliases. + // Let return-properties override whatever the persister has for aliases. columnAliases = ( String[] ) fieldResults.get(propertyName); if ( columnAliases==null ) { columnAliases = collectionPersister.getCollectionPropertyColumnAliases( propertyName, collectionSuffix ); @@ -247,7 +247,7 @@ public class SQLQueryParser { String[] columnAliases; - // Let return-propertys override whatever the persister has for aliases. + // Let return-propertiess override whatever the persister has for aliases. columnAliases = (String[]) fieldResults.get( propertyName ); if ( columnAliases == null ) { columnAliases = persister.getSubclassPropertyColumnAliases( propertyName, suffix ); diff --git a/hibernate-core/src/main/java/org/hibernate/loader/custom/sql/SQLQueryReturnProcessor.java b/hibernate-core/src/main/java/org/hibernate/loader/custom/sql/SQLQueryReturnProcessor.java index fdafd4203b..be483e481e 100644 --- a/hibernate-core/src/main/java/org/hibernate/loader/custom/sql/SQLQueryReturnProcessor.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/custom/sql/SQLQueryReturnProcessor.java @@ -565,7 +565,7 @@ public class SQLQueryReturnProcessor { throw new HibernateException( "Owner alias [" + ownerAlias + "] is unknown for alias [" + alias + "]" ); } - // If this return's alias has not been processed yet, do so b4 further processing of this return + // If this return's alias has not been processed yet, do so before further processing of this return if ( !alias2Persister.containsKey( ownerAlias ) ) { NativeSQLQueryNonScalarReturn ownerReturn = ( NativeSQLQueryNonScalarReturn ) alias2Return.get(ownerAlias); processReturn( ownerReturn ); diff --git a/hibernate-core/src/main/java/org/hibernate/loader/plan/exec/internal/LoadQueryJoinAndFetchProcessor.java b/hibernate-core/src/main/java/org/hibernate/loader/plan/exec/internal/LoadQueryJoinAndFetchProcessor.java index 333f3384d0..48616c2c0f 100644 --- a/hibernate-core/src/main/java/org/hibernate/loader/plan/exec/internal/LoadQueryJoinAndFetchProcessor.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/plan/exec/internal/LoadQueryJoinAndFetchProcessor.java @@ -607,7 +607,7 @@ public class LoadQueryJoinAndFetchProcessor { // when processing the Join part of this we are able to look up the "lhs table alias" because we know // the 'lhs' QuerySpace. // - // Good idea to be able resolve a Join by lookup on the rhs and lhs uid? If so, Fetch + // Good idea to be able to resolve a Join by lookup on the rhs and lhs uid? If so, Fetch // for many-to-many we have 3 table aliases. By way of example, consider a normal m-n: User<->Role // where User is the FetchOwner and Role (User.roles) is the Fetch. We'd have: diff --git a/hibernate-core/src/main/java/org/hibernate/loader/plan/exec/process/internal/CollectionReferenceInitializerImpl.java b/hibernate-core/src/main/java/org/hibernate/loader/plan/exec/process/internal/CollectionReferenceInitializerImpl.java index 2d97519e84..2f9fd983e3 100644 --- a/hibernate-core/src/main/java/org/hibernate/loader/plan/exec/process/internal/CollectionReferenceInitializerImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/plan/exec/process/internal/CollectionReferenceInitializerImpl.java @@ -128,7 +128,7 @@ public class CollectionReferenceInitializerImpl implements CollectionReferenceIn // todo : try org.hibernate.loader.plan.exec.process.spi.ResultSetProcessingContext.getOwnerProcessingState() ?? // -- specifically to return its ResultSetProcessingContext.EntityReferenceProcessingState#getEntityInstance() if ( collectionOwner == null ) { - //TODO: This is assertion is disabled because there is a bug that means the + //TODO: This assertion is disabled because there is a bug that means the // original owner of a transient, uninitialized collection is not known // if the collection is re-referenced by a different object associated // with the current Session diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Collection.java b/hibernate-core/src/main/java/org/hibernate/mapping/Collection.java index 78d96cefe8..8a1ad88a50 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/Collection.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/Collection.java @@ -332,8 +332,8 @@ public abstract class Collection implements Fetchable, Value, Filterable { int i = 0; while ( iterator.hasNext() ) { Selectable s = iterator.next(); - // exclude formulas and coluns that are not insertable or updatable - // since these values can be be repeated (HHH-5393) + // exclude formulas and columns that are not insertable or updatable + // since these values can be repeated (HHH-5393) if ( !s.isFormula() && ( insertability[i] || updatability[i] ) ) { Column col = (Column) s; if ( !distinctColumns.add( col.getName() ) ) { diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Column.java b/hibernate-core/src/main/java/org/hibernate/mapping/Column.java index 9c3fd15bc4..997aae316b 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/Column.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/Column.java @@ -217,10 +217,10 @@ public class Column implements Selectable, Serializable, Cloneable { } /** - * Returns the underlying columns sqltypecode. - * If null, it is because the sqltype code is unknown. + * Returns the underlying columns SqlTypeCode. + * If null, it is because the SqlTypeCode is unknown. *

- * Use #getSqlTypeCode(Mapping) to retrieve the sqltypecode used + * Use #getSqlTypeCode(Mapping) to retrieve the SqlTypeCode used * for the columns associated Value/Type. * * @return sqlTypeCode if it is set, otherwise null. diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/ForeignKey.java b/hibernate-core/src/main/java/org/hibernate/mapping/ForeignKey.java index 44c5db907b..73d891f1a6 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/ForeignKey.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/ForeignKey.java @@ -121,7 +121,7 @@ public class ForeignKey extends Constraint { } /** - * Validates that columnspan of the foreignkey and the primarykey is the same. + * Validates that column span of the foreign key and the primary key is the same. *

* Furthermore it aligns the length of the underlying tables columns. */ diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/MappedSuperclass.java b/hibernate-core/src/main/java/org/hibernate/mapping/MappedSuperclass.java index a51f158e50..d33a5fd347 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/MappedSuperclass.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/MappedSuperclass.java @@ -96,7 +96,7 @@ public class MappedSuperclass { } public Property getIdentifierProperty() { - //get direct identifiermapper or the one from the super mappedSuperclass + //get direct identifierMapper or the one from the super mappedSuperclass // or the one from the super persistentClass Property propagatedIdentifierProp = identifierProperty; if ( propagatedIdentifierProp == null ) { @@ -142,7 +142,7 @@ public class MappedSuperclass { } public Component getIdentifierMapper() { - //get direct identifiermapper or the one from the super mappedSuperclass + //get direct identifierMapper or the one from the super mappedSuperclass // or the one from the super persistentClass Component propagatedMapper = identifierMapper; if ( propagatedMapper == null ) { diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/OneToMany.java b/hibernate-core/src/main/java/org/hibernate/mapping/OneToMany.java index a4497a9b19..3f0d820474 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/OneToMany.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/OneToMany.java @@ -74,7 +74,7 @@ public class OneToMany implements Value { } public void createForeignKey() { - // no foreign key element of for a one-to-many + // no foreign key element for a one-to-many } public Iterator getColumnIterator() { diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/PersistentClass.java b/hibernate-core/src/main/java/org/hibernate/mapping/PersistentClass.java index e39f074652..6ab1e7de76 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/PersistentClass.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/PersistentClass.java @@ -1006,6 +1006,6 @@ public abstract class PersistentClass implements AttributeContainer, Serializabl this.superMappedSuperclass = superMappedSuperclass; } - // End of @Mappedsuperclass support + // End of @MappedSuperclass support } diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Property.java b/hibernate-core/src/main/java/org/hibernate/mapping/Property.java index f18d27046b..0c14c9bc61 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/Property.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/Property.java @@ -162,7 +162,7 @@ public class Property implements Serializable, MetaAttributable { public boolean isUpdateable() { // if the property mapping consists of all formulas, - // make it non-updateable + // make it non-updatable return updateable && !ArrayHelper.isAllFalse( value.getColumnUpdateability() ); } diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Set.java b/hibernate-core/src/main/java/org/hibernate/mapping/Set.java index 1b891a502d..7b6d7608e9 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/Set.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/Set.java @@ -86,7 +86,7 @@ public class Set extends Collection { } if ( pk.getColumnSpan() == getKey().getColumnSpan() ) { //for backward compatibility, allow a set with no not-null - //element columns, using all columns in the row locater SQL + //element columns, using all columns in the row locator SQL //TODO: create an implicit not null constraint on all cols? } else { diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java b/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java index d9f8b65ec9..3db302a5d4 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/SimpleValue.java @@ -531,7 +531,7 @@ public class SimpleValue implements KeyValue { .getServiceRegistry() .getService( ClassLoaderService.class ) ).getName(); - // todo : to fully support isNationalized here we need do the process hinted at above + // todo : to fully support isNationalized here we need to do the process hinted at above // essentially, much of the logic from #buildAttributeConverterTypeAdapter wrt resolving // a (1) SqlTypeDescriptor, a (2) JavaTypeDescriptor and dynamically building a BasicType // combining them. @@ -633,7 +633,7 @@ public class SimpleValue implements KeyValue { jdbcTypeCode = NationalizedTypeMappings.toNationalizedTypeCode( jdbcTypeCode ); } - // find the standard SqlTypeDescriptor for that JDBC type code (allow itr to be remapped if needed!) + // find the standard SqlTypeDescriptor for that JDBC type code (allow it to be remapped if needed!) final SqlTypeDescriptor sqlTypeDescriptor = getMetadata() .getMetadataBuildingOptions() .getServiceRegistry() diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AttributeFactory.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AttributeFactory.java index bb3f6b491c..34fc6a6fb8 100755 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AttributeFactory.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/AttributeFactory.java @@ -481,7 +481,7 @@ public class AttributeFactory { final org.hibernate.type.Type elementType = elementValue.getType(); // First, determine the type of the elements and use that to help determine the - // collection type) + // collection type final Attribute.PersistentAttributeType elementPersistentAttributeType; final Attribute.PersistentAttributeType persistentAttributeType; if ( elementType.isAnyType() ) { @@ -826,7 +826,7 @@ public class AttributeFactory { } }; - // interpret the key, if one + // interpret the key, if one exists if ( keyPersistentAttributeType != null ) { this.keyValueContext = new ValueContext() { public Value getHibernateValue() { diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java index ef0bc44788..13c5724c4d 100755 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/internal/MetadataContext.java @@ -323,7 +323,7 @@ class MetadataContext { if ( value instanceof Component ) { final Component component = (Component) value; if ( component.getPropertySpan() > 1 ) { - //FIXME we are an Hibernate embedded id (ie not type) + //FIXME we are dealing with a Hibernate embedded id (ie not type) } else { //FIXME take care of declared vs non declared property @@ -406,7 +406,7 @@ class MetadataContext { // nothing to do... } - // todo : this does not account for @MappeSuperclass, mainly because this is not being tracked in our + // todo : this does not account for @MappedSuperclass, mainly because this is not being tracked in our // internal metamodel as populated from the annotations properly ManagedTypeDescriptor superType = managedType.getSuperType(); if ( superType != null ) { @@ -455,7 +455,7 @@ class MetadataContext { // appropriate attribute declarer in such cases and so the incoming metamodelClass most likely // does not represent the declarer in such cases. // - // As a result, in the case of embeddable classes we simply use getField rather than get + // As a result, in the case of embeddable classes we simply use getField rather than // getDeclaredField final boolean allowNonDeclaredFieldReference = attribute.getPersistentAttributeType() == Attribute.PersistentAttributeType.EMBEDDED @@ -478,7 +478,7 @@ class MetadataContext { } catch (IllegalArgumentException e) { // most likely a mismatch in the type we are injecting and the defined field; this represents a - // mismatch in how the annotation processor interpretted the attribute and how our metamodel + // mismatch in how the annotation processor interpreted the attribute and how our metamodel // and/or annotation binder did. // This is particularly the case as arrays are nto handled propery by the StaticMetamodel generator diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/PluralAttributeBuilder.java b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/PluralAttributeBuilder.java index 7284263fe8..0593e23f03 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/PluralAttributeBuilder.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/PluralAttributeBuilder.java @@ -147,6 +147,6 @@ public class PluralAttributeBuilder { builder ); } - throw new UnsupportedOperationException( "Unkown collection: " + collectionClass ); + throw new UnsupportedOperationException( "Unknown collection: " + collectionClass ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java index fd90f98bde..d1ba48a472 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java @@ -1066,7 +1066,7 @@ public abstract class AbstractEntityPersister } if ( columnNumbers.size() == 0 && formulaNumbers.size() == 0 ) { - // only one-to-one is lazy fetched + // only one-to-one is lazily fetched continue; } @@ -1444,8 +1444,8 @@ public abstract class AbstractEntityPersister public String[] getIdentifierAliases(String suffix) { // NOTE: this assumes something about how propertySelectFragment is implemented by the subclass! - // was toUnqotedAliasStrings( getIdentifierColumnNames() ) before - now tried - // to remove that unqoting and missing aliases.. + // was toUnquotedAliasStrings( getIdentifierColumnNames() ) before - now tried + // to remove that unquoting and missing aliases.. return new Alias( suffix ).toAliasStrings( getIdentifierAliases() ); } @@ -1456,8 +1456,8 @@ public abstract class AbstractEntityPersister public String getDiscriminatorAlias(String suffix) { // NOTE: this assumes something about how propertySelectFragment is implemented by the subclass! - // toUnqotedAliasStrings( getdiscriminatorColumnName() ) before - now tried - // to remove that unqoting and missing aliases.. + // toUnquotedAliasStrings( getDiscriminatorColumnName() ) before - now tried + // to remove that unquoting and missing aliases.. return entityMetamodel.hasSubclasses() ? new Alias( suffix ).toAliasString( getDiscriminatorAlias() ) : null; @@ -1848,7 +1848,7 @@ public abstract class AbstractEntityPersister } if ( isVersionPropertyGenerated() ) { - // the difficulty here is exactly what do we update in order to + // the difficulty here is exactly what we update in order to // force the version to be incremented in the db... throw new HibernateException( "LockMode.FORCE is currently not supported for generated version properties" ); } @@ -2337,7 +2337,7 @@ public abstract class AbstractEntityPersister // aliases for composite-id's if ( getIdentifierType().isComponentType() ) { - // Fetch embedded identifiers propertynames from the "virtual" identifier component + // Fetch embedded identifiers property names from the "virtual" identifier component CompositeType componentId = (CompositeType) getIdentifierType(); String[] idPropertyNames = componentId.getPropertyNames(); String[] idAliases = getIdentifierAliases(); @@ -2366,7 +2366,7 @@ public abstract class AbstractEntityPersister ); } else { - // embedded composite ids ( alias.idname1, alias.idname2 ) + // embedded composite ids ( alias.idName1, alias.idName2 ) subclassPropertyAliases.put( idPropertyNames[i], new String[] {idAliases[i]} ); subclassPropertyColumnNames.put( idPropertyNames[i], new String[] {idColumnNames[i]} ); } @@ -2660,7 +2660,7 @@ public abstract class AbstractEntityPersister } } - // select the correct row by either pk or rowid + // select the correct row by either pk or row id if ( useRowId ) { update.addPrimaryKeyColumns( new String[] {rowIdName} ); //TODO: eventually, rowIdName[j] } @@ -3049,7 +3049,7 @@ public abstract class AbstractEntityPersister // should be using the entity root table as the driving table; // another option here would be to choose some non-optional joined // table to use as the driving table. In all likelihood, just using - // the root table is much simplier + // the root table is much simpler // 2) Need to add the FK columns corresponding to each joined table // to the generated select list; these would then be used when // iterating the result set to determine whether all non-optional @@ -4180,7 +4180,7 @@ public abstract class AbstractEntityPersister final String drivingAlias = generateTableAlias( getRootAlias(), drivingTable - ); //we *could* regerate this inside each called method! + ); //we *could* regenerate this inside each called method! final String where = createWhereByKey( drivingTable, drivingAlias ); final String from = createFrom( drivingTable, drivingAlias ); @@ -4517,7 +4517,7 @@ public abstract class AbstractEntityPersister protected UniqueEntityLoader getAppropriateLoader(LockOptions lockOptions, SharedSessionContractImplementor session) { if ( queryLoader != null ) { - // if the user specified a custom query loader we need to that + // if the user specified a custom query loader we need to use that // regardless of any other consideration return queryLoader; } diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractPropertyMapping.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractPropertyMapping.java index f7dbfd1696..be9bfb8dbb 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractPropertyMapping.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractPropertyMapping.java @@ -174,7 +174,7 @@ public abstract class AbstractPropertyMapping implements PropertyMapping { logDuplicateRegistration( path, existingType, type ); } else if ( !( existingType instanceof AssociationType ) ) { - // Workaround for org.hibernate.cfg.annotations.PropertyBinder.bind() adding a component for *ToOne ids + // Workaround for org.hibernate.cfg.annotations.PropertyBinder#bind() adding a component for *ToOne ids logDuplicateRegistration( path, existingType, type ); } else { @@ -215,7 +215,7 @@ public abstract class AbstractPropertyMapping implements PropertyMapping { duplicateIncompatiblePaths.add( path ); typesByPropertyPath.remove( path ); // Set everything to empty to signal action has to be taken! - // org.hibernate.hql.internal.ast.tree.DotNode.dereferenceEntityJoin() is reacting to this + // org.hibernate.hql.internal.ast.tree.DotNode#dereferenceEntityJoin() is reacting to this String[] empty = new String[0]; columnsByPropertyPath.put( path, empty ); columnReadersByPropertyPath.put( path, empty ); @@ -319,7 +319,7 @@ public abstract class AbstractPropertyMapping implements PropertyMapping { // referenced property in the mapping file (ok?) columns = columnsByPropertyPath.get( foreignKeyProperty ); if ( columns == null ) { - return; //get em on the second pass! + return; //get 'em on the second pass! } columnReaders = columnReadersByPropertyPath.get( foreignKeyProperty ); columnReaderTemplates = columnReaderTemplatesByPropertyPath.get( foreignKeyProperty ); diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/UnionSubclassEntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/UnionSubclassEntityPersister.java index 5112857986..3f9127c7c8 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/UnionSubclassEntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/UnionSubclassEntityPersister.java @@ -154,7 +154,7 @@ public class UnionSubclassEntityPersister extends AbstractEntityPersister { } //SPACES - //TODO: i'm not sure, but perhaps we should exclude + //TODO: I'm not sure, but perhaps we should exclude // abstract denormalized tables? int spacesSize = 1 + persistentClass.getSynchronizedTables().size(); @@ -263,7 +263,7 @@ public class UnionSubclassEntityPersister extends AbstractEntityPersister { getSubclassFormulaAliasClosure(), getSubclassFormulaLazyiness() ); - //TODO: include the rowids!!!! + //TODO: include the row ids!!!! if ( hasSubclasses() ) { if ( isDiscriminatorFormula() ) { select.addColumn( getDiscriminatorFormula(), getDiscriminatorAlias() ); diff --git a/hibernate-core/src/main/java/org/hibernate/persister/walking/internal/CompositionSingularSubAttributesHelper.java b/hibernate-core/src/main/java/org/hibernate/persister/walking/internal/CompositionSingularSubAttributesHelper.java index 3ca5bf195d..62b7453760 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/walking/internal/CompositionSingularSubAttributesHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/walking/internal/CompositionSingularSubAttributesHelper.java @@ -171,7 +171,7 @@ public final class CompositionSingularSubAttributesHelper { "Cannot build AnyMappingDefinition from non-any-typed attribute" ); } - // todo : not sure how lazy is propogated into the component for a subattribute of type any + // todo : not sure how lazy is propagated into the component for a sub-attribute of type any return new StandardAnyTypeDefinition( (AnyType) aType, false ); } diff --git a/hibernate-core/src/main/java/org/hibernate/pretty/MessageHelper.java b/hibernate-core/src/main/java/org/hibernate/pretty/MessageHelper.java index 8a16c1c4a0..1535022f98 100644 --- a/hibernate-core/src/main/java/org/hibernate/pretty/MessageHelper.java +++ b/hibernate-core/src/main/java/org/hibernate/pretty/MessageHelper.java @@ -347,7 +347,7 @@ public final class MessageHelper { SessionFactoryImplementor factory, StringBuilder s ) { // Need to use the identifier type of the collection owner - // since the incoming is value is actually the owner's id. + // since the incoming value is actually the owner's id. // Using the collection's key type causes problems with // property-ref keys. // Also need to check that the expected identifier type matches diff --git a/hibernate-core/src/main/java/org/hibernate/property/access/spi/EnhancedSetterImpl.java b/hibernate-core/src/main/java/org/hibernate/property/access/spi/EnhancedSetterImpl.java index de93fa10f6..27dbb9efe3 100644 --- a/hibernate-core/src/main/java/org/hibernate/property/access/spi/EnhancedSetterImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/property/access/spi/EnhancedSetterImpl.java @@ -45,7 +45,7 @@ public class EnhancedSetterImpl extends SetterFieldImpl { ( (CompositeTracker) value ).$$_hibernate_setOwner( propertyName, (CompositeOwner) target ); } - // This marks the attribute as initialized, so it doesn't get lazy loaded afterwards + // This marks the attribute as initialized, so it doesn't get lazily loaded afterwards if ( target instanceof PersistentAttributeInterceptable ) { PersistentAttributeInterceptor interceptor = ( (PersistentAttributeInterceptable) target ).$$_hibernate_getInterceptor(); if ( interceptor instanceof BytecodeLazyAttributeInterceptor ) { diff --git a/hibernate-core/src/main/java/org/hibernate/proxy/AbstractLazyInitializer.java b/hibernate-core/src/main/java/org/hibernate/proxy/AbstractLazyInitializer.java index 29a2ef2a89..2e7de16b14 100644 --- a/hibernate-core/src/main/java/org/hibernate/proxy/AbstractLazyInitializer.java +++ b/hibernate-core/src/main/java/org/hibernate/proxy/AbstractLazyInitializer.java @@ -188,7 +188,7 @@ public abstract class AbstractLazyInitializer implements LazyInitializer { protected void permissiveInitialization() { if ( session == null ) { - //we have a detached collection thats set to null, reattach + //we have a detached collection that is set to null, reattach if ( sessionFactoryUuid == null ) { throw new LazyInitializationException( "could not initialize proxy [" + entityName + "#" + id + "] - no Session" ); } diff --git a/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/CriteriaQueryImpl.java b/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/CriteriaQueryImpl.java index 33054e5b89..6ec5ddd1d6 100755 --- a/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/CriteriaQueryImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/CriteriaQueryImpl.java @@ -174,7 +174,7 @@ public class CriteriaQueryImpl extends AbstractNode implements CriteriaQuery< @Override public CriteriaQuery where(Predicate... predicates) { - // TODO : assuming this should be a conjuntion, but the spec does not say specifically... + // TODO : assuming this should be a conjunction, but the spec does not say specifically... queryStructure.setRestriction( criteriaBuilder().and( predicates ) ); return this; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/CriteriaSubqueryImpl.java b/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/CriteriaSubqueryImpl.java index 066f93078b..e186e3d1dd 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/CriteriaSubqueryImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/CriteriaSubqueryImpl.java @@ -155,7 +155,7 @@ public class CriteriaSubqueryImpl extends ExpressionImpl implements Subque @Override public Subquery where(Predicate... predicates) { - // TODO : assuming this should be a conjuntion, but the spec does not say specifically... + // TODO : assuming this should be a conjunction, but the spec does not say specifically... queryStructure.setRestriction( criteriaBuilder().and( predicates ) ); return this; } diff --git a/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/expression/EntityTypeExpression.java b/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/expression/EntityTypeExpression.java index dca77f0bbd..69b6ae768b 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/expression/EntityTypeExpression.java +++ b/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/expression/EntityTypeExpression.java @@ -23,7 +23,7 @@ public class EntityTypeExpression extends ExpressionImpl implements Serial } public void registerParameters(ParameterRegistry registry) { - // nothign to do + // nothing to do } public String render(RenderingContext renderingContext) { diff --git a/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/path/PluralAttributePath.java b/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/path/PluralAttributePath.java index 7b0fc3e332..401a3fc504 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/path/PluralAttributePath.java +++ b/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/path/PluralAttributePath.java @@ -52,9 +52,9 @@ public class PluralAttributePath extends AbstractPathImpl implements Seria return attribute.getDeclaringType().getJavaType().getName() + '.' + attribute.getName(); } case MAPPED_SUPERCLASS: { - // the attribute is declared in a mappedsuperclass + // the attribute is declared in a mappedSuperclass if ( getPathSource().getModel().getBindableType() == Bindable.BindableType.ENTITY_TYPE ) { - // the role will be assigned to the "nearest" EnityType subclass of the MappedSuperclassType + // the role will be assigned to the "nearest" EntityType subclass of the MappedSuperclassType final EntityType entityTypeNearestDeclaringType = locateNearestSubclassEntity( (MappedSuperclassType) attribute.getDeclaringType(), (EntityType) getPathSource().getModel() @@ -89,7 +89,7 @@ public class PluralAttributePath extends AbstractPathImpl implements Seria entityType = (EntityType) singularAttribute.getDeclaringType(); } else if ( singularAttribute.getDeclaringType().getPersistenceType() == Type.PersistenceType.MAPPED_SUPERCLASS ){ - // find the "nearest" EnityType subclass of the MappedSuperclassType + // find the "nearest" EntityType subclass of the MappedSuperclassType entityType = locateNearestSubclassEntity( (MappedSuperclassType) singularAttribute.getDeclaringType(), (EntityType) parentPath.getModel() diff --git a/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/path/SingularAttributePath.java b/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/path/SingularAttributePath.java index cb228b0b45..04f4fdf92b 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/path/SingularAttributePath.java +++ b/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/path/SingularAttributePath.java @@ -69,7 +69,7 @@ public class SingularAttributePath extends AbstractPathImpl implements Ser @Override protected Attribute locateAttributeInternal(String attributeName) { final Attribute attribute = managedType.getAttribute( attributeName ); - // ManagedType.locateAttribute should throw exception rather than return + // ManagedType#locateAttribute() should throw exception rather than return // null, but just to be safe... if ( attribute == null ) { throw new IllegalArgumentException( "Could not resolve attribute named " + attributeName ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/predicate/InPredicate.java b/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/predicate/InPredicate.java index 9b29e5bcd8..5463943cb4 100755 --- a/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/predicate/InPredicate.java +++ b/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/predicate/InPredicate.java @@ -160,7 +160,7 @@ public class InPredicate final Expression exp = getExpression(); if ( ParameterExpressionImpl.class.isInstance( exp ) ) { // technically we only need to CAST (afaik) if expression and all values are parameters. - // but checking for that condition could take long time on a lon value list + // but checking for that condition could take long time on a long value list final ParameterExpressionImpl parameterExpression = (ParameterExpressionImpl) exp; final SessionFactoryImplementor sfi = criteriaBuilder().getEntityManagerFactory().unwrap( SessionFactoryImplementor.class ); final Type mappingType = sfi.getTypeResolver().heuristicType( parameterExpression.getParameterType().getName() ); diff --git a/hibernate-core/src/main/java/org/hibernate/query/internal/AbstractProducedQuery.java b/hibernate-core/src/main/java/org/hibernate/query/internal/AbstractProducedQuery.java index 2c0eafd11a..b16f8256e3 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/internal/AbstractProducedQuery.java +++ b/hibernate-core/src/main/java/org/hibernate/query/internal/AbstractProducedQuery.java @@ -1248,7 +1248,7 @@ public abstract class AbstractProducedQuery implements QueryImplementor { * @return {@code true} indicates they can be applied, {@code false} otherwise. */ protected boolean canApplyAliasSpecificLockModeHints() { - // only procedure/function calls cannot i believe + // only procedure/function calls cannot I believe return true; } diff --git a/hibernate-core/src/main/java/org/hibernate/resource/jdbc/internal/ResourceRegistryStandardImpl.java b/hibernate-core/src/main/java/org/hibernate/resource/jdbc/internal/ResourceRegistryStandardImpl.java index 3f3af3b97f..5c31b2f014 100644 --- a/hibernate-core/src/main/java/org/hibernate/resource/jdbc/internal/ResourceRegistryStandardImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/resource/jdbc/internal/ResourceRegistryStandardImpl.java @@ -44,7 +44,7 @@ public final class ResourceRegistryStandardImpl implements ResourceRegistry { // Dummy value to associate with an Object in the backing Map when we use it as a set: private static final Object PRESENT = new Object(); - //Used instead of Collections.EMPTY_SET to avoid polymorhic calls on xref; + //Used instead of Collections.EMPTY_SET to avoid polymorphic calls on xref; //Also, uses an HashMap as it were an HashSet, as technically we just need the Set semantics //but in this case the overhead of HashSet is not negligible. private static final HashMap EMPTY = new HashMap( 1, 0.2f ); diff --git a/hibernate-core/src/main/java/org/hibernate/sql/ForUpdateFragment.java b/hibernate-core/src/main/java/org/hibernate/sql/ForUpdateFragment.java index df3f4554aa..aa16a7fe86 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/ForUpdateFragment.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/ForUpdateFragment.java @@ -101,7 +101,7 @@ public class ForUpdateFragment { } return ""; } - // TODO: pass lockmode + // TODO: pass lock mode if(isNowaitEnabled) { return dialect.getForUpdateNowaitString( aliases.toString() ); } diff --git a/hibernate-core/src/main/java/org/hibernate/sql/Template.java b/hibernate-core/src/main/java/org/hibernate/sql/Template.java index 31c1d400ee..3c743ba8c2 100644 --- a/hibernate-core/src/main/java/org/hibernate/sql/Template.java +++ b/hibernate-core/src/main/java/org/hibernate/sql/Template.java @@ -268,7 +268,7 @@ public final class Template { result.append( trimOperands.from ).append( ' ' ); } else if ( trimOperands.trimSpec != null || trimOperands.trimChar != null ) { - // I think ANSI SQL says that the 'from' is not optional if either trim-spec or trim-char are specified + // I think ANSI SQL says that the 'from' is not optional if either trim-spec or trim-char is specified result.append( "from " ); } diff --git a/hibernate-core/src/main/java/org/hibernate/tool/schema/spi/SchemaManagementToolCoordinator.java b/hibernate-core/src/main/java/org/hibernate/tool/schema/spi/SchemaManagementToolCoordinator.java index f05f9a8dce..4f4e07529e 100644 --- a/hibernate-core/src/main/java/org/hibernate/tool/schema/spi/SchemaManagementToolCoordinator.java +++ b/hibernate-core/src/main/java/org/hibernate/tool/schema/spi/SchemaManagementToolCoordinator.java @@ -436,7 +436,7 @@ public class SchemaManagementToolCoordinator { */ public static final MigrateSettingSelector INSTANCE = new MigrateSettingSelector(); - // todo : should this define new migrattor-specific settings? + // todo : should this define new migrator-specific settings? // for now we reuse the CREATE settings where applicable @Override diff --git a/hibernate-core/src/main/java/org/hibernate/transform/CacheableResultTransformer.java b/hibernate-core/src/main/java/org/hibernate/transform/CacheableResultTransformer.java index 1a1e40109f..6949f6bbb9 100644 --- a/hibernate-core/src/main/java/org/hibernate/transform/CacheableResultTransformer.java +++ b/hibernate-core/src/main/java/org/hibernate/transform/CacheableResultTransformer.java @@ -31,7 +31,7 @@ public class CacheableResultTransformer implements ResultTransformer { // array with the i-th element indicating whether the i-th // expression returned by a query is included in the tuple; - // IMPLLEMENTATION NOTE: + // IMPLEMENTATION NOTE: // "joined" and "fetched" associations may use the same SQL, // but result in different tuple and cached values. This is // because "fetched" associations are excluded from the tuple. diff --git a/hibernate-core/src/main/java/org/hibernate/transform/PassThroughResultTransformer.java b/hibernate-core/src/main/java/org/hibernate/transform/PassThroughResultTransformer.java index 077cae0931..1e5fb599cf 100644 --- a/hibernate-core/src/main/java/org/hibernate/transform/PassThroughResultTransformer.java +++ b/hibernate-core/src/main/java/org/hibernate/transform/PassThroughResultTransformer.java @@ -42,7 +42,7 @@ public class PassThroughResultTransformer extends BasicTransformerAdapter implem /* package-protected */ List untransformToTuples(List results, boolean isSingleResult) { - // untransform only if necessary; if transformed, do it in place; + // un-transform only if necessary; if transformed, do it in place; if ( isSingleResult ) { for ( int i = 0 ; i < results.size() ; i++ ) { Object[] tuple = untransformToTuple( results.get( i ), isSingleResult); diff --git a/hibernate-core/src/main/java/org/hibernate/transform/Transformers.java b/hibernate-core/src/main/java/org/hibernate/transform/Transformers.java index a5b569458c..e99b814fbd 100644 --- a/hibernate-core/src/main/java/org/hibernate/transform/Transformers.java +++ b/hibernate-core/src/main/java/org/hibernate/transform/Transformers.java @@ -23,7 +23,7 @@ final public class Transformers { public static final ToListResultTransformer TO_LIST = ToListResultTransformer.INSTANCE; /** - * Creates a resulttransformer that will inject aliased values into + * Creates a ResultTransformer that will inject aliased values into * instances of Class via property methods or fields. */ public static ResultTransformer aliasToBean(Class target) { diff --git a/hibernate-core/src/main/java/org/hibernate/tuple/entity/AbstractEntityTuplizer.java b/hibernate-core/src/main/java/org/hibernate/tuple/entity/AbstractEntityTuplizer.java index a3ecaa3f93..903a88fb62 100644 --- a/hibernate-core/src/main/java/org/hibernate/tuple/entity/AbstractEntityTuplizer.java +++ b/hibernate-core/src/main/java/org/hibernate/tuple/entity/AbstractEntityTuplizer.java @@ -248,7 +248,7 @@ public abstract class AbstractEntityTuplizer implements EntityTuplizer { @Override public void setIdentifier(Object entity, Serializable id) throws HibernateException { - // 99% of the time the session is not needed. Its only needed for certain brain-dead + // 99% of the time the session is not needed. It's only needed for certain brain-dead // interpretations of JPA 2 "derived identity" support setIdentifier( entity, id, null ); } @@ -506,7 +506,7 @@ public abstract class AbstractEntityTuplizer implements EntityTuplizer { @Override public void resetIdentifier(Object entity, Serializable currentId, Object currentVersion) { - // 99% of the time the session is not needed. Its only needed for certain brain-dead + // 99% of the time the session is not needed. It's only needed for certain brain-dead // interpretations of JPA 2 "derived identity" support resetIdentifier( entity, currentId, currentVersion, null ); } @@ -696,7 +696,7 @@ public abstract class AbstractEntityTuplizer implements EntityTuplizer { @Override public final Object instantiate(Serializable id) throws HibernateException { - // 99% of the time the session is not needed. Its only needed for certain brain-dead + // 99% of the time the session is not needed. It's only needed for certain brain-dead // interpretations of JPA 2 "derived identity" support return instantiate( id, null ); } diff --git a/hibernate-core/src/main/java/org/hibernate/tuple/entity/BytecodeEnhancementMetadataPojoImpl.java b/hibernate-core/src/main/java/org/hibernate/tuple/entity/BytecodeEnhancementMetadataPojoImpl.java index 1496c2cbed..de07cc6990 100644 --- a/hibernate-core/src/main/java/org/hibernate/tuple/entity/BytecodeEnhancementMetadataPojoImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/tuple/entity/BytecodeEnhancementMetadataPojoImpl.java @@ -145,7 +145,7 @@ public final class BytecodeEnhancementMetadataPojoImpl implements BytecodeEnhanc final PersistentAttributeInterceptable entity = (PersistentAttributeInterceptable) entityTuplizer .instantiate( identifier, session ); - // clear the fields that are marked as dirty in the dirtyness tracker + // clear the fields that are marked as dirty in the dirtiness tracker if ( entity instanceof SelfDirtinessTracker ) { ( (SelfDirtinessTracker) entity ).$$_hibernate_clearDirtyAttributes(); } diff --git a/hibernate-core/src/main/java/org/hibernate/tuple/entity/PojoEntityTuplizer.java b/hibernate-core/src/main/java/org/hibernate/tuple/entity/PojoEntityTuplizer.java index 623c95d781..ef6aaf97a1 100644 --- a/hibernate-core/src/main/java/org/hibernate/tuple/entity/PojoEntityTuplizer.java +++ b/hibernate-core/src/main/java/org/hibernate/tuple/entity/PojoEntityTuplizer.java @@ -223,7 +223,7 @@ public class PojoEntityTuplizer extends AbstractEntityTuplizer { } } - // clear the fields that are marked as dirty in the dirtyness tracker + // clear the fields that are marked as dirty in the dirtiness tracker if ( entity instanceof SelfDirtinessTracker ) { ( (SelfDirtinessTracker) entity ).$$_hibernate_clearDirtyAttributes(); } diff --git a/hibernate-core/src/main/java/org/hibernate/type/CollectionType.java b/hibernate-core/src/main/java/org/hibernate/type/CollectionType.java index e931ac1eb9..18d3bdd342 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/CollectionType.java +++ b/hibernate-core/src/main/java/org/hibernate/type/CollectionType.java @@ -356,7 +356,7 @@ public abstract class CollectionType extends AbstractType implements Association public boolean isDirty(Object old, Object current, SharedSessionContractImplementor session) throws HibernateException { - // collections don't dirty an unversioned parent entity + // collections don't dirty an un-versioned parent entity // TODO: I don't really like this implementation; it would be better if // this was handled by searchForDirtyCollections() diff --git a/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java b/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java index 3e5cee8d65..feb669ed55 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java +++ b/hibernate-core/src/main/java/org/hibernate/type/ComponentType.java @@ -115,7 +115,7 @@ public class ComponentType extends AbstractType implements CompositeType, Proced @Override public int[] sqlTypes(Mapping mapping) throws MappingException { - //Not called at runtime so doesn't matter if its slow :) + //Not called at runtime so doesn't matter if it's slow :) int[] sqlTypes = new int[getColumnSpan( mapping )]; int n = 0; for ( int i = 0; i < propertySpan; i++ ) { @@ -129,7 +129,7 @@ public class ComponentType extends AbstractType implements CompositeType, Proced @Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { - //Not called at runtime so doesn't matter if its slow :) + //Not called at runtime so doesn't matter if it's slow :) final Size[] sizes = new Size[getColumnSpan( mapping )]; int soFar = 0; for ( Type propertyType : propertyTypes ) { @@ -142,7 +142,7 @@ public class ComponentType extends AbstractType implements CompositeType, Proced @Override public Size[] defaultSizes(Mapping mapping) throws MappingException { - //Not called at runtime so doesn't matter if its slow :) + //Not called at runtime so doesn't matter if it's slow :) final Size[] sizes = new Size[getColumnSpan( mapping )]; int soFar = 0; for ( Type propertyType : propertyTypes ) { @@ -690,7 +690,7 @@ public class ComponentType extends AbstractType implements CompositeType, Proced if ( value != null ) { Object result = instantiate( owner, session ); Object[] values = (Object[]) value; - Object[] resolvedValues = new Object[values.length]; //only really need new array during semiresolve! + Object[] resolvedValues = new Object[values.length]; //only really need new array during semi-resolve! for ( int i = 0; i < values.length; i++ ) { resolvedValues[i] = propertyTypes[i].resolve( values[i], session, owner ); } diff --git a/hibernate-core/src/main/java/org/hibernate/type/CompositeCustomType.java b/hibernate-core/src/main/java/org/hibernate/type/CompositeCustomType.java index 5ab326ce62..462b92a99c 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/CompositeCustomType.java +++ b/hibernate-core/src/main/java/org/hibernate/type/CompositeCustomType.java @@ -250,7 +250,7 @@ public class CompositeCustomType extends AbstractType implements CompositeType, @Override public Size[] dictatedSizes(Mapping mapping) throws MappingException { - //Not called at runtime so doesn't matter if its slow :) + //Not called at runtime so doesn't matter if it's slow :) final Size[] sizes = new Size[getColumnSpan( mapping )]; int soFar = 0; for ( Type propertyType : userType.getPropertyTypes() ) { @@ -263,7 +263,7 @@ public class CompositeCustomType extends AbstractType implements CompositeType, @Override public Size[] defaultSizes(Mapping mapping) throws MappingException { - //Not called at runtime so doesn't matter if its slow :) + //Not called at runtime so doesn't matter if it's slow :) final Size[] sizes = new Size[getColumnSpan( mapping )]; int soFar = 0; for ( Type propertyType : userType.getPropertyTypes() ) { diff --git a/hibernate-core/src/main/java/org/hibernate/type/EntityType.java b/hibernate-core/src/main/java/org/hibernate/type/EntityType.java index 11ca22ff7f..a1271c1acd 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/EntityType.java +++ b/hibernate-core/src/main/java/org/hibernate/type/EntityType.java @@ -518,7 +518,7 @@ public abstract class EntityType extends AbstractType implements AssociationType Object propertyValue = entityPersister.getPropertyValue( value, uniqueKeyPropertyName ); // We now have the value of the property-ref we reference. However, // we need to dig a little deeper, as that property might also be - // an entity type, in which case we need to resolve its identitifier + // an entity type, in which case we need to resolve its identifier Type type = entityPersister.getPropertyType( uniqueKeyPropertyName ); if ( type.isEntityType() ) { propertyValue = ( (EntityType) type ).getIdentifier( propertyValue, session ); diff --git a/hibernate-core/src/main/java/org/hibernate/type/ManyToOneType.java b/hibernate-core/src/main/java/org/hibernate/type/ManyToOneType.java index a461bfe5c3..c6be39af5e 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/ManyToOneType.java +++ b/hibernate-core/src/main/java/org/hibernate/type/ManyToOneType.java @@ -120,7 +120,7 @@ public class ManyToOneType extends EntityType { @Override public boolean isAlwaysDirtyChecked() { - // always need to dirty-check, even when non-updateable; + // always need to dirty-check, even when non-updatable; // this ensures that when the association is updated, // the entity containing this association will be updated // in the cache diff --git a/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/ArrayMutabilityPlan.java b/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/ArrayMutabilityPlan.java index 9bd6c61ab9..49bc40f2d0 100644 --- a/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/ArrayMutabilityPlan.java +++ b/hibernate-core/src/main/java/org/hibernate/type/descriptor/java/ArrayMutabilityPlan.java @@ -19,7 +19,7 @@ public class ArrayMutabilityPlan extends MutableMutabilityPlan { @SuppressWarnings({ "unchecked", "SuspiciousSystemArraycopy" }) public T deepCopyNotNull(T value) { if ( ! value.getClass().isArray() ) { - // ugh! cannot find a way to properly define the type signature here to + // ugh! cannot find a way to properly define the type signature here throw new IllegalArgumentException( "Value was not an array [" + value.getClass().getName() + "]" ); } final int length = Array.getLength( value );