File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
src/main/kotlin/graphql/kickstart/tools/resolver Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,10 @@ import graphql.schema.DataFetchingEnvironment
12
12
import org.apache.commons.lang3.ClassUtils
13
13
import org.apache.commons.lang3.reflect.FieldUtils
14
14
import org.slf4j.LoggerFactory
15
- import java.lang.reflect.*
15
+ import java.lang.reflect.AccessibleObject
16
+ import java.lang.reflect.Method
17
+ import java.lang.reflect.Modifier
18
+ import java.lang.reflect.Type
16
19
import kotlin.reflect.full.valueParameters
17
20
import kotlin.reflect.jvm.javaType
18
21
import kotlin.reflect.jvm.kotlinFunction
@@ -62,9 +65,9 @@ internal class FieldResolverScanner(val options: SchemaParserOptions) {
62
65
private fun trySetAccessible (field : FieldDefinition , type : JavaType ): AccessibleObject .() -> Unit = {
63
66
try {
64
67
isAccessible = true
65
- } catch (e: InaccessibleObjectException ) {
66
- log.warn(" Unable to make field ${type.unwrap().name} #${field.name} accessible: " +
67
- " Module ${type.unwrap().module.name} is closed. Be sure to provide a resolver or open the module if possible." )
68
+ } catch (e: RuntimeException ) {
69
+ log.warn(" Unable to make field ${type.unwrap().name} #${field.name} accessible. " +
70
+ " Be sure to provide a resolver or open the enclosing module if possible." )
68
71
}
69
72
}
70
73
You can’t perform that action at this time.
0 commit comments