commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duncan Jones (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (TEXT-38) Fluent API in "RandomStringBuilder"
Date Tue, 27 Dec 2016 08:48:58 GMT

     [ https://issues.apache.org/jira/browse/TEXT-38?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Duncan Jones closed TEXT-38.
----------------------------
    Resolution: Fixed

Fixed in commit 08ac56a50.

> Fluent API in "RandomStringBuilder"
> -----------------------------------
>
>                 Key: TEXT-38
>                 URL: https://issues.apache.org/jira/browse/TEXT-38
>             Project: Commons Text
>          Issue Type: Improvement
>            Reporter: Gilles
>            Assignee: Duncan Jones
>              Labels: api
>             Fix For: 1.0
>
>
> It can be construed as potentially dangerous to let user code change any of the settings
of the builder, as other parts of the code could be using a reference to the same instance.
> In Commons Math, where the fluent API pattern was applied, a new builder (immutable)
instance would be created.  For example, see [this class|https://git1-us-west.apache.org/repos/asf?p=commons-math.git;a=blob;f=src/main/java/org/apache/commons/math4/fitting/SimpleCurveFitter.java;h=54f6cbfe1e003cec74f2b0e71efc1b13000a5525;hb=HEAD].



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message