google / protobuf-gradle-plugin

Protobuf Plugin for Gradle
Other
1.77k stars 273 forks source link

Early throw if configuration not found #626

Closed rougsig closed 2 years ago

rougsig commented 2 years ago

Background findByName can return null, getByName throws an exception if an object with the required name is not found. We pass the found configuration result to the setExtendsFrom function, this function cannot handle nullable objects. As a result, NPE will be thrown inside setExtendsFrom without details about the not found configuration.

Changes Replace findByName to getByName

Test plan Green pipelines. Not production logic was changed.

References https://github.com/google/protobuf-gradle-plugin/issues/623