Skip to content

Commit

Permalink
several: remove suspicious whitespace char occurrences
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lemora committed Jun 14, 2023
1 parent 9057f64 commit 984c966
Show file tree
Hide file tree
Showing 29 changed files with 58 additions and 57 deletions.
16 changes: 8 additions & 8 deletions docs/TheBook/src/main/markdown/cookbook-writing-hsm-plugins.md
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/TheBook/src/main/markdown/rf-ports.md
Expand Up @@ -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 |
|-------------|-------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|
Expand Down
6 changes: 3 additions & 3 deletions modules/cells/src/main/java/dmg/cells/nucleus/CellGlue.java
Expand Up @@ -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,
Expand Down
Expand Up @@ -37,7 +37,7 @@ default void beforeSetup() {
/**
* Called after every execution of a complete cell setup.
* <p>
* 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.
* <p>
Expand All @@ -51,7 +51,7 @@ default void afterSetup() {
/**
* Called after the setup has changed.
*
* <p>In contrast to the {@code beforeSetup} and {@code afterSetup} methods, this method is
* <p>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.
*
Expand Down
Expand Up @@ -239,7 +239,7 @@ private void shutdownCells(List<String> 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);
}
Expand Down
6 changes: 3 additions & 3 deletions modules/common/src/main/java/diskCacheV111/util/FsPath.java
Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand All @@ -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);

Expand Down
Expand Up @@ -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)
Expand Down
Expand Up @@ -38,7 +38,7 @@
* the cartesian product):
* <p>
* 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 {

Expand Down
Expand Up @@ -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: {}",
Expand Down
Expand Up @@ -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;
}
Expand Down
Expand Up @@ -649,7 +649,7 @@ private static TRequestSummary createRequestSummaryFailure(String token, TStatus
* <p>
* 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.
Expand Down
Expand Up @@ -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,
Expand Down
Expand Up @@ -390,7 +390,7 @@ protected XrootdResponse<OpenRequest> doOnOpen(ChannelHandlerContext ctx,
Map<String, String> 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.");
}
Expand Down Expand Up @@ -431,7 +431,7 @@ protected XrootdResponse<OpenRequest> 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());
Expand Down Expand Up @@ -522,7 +522,7 @@ protected XrootdResponse<StatRequest> 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 {
Expand Down
Expand Up @@ -289,7 +289,7 @@ public synchronized XrootdResponse<SyncRequest> 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) {
Expand Down
4 changes: 2 additions & 2 deletions modules/dcache/src/main/java/org/dcache/cells/CellStub.java
Expand Up @@ -521,7 +521,7 @@ public static <T extends Message> T getMessage(Future<T> future)
* result of the original {@code Future}.
* <p>
* 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 <T extends Message, V> ListenableFuture<V> transform(
Expand All @@ -542,7 +542,7 @@ public static <T extends Message, V> ListenableFuture<V> transform(
* result of the original {@code Future}.
* <p>
* 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 <T extends Message, V> ListenableFuture<V> transformAsync(
Expand Down
Expand Up @@ -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(
Expand Down
Expand Up @@ -122,7 +122,7 @@ protected void sendAddressToDoor(NettyMover<HttpProtocolInfo> 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());
Expand Down
Expand Up @@ -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);
Expand Down
Expand Up @@ -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());
Expand All @@ -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;
Expand Down
Expand Up @@ -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";
Expand Down
Expand Up @@ -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) {
}
}
Expand All @@ -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) {
}
}
Expand Down Expand Up @@ -513,7 +513,7 @@ private static class LruQueue<T extends Comparable<T>> {
/**
* Elements sorted by access time and value.
* <p>
* 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).
* <p>
Expand Down
Expand Up @@ -66,13 +66,13 @@ public Set<PnfsId> index(IndexOption... options) throws CacheException {

Stopwatch watch = Stopwatch.createStarted();
Set<PnfsId> 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<String> 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))) {
Expand Down
Expand Up @@ -84,7 +84,7 @@ public Set<PnfsId> index(IndexOption... options) throws CacheException {

Stopwatch watch = Stopwatch.createStarted();
Set<PnfsId> 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();
Expand All @@ -98,7 +98,7 @@ public Set<PnfsId> 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) {
Expand Down
Expand Up @@ -156,7 +156,7 @@ public Set<PnfsId> index(IndexOption... options) throws CacheException {

Stopwatch watch = Stopwatch.createStarted();
Set<PnfsId> 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();
Expand All @@ -169,7 +169,7 @@ public Set<PnfsId> 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) -> {
Expand Down

0 comments on commit 984c966

Please sign in to comment.