Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-1529

parameterTypes collection from MethodMetada is not well formed

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.1.0.M1
    • Fix Version/s: 1.1.0.RC1
    • Component/s: @ CORE
    • Labels:
      None
    • Environment:
      SUN JDK 1.5.0_07
      Ubuntu 10.04
      Eclipse 3.5.1

      Description

      Hi! I'm trying to inspect Parameter Types defined in an especific method.
      When I use:

      OperationServiceImpl.java
      ClassOrInterfaceTypeDetails tmpClassDetails = classpathOperations
      	.getClassOrInterface(javaType);
      
      MutableClassOrInterfaceTypeDetails classDetails = (MutableClassOrInterfaceTypeDetails) tmpClassDetails;
      
      List<? extends MethodMetadata> methodList = classDetails
      .getDeclaredMethods();
      

      To analyze parameter types from a method in a class:

      org.test.service.layer.project.services.TestService.java
      public String correctInputParameters(Car listaVacia,
              java.util.List<String> listaLlena, HashSet<String> primerHashSet,
              Set<String> set,
              String name)
              throws Exception, NullPointerException {
          return "aaaaaaaaaaaaaaaaaaaaaaaaa" + "aaaaaaaaaaaaaaaaaaaaaaaaah";
      }
      

      Content of MethodMetadata.toString():

       
      [[email protected] declaredByMetadataId = [null], modifier = 'public', methodName = correctInputParameters, parameterTypes = list[org.gvnix.test.service.layer.project.domain.Car, java.util.List<java.lang.String>, org.test.service.layer.project.services.HashSet<java.lang.String>, org.test.service.layer.project.services.Set<java.lang.String>, java.lang.String], parameterNames = list[listaVacia, listaLlena, primerHashSet, set, name], returnType = java.lang.String, throwsTypes = list[java.lang.Exception, java.lang.NullPointerException], annotations = list[[[email protected] annotationType = org.gvnix.service.layer.roo.addon.annotations.GvNIXWebMethod, attributes = list[operationName -> correctInputParameters, requestWrapperName -> correctInputParameters, requestWrapperNamespace -> http://services.project.layer.service.test.gvnix.org/, requestWrapperClassName -> org.gvnix.test.service.layer.project.services.IncorrectInputParametersRequestWrapper, responseWrapperName -> correctInputParametersResponse, responseWrapperNamespace -> http://services.project.layer.service.test.gvnix.org/, responseWrapperClassName -> org.gvnix.test.service.layer.project.services.IncorrectInputParametersResponse, resultName -> return, resultNamespace -> http://services.project.layer.service.test.gvnix.org/, webResultType -> java.lang.String]]], body = '{
          return "Message returned.";
      }']
      

      Parameter types that are not fullyqualyfied in method like HashSet<String> are loaded with TestService package name as:

       
      org.test.service.layer.project.services.HashSet<java.lang.String> 
      

      instead of:

       
      java.util.HashSet<java.lang.String>
      

      The collections as parameterTypes are not well formed with the complete JavaPath (java package + java class name).

      This problem is like I posted in JIRA with throw types:

      Thank you !

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stewarta Alan Stewart
                Reporter:
                ricardogarfe Ricardo García
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: