diff options
author | Andrey Turbanov <turbanoff@gmail.com> | 2022-04-13 13:51:39 +0300 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2022-04-15 11:00:33 +0700 |
commit | 2091b6d1ded90bfeb29f8d74bd17f05ec8fc983d (patch) | |
tree | 4afc936dbc982b72b5dadddafc8360f6c4436be0 /asm/src/main | |
parent | 047a93c24f4eef3b2ebf254be9332d4340adbd04 (diff) | |
download | aspectj-2091b6d1ded90bfeb29f8d74bd17f05ec8fc983d.tar.gz aspectj-2091b6d1ded90bfeb29f8d74bd17f05ec8fc983d.zip |
Reduce 'Object' class usage
Diffstat (limited to 'asm/src/main')
3 files changed, 4 insertions, 4 deletions
diff --git a/asm/src/main/java/org/aspectj/asm/AsmManager.java b/asm/src/main/java/org/aspectj/asm/AsmManager.java index 5a94c69fb..048e3c180 100644 --- a/asm/src/main/java/org/aspectj/asm/AsmManager.java +++ b/asm/src/main/java/org/aspectj/asm/AsmManager.java @@ -551,7 +551,7 @@ public class AsmManager implements IStructureModel { Set<String> deletedNodes = new HashSet<>(); for (File fileForCompilation : files) { String correctedPath = getCanonicalFilePath(fileForCompilation); - IProgramElement progElem = (IProgramElement) hierarchy.findInFileMap(correctedPath); + IProgramElement progElem = hierarchy.findInFileMap(correctedPath); if (progElem != null) { // Found it, let's remove it if (dumpDeltaProcessing) { diff --git a/asm/src/main/java/org/aspectj/asm/IHierarchy.java b/asm/src/main/java/org/aspectj/asm/IHierarchy.java index 681617942..5fabfe31b 100644 --- a/asm/src/main/java/org/aspectj/asm/IHierarchy.java +++ b/asm/src/main/java/org/aspectj/asm/IHierarchy.java @@ -45,7 +45,7 @@ public interface IHierarchy extends Serializable { setFileMap((Map<String, IProgramElement>) fileMap); } - Object findInFileMap(Object key); + IProgramElement findInFileMap(String key); Set<Map.Entry<String, IProgramElement>> getFileMapEntrySet(); diff --git a/asm/src/main/java/org/aspectj/asm/internal/AspectJElementHierarchy.java b/asm/src/main/java/org/aspectj/asm/internal/AspectJElementHierarchy.java index 74c48a1b6..16fba3857 100644 --- a/asm/src/main/java/org/aspectj/asm/internal/AspectJElementHierarchy.java +++ b/asm/src/main/java/org/aspectj/asm/internal/AspectJElementHierarchy.java @@ -100,7 +100,7 @@ public class AspectJElementHierarchy implements IHierarchy { this.fileMap = fileMap; } - public Object findInFileMap(Object key) { + public IProgramElement findInFileMap(String key) { return fileMap.get(key); } @@ -331,7 +331,7 @@ public class AspectJElementHierarchy implements IHierarchy { } else { String correctedPath = asm.getCanonicalFilePath(new File(sourceFile)); // StructureNode node = (StructureNode)getFileMap().get(correctedPath);//findFileNode(filePath, model); - IProgramElement node = (IProgramElement) findInFileMap(correctedPath);// findFileNode(filePath, model); + IProgramElement node = findInFileMap(correctedPath);// findFileNode(filePath, model); if (node != null) { return node; } else { |