Skip to content

Commit fe4ef59

Browse files
author
Soroosh Sarabadani
committed
extract FINALIZER_NAME
1 parent 2b5ef83 commit fe4ef59

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

operator-framework/src/main/java/io/javaoperatorsdk/operator/ControllerUtils.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
public class ControllerUtils {
1717

1818
private final static double JAVA_VERSION = Double.parseDouble(System.getProperty("java.specification.version"));
19-
20-
private final static Logger log = LoggerFactory.getLogger(ControllerUtils.class);
19+
private static final String FINALIZER_NAME_SUFFIX = "/finalizer";
2120

2221
// this is just to support testing, this way we don't try to create class multiple times in memory with same name.
2322
// note that other solution is to add a random string to doneable class name
@@ -29,7 +28,7 @@ static String getFinalizer(ResourceController controller) {
2928
if (!Controller.NULL.equals(annotationFinalizerName)) {
3029
return annotationFinalizerName;
3130
}
32-
final String crdName = getAnnotation(controller).crdName() + "/finalizer";
31+
final String crdName = getAnnotation(controller).crdName() + FINALIZER_NAME_SUFFIX;
3332
return crdName;
3433
}
3534

0 commit comments

Comments
 (0)