Skip to content

Commit cba0710

Browse files
committed
Optimze imports in ImageResponseMetadata.
* Make the Long created field final. * Delegate the default constructor to ImageResponseMetadata(:Long) passing System.currentTimeMillis().
1 parent bb88e2f commit cba0710

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

spring-ai-core/src/main/java/org/springframework/ai/image/ImageResponseMetadata.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
package org.springframework.ai.image;
1717

1818
import org.springframework.ai.model.MutableResponseMetadata;
19-
import org.springframework.ai.model.ResponseMetadata;
20-
21-
import java.util.HashMap;
2219

2320
/**
2421
* Represents metadata associated with an image response. It provides additional
@@ -31,10 +28,10 @@
3128
*/
3229
public class ImageResponseMetadata extends MutableResponseMetadata {
3330

34-
private Long created;
31+
private final Long created;
3532

3633
public ImageResponseMetadata() {
37-
this.created = System.currentTimeMillis();
34+
this(System.currentTimeMillis());
3835
}
3936

4037
public ImageResponseMetadata(Long created) {

0 commit comments

Comments
 (0)