Ghidra is a software reverse engineering (SRE) framework
GP-0: Additional pluralization fixes
Ryan Kurtz1aeda814b113
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFImporter.java b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFImporter.javaindex de1033d53f..444b101762 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFImporter.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFImporter.java@@ -76,7 +76,7 @@ public class DWARFImporter {* <p>* After moving each DataType, if the folder is empty, remove the folder.*- * @throws CancelledException+ * @throws CancelledException if the user cancelled the operation*/private void moveTypesIntoSourceFolders() throws CancelledException {@@ -252,11 +252,12 @@ public class DWARFImporter {sourceInfo.addAll(cu.getLine().getAllSourceFileAddrInfo(cu, reader));}- monitor.setIndeterminate(true);int sourceInfoSize = sourceInfo.size();- monitor.setMessage("Sorting " + sourceInfoSize + " entr" +- (sourceInfoSize == 1 ? "y" : "ies"));- sourceInfo.sort((i, j) -> Long.compareUnsigned(i.address(), j.address()));+ if (sourceInfoSize > 1) {+ monitor.setIndeterminate(true);+ monitor.setMessage("Sorting " + sourceInfoSize + "entries");+ sourceInfo.sort((i, j) -> Long.compareUnsigned(i.address(), j.address()));+ }monitor.setIndeterminate(false);monitor.initialize(sourceInfo.size(), "DWARF: Applying Source Map Info");@@ -385,10 +386,10 @@ public class DWARFImporter {/*** Imports DWARF information according to the {@link DWARFImportOptions} set.- * @return- * @throws IOException- * @throws DWARFException- * @throws CancelledException+ * @return A {@link DWARFImportSummary}+ * @throws IOException if an IO-related error occurred+ * @throws DWARFException if a DWARF-related error occurred+ * @throws CancelledException if the user cancelled the operation*/public DWARFImportSummary performImport()throws IOException, DWARFException, CancelledException {diff --git a/Ghidra/Features/Base/src/main/java/ghidra/plugins/fsbrowser/tasks/GFileSystemExtractAllTask.java b/Ghidra/Features/Base/src/main/java/ghidra/plugins/fsbrowser/tasks/GFileSystemExtractAllTask.javaindex e88a5ec762..e7a64f94e8 100644--- a/Ghidra/Features/Base/src/main/java/ghidra/plugins/fsbrowser/tasks/GFileSystemExtractAllTask.java+++ b/Ghidra/Features/Base/src/main/java/ghidra/plugins/fsbrowser/tasks/GFileSystemExtractAllTask.java@@ -4,9 +4,9 @@* Licensed under the Apache License, Version 2.0 (the "License");* you may not use this file except in compliance with the License.* You may obtain a copy of the License at- *+ ** http://www.apache.org/licenses/LICENSE-2.0- *+ ** Unless required by applicable law or agreed to in writing, software* distributed under the License is distributed on an "AS IS" BASIS,* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.@@ -52,7 +52,6 @@ public class GFileSystemExtractAllTask extends AbstractFileExtractorTask {monitor.setMessage("Extracting all...");try (RefdFile refdFile = FileSystemService.getInstance().getRefdFile(srcFSRL, monitor)) {- GFileSystem fs = refdFile.fsRef.getFilesystem();GFile file = refdFile.file;if (!file.isDirectory()) {Msg.warn(this, "Extract All source not a directory! " + file.getFSRL());@@ -60,7 +59,7 @@ public class GFileSystemExtractAllTask extends AbstractFileExtractorTask {}if (verifyRootOutputDir(file.getName())) {- startExtract(fs, file, monitor);+ startExtract(refdFile.fsRef.getFilesystem(), file, monitor);}}catch (CancelledException ce) {diff --git a/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/UserManager.java b/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/UserManager.javaindex 37edfcf9f0..861d3a1c5b 100644--- a/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/UserManager.java+++ b/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/UserManager.java@@ -28,7 +28,8 @@ import org.apache.logging.log4j.Logger;import generic.hash.HashUtilities;import ghidra.framework.remote.User;import ghidra.framework.store.local.LocalFileSystem;-import ghidra.util.*;+import ghidra.util.NamingUtilities;+import ghidra.util.NumericUtilities;import ghidra.util.exception.DuplicateNameException;/**@@ -93,7 +94,7 @@ public class UserManager {readUserListIfNeeded();clearExpiredPasswords();int size = userList.size();- log.info("User file contains " + size + " entr" + (size == 1 ? "y" : "ies"));+ log.info("User file contains " + size + (size == 1 ? "entry" : "entries"));}catch (FileNotFoundException e) {log.error("Existing User file not found.");