Skip to content

Commit d2a00f7

Browse files
committed
Change black/whitelist to block/allowlist
See: https://twitter.com/leahculver/status/1269109776983547904
1 parent 4736214 commit d2a00f7

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/main/java/net/imagej/legacy/DefaultLegacyHooks.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ public boolean interceptCloseAllWindows() {
511511
final Package winPackage = winClass.getPackage();
512512
final String name = winPackage == null ? null : winPackage.getName();
513513

514-
// Whitelist any classes from ij.* to be disposed. This should get
514+
// Allowlist any classes from ij.* to be disposed. This should get
515515
// around any offenders in core ImageJ that leave windows open when
516516
// closing.
517517
// External classes should just implement CloseConfirmable!

src/main/java/net/imagej/legacy/LegacyService.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -489,9 +489,9 @@ public void initialize() {
489489
scriptService.addScriptDirectory(plugins, new MenuPath("Plugins"));
490490
}
491491

492-
// remove modules blacklisted from the legacy UI
492+
// remove modules blocklisted from the legacy UI
493493
if (Boolean.getBoolean(ENABLE_MODERN_ONLY_COMMANDS_PROPERTY)) {
494-
log.info("Skipping blacklist of no-legacy commands");
494+
log.info("Skipping blocklist of no-legacy commands");
495495
}
496496
else {
497497
final List<ModuleInfo> noLegacyModules = //

src/main/java/net/imagej/legacy/SingleInstanceArgument.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ public boolean supports(final LinkedList<String> args) {
191191
}
192192

193193
// Some arguments preclude deferring to another instance.
194-
final String[] blacklistedArgs = {"-batch", "-ijpath", "--headless"};
194+
final String[] blocklistedArgs = {"-batch", "-ijpath", "--headless"};
195195
for (final String arg : otherArgs) {
196-
for (final String blacklisted : blacklistedArgs) {
197-
if (blacklisted.equals(arg)) {
196+
for (final String blocklisted : blocklistedArgs) {
197+
if (blocklisted.equals(arg)) {
198198
log().debug("Skipping single instance logic due to argument: " + arg);
199199
return result;
200200
}

src/main/java/net/imagej/legacy/translate/LegacyUtils.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,16 @@ public static void deleteImagePlus(final ImagePlus imp) {
7373
* the axes of a modern ImageJ Dataset. Incompatible modern axes are encoded
7474
* as extra planes in the legacy ImageJ image.
7575
*/
76-
static long ij1PlaneCount(ImgPlus imgPlus, final AxisType whiteList) {
76+
static long ij1PlaneCount(ImgPlus imgPlus, final AxisType allowList) {
7777
long planeCount = 1;
7878
int axisIndex = 0;
7979
for ( int i = 0; i < imgPlus.numDimensions(); i++) {
8080
Axis axisType = imgPlus.axis(i);
8181
final long axisSize = imgPlus.dimension(axisIndex++);
8282
// we want to skip the X,Y,C,Z,T axes, unless that axis is the white list.
83-
// this will cause planeCount to be the product of the whiteList axis and
83+
// this will cause planeCount to be the product of the allowList axis and
8484
// all other axes
85-
if (axisType == whiteList) {} // DON'T continue
85+
if (axisType == allowList) {} // DON'T continue
8686
else if (axisType == Axes.X) continue;
8787
else if (axisType == Axes.Y) continue;
8888
else if (axisType == Axes.CHANNEL) continue;

0 commit comments

Comments
 (0)