Summary: | NPE in getGenericArgTypes() on Eclipse 3.1.2 | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | George Pacheco <georgepacheco1> |
Component: | Compiler | Assignee: | aspectj inbox <aspectj-inbox> |
Status: | RESOLVED WORKSFORME | QA Contact: | |
Severity: | major | ||
Priority: | P3 | ||
Version: | 1.5.0 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
George Pacheco
2006-04-01 14:27:00 EST
What version of AJDT are you using? are you on the latest dev build or not? I´m using 1.3.1.20060330061801. with eclipse 3.1, my code work normaly. Are you still having this problem? Sorry I haven't been able to investigate sooner. The way the pointcut is written we are looking for a joinpoint in the method "executarConfNovo" that causes us to fail when attempting to match args against it. The code for executarConfNovo is: protected void executarConfNovo() throws java.lang.Exception ALOAD_0 // Lgov/ba/pm/sopm/controller/uf/UfCadPB; this ALOAD_0 // Lgov/ba/pm/sopm/controller/uf/UfCadPB; this INVOKESPECIAL gov.ba.pm.sopm.controller.uf.UfCadPB.obterBean ()Lgov/ba/pm/sopm/dto/Uf; PUTFIELD gov.ba.pm.sopm.controller.uf.UfCadPB.uf Lgov/ba/pm/sopm/dto/Uf; NEW gov.ba.pm.sopm.dao.UfDAO (line 52) DUP INVOKESPECIAL gov.ba.pm.sopm.dao.UfDAO.<init> ()V ASTORE_1 ALOAD_1 // Lgov/ba/pm/sopm/dao/UfDAO; dao (line 53) ALOAD_0 // Lgov/ba/pm/sopm/controller/uf/UfCadPB; this GETFIELD gov.ba.pm.sopm.controller.uf.UfCadPB.uf Lgov/ba/pm/sopm/dto/Uf; INVOKEVIRTUAL gov.ba.pm.sopm.dao.UfDAO.inserir(Lgov/ba/pm/sopm/dto/base/BaseDTOAb;)V ALOAD_0 // Lgov/ba/pm/sopm/controller/uf/UfCadPB; this GETFIELD gov.ba.pm.sopm.controller.uf.UfCadPB.response Ljavax/servlet/http/HttpServletResponse; LDC "ufMnt.jsp?acao=VISUALIZAR" INVOKEINTERFACE javax.servlet.http.HttpServletResponse.sendRedirect (Ljava/lang/String;)V RETURN (line 56) end protected void executarConfNovo() throws java.lang.Exception this is the method where the NPE occurs: public UnresolvedType[] getGenericArgTypes() { if (isShadowForArrayConstructionJoinpoint()) { return getArgumentTypesForArrayConstructionShadow(); } if (getKind() == FieldSet) return new UnresolvedType[] { getResolvedSignature().getGenericReturnType() }; return getResolvedSignature().getGenericParameterTypes(); } the last line in that method is line 169 so... getResolvedSignature() is returning null. We know it is one of the invoke instructions from further down the stack trace. And we know it isn't an invokespecial as that would take a different path. So it is either INVOKEVIRTUAL gov.ba.pm.sopm.dao.UfDAO.inserir(Lgov/ba/pm/sopm/dto/base/BaseDTOAb;)V or INVOKEINTERFACE javax.servlet.http.HttpServletResponse.sendRedirect (Ljava/lang/String;)V can I ask what the signature is of the inserir call? I can see it takes a BaseDTOAb but is it a generic signature? (i.e. is BaseDTOAb a generic type?) Are you building this entire project from source or are you binary weaving at all? no reply for six months. please reopen if it is still a problem for you. |