You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2014/08/08 15:20:34 UTC

[Bug 56830] New: Improve check or error message when classes aren't assignable from checkedRefs

https://issues.apache.org/bugzilla/show_bug.cgi?id=56830

            Bug ID: 56830
           Summary: Improve check or error message when classes aren't
                    assignable from checkedRefs
           Product: Ant
           Version: 1.9.4
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core
          Assignee: notifications@ant.apache.org
          Reporter: 1983-01-06@gmx.net

I recently ran into an issue with Eclipse Aether Ant tasks:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=440299

The issue is that I passed references to an antcall and it failed. It turned
out that protected <T> T getCheckedRef(final Class<T> requiredClass,
                                  final String dataTypeName, final Project
project)
checks for requiredClass.isAssignableFrom(o.getClass()) and fails with a
BuildException if it is false. It my case the classes are the same but do have
different IDs in the debugger because they where loaded from different
classloaders. In that case the log message says: "Class MyClass is not a
subclass of MyClass"

This is not helpful and confusing. It should either check classloaders too or
at least add the identity hash code of the class' classloader to denote the
real difference.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 56830] Improve check or error message when classes aren't assignable from checkedRefs

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56830

Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |1.9.5

--- Comment #1 from Stefan Bodewig <bo...@apache.org> ---
add classloader information with git commit 963d6c9

-- 
You are receiving this mail because:
You are the assignee for the bug.