@@ -431,8 +431,7 @@ public static XStream getConfiguredXStreamWithContext(
431431 if (extension instanceof ContextualConfigurationProvider provider
432432 &&
433433 // Check if the context is applicable for the provider
434- (providerContext == null
435- || !provider .appliesTo (providerContext ))) {
434+ (providerContext == null || !provider .appliesTo (providerContext ))) {
436435 // If so, try the next one
437436 continue ;
438437 }
@@ -957,7 +956,9 @@ public synchronized void addBlobStore(BlobStoreInfo info) {
957956 }
958957 // ensure there isn't a BlobStoreInfo with the same name already
959958 if (getBlobStoreNames ().contains (info .getName ())) {
960- throw new IllegalArgumentException ("Failed to add BlobStoreInfo. A BlobStoreInfo with name \" %s\" already exists" .formatted (info .getName ()));
959+ throw new IllegalArgumentException (
960+ "Failed to add BlobStoreInfo. A BlobStoreInfo with name \" %s\" already exists"
961+ .formatted (info .getName ()));
961962 }
962963 // add the BlobStoreInfo
963964 final List <BlobStoreInfo > blobStores = getGwcConfig ().getBlobStores ();
@@ -978,8 +979,7 @@ public synchronized void addBlobStore(BlobStoreInfo info) {
978979 if (ExceptionUtils .isOrSuppresses (e , UnsuitableStorageException .class )) {
979980 // Can't store here, roll back
980981 blobStores .remove (info );
981- throw new ConfigurationPersistenceException (
982- "Unable to add BlobStoreInfo \" %s\" " .formatted (info ), e );
982+ throw new ConfigurationPersistenceException ("Unable to add BlobStoreInfo \" %s\" " .formatted (info ), e );
983983 }
984984 throw new ConfigurationPersistenceException (e );
985985 }
@@ -990,7 +990,9 @@ public synchronized void addBlobStore(BlobStoreInfo info) {
990990 public synchronized void removeBlobStore (String name ) {
991991 // ensure there is a BlobStoreInfo with the name
992992 final BlobStoreInfo infoToRemove = getBlobStore (name )
993- .orElseThrow (() -> new NoSuchElementException ("Failed to remove BlobStoreInfo. A BlobStoreInfo with name \" %s\" does not exist." .formatted (name )));
993+ .orElseThrow (() -> new NoSuchElementException (
994+ "Failed to remove BlobStoreInfo. A BlobStoreInfo with name \" %s\" does not exist."
995+ .formatted (name )));
994996 // remove the BlobStoreInfo
995997 final List <BlobStoreInfo > blobStores = getGwcConfig ().getBlobStores ();
996998 blobStores .remove (infoToRemove );
@@ -1000,8 +1002,7 @@ public synchronized void removeBlobStore(String name) {
10001002 } catch (IOException ioe ) {
10011003 // save failed, roll back the delete
10021004 blobStores .add (infoToRemove );
1003- throw new ConfigurationPersistenceException (
1004- "Unable to remove BlobStoreInfo \" %s\" " .formatted (name ), ioe );
1005+ throw new ConfigurationPersistenceException ("Unable to remove BlobStoreInfo \" %s\" " .formatted (name ), ioe );
10051006 }
10061007 try {
10071008 blobStoreListeners .safeForEach (listener -> {
@@ -1021,8 +1022,9 @@ public synchronized void modifyBlobStore(BlobStoreInfo info) {
10211022 // ensure there is a BlobStoreInfo with the name
10221023 final Optional <BlobStoreInfo > optionalInfo = getBlobStore (info .getName ());
10231024 if (optionalInfo .isEmpty ()) {
1024- throw new NoSuchElementException ("Failed to modify BlobStoreInfo. A BlobStoreInfo with name \" %s\" does not exist." .formatted (
1025- info .getName ()));
1025+ throw new NoSuchElementException (
1026+ "Failed to modify BlobStoreInfo. A BlobStoreInfo with name \" %s\" does not exist."
1027+ .formatted (info .getName ()));
10261028 }
10271029 // remove existing and add the new one
10281030 final List <BlobStoreInfo > blobStores = getGwcConfig ().getBlobStores ();
@@ -1048,8 +1050,7 @@ public synchronized void modifyBlobStore(BlobStoreInfo info) {
10481050 // Can't store here, roll back
10491051 blobStores .remove (info );
10501052 blobStores .add (infoToRemove );
1051- throw new ConfigurationPersistenceException (
1052- "Unable to modify BlobStoreInfo \" %s\" " .formatted (info ), e );
1053+ throw new ConfigurationPersistenceException ("Unable to modify BlobStoreInfo \" %s\" " .formatted (info ), e );
10531054 }
10541055 throw new ConfigurationPersistenceException (e );
10551056 }
@@ -1150,8 +1151,9 @@ public void renameBlobStore(String oldName, String newName)
11501151 if (blobStoreInfoToRevert == null ) {
11511152 // we're really messed up now as we couldn't find the BlobStoreInfo that was just
11521153 // renamed.
1153- throw new ConfigurationPersistenceException ("Error reverting BlobStoreInfo modification. Could not revert rename from \" %s\" to \" %s\" " .formatted (
1154- oldName , newName ));
1154+ throw new ConfigurationPersistenceException (
1155+ "Error reverting BlobStoreInfo modification. Could not revert rename from \" %s\" to \" %s\" "
1156+ .formatted (oldName , newName ));
11551157 }
11561158 // revert the name and add it back to the list
11571159 blobStoreInfoToRevert .setName (oldName );
@@ -1165,8 +1167,8 @@ public void renameBlobStore(String oldName, String newName)
11651167 });
11661168 } catch (IOException | GeoWebCacheException e ) {
11671169 throw new ConfigurationPersistenceException (
1168- "Exception while handling listeners for renaming blobstore \" %s\" to \" %s\" " . formatted (
1169- oldName , newName ),
1170+ "Exception while handling listeners for renaming blobstore \" %s\" to \" %s\" "
1171+ . formatted ( oldName , newName ),
11701172 e );
11711173 }
11721174 }
0 commit comments