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
1212import org.apache.commons.lang3.ClassUtils
1313import org.apache.commons.lang3.reflect.FieldUtils
1414import 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
1619import kotlin.reflect.full.valueParameters
1720import kotlin.reflect.jvm.javaType
1821import kotlin.reflect.jvm.kotlinFunction
@@ -62,9 +65,9 @@ internal class FieldResolverScanner(val options: SchemaParserOptions) {
6265 private fun trySetAccessible (field : FieldDefinition , type : JavaType ): AccessibleObject .() -> Unit = {
6366 try {
6467 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." )
6871 }
6972 }
7073
You can’t perform that action at this time.
0 commit comments