@@ -109,22 +109,22 @@ static ReflectionRemapperImpl fromMappingTree(
109109 final Map <String , String > fields = new HashMap <>();
110110 for (final MappingTree .FieldMapping field : cls .getFields ()) {
111111 fields .put (
112- pool .string (field .getName (fromNamespace )),
113- pool .string (field .getName (toNamespace ))
112+ pool .string (Objects . requireNonNull ( field .getName (fromNamespace ) )),
113+ pool .string (Objects . requireNonNull ( field .getName (toNamespace ) ))
114114 );
115115 }
116116
117117 final Map <String , String > methods = new HashMap <>();
118118 for (final MappingTree .MethodMapping method : cls .getMethods ()) {
119119 methods .put (
120- pool .string (methodKey (method .getName (fromNamespace ), method .getDesc (toNamespace ))),
121- pool .string (method .getName (toNamespace ))
120+ pool .string (methodKey (Objects . requireNonNull ( method .getName (fromNamespace )), Objects . requireNonNull ( method .getDesc (toNamespace ) ))),
121+ pool .string (Objects . requireNonNull ( method .getName (toNamespace ) ))
122122 );
123123 }
124124
125125 final ClassMapping map = new ClassMapping (
126- cls .getName (toNamespace ).replace ('/' , '.' ),
127- cls .getName (fromNamespace ).replace ('/' , '.' ),
126+ Objects . requireNonNull ( cls .getName (toNamespace ) ).replace ('/' , '.' ),
127+ Objects . requireNonNull ( cls .getName (fromNamespace ) ).replace ('/' , '.' ),
128128 Collections .unmodifiableMap (fields ),
129129 Collections .unmodifiableMap (methods )
130130 );
0 commit comments