You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juneau.apache.org by "James Bognar (Jira)" <ji...@apache.org> on 2020/03/16 14:31:00 UTC

[jira] [Created] (JUNEAU-203) Bean copy constructor can be confused with builder constructor.

James Bognar created JUNEAU-203:
-----------------------------------

             Summary: Bean copy constructor can be confused with builder constructor.
                 Key: JUNEAU-203
                 URL: https://issues.apache.org/jira/browse/JUNEAU-203
             Project: Juneau
          Issue Type: Improvement
          Components: Code
    Affects Versions: 8.1.3
            Reporter: James Bognar
            Assignee: James Bognar


In the following scenario where both a static creator method and copy constructor is present, the pattern erroneously gets detected as a bean builder pattern:
{code:java}
public class A {
   public A() {...}
   public A(A a) {...}

   public static A create() {...}
}{code}
The logic for finding static builder creator methods should exclude methods that return the same class.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)