[ https://issues.apache.org/jira/browse/SOLR-8992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15252072#comment-15252072 ]
Steve Rowe commented on SOLR-8992: ---------------------------------- {quote} bq. but you don't guard against that in SchemaProps.toMap(), so NPEs are waiting to happen. I think I have copied the code verbatim and it is guarded against NPEs {code:java} Object val = it.fun.apply(this); if (val != null) topLevel.put(it.name, val); {code} {quote} Which code are you talking about copying verbatim? The code below looks completely new to me? And {{it.fun}} is never checked for null. {code:java} @Override public Map<String, Object> toMap() { Map<String, Object> topLevel = new LinkedHashMap<>(); Stream.of(Handler.values()) .filter(it -> name == null || it.name.equals(name)) .forEach(it -> { Object val = it.fun.apply(this); if (val != null) topLevel.put(it.name, val); }); return topLevel; } } {code} > Restore Schema API GET method functionality removed by SOLR-8736 > ---------------------------------------------------------------- > > Key: SOLR-8992 > URL: https://issues.apache.org/jira/browse/SOLR-8992 > Project: Solr > Issue Type: Bug > Reporter: Steve Rowe > Assignee: Noble Paul > Attachments: SOLR-8992.patch > > > The following schema API GET functionality was removed under SOLR-8736; some > of this functionality should be restored: > * {{schema/copyfields}}: > ** The following information is no longer output: > *** {{destDynamicBase}}: the matching dynamic field pattern for the > destination > *** {{sourceDynamicBase}}: the matching dynamic field pattern for the source > ** The following request parameters are no longer supported: > *** {{dest.fl}}: include only copyFields that have one of these as a > destination > *** {{source.fl}}: include only copyFields that have one of these as a source > * {{schema/dynamicfields}}: > ** The following request parameters are no longer supported: > *** {{fl}}: a comma and/or space separated list of dynamic field patterns to > include > * {{schema/fields}} and {{schema/fields/_fieldname_}}: > ** The following information is no longer output: > *** {{dynamicBase}}: the matching dynamic field pattern, if the > {{includeDynamic}} param is given (see below) > ** The following request parameters are no longer supported: > *** {{fl}}: (only supported without {{/_fieldname_}}): a comma and/or space > separated list of fields to include > *** {{includeDynamic}}: output the matching dynamic field pattern as > {{dynamicBase}}, if {{_fieldname_}}, or field(s) listed in {{fl}} param, are > not explicitly declared in the schema > * {{schema/fieldtypes}} and {{schema/fieldtypes/_typename_}}: > ** The following information is no longer output: > *** {{fields}}: the fields with the given field type > *** {{dynamicFields}}: the dynamic fields with the given field type -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org