From 984c96671e76737f83ac172d1ba0541721683116 Mon Sep 17 00:00:00 2001 From: Lea Morschel Date: Fri, 9 Jun 2023 14:55:53 +0200 Subject: [PATCH] several: remove suspicious whitespace char occurrences Motivation: Review Board keeps complaining about detected non-ASCII characters, suspecting malicious code. IntelliJ highlights them as well. Modification: Change no-break space U+00A0 to regular whitespace. Result: No admin- or user-observable changes. Target: master Requires-notes: no Requires-book: no Patch: https://rb.dcache.org/r/14003/ Acked-by: Dmitry Litvintsev, Tigran Mkrtchyan --- .../markdown/cookbook-writing-hsm-plugins.md | 16 ++++++++-------- docs/TheBook/src/main/markdown/rf-ports.md | 2 +- .../main/java/dmg/cells/nucleus/CellGlue.java | 6 +++--- .../dmg/cells/nucleus/CellLifeCycleAware.java | 4 ++-- .../java/dmg/cells/nucleus/SystemCell.java | 2 +- .../main/java/diskCacheV111/util/FsPath.java | 6 +++--- .../java/org/dcache/util/AtomicCounter.java | 2 +- .../java/org/dcache/util/GlobBraceParser.java | 2 +- .../services/space/LinkGroupLoader.java | 2 +- .../SimpleSpaceManagerAuthorizationPolicy.java | 2 +- .../java/diskCacheV111/srm/SrmHandler.java | 2 +- .../java/diskCacheV111/srm/dcache/Storage.java | 2 +- .../xrootd/pool/XrootdPoolRequestHandler.java | 6 +++--- .../dcache/xrootd/tpc/TpcWriteDescriptor.java | 2 +- .../main/java/org/dcache/cells/CellStub.java | 4 ++-- .../dcache/http/HttpPoolRequestHandler.java | 2 +- .../org/dcache/http/HttpTransferService.java | 2 +- .../pinmanager/MovePinRequestProcessor.java | 2 +- .../org/dcache/pinmanager/UnpinProcessor.java | 3 ++- .../pool/classic/HsmFlushController.java | 2 +- .../org/dcache/pool/classic/SpaceSweeper2.java | 6 +++--- .../meta/db/BerkeleyDBMetaDataRepository.java | 4 ++-- .../meta/file/FileMetaDataRepository.java | 4 ++-- .../meta/mongo/MongoDbMetadataRepository.java | 4 ++-- .../java/org/dcache/util/TryCatchTemplate.java | 18 +++++++++--------- .../org/dcache/srm/AbstractStorageElement.java | 2 +- .../srm/handler/SrmExtendFileLifeTime.java | 2 +- .../sql/DatabaseContainerRequestStorage.java | 2 +- .../scheduler/AsynchronousSaveJobStorage.java | 2 +- 29 files changed, 58 insertions(+), 57 deletions(-) diff --git a/docs/TheBook/src/main/markdown/cookbook-writing-hsm-plugins.md b/docs/TheBook/src/main/markdown/cookbook-writing-hsm-plugins.md index 60e7d1980be..e190b61402a 100644 --- a/docs/TheBook/src/main/markdown/cookbook-writing-hsm-plugins.md +++ b/docs/TheBook/src/main/markdown/cookbook-writing-hsm-plugins.md @@ -253,17 +253,17 @@ $ tree └── src └── main ├── assembly - │   └── plugin.xml + │ └── plugin.xml ├── defaults - │   └── org.example.test.properties + │ └── org.example.test.properties ├── docs - │   └── README.md + │ └── README.md ├── java - │   └── org - │   └── example - │   └── dcache - │   ├── PluginNearlineStorage.java - │   └── PluginNearlineStorageProvider.java + │ └── org + │ └── example + │ └── dcache + │ ├── PluginNearlineStorage.java + │ └── PluginNearlineStorageProvider.java └── resources └── META-INF └── services diff --git a/docs/TheBook/src/main/markdown/rf-ports.md b/docs/TheBook/src/main/markdown/rf-ports.md index c14208c1a25..092319e4973 100644 --- a/docs/TheBook/src/main/markdown/rf-ports.md +++ b/docs/TheBook/src/main/markdown/rf-ports.md @@ -8,7 +8,7 @@ The table below lists the *default* port values as defined in the \*.properties files in /usr/share/dcache/defaults/. Those files also provide information about which ports may be deprecated. -  + | Port number | Description | Component | |-------------|-------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------| diff --git a/modules/cells/src/main/java/dmg/cells/nucleus/CellGlue.java b/modules/cells/src/main/java/dmg/cells/nucleus/CellGlue.java index 96813beed09..6bd69768088 100644 --- a/modules/cells/src/main/java/dmg/cells/nucleus/CellGlue.java +++ b/modules/cells/src/main/java/dmg/cells/nucleus/CellGlue.java @@ -596,18 +596,18 @@ private void sendException(CellMessage msg, String routeTarget) Serializable messageObject = msg.decode().getMessageObject(); if (messageObject instanceof NoRouteToCellException) { LOGGER.info( - "Unable to notify {} about delivery failure of message sent to {}: No route for {} in {}.", + "Unable to notify {} about delivery failure of message sent to {}: No route for {} in {}.", msg.getDestinationPath(), ((NoRouteToCellException) messageObject).getDestinationPath(), routeTarget, _cellDomainName); } else { LOGGER.warn( - "Message from {} could not be delivered because no route to {} is known.", + "Message from {} could not be delivered because no route to {} is known.", msg.getSourcePath(), routeTarget); } } else { LOGGER.debug( - "Message from {} could not be delivered because no route to {} is known; the sender will be notified.", + "Message from {} could not be delivered because no route to {} is known; the sender will be notified.", msg.getSourcePath(), routeTarget); CellMessage envelope = new CellMessage(msg.getSourcePath().revert(), new NoRouteToCellException(msg, diff --git a/modules/cells/src/main/java/dmg/cells/nucleus/CellLifeCycleAware.java b/modules/cells/src/main/java/dmg/cells/nucleus/CellLifeCycleAware.java index 01e2a3801ea..fc3075eafe1 100644 --- a/modules/cells/src/main/java/dmg/cells/nucleus/CellLifeCycleAware.java +++ b/modules/cells/src/main/java/dmg/cells/nucleus/CellLifeCycleAware.java @@ -37,7 +37,7 @@ default void beforeSetup() { /** * Called after every execution of a complete cell setup. *

- * Unless any {@code beforeSetup} call failed and thus killed the cell, every invocation of + * Unless any {@code beforeSetup} call failed and thus killed the cell, every invocation of * {@code beforeSetup} is followed by an invocation of {@code afterSetup} once the setup has * been fully applied. *

@@ -51,7 +51,7 @@ default void afterSetup() { /** * Called after the setup has changed. * - *

In contrast to the {@code beforeSetup} and {@code afterSetup} methods, this method is + *

In contrast to the {@code beforeSetup} and {@code afterSetup} methods, this method is * also called after individual setup affecting commands have been invoked. When processing an * entire setup, this method is only called once after {@code afterSetup} was called. * diff --git a/modules/cells/src/main/java/dmg/cells/nucleus/SystemCell.java b/modules/cells/src/main/java/dmg/cells/nucleus/SystemCell.java index 2932b75e6ac..d0870d33bb6 100644 --- a/modules/cells/src/main/java/dmg/cells/nucleus/SystemCell.java +++ b/modules/cells/src/main/java/dmg/cells/nucleus/SystemCell.java @@ -239,7 +239,7 @@ private void shutdownCells(List cells, long softTimeout, long hardTimeou name -> () -> { long time = System.currentTimeMillis() - start; if (time > softTimeout) { - _log.warn("Killed {} in {} ms", name, time); + _log.warn("Killed {} in {} ms", name, time); } else { _log.info("Killed {}", name); } diff --git a/modules/common/src/main/java/diskCacheV111/util/FsPath.java b/modules/common/src/main/java/diskCacheV111/util/FsPath.java index ededb9d6748..f66aa7099f2 100644 --- a/modules/common/src/main/java/diskCacheV111/util/FsPath.java +++ b/modules/common/src/main/java/diskCacheV111/util/FsPath.java @@ -221,7 +221,7 @@ public FsPath child(String name) { } /** - * Returns true if the path of {@code prefix} is a prefix of the path of this FsPath. + * Returns true if the path of {@code prefix} is a prefix of the path of this FsPath. */ public boolean hasPrefix(FsPath prefix) { /* The purpose of delta is just to describe how much longer this path is than prefix - the @@ -253,7 +253,7 @@ public String stripPrefix(FsPath prefix) { * @return The {@code path} StringBuilder * @throws IllegalArgumentException if {@code prefix} is not a prefix of this FsPath or if the * the length of this FsPath is not the sum of the length of - * {@code prefix} and {@code length}. + * {@code prefix} and {@code length}. */ protected abstract StringBuilder appendSuffix(FsPath prefix, FsPath length, StringBuilder s); @@ -266,7 +266,7 @@ public String stripPrefix(FsPath prefix) { * @return The {@code path} StringBuilder * @throws IllegalArgumentException if {@code prefix} is not a prefix of this FsPath or if the * the length of this FsPath is not the sum of the length of - * {@code prefix} and {@code length}. + * {@code prefix} and {@code length}. */ protected abstract StringBuilder appendSuffix2(FsPath prefix, FsPath length, StringBuilder s); diff --git a/modules/common/src/main/java/org/dcache/util/AtomicCounter.java b/modules/common/src/main/java/org/dcache/util/AtomicCounter.java index 622be71b7e8..b177b74a383 100644 --- a/modules/common/src/main/java/org/dcache/util/AtomicCounter.java +++ b/modules/common/src/main/java/org/dcache/util/AtomicCounter.java @@ -61,7 +61,7 @@ public int get() { * * @param value the value to wait for the counter to change away from * @param deadline the absolute time to wait until - * @return true if the counter has a different value than {@code value} upon return + * @return true if the counter has a different value than {@code value} upon return * @throw InterruptedException if the current thread is interrupted */ public boolean awaitChangeUntil(int value, Date deadline) diff --git a/modules/common/src/main/java/org/dcache/util/GlobBraceParser.java b/modules/common/src/main/java/org/dcache/util/GlobBraceParser.java index 8e9bbeb3e43..eaa491cf875 100644 --- a/modules/common/src/main/java/org/dcache/util/GlobBraceParser.java +++ b/modules/common/src/main/java/org/dcache/util/GlobBraceParser.java @@ -38,7 +38,7 @@ * the cartesian product): *

* expand(S) = expand(E) U expand(T) expand(T) = expand(S) | [] expand(E) = [ STR ] x expand(F) | - * expand(F) expand(F) = expand(S) x expand(E) | [""] + * expand(F) expand(F) = expand(S) x expand(E) | [""] */ class GlobBraceParser { diff --git a/modules/dcache-spacemanager/src/main/java/diskCacheV111/services/space/LinkGroupLoader.java b/modules/dcache-spacemanager/src/main/java/diskCacheV111/services/space/LinkGroupLoader.java index 955befa2316..86a58421973 100644 --- a/modules/dcache-spacemanager/src/main/java/diskCacheV111/services/space/LinkGroupLoader.java +++ b/modules/dcache-spacemanager/src/main/java/diskCacheV111/services/space/LinkGroupLoader.java @@ -163,7 +163,7 @@ private void saveLinkGroup(long currentTime, PoolLinkGroupInfo info) vos); break; } catch (DeadlockLoserDataAccessException e) { - LOGGER.info("Update of link group {} lost deadlock race and will be retried: {}", + LOGGER.info("Update of link group {} lost deadlock race and will be retried: {}", linkGroupName, e.toString()); } catch (TransientDataAccessException | RecoverableDataAccessException | CannotCreateTransactionException e) { LOGGER.warn("Update of link group {} failed and will be retried: {}", diff --git a/modules/dcache-spacemanager/src/main/java/diskCacheV111/services/space/SimpleSpaceManagerAuthorizationPolicy.java b/modules/dcache-spacemanager/src/main/java/diskCacheV111/services/space/SimpleSpaceManagerAuthorizationPolicy.java index 535e3b4b286..aed4a520826 100644 --- a/modules/dcache-spacemanager/src/main/java/diskCacheV111/services/space/SimpleSpaceManagerAuthorizationPolicy.java +++ b/modules/dcache-spacemanager/src/main/java/diskCacheV111/services/space/SimpleSpaceManagerAuthorizationPolicy.java @@ -45,7 +45,7 @@ public void checkReleasePermission(Subject subject, Space space) FQAN fqan = principal.getFqan(); if (spaceGroup.equals(fqan.getGroup()) && (spaceRole == null || spaceRole.equals( fqan.getRole()))) { - logger.debug("Subject with fqan {} has permission to release space {}", + logger.debug("Subject with fqan {} has permission to release space {}", fqan, space); return; } diff --git a/modules/dcache-srm/src/main/java/diskCacheV111/srm/SrmHandler.java b/modules/dcache-srm/src/main/java/diskCacheV111/srm/SrmHandler.java index afa0ebc87e8..eea06fc8b8d 100644 --- a/modules/dcache-srm/src/main/java/diskCacheV111/srm/SrmHandler.java +++ b/modules/dcache-srm/src/main/java/diskCacheV111/srm/SrmHandler.java @@ -649,7 +649,7 @@ private static TRequestSummary createRequestSummaryFailure(String token, TStatus *

* The return map contains {@code keys} elements. Each key is mapped to a future value. If * {@code future} fails, all returned futures fail with the same error. Otherwise {@code mapper} - * maps the return value of {@code future} to a map of values. {@code acceptor} is called for + * maps the return value of {@code future} to a map of values. {@code acceptor} is called for * each value, applying the value to the settable future in the returned map. * * @param keys The keys of the map to return. diff --git a/modules/dcache-srm/src/main/java/diskCacheV111/srm/dcache/Storage.java b/modules/dcache-srm/src/main/java/diskCacheV111/srm/dcache/Storage.java index 0158e78b9d6..880d557c8f6 100644 --- a/modules/dcache-srm/src/main/java/diskCacheV111/srm/dcache/Storage.java +++ b/modules/dcache-srm/src/main/java/diskCacheV111/srm/dcache/Storage.java @@ -1652,7 +1652,7 @@ public String getFromRemoteTURL(SRMUser user, CopyCallbacks callbacks) throws SRMException { FsPath path = FsPath.create(fileId); - _log.debug("getFromRemoteTURL from {} to {}", remoteTURL, path); + _log.debug("getFromRemoteTURL from {} to {}", remoteTURL, path); return performRemoteTransfer(user, remoteTURL, path, true, extraInfo, remoteCredentialId, diff --git a/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/pool/XrootdPoolRequestHandler.java b/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/pool/XrootdPoolRequestHandler.java index ef3bb9cdd0b..bfbe8b69a7e 100644 --- a/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/pool/XrootdPoolRequestHandler.java +++ b/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/pool/XrootdPoolRequestHandler.java @@ -390,7 +390,7 @@ protected XrootdResponse doOnOpen(ChannelHandlerContext ctx, Map opaqueMap = getOpaqueMap(msg.getOpaque()); UUID uuid = getUuid(opaqueMap); if (uuid == null) { - _log.info("Request to open {} contains no UUID.", msg.getPath()); + _log.info("Request to open {} contains no UUID.", msg.getPath()); throw new XrootdException(kXR_NotAuthorized, "Request lacks the " + UUID_PREFIX + " property."); } @@ -431,7 +431,7 @@ protected XrootdResponse doOnOpen(ChannelHandlerContext ctx, boolean posc = (msg.getOptions() & kXR_posc) == kXR_posc || protocolInfo.getFlags().contains(XrootdProtocolInfo.Flags.POSC); if (opaqueMap.containsKey("tpc.src")) { - _log.debug("Request to open {} is as third-party destination.", msg); + _log.debug("Request to open {} is as third-party destination.", msg); XrootdTpcInfo tpcInfo = new XrootdTpcInfo(opaqueMap); tpcInfo.setDelegatedProxy(protocolInfo.getDelegatedCredential()); tpcInfo.setUid(protocolInfo.getTpcUid()); @@ -522,7 +522,7 @@ protected XrootdResponse doOnStat(ChannelHandlerContext ctx, StatRe int fd = msg.getFhandle(); FileDescriptor descriptor = getDescriptor(fd); if (descriptor instanceof TpcWriteDescriptor) { - _log.debug("Request to stat {} is for third-party transfer.", msg); + _log.debug("Request to stat {} is for third-party transfer.", msg); return ((TpcWriteDescriptor) descriptor).handleStat(msg); } else { try { diff --git a/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/tpc/TpcWriteDescriptor.java b/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/tpc/TpcWriteDescriptor.java index aef6923f5fb..0c8f8ef6b85 100644 --- a/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/tpc/TpcWriteDescriptor.java +++ b/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/tpc/TpcWriteDescriptor.java @@ -289,7 +289,7 @@ public synchronized XrootdResponse sync(SyncRequest syncRequest) client.getError()); } - LOGGER.debug("Request to sync ({}) is for third-party write.", + LOGGER.debug("Request to sync ({}) is for third-party write.", syncRequest); if (isFirstSync) { diff --git a/modules/dcache/src/main/java/org/dcache/cells/CellStub.java b/modules/dcache/src/main/java/org/dcache/cells/CellStub.java index 4711f966772..fc28241ff9c 100644 --- a/modules/dcache/src/main/java/org/dcache/cells/CellStub.java +++ b/modules/dcache/src/main/java/org/dcache/cells/CellStub.java @@ -521,7 +521,7 @@ public static T getMessage(Future future) * result of the original {@code Future}. *

* If the original {@code Future} returns a message indicating an error, the returned {@code - * Future} will fail with the corresponding CacheException. This distinguishes this method from + * Future} will fail with the corresponding CacheException. This distinguishes this method from * {@link Futures#transform}. */ public static ListenableFuture transform( @@ -542,7 +542,7 @@ public static ListenableFuture transform( * result of the original {@code Future}. *

* If the original {@code Future} returns a message indicating an error, the returned {@code - * Future} will fail with the corresponding CacheException. This distinguishes this method from + * Future} will fail with the corresponding CacheException. This distinguishes this method from * {@link Futures#transform}. */ public static ListenableFuture transformAsync( diff --git a/modules/dcache/src/main/java/org/dcache/http/HttpPoolRequestHandler.java b/modules/dcache/src/main/java/org/dcache/http/HttpPoolRequestHandler.java index 0d1526efe07..3844f2ef5ac 100644 --- a/modules/dcache/src/main/java/org/dcache/http/HttpPoolRequestHandler.java +++ b/modules/dcache/src/main/java/org/dcache/http/HttpPoolRequestHandler.java @@ -303,7 +303,7 @@ public void channelInactive(ChannelHandlerContext ctx) throws Exception { public void exceptionCaught(ChannelHandlerContext ctx, Throwable t) { if (t instanceof ClosedChannelException) { - LOGGER.info("Connection {} unexpectedly closed.", ctx.channel()); + LOGGER.info("Connection {} unexpectedly closed.", ctx.channel()); } else if (t instanceof Exception) { releaseAllFiles(downloadsSeeError(new CacheException(t.toString(), t)) .uploadsSeeError( diff --git a/modules/dcache/src/main/java/org/dcache/http/HttpTransferService.java b/modules/dcache/src/main/java/org/dcache/http/HttpTransferService.java index c4a22518019..b6823bde872 100644 --- a/modules/dcache/src/main/java/org/dcache/http/HttpTransferService.java +++ b/modules/dcache/src/main/java/org/dcache/http/HttpTransferService.java @@ -122,7 +122,7 @@ protected void sendAddressToDoor(NettyMover mover, InetSocketA } CellAddressCore httpDoor = new CellAddressCore( protocolInfo.getHttpDoorCellName(), protocolInfo.getHttpDoorDomainName()); - LOGGER.debug("Sending redirect URI {} to {}", uri, httpDoor); + LOGGER.debug("Sending redirect URI {} to {}", uri, httpDoor); HttpDoorUrlInfoMessage httpDoorMessage = new HttpDoorUrlInfoMessage(mover.getFileAttributes().getPnfsId().toString(), uri); httpDoorMessage.setId(protocolInfo.getSessionId()); diff --git a/modules/dcache/src/main/java/org/dcache/pinmanager/MovePinRequestProcessor.java b/modules/dcache/src/main/java/org/dcache/pinmanager/MovePinRequestProcessor.java index f248d0b5862..4113e9040a0 100644 --- a/modules/dcache/src/main/java/org/dcache/pinmanager/MovePinRequestProcessor.java +++ b/modules/dcache/src/main/java/org/dcache/pinmanager/MovePinRequestProcessor.java @@ -167,7 +167,7 @@ private void setSticky(String poolName, PnfsId pnfsId, boolean sticky, String ow .getPool(poolName); if (pool == null || !pool.isActive()) { throw new CacheException( - "Unable to move sticky flag because pool " + poolName + " is unavailable"); + "Unable to move sticky flag because pool " + poolName + " is unavailable"); } PoolSetStickyMessage msg = new PoolSetStickyMessage(poolName, pnfsId, sticky, owner, validTill); diff --git a/modules/dcache/src/main/java/org/dcache/pinmanager/UnpinProcessor.java b/modules/dcache/src/main/java/org/dcache/pinmanager/UnpinProcessor.java index 8af22ed5794..1a430aa9c3a 100644 --- a/modules/dcache/src/main/java/org/dcache/pinmanager/UnpinProcessor.java +++ b/modules/dcache/src/main/java/org/dcache/pinmanager/UnpinProcessor.java @@ -93,6 +93,7 @@ protected void unpin(final Semaphore idle, final Executor executor) } private void upin(Semaphore idle, Executor executor, Pin pin) throws InterruptedException { + LOGGER.info("Unpining {}", pin.toString()); if (pin.getPool() == null) { LOGGER.debug("No pool found for pin {}, pnfsid {}; no sticky flags to clear", pin.getPinId(), pin.getPnfsId()); @@ -115,7 +116,7 @@ private void clearStickyFlag(final Semaphore idle, final Pin pin, Executor execu .getPool(pin.getPool()); if (pool == null || !pool.isActive()) { LOGGER.warn( - "Unable to clear sticky flag for pin {} on pnfsid {} because pool {} is unavailable", + "Unable to clear sticky flag for pin {} on pnfsid {} because pool {} is unavailable", pin.getPinId(), pin.getPnfsId(), pin.getPool()); failedToUnpin(pin); return; diff --git a/modules/dcache/src/main/java/org/dcache/pool/classic/HsmFlushController.java b/modules/dcache/src/main/java/org/dcache/pool/classic/HsmFlushController.java index bc9385af6fa..2de90d3d333 100644 --- a/modules/dcache/src/main/java/org/dcache/pool/classic/HsmFlushController.java +++ b/modules/dcache/src/main/java/org/dcache/pool/classic/HsmFlushController.java @@ -355,7 +355,7 @@ public void completed(Void result, PnfsId attachment) { @Override public void failed(Throwable exc, PnfsId attachment) { - LOGGER.error("Flush for {} failed: {}", pnfsId, exc.toString()); + LOGGER.error("Flush for {} failed: {}", pnfsId, exc.toString()); } }); return "Flush Initiated"; diff --git a/modules/dcache/src/main/java/org/dcache/pool/classic/SpaceSweeper2.java b/modules/dcache/src/main/java/org/dcache/pool/classic/SpaceSweeper2.java index 2dd134ae33d..8fac268aa10 100644 --- a/modules/dcache/src/main/java/org/dcache/pool/classic/SpaceSweeper2.java +++ b/modules/dcache/src/main/java/org/dcache/pool/classic/SpaceSweeper2.java @@ -231,7 +231,7 @@ public String call() { public void run() { try { long bytes = reclaim(Long.MAX_VALUE, "'sweeper purge' command"); - LOGGER.info("'sweeper purge' reclaimed {} bytes.", bytes); + LOGGER.info("'sweeper purge' reclaimed {} bytes.", bytes); } catch (InterruptedException e) { } } @@ -255,7 +255,7 @@ public String call() { public void run() { try { long bytes = reclaim(bytesToFree, "'sweeper free' command"); - LOGGER.info("'sweeper free {}' reclaimed {} bytes.", bytesToFree, bytes); + LOGGER.info("'sweeper free {}' reclaimed {} bytes.", bytesToFree, bytes); } catch (InterruptedException e) { } } @@ -513,7 +513,7 @@ private static class LruQueue> { /** * Elements sorted by access time and value. *

- * The comparator uses {@code timeStamps} to look up the time of keys. A compound comparator + * The comparator uses {@code timeStamps} to look up the time of keys. A compound comparator * is used to ensure consistency with equals (otherwise two keys with the same time would be * collapsed to a single element in the set). *

diff --git a/modules/dcache/src/main/java/org/dcache/pool/repository/meta/db/BerkeleyDBMetaDataRepository.java b/modules/dcache/src/main/java/org/dcache/pool/repository/meta/db/BerkeleyDBMetaDataRepository.java index 9b3a13babf9..391a52e30b7 100644 --- a/modules/dcache/src/main/java/org/dcache/pool/repository/meta/db/BerkeleyDBMetaDataRepository.java +++ b/modules/dcache/src/main/java/org/dcache/pool/repository/meta/db/BerkeleyDBMetaDataRepository.java @@ -66,13 +66,13 @@ public Set index(IndexOption... options) throws CacheException { Stopwatch watch = Stopwatch.createStarted(); Set files = _fileStore.index(); - LOGGER.info("Indexed {} entries in {} in {}.", files.size(), _fileStore, watch); + LOGGER.info("Indexed {} entries in {} in {}.", files.size(), _fileStore, watch); if (indexOptions.contains(IndexOption.ALLOW_REPAIR)) { watch.reset().start(); Set records = views.collectKeys(Collectors.toSet()); - LOGGER.info("Indexed {} entries in {} in {}.", records.size(), dir, watch); + LOGGER.info("Indexed {} entries in {} in {}.", records.size(), dir, watch); for (String id : records) { if (!files.contains(new PnfsId(id))) { diff --git a/modules/dcache/src/main/java/org/dcache/pool/repository/meta/file/FileMetaDataRepository.java b/modules/dcache/src/main/java/org/dcache/pool/repository/meta/file/FileMetaDataRepository.java index 7b1b0731152..2a3ee2fd697 100644 --- a/modules/dcache/src/main/java/org/dcache/pool/repository/meta/file/FileMetaDataRepository.java +++ b/modules/dcache/src/main/java/org/dcache/pool/repository/meta/file/FileMetaDataRepository.java @@ -84,7 +84,7 @@ public Set index(IndexOption... options) throws CacheException { Stopwatch watch = Stopwatch.createStarted(); Set files = _fileStore.index(); - LOGGER.info("Indexed {} entries in {} in {}.", files.size(), _fileStore, watch); + LOGGER.info("Indexed {} entries in {} in {}.", files.size(), _fileStore, watch); if (indexOptions.contains(IndexOption.ALLOW_REPAIR)) { watch.reset().start(); @@ -98,7 +98,7 @@ public Set index(IndexOption... options) throws CacheException { }) .collect(toList()); } - LOGGER.info("Found {} orphaned meta data entries in {} in {}.", + LOGGER.info("Found {} orphaned meta data entries in {} in {}.", metaFilesToBeDeleted.size(), _metadir, watch); for (Path name : metaFilesToBeDeleted) { diff --git a/modules/dcache/src/main/java/org/dcache/pool/repository/meta/mongo/MongoDbMetadataRepository.java b/modules/dcache/src/main/java/org/dcache/pool/repository/meta/mongo/MongoDbMetadataRepository.java index 548df3a7447..424f0574b2f 100644 --- a/modules/dcache/src/main/java/org/dcache/pool/repository/meta/mongo/MongoDbMetadataRepository.java +++ b/modules/dcache/src/main/java/org/dcache/pool/repository/meta/mongo/MongoDbMetadataRepository.java @@ -156,7 +156,7 @@ public Set index(IndexOption... options) throws CacheException { Stopwatch watch = Stopwatch.createStarted(); Set files = fileStore.index(); - LOGGER.info("Indexed {} entries in {} in {}.", files.size(), fileStore, watch); + LOGGER.info("Indexed {} entries in {} in {}.", files.size(), fileStore, watch); if (indexOptions.contains(IndexOption.ALLOW_REPAIR)) { watch.reset().start(); @@ -169,7 +169,7 @@ public Set index(IndexOption... options) throws CacheException { .filter(id -> !files.contains(new PnfsId(id))) .collect(toList()); } - LOGGER.info("Found {} orphaned meta data entries in {}.", + LOGGER.info("Found {} orphaned meta data entries in {}.", metaFilesToBeDeleted.size(), watch); metaFilesToBeDeleted.forEach((id) -> { diff --git a/modules/dcache/src/main/java/org/dcache/util/TryCatchTemplate.java b/modules/dcache/src/main/java/org/dcache/util/TryCatchTemplate.java index c9d22c73d14..b0f657352bd 100644 --- a/modules/dcache/src/main/java/org/dcache/util/TryCatchTemplate.java +++ b/modules/dcache/src/main/java/org/dcache/util/TryCatchTemplate.java @@ -34,14 +34,14 @@ * executeWithCancellable} method. *

* The template implements Cancellable, which may be used to cancel any asynchronous operations - * started by {@code execute}. The template implements CompletionHandler and {@code execute} or an - * asynchronous operation started by {@code execute} must use this interface to signal completion. + * started by {@code execute}. The template implements CompletionHandler and {@code execute} or an + * asynchronous operation started by {@code execute} must use this interface to signal completion. *

* Once the template completes or fails, this is signalled to an injected completion handler. *

* An asynchronous operation started by {@code execute} should be registered by calling {@code * setCancellable}. Only then will the template be able to cancel the asynchronous operations. - * Alternatively a subclass may override {@code executeWithCancellable} and return the Cancellable. + * Alternatively a subclass may override {@code executeWithCancellable} and return the Cancellable. *

* {@code execute} may register Closeable resources by calling {@code autoclose}. These are * guaranteed to be closed once this {@code TryCatchTemplate} completes. Failure to close any @@ -50,7 +50,7 @@ *

* Any exceptions thrown by {@code execute} are caught and will result in failure of the template. *

- * A cancellable registered through {@code setCancellable} will be cancelled if {@code execute} + * A cancellable registered through {@code setCancellable} will be cancelled if {@code execute} * throws an exception or calls {@code failed}, or if the template is cancelled. *

* A subclass may override {@code onSuccess} and {@code onFailure} to add additional processing when @@ -169,9 +169,9 @@ protected Cancellable executeWithCancellable() throws Exception { /** * Invoked with the result of the execution when it is successful. *

- * If an {@code Exception} is thrown, the template fails. Otherwise the template succeeds. + * If an {@code Exception} is thrown, the template fails. Otherwise the template succeeds. *

- * Must not call {@code completed} or {@code failed}. + * Must not call {@code completed} or {@code failed}. */ protected void onSuccess(V result, A attachment) throws Exception { @@ -180,14 +180,14 @@ protected void onSuccess(V result, A attachment) /** * Invoked when the execution fails or is canceled. *

- * If an {@code Exception} is thrown of which {@code t} is the cause, that exception is used to + * If an {@code Exception} is thrown of which {@code t} is the cause, that exception is used to * fail this template. Thus an implementation may replace the reason the template fails by - * throwing a new exception with {@code t} set as the cause. + * throwing a new exception with {@code t} set as the cause. *

* Otherwise the template fails with {@code t}. Any other exception thrown by this method is * suppressed. *

- * Must not call {@code completed} or {@code failed}. + * Must not call {@code completed} or {@code failed}. */ protected void onFailure(Throwable t, A attachment) throws Exception { diff --git a/modules/srm-server/src/main/java/org/dcache/srm/AbstractStorageElement.java b/modules/srm-server/src/main/java/org/dcache/srm/AbstractStorageElement.java index 87f38a725a5..71427820cab 100644 --- a/modules/srm-server/src/main/java/org/dcache/srm/AbstractStorageElement.java +++ b/modules/srm-server/src/main/java/org/dcache/srm/AbstractStorageElement.java @@ -405,7 +405,7 @@ ListenableFuture unPinFile( * @param surl SURL * @param recursive Whether to delete directories recursively * @throws SRMAuthorizationException if {@code subject} is not authorized to delete {@code - * dir}  or one of its subdirectories. + * dir} or one of its subdirectories. * @throws SRMNonEmptyDirectoryException if {@code dir} is not empty. * @throws SRMInternalErrorException in case of transient errors. * @throws SRMInvalidPathException if {@code dir} is not a directory or does not exist diff --git a/modules/srm-server/src/main/java/org/dcache/srm/handler/SrmExtendFileLifeTime.java b/modules/srm-server/src/main/java/org/dcache/srm/handler/SrmExtendFileLifeTime.java index 125463e831f..0880cdb72c1 100644 --- a/modules/srm-server/src/main/java/org/dcache/srm/handler/SrmExtendFileLifeTime.java +++ b/modules/srm-server/src/main/java/org/dcache/srm/handler/SrmExtendFileLifeTime.java @@ -207,7 +207,7 @@ private TSURLLifetimeReturnStatus extendTurlOrPinLifeTime( "File lifetime extension failed for request " + request.getClientRequestId() + " with SURL " + surl + ": " + e.getMessage(), e); } catch (SRMException e) { - LOGGER.warn("File lifetime extension failed for request {} with SURL {}: {}", + LOGGER.warn("File lifetime extension failed for request {} with SURL {}: {}", request.getClientRequestId(), surl, e.getMessage()); returnStatus = new TReturnStatus(TStatusCode.SRM_FAILURE, "TURL for request " + request.getClientRequestId() + " with SURL " + surl diff --git a/modules/srm-server/src/main/java/org/dcache/srm/request/sql/DatabaseContainerRequestStorage.java b/modules/srm-server/src/main/java/org/dcache/srm/request/sql/DatabaseContainerRequestStorage.java index b995d7da4b3..999ee39aa2e 100644 --- a/modules/srm-server/src/main/java/org/dcache/srm/request/sql/DatabaseContainerRequestStorage.java +++ b/modules/srm-server/src/main/java/org/dcache/srm/request/sql/DatabaseContainerRequestStorage.java @@ -141,7 +141,7 @@ private F getFileRequest(long jobId, Connection _con) { if (job != null) { return fileRequestType.cast(job); } - LOGGER.error("Job {} not found in database.", jobId); + LOGGER.error("Job {} not found in database.", jobId); } catch (DataAccessException | SQLException e) { LOGGER.error("Failed to read job {}: {}", jobId, e.toString()); } diff --git a/modules/srm-server/src/main/java/org/dcache/srm/scheduler/AsynchronousSaveJobStorage.java b/modules/srm-server/src/main/java/org/dcache/srm/scheduler/AsynchronousSaveJobStorage.java index 703730a447a..e3471670e25 100644 --- a/modules/srm-server/src/main/java/org/dcache/srm/scheduler/AsynchronousSaveJobStorage.java +++ b/modules/srm-server/src/main/java/org/dcache/srm/scheduler/AsynchronousSaveJobStorage.java @@ -92,7 +92,7 @@ public void run() { task.run(); success = true; } else { - LOGGER.warn("Persistence of request {} skipped, queue is too long.", + LOGGER.warn("Persistence of request {} skipped, queue is too long.", job.getId()); } } finally {