exceptionfactory commented on code in PR #10471:
URL: https://github.com/apache/nifi/pull/10471#discussion_r2560367927


##########
nifi-extension-bundles/nifi-extension-utils/nifi-git-flow-registry/src/main/java/org/apache/nifi/registry/flow/git/client/GitRepositoryClient.java:
##########
@@ -138,6 +138,21 @@ public interface GitRepositoryClient {
      */
     InputStream deleteContent(String filePath, String commitMessage, String 
branch) throws FlowRegistryException, IOException;
 
+    /**
+     * Creates a new branch in the repository.
+     *
+     * @param newBranchName the name of the branch to create
+     * @param sourceBranch the name of the source branch
+     * @param sourceCommitSha optional commit SHA to use as the starting point 
for the new branch. If empty, the head commit of the source branch should be 
used.
+     * @throws IOException if an I/O error occurs
+     * @throws FlowRegistryException if a non-I/O error occurs
+     * @throws UnsupportedOperationException if the repository implementation 
does not support branch creation
+     */
+    default void createBranch(final String newBranchName, final String 
sourceBranch, final Optional<String> sourceCommitSha)

Review Comment:
   The `final` keyword is implied on interface methods.
   ```suggestion
       default void createBranch(String newBranchName, String sourceBranch, 
Optional<String> sourceCommitSha)
   ```



##########
nifi-extension-bundles/nifi-extension-utils/nifi-git-flow-registry/src/main/java/org/apache/nifi/registry/flow/git/client/GitRepositoryClient.java:
##########
@@ -138,6 +138,21 @@ public interface GitRepositoryClient {
      */
     InputStream deleteContent(String filePath, String commitMessage, String 
branch) throws FlowRegistryException, IOException;
 
+    /**
+     * Creates a new branch in the repository.
+     *
+     * @param newBranchName the name of the branch to create
+     * @param sourceBranch the name of the source branch
+     * @param sourceCommitSha optional commit SHA to use as the starting point 
for the new branch. If empty, the head commit of the source branch should be 
used.
+     * @throws IOException if an I/O error occurs
+     * @throws FlowRegistryException if a non-I/O error occurs
+     * @throws UnsupportedOperationException if the repository implementation 
does not support branch creation
+     */
+    default void createBranch(final String newBranchName, final String 
sourceBranch, final Optional<String> sourceCommitSha)

Review Comment:
   The `final` keyword is implied on interface methods.
   ```suggestion
       default void createBranch(String newBranchName, String sourceBranch, 
Optional<String> sourceCommitSha)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to