mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Ignore private/package private classes from CP-scan
This commit is contained in:
@@ -342,8 +342,9 @@ public class BootupClasses implements Predicate<Class<?>> {
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean isInterestingInterface(Class<?> cls) {
|
||||
if (Modifier.isAbstract(cls.getModifiers())) {
|
||||
// do not include abstract classes as we can
|
||||
if (Modifier.isAbstract(cls.getModifiers())
|
||||
|| !(Modifier.isPublic(cls.getModifiers()) || Modifier.isProtected(cls.getModifiers()))) {
|
||||
// do not include abstract and non pupbic/protected classes as we can
|
||||
// not instantiate them
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ import org.tests.model.basic.ECustomId;
|
||||
import org.tests.model.controller.FindControllerMain;
|
||||
import org.tests.model.controller.SoftRefA;
|
||||
import org.tests.model.controller.SoftRefB;
|
||||
import org.tests.model.controller.TestBeanFindController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
+3
-2
@@ -1,16 +1,17 @@
|
||||
package org.tests.model.controller;
|
||||
package io.ebean.xtest.event;
|
||||
|
||||
import io.ebean.bean.BeanCollection;
|
||||
import io.ebean.event.BeanFindController;
|
||||
import io.ebean.event.BeanQueryRequest;
|
||||
import io.ebean.plugin.BeanType;
|
||||
import org.tests.model.controller.FindControllerMain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class TestBeanFindController implements BeanFindController {
|
||||
class TestBeanFindController implements BeanFindController {
|
||||
|
||||
@Override
|
||||
public boolean isRegisterFor(final Class<?> cls) {
|
||||
@@ -189,7 +189,7 @@ public class TestChangeLog extends BaseTestCase {
|
||||
return DatabaseFactory.create(config);
|
||||
}
|
||||
|
||||
public static class TDChangeLogPrepare implements ChangeLogPrepare {
|
||||
static class TDChangeLogPrepare implements ChangeLogPrepare {
|
||||
@Override
|
||||
public boolean prepare(ChangeSet changes) {
|
||||
changes.setUserId("appUser1");
|
||||
@@ -198,7 +198,7 @@ public class TestChangeLog extends BaseTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
public static class TDChangeLogListener implements ChangeLogListener {
|
||||
static class TDChangeLogListener implements ChangeLogListener {
|
||||
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
@@ -226,7 +226,7 @@ public class TestChangeLog extends BaseTestCase {
|
||||
|
||||
}
|
||||
|
||||
public static class TDChangeLogRegister implements ChangeLogRegister {
|
||||
static class TDChangeLogRegister implements ChangeLogRegister {
|
||||
|
||||
@Override
|
||||
public ChangeLogFilter getChangeFilter(Class<?> beanType) {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class MyEBasicConfigStartup implements ServerConfigStartup {
|
||||
serverConfig.add(new EbasicBulkListener());
|
||||
}
|
||||
|
||||
public static class EbasicBulkListener implements BulkTableEventListener {
|
||||
private static class EbasicBulkListener implements BulkTableEventListener {
|
||||
|
||||
final Set<String> s = new HashSet<>();
|
||||
|
||||
@@ -49,7 +49,7 @@ public class MyEBasicConfigStartup implements ServerConfigStartup {
|
||||
|
||||
}
|
||||
|
||||
public static class EbasicPersistList extends AbstractBeanPersistListener {
|
||||
private static class EbasicPersistList extends AbstractBeanPersistListener {
|
||||
|
||||
@Override
|
||||
public boolean isRegisterFor(Class<?> cls) {
|
||||
|
||||
Reference in New Issue
Block a user