HHH-10108 - Substituted checkstyle NewlineAtEndOfFile rule with rules used in OGM and fixed classes having more than a newline at the end of file

This commit is contained in:
Andrea Boriero 2015-09-21 16:05:32 +01:00
parent d812f79ace
commit c5b1cf94f3
97 changed files with 13 additions and 320 deletions

View File

@ -45,9 +45,3 @@ public class HibernateException extends RuntimeException {
super( message, cause );
}
}

View File

@ -42,9 +42,3 @@ public class MappingException extends HibernateException {
}
}

View File

@ -26,10 +26,3 @@ public class ObjectDeletedException extends UnresolvableObjectException {
}
}

View File

@ -851,10 +851,3 @@ public interface Query extends BasicQueryContract {
public Query setResultTransformer(ResultTransformer transformer);
}

View File

@ -67,9 +67,3 @@ public enum ReplicationMode {
public abstract boolean shouldOverwriteCurrentVersion(Object entity, Object currentVersion, Object newVersion, VersionType versionType);
}

View File

@ -356,9 +356,3 @@ public interface ScrollableResults extends java.io.Closeable {
*/
public TimeZone getTimeZone(int col);
}

View File

@ -45,10 +45,3 @@ public class StaleObjectStateException extends StaleStateException {
}
}

View File

@ -66,10 +66,3 @@ public class UnresolvableObjectException extends HibernateException {
}
}

View File

@ -46,4 +46,3 @@ public class WrongClassException extends HibernateException {
return identifier;
}
}

View File

@ -196,4 +196,3 @@ public abstract class CollectionAction implements Executable, Serializable, Comp
return (EventSource) getSession();
}
}

View File

@ -79,10 +79,3 @@ public final class CollectionRecreateAction extends CollectionAction {
}
}
}

View File

@ -124,10 +124,3 @@ public final class CollectionUpdateAction extends CollectionAction {
}
}
}

View File

@ -186,4 +186,3 @@ public abstract class EntityAction
return (EventSource) getSession();
}
}

View File

@ -347,4 +347,3 @@ public final class EntityUpdateAction extends EntityAction {
}
}

View File

@ -43,4 +43,3 @@ public final class QueuedOperationCollectionAction extends CollectionAction {
getPersister().processQueuedOps( getCollection(), getKey(), getSession() );
}
}

View File

@ -26,4 +26,3 @@ public @interface GenericGenerators {
*/
GenericGenerator[] value();
}

View File

@ -104,4 +104,3 @@ public class Caching {
}
}

View File

@ -36,4 +36,3 @@ public enum TruthValue {
return value != null ? value.toBoolean( defaultValue ) : defaultValue;
}
}

View File

@ -200,4 +200,3 @@ public class Identifier implements Comparable<Identifier> {
return getCanonicalName().compareTo( o.getCanonicalName() );
}
}

View File

@ -24,4 +24,3 @@ public interface QualifiedName {
String render();
}

View File

@ -72,5 +72,3 @@ class AbstractConstraintSource implements ConstraintSource {
return result;
}
}

View File

@ -36,5 +36,3 @@ class IndexConstraintSourceImpl extends AbstractConstraintSource implements Inde
return false;
}
}

View File

@ -39,4 +39,3 @@ public class AttributeRole extends AbstractAttributeKey {
super( parent, property );
}
}

View File

@ -70,4 +70,3 @@ public interface AttributeSource extends ToolingHintContextContainer {
*/
public boolean isIncludedInOptimisticLocking();
}

View File

@ -62,4 +62,3 @@ public interface IdentifiableTypeSource extends AttributeSourceContainer {
*/
public List<JpaCallbackSource> getJpaCallbackClasses();
}

View File

@ -26,4 +26,3 @@ public enum NaturalIdMutability {
*/
NOT_NATURAL_ID
}

View File

@ -64,4 +64,3 @@ public interface SecondaryTableSource extends ForeignKeyContributingSource {
*/
public CustomSql getCustomSqlDelete();
}

View File

@ -13,4 +13,3 @@ package org.hibernate.cache.spi;
*/
public interface TransactionAwareCache {
}

View File

@ -1237,4 +1237,3 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
}
}

View File

@ -64,8 +64,3 @@ public enum MatchMode {
public abstract String toMatchString(String pattern);
}

View File

@ -305,4 +305,3 @@ public class IngresDialect extends Dialect {
return false;
}
}

View File

@ -201,4 +201,3 @@ public class SQLServerDialect extends AbstractTransactSQLDialect {
return new SQLServerIdentityColumnSupport();
}
}

View File

@ -271,4 +271,3 @@ public class Teradata14Dialect extends TeradataDialect {
return new Teradata14IdentityColumnSupport();
}
}

View File

@ -134,9 +134,3 @@ public class TypeNames {
defaults.put( typeCode, value );
}
}

View File

@ -82,4 +82,3 @@ public class BatchBuilderImpl implements BatchBuilder, Configurable {
return this;
}
}

View File

@ -57,4 +57,3 @@ public interface Batch {
*/
public void release();
}

View File

@ -42,5 +42,3 @@ public enum SQLStateType {
}
}
}

View File

@ -95,4 +95,3 @@ public class SqlStatementLogger {
}
}
}

View File

@ -32,4 +32,3 @@ public interface TransactionObserver {
*/
public void afterCompletion(boolean successful, boolean delayed);
}

View File

@ -24,4 +24,3 @@ public interface LockEventListener extends Serializable {
*/
public void onLock(LockEvent event) throws HibernateException;
}

View File

@ -47,11 +47,4 @@ public class GroupByParser implements Parser {
public void end(QueryTranslatorImpl q) throws QueryException {
}
}

View File

@ -21,10 +21,3 @@ public interface Parser {
public void end(QueryTranslatorImpl q) throws QueryException;
}

View File

@ -44,11 +44,4 @@ public final class ParserHelper {
}
p.end( q );
}
}

View File

@ -137,4 +137,3 @@ public class PreprocessingParser implements Parser {
}
}

View File

@ -26,10 +26,3 @@ public class SelectPathExpressionParser extends PathExpressionParser {
return getCurrentName();
}
}

View File

@ -76,10 +76,4 @@ public abstract class AbstractUUIDGenerator implements IdentifierGenerator {
protected int getLoTime() {
return (int) System.currentTimeMillis();
}
}

View File

@ -47,9 +47,3 @@ public class Assigned implements IdentifierGenerator, Configurable {
}
}
}

View File

@ -56,4 +56,3 @@ public enum EntityIdentifierNature {
*/
AGGREGATED_COMPOSITE
}

View File

@ -24,11 +24,4 @@ public class IdentifierGenerationException extends HibernateException {
public IdentifierGenerationException(String msg, Throwable t) {
super(msg, t);
}
}

View File

@ -48,4 +48,3 @@ public final class StreamCopier {
}
}
}

View File

@ -81,4 +81,3 @@ public final class JndiHelper {
}
}
}

View File

@ -22,9 +22,3 @@ public interface CollectionInitializer {
*/
public void initialize(Serializable id, SessionImplementor session) throws HibernateException;
}

View File

@ -62,12 +62,4 @@ public abstract class IdentifierCollection extends Collection {
);
}
}
}

View File

@ -46,9 +46,3 @@ public interface CollectionMetadata {
*/
public boolean isLazy();
}

View File

@ -27,10 +27,3 @@ public interface HibernateProxy extends Serializable {
*/
public LazyInitializer getHibernateLazyInitializer();
}

View File

@ -33,11 +33,4 @@ public final class HibernateProxyHelper {
private HibernateProxyHelper() {
//cant instantiate
}
}

View File

@ -42,4 +42,3 @@ public class HSQLCaseFragment extends CaseFragment {
return buf.toString();
}
}

View File

@ -43,4 +43,3 @@ public class MckoiCaseFragment extends CaseFragment {
return buf.toString();
}
}

View File

@ -125,9 +125,3 @@ public class QueryJoinFragment extends JoinFragment {
afterWhere.setLength( 0 );
}
}

View File

@ -110,5 +110,3 @@ public class Sybase11JoinFragment extends JoinFragment {
addCondition( on );
}
}

View File

@ -57,11 +57,4 @@ public class ColumnMetadata {
public int getTypeCode() {
return typeCode;
}
}

View File

@ -74,9 +74,3 @@ public class ForeignKeyMetadata {
return "ForeignKeyMetadata(" + name + ')';
}
}

View File

@ -40,9 +40,3 @@ public class IndexMetadata {
return "IndexMatadata(" + name + ')';
}
}

View File

@ -82,11 +82,4 @@ public class ColumnInformationImpl implements ColumnInformation {
public String toString() {
return "ColumnInformation(" + columnIdentifier + ')';
}
}

View File

@ -67,9 +67,3 @@ public interface ColumnInformation {
*/
public int getDecimalDigits();
}

View File

@ -222,4 +222,3 @@ public abstract class AbstractCompositionAttribute
return super.loggableMetadata() + ",composition";
}
}

View File

@ -37,6 +37,4 @@ public class BlobType extends AbstractSingleColumnStandardBasicType<Blob> {
protected Blob getReplacement(Blob original, Blob target, SessionImplementor session) {
return session.getFactory().getDialect().getLobMergeStrategy().mergeBlob( original, target, session );
}
}

View File

@ -57,8 +57,3 @@ public class BooleanType
return dialect.toBooleanValueString( value );
}
}

View File

@ -47,8 +47,3 @@ public class FloatType extends AbstractSingleColumnStandardBasicType<Float> impl
return toString( value );
}
}

View File

@ -47,6 +47,4 @@ public class ListType extends CollectionType {
}
return null;
}
}

View File

@ -171,6 +171,4 @@ public class OneToOneType extends EntityType {
//TODO: this is kinda inconsistent with CollectionType
return false;
}
}

View File

@ -43,11 +43,4 @@ public class SortedMapType extends MapType {
public PersistentCollection wrap(SessionImplementor session, Object collection) {
return new PersistentSortedMap( session, (java.util.SortedMap) collection );
}
}

View File

@ -41,9 +41,3 @@ public interface VersionType<T> extends Type {
*/
public Comparator<T> getComparator();
}

View File

@ -160,11 +160,4 @@ public interface UserType {
* @return the value to be merged
*/
public Object replace(Object original, Object target, Object owner) throws HibernateException;
}

View File

@ -385,4 +385,3 @@ abstract class AbstractReadWriteEhcacheAccessStrategy<T extends EhcacheTransacti
}
}
}

View File

@ -57,4 +57,3 @@ public class ExplicitTruthValueCheck
+ ( getTruthValue() == TruthValue.TRUE ? "true" : "false" );
}
}

View File

@ -94,5 +94,3 @@ public class RevisionTypeType implements UserType, Serializable {
return EqualsHelper.equals( x, y );
}
}

View File

@ -290,4 +290,3 @@ public class Parameters {
queryParamValues.putAll( localQueryParamValues );
}
}

View File

@ -136,7 +136,4 @@ public class GeoDbWkb {
}
return ByteBuffer.from( baos.toByteArray() );
}
}

View File

@ -133,6 +133,4 @@ public class MySQL56SpatialDialect extends MySQL5Dialect implements SpatialDiale
public boolean supports(SpatialFunction function) {
return dialectDelegate.supports( function );
}
}

View File

@ -22,4 +22,3 @@ import java.lang.annotation.Target;
@Target({ ElementType.METHOD, ElementType.TYPE })
public @interface BeforeClassOnce {
}

View File

@ -69,7 +69,4 @@ class BaseRegion implements Region {
public int getTimeout() {
return timeout;
}
}

View File

@ -39,9 +39,3 @@ public final class Timestamper {
private Timestamper() {
}
}

View File

@ -212,7 +212,19 @@
<property name="severity" value="warning" />
</module>
<module name="NewlineAtEndOfFile" />
<!-- We are not using NewLineAtEndOfFile because the new line chars change
on different operating systems and that rule allows only one type. This rule
is not actually checking for new lines, but it will work if we check that
there are not white spaces at the end of a line with another rule. -->
<module name="RegexpMultiline">
<property name="format" value="\S\z" />
<property name="message" value="Missing new line at the end of file" />
</module>
<module name="RegexpMultiline">
<property name="format" value="\S\r?\n(\r?\n)+\z" />
<property name="message" value="Only one new line is allowed at the end of a file" />
</module>
<!--
Used to collect "todo" comments into a single location

View File

@ -20,5 +20,3 @@ public class MetaModelGenerationException extends RuntimeException {
super( message );
}
}

View File

@ -19,5 +19,3 @@ public final class Version {
return "[WORKING]";
}
}

View File

@ -318,5 +318,3 @@ class BasicAttributeVisitor extends SimpleTypeVisitor6<Boolean, Element> {
return Boolean.FALSE;
}
}

View File

@ -73,5 +73,3 @@ public class AccessTypeInformation {
return sb.toString();
}
}

View File

@ -78,5 +78,3 @@ public final class Constants {
private Constants() {
}
}

View File

@ -57,5 +57,3 @@ public class FileTimeStampChecker implements Serializable {
return sb.toString();
}
}

View File

@ -99,5 +99,3 @@ public final class StringUtil {
Character.isUpperCase( string.charAt( 1 ) );
}
}

View File

@ -426,4 +426,3 @@ public final class TypeUtils {
}
}
}

View File

@ -41,5 +41,3 @@ public class ContextProvidingValidationEventHandler implements ValidationEventHa
return message;
}
}

View File

@ -149,6 +149,3 @@ public class JpaNamespaceTransformingEventReader extends EventReaderDelegate {
return newElementAttributeList;
}
}

View File

@ -176,6 +176,3 @@ public class XmlParserHelper {
return schema;
}
}

View File

@ -16,5 +16,3 @@ public class XmlParsingException extends Exception {
super( message, root );
}
}

View File

@ -465,5 +465,3 @@ public class JpaDescriptorParser {
return null;
}
}