Fwd: [text] StringSubstitutor checks for cycles even if substitution in variables is disabled

2022-12-28 Thread Cyril de Catheu
Hello,

I shared this issue on the user ML a few weeks ago.
If it's ok I'll start working on a fix for this.
Ticket is here https://issues.apache.org/jira/browse/TEXT-223.

Happy holidays.

-- Forwarded message -
From: Cyril de Catheu 
Date: Fri, Nov 4, 2022 at 12:12 AM
Subject: [text] StringSubstitutor checks for cycles even if substitution in
variables is disabled
To: 


Hello,

I'm trying to use StringSubstitutor. Substitution in variables (recursive
substitution) is disabled.
When I run with a variable cycle, I don't expect an infinite loop because
recursive substitution is disabled. But I still get the exception:
java.lang.IllegalStateException: Infinite loop in property interpolation of
my template ${cycle}: cycle.

See example code below.

import java.util.Map;
import org.apache.commons.text.StringSubstitutor;

public class TestCycles {

  public static void main(String[] args) {
final Map cycleMap = Map.of("cycle", "${cycle}");
final StringSubstitutor sub = new StringSubstitutor(cycleMap)
.setEnableSubstitutionInVariables(false);
  String res =  sub.replace("my template ${cycle}");
  }
}


Is this the expected behavior, or do you think this should be fixed?

Thanks.

-- 

[image: StarTree] 
Cyril de Catheu
Software Engineer
+33 (684) 829-908 <+33+(684)+829-908>
Follow us: [image: RSS] [image: LinkedIn]
[image: Twitter]
[image: Slack]
[image:
YouTube] 

[image: Try StarTree Cloud Today]



Re: Jakarta namespace in commons like dbcp - thoughts / ideas?

2022-12-28 Thread Romain Manni-Bucau
Hi Emmanuel,

You have
https://repo1.maven.org/maven2/org/apache/geronimo/components/geronimo-transaction/3.1.5/geronimo-transaction-3.1.5-jakarta.jar
which is usable if you exclude transitive deps.

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | Book



Le mer. 28 déc. 2022 à 19:09, Emmanuel Bourg  a écrit :

> Thank you for the pointers, the Narayana and JBoss artifacts look good,
> but I haven't found a replacement for geronimo-transaction. I tried
> replacing the Geronimo Transaction implementation with the one from
> Narayana but got 4 test failures.
>
> I'll try to process the geronimo-transaction jar at build time and see
> how it works.
>
> Emmanuel Bourg
>
> Le 28/12/2022 à 07:24, Richard Zowalla a écrit :
> > There is a Jakarta artifact available for Narayana: narayana-jta-jakarta
> >
> > For the SPI: jboss-transaction-spi-jakarta
> >
> > (because JBoss plays the namespace game with their app server ;-) )
> >
> > Geronimo most likely also provides a Jakarta version or (if it is only
> API) can be replaced by the Jakarta artifact.
> >
> > Gruß
> > Richard
>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


Re: Jakarta namespace in commons like dbcp - thoughts / ideas?

2022-12-28 Thread Emmanuel Bourg
Thank you for the pointers, the Narayana and JBoss artifacts look good, 
but I haven't found a replacement for geronimo-transaction. I tried 
replacing the Geronimo Transaction implementation with the one from 
Narayana but got 4 test failures.


I'll try to process the geronimo-transaction jar at build time and see 
how it works.


Emmanuel Bourg

Le 28/12/2022 à 07:24, Richard Zowalla a écrit :

There is a Jakarta artifact available for Narayana: narayana-jta-jakarta

For the SPI: jboss-transaction-spi-jakarta

(because JBoss plays the namespace game with their app server ;-) )

Geronimo most likely also provides a Jakarta version or (if it is only API) can 
be replaced by the Jakarta artifact.

Gruß
Richard




-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [math] contribution proposal for multivariate functions optimization (2)

2022-12-28 Thread Gilles Sadowski
Hi.

Le mer. 28 déc. 2022 à 16:53, Eric Bresie  a écrit :
>
> Would fork/cloning from the following and raise a PR work to provide the
> code?
>
> https://github.com/apache/commons-math

Yes.

>
> Although there does appear to be a few PRs waiting to be merged there
> presently.

Well, if there is no coordination with a committer, they'll stay there
forever.

Some look fine but are old, some fail the build (and should have been
cleaned up by the reporter), some look interesting but lack references
(e.g. #212), some were discussed on JIRA but there was no consensus
on the way forward (e.g. #209, #190, #189, #188), some are not so
convincing (e.g. #143), some refer to a discussion on the ML (e.g. #118).
In most cases, a review and/or rebase is necessary, but the reporter
seems to not care enough to go to the bottom of the issue through a
message to the ML.
Many contributions need more interaction (on the ML and/or JIRA) than
just dropping a PR on GH.

Regards,
Gilles

> > [...]

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



Re: [math] contribution proposal for multivariate functions optimization (2)

2022-12-28 Thread Eric Bresie
Would fork/cloning from the following and raise a PR work to provide the
code?

https://github.com/apache/commons-math

Although there does appear to be a few PRs waiting to be merged there
presently.

Eric

On Tue, Dec 27, 2022 at 5:02 PM Gilles Sadowski 
wrote:

> Hi.
>
> Le mar. 27 déc. 2022 à 23:30, François Laferrière
>  a écrit :
> >
> >  Hello,
> > I am finally done with a draft version of multivariate optimizers
> (gradient descent, Newton-Raphson, BFGS) that fits the legacy API design
> and class hierarchy.
>
> Thanks!
>
> > The new code is compliant with checkstyle rule.
> > My question is : "what's next?".
>
> Post the code somewhere so that it can be reviewed. :-)
>
> > I suppose that I should have access to a specific git branch so that I
> can submit my code as a pull request?
>
> Is there a reason not to use the "master" branch?
>
> > Or is there another specific process?
>
> Providing a patch through JIRA is also possible (cf. below).
>
> > By the way, I have not been able to create a JIRA account.
>
> Instructions are here:
> https://infra.apache.org/jira-guidelines.html#who
>
> Best,
> Gilles
>
> >>> [...]
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
> --
Eric Bresie
ebre...@gmail.com


Re: repo usage question

2022-12-28 Thread Gary Gregory
Hi Mark,

GitHub is a mirror of Apache's canonical Git repository known as GitBox.

If your use is read-only, it does not matter which one you use.

For a contributor without commit privileges, the best way IMO to contribute
is with a PR on GitHub. The old fashioned way and out of favor way to
contribute was to create a diff file and attach it to a Jira ticket, and
for that style it does not matter which repository you use.

HTH,
Gary

On Wed, Dec 28, 2022, 09:37 Mark Roberts  wrote:

> What is the difference/preferred usage between
> github.com/apache/commons-bcel and
> gitbox.apache.org/repos/asf/commons-bcel.git?
>
> Thanks,
> Mark
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


repo usage question

2022-12-28 Thread Mark Roberts
What is the difference/preferred usage between
github.com/apache/commons-bcel and
gitbox.apache.org/repos/asf/commons-bcel.git?

Thanks,
Mark

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org