Skip to content

Commit 4a0ac29

Browse files
committed
Add calls to get snapshot info
1 parent 486e3f3 commit 4a0ac29

File tree

3 files changed

+299
-76
lines changed

3 files changed

+299
-76
lines changed

x-pack/plugin/slm/src/main/java/org/elasticsearch/xpack/slm/SnapshotLifecycleService.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,7 @@ public static String getJobId(SnapshotLifecyclePolicyMetadata policyMeta) {
239239
*/
240240
public static String getPolicyId(String jobId) {
241241
int lastDashIndex = jobId.lastIndexOf('-');
242-
if (lastDashIndex == -1) {
243-
throw new IllegalArgumentException("Invalid job id format: " + jobId);
244-
}
242+
assert lastDashIndex != -1 : "Invalid job id format: " + jobId;
245243
return jobId.substring(0, lastDashIndex);
246244
}
247245

0 commit comments

Comments
 (0)