This is an automated email from the ASF dual-hosted git repository.
yasithdev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/master by this push:
new 87aaeee733 style: apply Spotless formatting to D4.3
storage/data-product files (#658)
87aaeee733 is described below
commit 87aaeee73325ecd99243bc09a192158e240b8b26
Author: Yasith Jayawardana <[email protected]>
AuthorDate: Tue Jun 9 12:14:17 2026 -0400
style: apply Spotless formatting to D4.3 storage/data-product files (#658)
mvn spotless:apply reformatting for three files added/modified in the D4.3
storage work (DevStorageInitializer, DataProductInterface,
UserStorageGrpcService)
that had minor line-wrapping violations the Spotless check now flags on
every PR.
Formatting-only; no behavior change.
---
.../airavata/orchestration/util/DevStorageInitializer.java | 9 +++++----
.../org/apache/airavata/interfaces/DataProductInterface.java | 3 +--
.../org/apache/airavata/storage/grpc/UserStorageGrpcService.java | 6 ++----
3 files changed, 8 insertions(+), 10 deletions(-)
diff --git
a/airavata-api/orchestration-service/src/main/java/org/apache/airavata/orchestration/util/DevStorageInitializer.java
b/airavata-api/orchestration-service/src/main/java/org/apache/airavata/orchestration/util/DevStorageInitializer.java
index a651c1e8eb..ffa83238ab 100644
---
a/airavata-api/orchestration-service/src/main/java/org/apache/airavata/orchestration/util/DevStorageInitializer.java
+++
b/airavata-api/orchestration-service/src/main/java/org/apache/airavata/orchestration/util/DevStorageInitializer.java
@@ -87,16 +87,17 @@ public class DevStorageInitializer {
// a partial prior init can leave it without one, which
then fails
// the SFTP adaptor with "No SCP data movement interface".
String existingId = entry.getKey();
- boolean hasScp =
registryHandler.getStorageResource(existingId).getDataMovementInterfacesList()
- .stream()
- .anyMatch(i -> i.getDataMovementProtocol() ==
DataMovementProtocol.SCP);
+ boolean hasScp =
+
registryHandler.getStorageResource(existingId).getDataMovementInterfacesList().stream()
+ .anyMatch(i -> i.getDataMovementProtocol()
== DataMovementProtocol.SCP);
if (!hasScp) {
SCPDataMovement scpDm = SCPDataMovement.newBuilder()
.setSecurityProtocol(SecurityProtocol.SSH_KEYS)
.setSshPort(22)
.build();
registryHandler.addSCPDataMovementDetails(existingId,
DMType.STORAGE_RESOURCE, 0, scpDm);
- logger.info("Healed dev storage resource {}: added
missing SCP data movement interface",
+ logger.info(
+ "Healed dev storage resource {}: added missing
SCP data movement interface",
existingId);
} else {
logger.info("Dev storage resource already exists: {}
({})", entry.getValue(), existingId);
diff --git
a/airavata-api/src/main/java/org/apache/airavata/interfaces/DataProductInterface.java
b/airavata-api/src/main/java/org/apache/airavata/interfaces/DataProductInterface.java
index ef63de1f9a..a18339d06c 100644
---
a/airavata-api/src/main/java/org/apache/airavata/interfaces/DataProductInterface.java
+++
b/airavata-api/src/main/java/org/apache/airavata/interfaces/DataProductInterface.java
@@ -43,8 +43,7 @@ public interface DataProductInterface {
* Return the data product in the gateway that has a replica at the given
file path, or
* {@code null} if none exists.
*/
- DataProductModel getDataProductByReplicaFilePath(String gatewayId, String
filePath)
- throws ReplicaCatalogException;
+ DataProductModel getDataProductByReplicaFilePath(String gatewayId, String
filePath) throws ReplicaCatalogException;
boolean isDataProductExists(String productUri) throws
ReplicaCatalogException;
diff --git
a/airavata-api/storage-service/src/main/java/org/apache/airavata/storage/grpc/UserStorageGrpcService.java
b/airavata-api/storage-service/src/main/java/org/apache/airavata/storage/grpc/UserStorageGrpcService.java
index c8fe08e46e..706122d20b 100644
---
a/airavata-api/storage-service/src/main/java/org/apache/airavata/storage/grpc/UserStorageGrpcService.java
+++
b/airavata-api/storage-service/src/main/java/org/apache/airavata/storage/grpc/UserStorageGrpcService.java
@@ -353,8 +353,7 @@ public class UserStorageGrpcService extends
UserStorageServiceGrpc.UserStorageSe
String path = resolvePath(request.getPath(),
request.getStorageResourceId());
String storageResourceId =
resolveStorageResourceId(request.getStorageResourceId());
FileMetadata meta = adaptor.getFileMetadata(path);
- observer.onNext(toFileMetadataResponse(
- meta, path, resolveDataProductUri(meta, path,
storageResourceId)));
+ observer.onNext(toFileMetadataResponse(meta, path,
resolveDataProductUri(meta, path, storageResourceId)));
observer.onCompleted();
} catch (Exception e) {
observer.onError(GrpcStatusMapper.toStatusException(e));
@@ -454,8 +453,7 @@ public class UserStorageGrpcService extends
UserStorageServiceGrpc.UserStorageSe
}
}
- private static FileMetadataResponse toFileMetadataResponse(
- FileMetadata meta, String path, String dataProductUri) {
+ private static FileMetadataResponse toFileMetadataResponse(FileMetadata
meta, String path, String dataProductUri) {
return FileMetadataResponse.newBuilder()
.setName(meta.getName() != null ? meta.getName() : "")
.setPath(path)