From b56df27831cd2e5230690ed974b5c38d1b410f50 Mon Sep 17 00:00:00 2001
From: rs-fraser <141634676+rs-fraser@users.noreply.github.com>
Date: Tue, 4 Nov 2025 19:17:01 +0000
Subject: [PATCH 1/4] set spotless index file to hidden subfolder. default was
target, but index would be wiped each 'mvn clean'. ignored by git so indexing
will run once per local folder, then any subsequent runs of spotless (tied to
compile goal so runs a lot) will be much quicker. takes 'mvn clean compile'
from 20s to 13s on my machine, after the first run
---
.gitignore | 1 +
pom.xml | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/.gitignore b/.gitignore
index bc52b25a79..5c6a961353 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,6 +38,7 @@ generatedDBChangeSets/
/svg.pdf
/xsxx.pdf
xsxx2.pdf
+.spotless
# Nix specifics
shell.nix
diff --git a/pom.xml b/pom.xml
index bffeec2fe9..002ef9431c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -263,6 +263,10 @@
true
+
+ true
+ ${project.basedir}/.spotless/spotless-index
+
From 129688245c164839a31c1f24e6f560a184cc3e43 Mon Sep 17 00:00:00 2001
From: rs-fraser <141634676+rs-fraser@users.noreply.github.com>
Date: Tue, 4 Nov 2025 19:30:03 +0000
Subject: [PATCH 2/4] use latest spotless version
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 002ef9431c..cf52cb8503 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3063,7 +3063,7 @@
3.1.0
2.4.2
4.0.3
- 2.43.0
+ 3.0.0
install --force
From 61d9e727d97f8620743921d49e72d8c9894d18ae Mon Sep 17 00:00:00 2001
From: rs-fraser <141634676+rs-fraser@users.noreply.github.com>
Date: Wed, 5 Nov 2025 15:54:59 +0000
Subject: [PATCH 3/4] formatting
---
.../service/impl/EmailBroadcastTest.java | 4 +---
.../controller/WorkspaceControllerMVCIT.java | 23 +++++++++++--------
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/src/test/java/com/researchspace/service/impl/EmailBroadcastTest.java b/src/test/java/com/researchspace/service/impl/EmailBroadcastTest.java
index d3638b2622..f8648845d8 100644
--- a/src/test/java/com/researchspace/service/impl/EmailBroadcastTest.java
+++ b/src/test/java/com/researchspace/service/impl/EmailBroadcastTest.java
@@ -53,9 +53,7 @@ public class EmailBroadcastTest extends SpringTransactionalTest {
abstract static class NoRetryBroadcasterStub extends EmailBroadcastImp {
@Override
RetryConfig buildRetryConfig() {
- return RetryConfig.custom()
- .maxAttempts(1)
- .build();
+ return RetryConfig.custom().maxAttempts(1).build();
}
}
diff --git a/src/test/java/com/researchspace/webapp/controller/WorkspaceControllerMVCIT.java b/src/test/java/com/researchspace/webapp/controller/WorkspaceControllerMVCIT.java
index 6370249cea..8737f51a47 100644
--- a/src/test/java/com/researchspace/webapp/controller/WorkspaceControllerMVCIT.java
+++ b/src/test/java/com/researchspace/webapp/controller/WorkspaceControllerMVCIT.java
@@ -1330,7 +1330,9 @@ public void testMoveDocumentIntoSharedNotebookMVC() throws Exception {
Folder regularUserRoot = folderMgr.getRootFolderForUser(regularUser);
StructuredDocument docToShare = createBasicDocumentInRootFolderWithText(regularUser, "anytext");
- SharePost toPost = createValidSharePostWithGroup(group, docToShare, group.getGroup().getCommunalGroupFolderId());
+ SharePost toPost =
+ createValidSharePostWithGroup(
+ group, docToShare, group.getGroup().getCommunalGroupFolderId());
String apiKey = createNewApiKeyForUser(regularUser);
// regular user shares a Doc into Group_shared_folder
@@ -2422,18 +2424,19 @@ public void testPiSharesDocToGroupSubFolderThenMovesToGroupRoot() throws Excepti
String apiKey = createNewApiKeyForUser(piUser);
mockMvc
- .perform(createBuilderForPostWithJSONBody(apiKey, "/share", piUser, sharePost))
- .andExpect(status().isCreated())
- .andReturn();
+ .perform(createBuilderForPostWithJSONBody(apiKey, "/share", piUser, sharePost))
+ .andExpect(status().isCreated())
+ .andReturn();
// Move the doc to the top-level shared folder
- MvcResult moveResult = mockMvc
+ MvcResult moveResult =
+ mockMvc
.perform(
- post("/workspace/ajax/move")
- .param("parentFolderId", sharedSubFolder.getId() + "")
- .param("toMove[]", doc.getId() + "")
- .param("target", sharedFolderRootId + "")
- .principal(new MockPrincipal(piUser.getUsername())))
+ post("/workspace/ajax/move")
+ .param("parentFolderId", sharedSubFolder.getId() + "")
+ .param("toMove[]", doc.getId() + "")
+ .param("target", sharedFolderRootId + "")
+ .principal(new MockPrincipal(piUser.getUsername())))
.andExpect(status().isOk())
.andReturn();
From a7a731512423a565b286c23e8808330433c364a2 Mon Sep 17 00:00:00 2001
From: rs-fraser <141634676+rs-fraser@users.noreply.github.com>
Date: Wed, 5 Nov 2025 16:01:02 +0000
Subject: [PATCH 4/4] use latest v2 of spotless to appease Jenkins
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index cf52cb8503..02316d9c23 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3063,7 +3063,7 @@
3.1.0
2.4.2
4.0.3
- 3.0.0
+ 2.46.1
install --force