commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TEXT-38) Fluent API in "RandomStringBuilder"
Date Wed, 21 Dec 2016 14:09:58 GMT

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

Gilles updated TEXT-38:
-----------------------
    Summary: Fluent API in "RandomStringBuilder"  (was: Fluent API in {{RandomStringBuilder}})

> Fluent API in "RandomStringBuilder"
> -----------------------------------
>
>                 Key: TEXT-38
>                 URL: https://issues.apache.org/jira/browse/TEXT-38
>             Project: Commons Text
>          Issue Type: Improvement
>            Reporter: Gilles
>              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