Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.hibernate.bytecode.enhance.spi.UnloadedClass;
import org.hibernate.bytecode.enhance.spi.UnloadedField;

import org.hibernate.bytecode.enhance.spi.UnsupportedEnhancementStrategy;
import org.hibernate.testing.junit4.CustomRunner;
import org.junit.runner.Runner;
import org.junit.runner.notification.RunNotifier;
Expand All @@ -29,6 +30,7 @@
import org.junit.runners.model.InitializationError;
import org.junit.runners.model.RunnerBuilder;

import static org.hibernate.bytecode.enhance.spi.UnsupportedEnhancementStrategy.SKIP;
import static org.hibernate.bytecode.internal.BytecodeProviderInitiator.buildDefaultBytecodeProvider;

/**
Expand Down Expand Up @@ -113,6 +115,12 @@ public boolean hasLazyLoadableAttributes(UnloadedClass classDescriptor) {
public boolean isLazyLoadable(UnloadedField field) {
return options.lazyLoading() && super.isLazyLoadable( field );
}

@Override
public UnsupportedEnhancementStrategy getUnsupportedEnhancementStrategy() {
final UnsupportedEnhancementStrategy strategy = options.unsupportedEnhancementStrategy();
return strategy != SKIP ? strategy : super.getUnsupportedEnhancementStrategy();
}
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
*/
package org.hibernate.testing.bytecode.enhancement;

import org.hibernate.bytecode.enhance.spi.UnsupportedEnhancementStrategy;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
Expand All @@ -21,4 +23,5 @@
boolean inlineDirtyChecking() default false;
boolean lazyLoading() default false;
boolean extendedEnhancement() default false;
UnsupportedEnhancementStrategy unsupportedEnhancementStrategy() default UnsupportedEnhancementStrategy.SKIP;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/
package org.hibernate.testing.bytecode.enhancement.extension.engine;

import static org.hibernate.bytecode.enhance.spi.UnsupportedEnhancementStrategy.SKIP;
import static org.hibernate.bytecode.internal.BytecodeProviderInitiator.buildDefaultBytecodeProvider;

import java.io.BufferedInputStream;
Expand All @@ -27,6 +28,7 @@
import org.hibernate.bytecode.enhance.spi.UnloadedClass;
import org.hibernate.bytecode.enhance.spi.UnloadedField;

import org.hibernate.bytecode.enhance.spi.UnsupportedEnhancementStrategy;
import org.hibernate.testing.bytecode.enhancement.ClassEnhancementSelector;
import org.hibernate.testing.bytecode.enhancement.ClassEnhancementSelectors;
import org.hibernate.testing.bytecode.enhancement.ClassSelector;
Expand Down Expand Up @@ -112,6 +114,12 @@ public boolean hasLazyLoadableAttributes(UnloadedClass classDescriptor) {
public boolean isLazyLoadable(UnloadedField field) {
return options.lazyLoading() && super.isLazyLoadable( field );
}

@Override
public UnsupportedEnhancementStrategy getUnsupportedEnhancementStrategy() {
final UnsupportedEnhancementStrategy strategy = options.unsupportedEnhancementStrategy();
return strategy != SKIP ? strategy : super.getUnsupportedEnhancementStrategy();
}
};
}

Expand Down
Loading