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

JavaBean implementing Interface defining getters and setters

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.1.RC1
    • Fix Version/s: 1.3.1.RC2
    • Component/s: GENERAL OBJECTS
    • Labels:
    • Environment:
      Java 7

      Description

      Interface:

      public interface MeeInterface {
      
        public String getName();
        
        public void setName(String name);
      }
      

      JavaBean implementing Interface:

      @RooJavaBean
      public class MeeEntity implements MeeInterface {
      
      	private String name;
      }	
      

      That was no problem in Roo 1.2.x - it generated MeeEntity_Roo_JavaBean.aj containing a getName and setName, not complaining in any way. In Roo 1.3.1.RC1 writes:

      Method 'getName' already defined in ITD (ITD target 'xxx.MeeEntity_Roo_JavaBean')

      adding:

      	public String getName() {
      		return name;
      	}
      

      writes on roo shell:

      Method 'org.springframework.roo.classpath.details.MethodMetadataBuilder@76b87d4c[methodName=setName,parameterTypes=[]]' failed to provide a body, despite being identified for ITD inclusion

      which can be fixed by adding:

      	public void setName() {
      	}
      

        Attachments

          Activity

            People

            • Assignee:
              jcgarcia Juan Carlos García del Canto
              Reporter:
              markus.strenn Markus Strenn
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: