juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Bognar (Jira)" <j...@apache.org>
Subject [jira] [Created] (JUNEAU-203) Bean copy constructor can be confused with builder constructor.
Date Mon, 16 Mar 2020 14:31:00 GMT
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)

Mime
View raw message