From 770a4d6a1474764dd24e292e0404c04c44f33d90 Mon Sep 17 00:00:00 2001 From: acolyer Date: Thu, 29 Jul 2004 10:33:44 +0000 Subject: [PATCH] fix for Bugzilla Bug 64262 ClassCastException at BcelRenderer.java:16 --- .../src/org/aspectj/weaver/patterns/ExactTypePattern.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java index 3aa3400ca..577051fbc 100644 --- a/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java +++ b/weaver/src/org/aspectj/weaver/patterns/ExactTypePattern.java @@ -83,7 +83,12 @@ public class ExactTypePattern extends TypePattern { return FuzzyBoolean.YES; } - return matchType.isCoerceableFrom(type) ? FuzzyBoolean.MAYBE : FuzzyBoolean.NO; + // fix for PR 64262 - shouldn't try to coerce primitives + if (type.isPrimitive()) { + return FuzzyBoolean.NO; + } else { + return matchType.isCoerceableFrom(type) ? FuzzyBoolean.MAYBE : FuzzyBoolean.NO; + } } public boolean matchesExactly(Class matchType) { -- 2.39.5