mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
[ML] Avoid potentially throwing calls to Task#getDescription in model download
This commit is contained in:
parent
c26d195120
commit
444b8eab75
2 changed files with 6 additions and 1 deletions
5
docs/changelog/124527.yaml
Normal file
5
docs/changelog/124527.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
pr: 124527
|
||||
summary: Avoid potentially throwing calls to Task#getDescription in model download
|
||||
area: Machine Learning
|
||||
type: bug
|
||||
issues: []
|
|
@ -151,7 +151,7 @@ public class TransportLoadTrainedModelPackage extends TransportMasterNodeAction<
|
|||
|
||||
ModelDownloadTask inProgress = null;
|
||||
for (var task : tasks) {
|
||||
if (description.equals(task.getDescription()) && task instanceof ModelDownloadTask downloadTask) {
|
||||
if (task instanceof ModelDownloadTask downloadTask && (description.equals(downloadTask.getDescription()))) {
|
||||
inProgress = downloadTask;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue