diff options
author | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-15 17:01:46 +0200 |
---|---|---|
committer | Lars Grefer <eclipse@larsgrefer.de> | 2020-08-15 17:01:46 +0200 |
commit | 639f5030e0391e831138f9786cf831c3374449e7 (patch) | |
tree | fc4e616cb6df8e73722a6d0cf83a55efd6d87387 /bridge | |
parent | 2409bcbc7c9606b055e23f52d688eecda84351d6 (diff) | |
download | aspectj-639f5030e0391e831138f9786cf831c3374449e7.tar.gz aspectj-639f5030e0391e831138f9786cf831c3374449e7.zip |
Weaken Collection declarations
Reports on declarations of Collection variables made by using the collection class as the type, rather than an appropriate interface.
Signed-off-by: Lars Grefer <eclipse@larsgrefer.de>
Diffstat (limited to 'bridge')
3 files changed, 3 insertions, 3 deletions
diff --git a/bridge/src/main/java/org/aspectj/bridge/MessageHandler.java b/bridge/src/main/java/org/aspectj/bridge/MessageHandler.java index 23c2ef3b2..95bcf029d 100644 --- a/bridge/src/main/java/org/aspectj/bridge/MessageHandler.java +++ b/bridge/src/main/java/org/aspectj/bridge/MessageHandler.java @@ -31,7 +31,7 @@ public class MessageHandler implements IMessageHolder { /** messages accumulated */ protected final ArrayList<IMessage> messages; /** kinds of messages to be ignored */ - protected final ArrayList<IMessage.Kind> ignoring; + protected final List<IMessage.Kind> ignoring; /** result of handleMessage(..) for messages not accumulated (ignored) */ protected boolean handleMessageResult; /** listener which can halt processing by returning true */ diff --git a/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java b/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java index d55ac3c3b..0ebe113e0 100644 --- a/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java +++ b/bridge/src/main/java/org/aspectj/bridge/MessageUtil.java @@ -409,7 +409,7 @@ public class MessageUtil { if (null == kind) { return messages; } - ArrayList<IMessage> result = new ArrayList<>(); + List<IMessage> result = new ArrayList<>(); for (IMessage message : messages) { if (kind == message.getKind()) { result.add(message); diff --git a/bridge/src/main/java/org/aspectj/bridge/context/CompilationAndWeavingContext.java b/bridge/src/main/java/org/aspectj/bridge/context/CompilationAndWeavingContext.java index 2ae13a279..e1ea09a99 100644 --- a/bridge/src/main/java/org/aspectj/bridge/context/CompilationAndWeavingContext.java +++ b/bridge/src/main/java/org/aspectj/bridge/context/CompilationAndWeavingContext.java @@ -130,7 +130,7 @@ public class CompilationAndWeavingContext { * Returns a string description of what the compiler/weaver is currently doing */ public static String getCurrentContext() { - Stack<ContextStackEntry> contextStack = getContextStack(); + Iterable<ContextStackEntry> contextStack = getContextStack(); Stack<String> explanationStack = new Stack<>(); for (ContextStackEntry entry : contextStack) { Object data = entry.getData(); |