[ANNOUNCE] Apache Commons Lang 3.1 released
The Apache Commons team is pleased to announce the release of Commons Lang 3.1. This is a drop-in replacement for 3.0 and 3.0.1. A list of the 8 changes and 5 bug fixes in this release are found in the release notes: https://commons.apache.org/lang/changes-report.html#a3.1 For general information on Commons Lang please visit the Lang website: http://commons.apache.org/lang/ The latest version may be downloaded from the following page: http://commons.apache.org/lang/download_lang.cgi For advice on upgrading from 2.x to 3.x, see the following page: http://commons.apache.org/lang/article3_0.html Thanks again to all involved in the release, both Commons users and Commons developers. Hen on behalf of the Apache Commons community - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: Download statistics question
Unfortunately the answer is that we don't know. A side effect of the huge number of mirrors we have is that we don't know how much is downloaded from each mirror. Vadim's site shows the number of downloads from Apache, but beyond knowing the download stats for legacy versions (which don't go to the mirrors), this won't tell you a huge amount as we discourage downloading directly from Apache. Hen On Thu, Sep 15, 2011 at 9:57 AM, Steven Raemaekers s.raemaek...@sig.eu wrote: Hi, My name is Steven and I'm a PhD student in software engineering. I'm writing an article on frequency of use of a couple of open source libraries, and I want to get the download statistics for a couple of Apache projects. There are daily and monthly statistics on the page http://people.apache.org/~vgritsenko/stats/daily.html, but I'm interested in the total number of downloads from the start of each project. On the same page I also saw that Vadim Gritsenko is the maintainer of the download statistics page, so I suppose that Vadim will be the best person to answer my question. I'm interested in the total number of downloads from the start of these projects: - log4j - slf4j - TestNG - Struts - OpenJPA Any help would be much appreciated. Thanks, Steven - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: Validate method with logging
Nope. Primarily because Lang doesn't take dependencies on anything but the JDK. Hen On Thu, Sep 8, 2011 at 3:58 AM, jeff mutonho linuxedhum...@gmail.com wrote: Hi Is there an argument validate method in the lang package that one can override not to throw a NullPointerException (NPE) after validating a null argument, and rather log the NPE using org.apache.log4j.Logger? Thanks - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: Bug in StringUtils.equals()
On Tue, Aug 30, 2011 at 1:59 PM, sebb seb...@gmail.com wrote: On 30 August 2011 19:08, e_rei...@web.de wrote: Hi All, i found a Bug in lang3. This tests are failed: Assert.assertTrue(org.apache.commons.lang3.StringUtils.equals(new StringBuffer(), new StringBuffer())); Assert.assertTrue(org.apache.commons.lang3.StringUtils.equals(new StringBuffer(123), new StringBuffer(123))); The CharSequence interface does not define equals(), so only concrete implementations that provide one (such as String) will use anything other than Object.equals(). I don't think this is a bug though perhaps the Javadoc could be clearer. I think a warning in StringUtils.equals that StringBuffer and StringBuilder don't implement equals as you'd expect and to call toString before calling such would be valuable. I think it's weird that the JDK doesn't do a real equals, but I don't think it's something we should try to fix. Hen - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [lang] Dev support for LANG-378 new ToStyle to support MultiLine with Indent
Noting for the user list's sake that I've switched this thread over to the dev list. Hen On Mon, Aug 22, 2011 at 11:39 PM, Barrie Treloar baerr...@gmail.com wrote: Hi, I'm looking for someone to help me with getting LANG-378 new ToStyle to support MultiLine with Indent committed. I think I have addressed all the comments about fitting into the framework properly. There are unit tests, etc as well. I'm willing to spend more time polishing it if someone can give me the direction required to get this committed. Cheers Barrie - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [lang] java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils Exception
We should update the article to cover that. Or make a FAQ item :) Hen On Thu, Aug 11, 2011 at 7:31 AM, Gary Gregory ggreg...@seagullsoftware.com wrote: 3.x is not a drop-in replacement for 2.x. So it only makes sense to ADD 3.x if you are coding to the 3.x API. Gary -Original Message- From: Christian Grobmeier [mailto:grobme...@gmail.com] Sent: Thursday, August 11, 2011 10:28 AM To: Commons Users List; em...@encs.concordia.ca Subject: Re: [lang] java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils Exception Emi, I think you need both lang jars in your classpath Cheers Christian On Thu, Aug 11, 2011 at 4:25 PM, Emi Lu em...@encs.concordia.ca wrote: Hi Gary, https://commons.apache.org/lang/article3_0.html It clearly shows lang - lang3. But could you tell me which jar cause the dependence exception please? Is it org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)? Or struts2, or xwork? I do want to know which jar cause the dependence? Thanks a lot! Emi -Original Message- From: Emi Lu [mailto:em...@encs.concordia.ca] Sent: Thursday, August 11, 2011 9:47 AM To: user@commons.apache.org Subject: [lang] java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils Exception Good morning, After I downloaded commons-lang.3.0.1, I got the following exceptions: java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.reg ister(XmlConfigurationProvider.java:198) at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(Str utsXmlConfigurationProvider.java:101) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContai ner(DefaultConfiguration.java:180) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration( ConfigurationManager.java:66) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Di spatcher.java:380) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:424) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOp erations.java:69) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter .init(StrutsPrepareAndExecuteFilter.java:51) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(Applicatio nFilterConfig.java:295) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applica tionFilterConfig.java:422) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFi lterConfig.java:115) at org.apache.catalina.core.StandardContext.filterStart(StandardContext. java:4071) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 725) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java: 1276) at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServl et.java:625) at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServl et.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPrevent ionFilter.java:186) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica torBase.java:563) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j ava:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal ve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce ss(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:48 9) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang.StringUtils at
Re: [jdk compatibility]Using commons libraries on java 6
Simple answer: They're probably fine. JDBC is the only item that usually causes trouble. To be more sure, go to SVN and check out the source code for each. Then build it under JDK 6. Upgrading to the latest versions of these would also be useful. Although we may release a component by using a specific JDK, chances are most of the development was done on a more modern version. For example while Lang 3.0 is officially built under JDK 1.5, I used JDK 6 for all my development until that final release build. Hen On Wed, Aug 10, 2011 at 5:29 AM, b_demchig b_demc...@omc.co.jp wrote: Hello, I am trying to setup web application on java 6, which is now running in jdk 1.4 environment. In 1.4 environment, application is using Apache Commons libraries as below: commons-collections-3.1.jar commons-el-1.0.jar commons-fileupload-1.2.jar commons-io-1.3.2.jar commons-logging-1.1.jar My question is: 1) How I know if the libraries are compatible with java 6. 2) Should I upgrade this libraries to new version. I would appreciate if anyone could give me some advice. -- Kind regards, Batchuluun Demchig - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[ANNOUNCE] Apache Commons Lang 3.0.1 released
The Apache Commons team is pleased to announce the release of Commons Lang 3.0.1. As the version suggests, this is a drop-in replacement for 3.0. A list of the 9 changes and 6 bug fixes in this release are found in the release notes: https://commons.apache.org/lang/changes-report.html#a3.0.1 For general information on Commons Lang please visit the Lang website: http://commons.apache.org/lang/ The latest version may be downloaded from the following page: http://commons.apache.org/lang/download_lang.cgi For advice on upgrading from 2.x to 3.x, see the following page: http://commons.apache.org/lang/article3_0.html Thanks again to all involved in the release, both Commons users and Commons developers. Hen on behalf of the Apache Commons community - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[ANNOUNCE] Apache Commons Lang 3.0 released
The Apache Commons team is pleased to announce the release of Commons Lang 3.0 Commons Lang is JDK 1.5+ and has updated the API to support Java 5 features, such as generics and varargs. Deprecated parts of the API have been removed. This is NOT a backwards compatible release. Because of this, we have changed the package name to org.apache.commons.lang3 allowing you to run Lang 3.0 and Lang 2.6 (or another version) side by side in the same Java instance. Details of the changes and bug fixes in this release can be found in the release notes: http://commons.apache.org/lang/upgradeto3_0.html For information on Commons Lang please visit the Lang website: http://commons.apache.org/lang/ Commons Lang can be downloaded from the following page: http://commons.apache.org/lang/download_lang.cgi Lang 3.0 is the work of 113 developers reporting and commenting on 179 issues. My thanks to everyone who helped out. Hen on behalf of the Apache Commons community P.S. You won't have to wait as long for the next release :) - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [lang]: Release date for Common Lang 3.0 (Final Release)
Undefined I'm afraid. There were a few issues on the last RC and, for my part, I'm currently in baby-rearing mode with about 10 minutes of personal time each day. Hen On Mon, May 23, 2011 at 4:19 AM, Rohan Kadam roha...@cybage.com wrote: Hi, Please let me know, when common lang 3.0 will be moved from Beta to Final Release? Thanks, Rohan Kadam. Legal Disclaimer: This electronic message and all contents contain information from Cybage Software Private Limited which may be privileged, confidential, or otherwise protected from disclosure. The information is intended to be for the addressee(s) only. If you are not an addressee, any disclosure, copy, distribution, or use of the contents of this message is strictly prohibited. If you have received this electronic message in error please notify the sender by reply e-mail to and destroy the original message and all copies. Cybage has taken every reasonable precaution to minimize the risk of malicious content in the mail, but is not liable for any damage you may sustain as a result of any malicious content in this e-mail. You should carry out your own malicious content checks before opening the e-mail or attachment. www.cybage.com - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [codec] DigestUtils.md5Hex Exception inside Servlet
That's a pretty boring class Java-wise and it seems unlikely that your container is putting codec in the classpath on its own, so I suspect the problem is in how you're making the jar available within the servlet container. Hen On Thu, Apr 7, 2011 at 1:23 AM, Fahmi Hachicha fahmi.hachi...@gmail.com wrote: Hello, The DigestUtils.md5Hex method generate an exception when used inside a Servlet : java.lang.NoClassDefFoundError: org/apache/commons/codec/digest/DigestUtils The class DigestUtils works correctly when used in a test class with main method in the same project. The same error appears when it is used in a bean associated to a JSP page using MyFaces. Thanks Fahmi - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Feathercast on Apache Commons
Our own Gary Gregory being interviewed by Feathercast.org: http://feathercast.org/?p=97 - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: NumberUtils and decimal point character
None I can think of; I've recorded it as LANG-674: https://issues.apache.org/jira/browse/LANG-674 Thanks :) On Thu, Jan 27, 2011 at 1:11 AM, Stevo Slavić ssla...@gmail.com wrote: Hello Apache Commons users, Is there any valid reason why '.' is hardcoded as decimal point character in lang.math.NumberUtils, commons-lang (2.6) ? Shouldn't this be locale dependent? Regards, Stevo. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: Bug with StringEscapeUtilities' escapeHTML/unescapeHTML for certain characters
Yes, the 3.0-beta is from the beginning of August. There have been 20 fixes since then: https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truepid=12310481updated%3Aafter=4%2FAug%2F10status=5status=6fixfor=12311714resolution=1sorter/field=updatedsorter/order=DESC Hen On Mon, Dec 20, 2010 at 8:50 AM, Burt Leung burt.le...@gmail.com wrote: Hi Sebb, I observed this error (ä equated with atilde) in the JAR file from http://mirrors.axint.net/apache//commons/lang/binaries/commons-lang3-3.0-beta-bin.tar.gz. This is the latest beta-3.0 download that I can see is available on http://commons.apache.org/lang/download_lang.cgi. Could it be that the fix wasn't merged into this build yet? Thanks, Burt On Sat, Dec 18, 2010 at 4:38 AM, sebb seb...@gmail.com wrote: On 18 December 2010 08:07, Burt Leung burt.le...@gmail.com wrote: Hello, I recently used the StringEscapeUtilities to encode/decode a character into its equivalent HTML entity. While I haven't used it much I do notice that a couple cases in particular seem wrong. case1: StringEscapeUtils.escapeHtml4(ä) This appears to give atilde;. This should actually be auml;. case2: StringEscapeUtils.escapeHtml4(å); This gives aring but should actually be atilde;. Using the unescape functional also gives the (incorrect) reverse results. Is this an actual bug or am I missing something? See: https://issues.apache.org/jira/browse/LANG-658 Thanks, Burt - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [lang]
Thanks Dirk, I've gone ahead and fixed this in r1032220. Index: src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java === --- src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java (revision 1031447) +++ src/test/java/org/apache/commons/lang3/StringUtilsEqualsIndexOfTest.java (working copy) @@ -596,7 +596,9 @@ assertEquals(-1, StringUtils.indexOfAnyBut(zzabyycdxx, new char[0])); assertEquals(3, StringUtils.indexOfAnyBut(zzabyycdxx, new char[] {'z','a'})); assertEquals(0, StringUtils.indexOfAnyBut(zzabyycdxx, new char[] {'b','y'})); -assertEquals(0, StringUtils.indexOfAnyBut(ab, new char[] {'z'})); +assertEquals(-1, StringUtils.indexOfAnyBut(aba, new char[] {'a', 'b'})); +assertEquals(0, StringUtils.indexOfAnyBut(aba, new char[] {'z'})); + } public void testIndexOfAnyBut_StringCharArrayWithSupplementaryChars() { Index: src/main/java/org/apache/commons/lang3/StringUtils.java === --- src/main/java/org/apache/commons/lang3/StringUtils.java (revision 1031447) +++ src/main/java/org/apache/commons/lang3/StringUtils.java (working copy) @@ -1555,13 +1555,14 @@ * A codenull/code or zero length search array will return code-1/code./p * * pre - * StringUtils.indexOfAnyBut(null, *) = -1 - * StringUtils.indexOfAnyBut(, *) = -1 - * StringUtils.indexOfAnyBut(*, null) = -1 - * StringUtils.indexOfAnyBut(*, []) = -1 - * StringUtils.indexOfAnyBut(zzabyycdxx,'za') = 3 - * StringUtils.indexOfAnyBut(zzabyycdxx, '') = 0 - * StringUtils.indexOfAnyBut(aba, 'ab') = -1 + * StringUtils.indexOfAnyBut(null, *) = -1 + * StringUtils.indexOfAnyBut(, *)= -1 + * StringUtils.indexOfAnyBut(*, null) = -1 + * StringUtils.indexOfAnyBut(*, [])= -1 + * StringUtils.indexOfAnyBut(zzabyycdxx, new char[] {'z', 'a'} ) = 3 + * StringUtils.indexOfAnyBut(aba, new char[] {'z'} ) = 0 + * StringUtils.indexOfAnyBut(aba, new char[] {'a', 'b'} )= -1 + * /pre * * @param cs the CharSequence to check, may be null On Wed, Oct 27, 2010 at 3:13 PM, Niall Pemberton niall.pember...@gmail.com wrote: On Wed, Oct 27, 2010 at 2:32 PM, Dirk Starke dirk.sta...@protagen.de wrote: Hello, I just recognized the following example in class StringUtils: StringUtils.indexOfAnyBut(zzabyycdxx, '') = 0 I don't understand this example, because [] is used for an empty array in the documentation of this method. Could this be corrected or explained? Looks like an error, should be: StringUtils.indexOfAnyBut(zzabyycdxx, ) = -1 http://commons.apache.org/lang/xref/org/apache/commons/lang3/StringUtils.html#1596 Please file a bug report: http://commons.apache.org/lang/issue-tracking.html Thanks Niall Cheers, Dirk - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [Primitives] Does anyone use this?
Something else to consider is Stephen Colebourne's Joda Primitives: http://joda-primitives.sourceforge.net/ Commons Primitives hasn't been touched since 2005 when Stephen was active on the component. I think it's an Attic component (ie not being worked on and no future releases expected). Bcc to Commons Users; moving conversation to Dev on the 2nd point. Hen On Tue, Nov 2, 2010 at 1:52 PM, sebb seb...@gmail.com wrote: Note that lack of recent activity is not necessarily a bad sign; in this case I think it's because the code is working fine. I could find no outstanding bugs for the component. On 2 November 2010 20:10, Brian Pontarelli br...@pontarelli.com wrote: I probably wouldn't use these collections in a factory context. If I'm concerned about speed and size, I'm going to create the primitive collection using the constructor and then use it directly. Adding in any factories, AOP, etc. is just going to add overhead. The original issue is really whether or not the commons library is still active or if Trove is a better choice. I'd say either library will work and I've used both. Another thing to think about is your comfort with licenses. I prefer ASL over LGPL as a rule of thumb and Trove is LGPL. I tend to avoid anything with the letters G, P and L in the license. But if you can find something with BSD, that's the way to go. ;) -bp On Nov 2, 2010, at 1:24 PM, Martin Gainty wrote: also lookup methods from factories will reliably lookup ArrayListBoxedPrimitiveDatatype when bean definition has attribute dependency-check=object but wont lookup a collection of primitives such as int []PrimitiveDataTypeVariable even when the bean definition specified dependency-check=simple http://static.springsource.org/spring/docs/1.2.9/reference/beans.html thanks, Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. From: josiah.d.hasw...@hp.com To: user@commons.apache.org Date: Tue, 2 Nov 2010 18:42:29 + Subject: RE: [Primitives] Does anyone use this? Gnu Trove includes a set of benchmarks vs. the JCF. I don't understand why this is so controversial; a developer should be able to assess the suitability of a library for his or her purposes without it turning into a huge debate. If dependency-management is an issue, Trove is available from numerous Ivy/Maven repositories. Joe H. | HP Software -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Tuesday, November 02, 2010 11:41 AM To: user@commons.apache.org Subject: RE: [Primitives] Does anyone use this? Brian how does primitive collections implementation perform better than JDK collections? thanks, Martin __ please do not alter or disrupt this transmission. thank you Subject: Re: [Primitives] Does anyone use this? From: br...@pontarelli.com Date: Tue, 2 Nov 2010 11:32:01 -0600 To: user@commons.apache.org I would assume once you get out of the autoboxing caches the performance will get even worse. It really depends on the application, but I've found a number of spots where primitive collections work much better than autoboxing and JDK collections. -bp On Nov 2, 2010, at 11:25 AM, James Carman wrote: Yet another dependency to add to the mix. On Tue, Nov 2, 2010 at 1:17 PM, Cogen, David - 1008 - MITLL co...@ll.mit.edu wrote: From: jcar...@carmanconsulting.com [jcar...@carmanconsulting.com] On Behalf Of James Carman [ja...@carmanconsulting.com] Sent: Tuesday, November 02, 2010 12:30 PM To: Commons Users List Subject: Re: [Primitives] Does anyone use this? Premature optimization with JDK5. I'd say stick to the JDK classes if you can and only try to beef up space/performance if you need to. Normally I agree about evils of premature optimization. But ArrayListInt is practically a drop-in replacement for ArrayListInteger and I see no
Re: [SANSELAN] Status and future of Sanselan?
Forwarding Matthew's reply back to the user list. -- Forwarded message -- From: Charles Matthew Chen charlesmc...@gmail.com Date: Sun, Nov 7, 2010 at 8:25 AM Subject: Re: [SANSELAN] Status and future of Sanselan? To: Commons Developers List d...@commons.apache.org I think a new release is overdue. I've been meaning to do it when I find the time. If someone else would like to beat me to it, they're welcome to go ahead. Almost everything new in the release is covered by closed JIRA tickets. What are the implications of Sanselan's having been elevated from Apache Incubator to Commons status? I'm not sure what you mean? Has the code changed? No. Are there any plans to release more complete Sanselan documentation? Agreed, this is (also) long overdue. Are there any known issues concerning discrepancies between the current version (0.97) of Sanselan and the latest release (2.3, April 26, 2010) of the EXIF standard? I haven't had a chance to look at this at all. Matthew On Sun, Nov 7, 2010 at 2:14 PM, Henri Yandell flame...@gmail.com wrote: Pointing this email out. JIRA for Sanselan is a bit confusing; it needs a new version created for the next release and the changes that are going in that version should have a fix version set of that new version. Ideally the 'what's in the next version?' question can be answered with a link to JIRA. Having discovered the pain of the iPod iThmb format, I find myself wanting Sanselan to support that :) Hen -- Forwarded message -- From: n...@dad.org Date: Sun, Oct 31, 2010 at 10:51 AM Subject: [SANSELAN] Status and future of Sanselan? To: Commons Users List user@commons.apache.org Cc: jeff_rothenb...@acm.org, n...@dad.org Does anyone know if a new release of Sanselan, after the current sanselan-0.97-incubator, is in the works? If so, are the features, enhancements, and status of the forthcoming version described anywhere? What are the implications of Sanselan's having been elevated from Apache Incubator to Commons status? Are there any plans to release more complete Sanselan documentation? Are there any known issues concerning discrepancies between the current version (0.97) of Sanselan and the latest release (2.3, April 26, 2010) of the EXIF standard? Norman Shapiro - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [Collections] Generics Support
On Mon, Aug 2, 2010 at 5:18 AM, sebastian.petzelber...@aformatik.com wrote: Are there any plans for the Collections library to support generics in the future? If so, when can we expect that? I was looking for this my self and I found following: http://sourceforge.net/projects/collections/ Sebastian Petzelberger If you build Collections from trunk, it (largely) supports generics. There are still open JIRA items, so some components may still need work. Hen - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[ANNOUNCE] Apache Commons Lang 3.0 Beta released
On behalf of the Apache Commons Lang contributors, I would like to announce that we have released a 3.0-beta of Commons Lang. Lang is now Java 5 based. We've generified the API, moved certain APIs to support varargs and thrown out any features that are now supported by Java itself. We've removed the deprecated parts of the API and have also removed some features that were deemed weak or unnecessary. All of this means that Lang 3.0 is not backwards compatible with the 2.x versions. To that end we have changed the package name, allowing Lang 3.0 to sit side-by-side with your previous version of Lang without any bad side effects. The new package name is the exciting and original 'org.apache.commons.lang3'. In general migrating should be a simple search and replace. There are also, as you'd expect, many new features, enhancements and bugfixes. You can find out more on the Commons Lang website, where you can download the beta or browse the Javadoc: # http://commons.apache.org/lang/upgradeto3_0.html # http://commons.apache.org/lang/download_lang.cgi # http://commons.apache.org/lang/api-3.0-beta/index.html We encourage you to give the new version a try and send us your feedback, ideas or suggestions. Feel free to subscribe to either the user or developer mailing lists, or to create issues in the issue tracker: # http://commons.apache.org/lang/mail-lists.html # http://commons.apache.org/lang/issue-tracking.html Lastly - a hearty thank you to the many Java developers who have contributed to Commons Lang over the last 8 years. It is very much a community built project. Hen - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [validator] download 1.4 version ?
Correct, it's not been released so you need to download the source from svn and build. I've built a snapshot version of the latest source code for you in case that's a pain in the arse :) http://people.apache.org/~bayard/commons-validator-1.4-SNAPSHOT-bin.zip Feedback is very much appreciated. Hen On Thu, Jul 22, 2010 at 2:28 AM, Jan C. chal...@gmail.com wrote: Hi, The bug 220 https://issues.apache.org/jira/browse/VALIDATOR-220 is present in 1.3.1 so I'd like to get the version 1.4 which is supposed to fix it. I cannot find any download of the 1.4. Do I have to build it myself from the cvs ? Does it mean that the 1.4 is still a beta ? Thanks, Jan - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [SANSELAN] Distributing Applications That Use Sanselan
Embedding the classes from one jar in another tends to lead to jar hell; namely people wondering why putting a later version of sanselan in their classpath isn't working. If you're a user end application then you can get away with it. Legally; follow the license. For me that means including the LICENSE and NOTICE in my distribution, but there's more to the license than that and you should make sure you and your legal advisor don't have concerns. I wouldn't worry about copying the jar amongst apps; that allows for better autonomous coding. If size is an issue, use tools to shrink sanselan down to the bits each app is actually using. Hen On Thu, Jul 1, 2010 at 10:51 AM, Norman Shapiro n...@smtp.rawbw.com wrote: I want to distribute applications that use sanselan, and want to meet all legal, ethical and practical requirements. I don't know where to put the required copyright notice(s). Also, I don't know how to distribute sanselan-*-incubator.jar. If I distribute it as a separate jar file, or as reference to a copy on a web site, the installation scripts and Microsoft batch files will have to know where on the host computer it is installed. I'm thinking that it would be best to incorporate the contents of sanselan-*-incubator.jar into my jar file and then just distribute my jar file, along with my sources. I know that doing so would mean, in effect, a separate copy of sanselan-*-incubator.jar for each application, but its only half a megabyte. Advice will be appreciated. Norman Shapiro 798 Barron Avenue Palo Alto CA 94306-3109 (650) 565-8215 n...@dad.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: Commons-transaction abandoned?
I think the next step would be to raise the issue on the dev list - retiring Transaction because xyz. Then if no one has any bright ideas or helps you have any bright ideas then we can go ahead and move it onto the retirement side. It's a pretty strong message to say This is just not implementable. so I imagine we'd want to bash the thoughts around a bit to make sure they hold up. Hen On Fri, Mar 5, 2010 at 1:41 PM, Oliver Zeigermann oliver.zeigerm...@gmail.com wrote: I thought about it for a while and I really think it is true. Of course you could change what is on the tin, but then it would no longer be of major interest. Thus, except anyone else wants to bring it further, the project is dead. What would be the steps for its funeral (feels bad as this would be the second Apache project funeral I am involved in)? - Oliver 2010/3/5 Henri Yandell flame...@gmail.com: That would be dead then :) If it's not possible - I think we should retire the library asap with such a statement. Do not use - it's not able to do what it says on the tin. Is there any more conversation we should have before determining that a) it's misleading and b) there shouldn't be a 1.3 or 2.0 release with the improved if not great functionality? Hen On Fri, Mar 5, 2010 at 2:01 AM, Oliver Zeigermann oliver.zeigerm...@gmail.com wrote: Folks! What Henri says is completely right. The project has been abandoned by me as I lost faith in one of its goal - ACID properties (especially atomicity) on any file system. From my (and others) point of view it can not be achieved by *any* implementation. So if you are asking whether there is another implementation that is more suitable, my answer is there can't be any. Certain parts of the 2.0 code are quite reasonable, though, especially the locking and deadlock detection part. That's why I have not been determined what to do with the project. Certainly 2.0 is better than 1.x by any means, but I still think it should not be released as its promises can not be kept. Any thoughts? - Oliver 2010/3/5 Henri Yandell flame...@gmail.com: The current version is 1.2 (released in 2007). 1.3-SNAPSHOT is then the subsequent version in development, but it looks as though it was quickly renamed to 2.0. 2.0 currently has 6 of 9 issues resolved, the most recent being reported and applied in Sept 2009, and 2 of the open issues were opened a month ago. So I wouldn't call it dead - there just hasn't been much to do. Your email does raise the question of whether 2.0 should be released or not. I've cc'd Oliver who has been doing most of the work. Hen On Tue, Feb 9, 2010 at 10:07 PM, John Ericksen johncar...@gmail.com wrote: Hello, I came across the file transaction capabilities in commons-transaction today which was exactly what I was looking for. To my disapointment, however, it looks like there hasn't been an update to the project for over 2 years. The home page says the current version is a SNAPSHOT and from my search of the mailing list, it looks like 2.0 is upcoming (in 2007?). My question is, is the commons-transaction project abandoned, is there a better library out there for transactional file system operations? Thanks for your reply. John - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: Commons-transaction abandoned?
The current version is 1.2 (released in 2007). 1.3-SNAPSHOT is then the subsequent version in development, but it looks as though it was quickly renamed to 2.0. 2.0 currently has 6 of 9 issues resolved, the most recent being reported and applied in Sept 2009, and 2 of the open issues were opened a month ago. So I wouldn't call it dead - there just hasn't been much to do. Your email does raise the question of whether 2.0 should be released or not. I've cc'd Oliver who has been doing most of the work. Hen On Tue, Feb 9, 2010 at 10:07 PM, John Ericksen johncar...@gmail.com wrote: Hello, I came across the file transaction capabilities in commons-transaction today which was exactly what I was looking for. To my disapointment, however, it looks like there hasn't been an update to the project for over 2 years. The home page says the current version is a SNAPSHOT and from my search of the mailing list, it looks like 2.0 is upcoming (in 2007?). My question is, is the commons-transaction project abandoned, is there a better library out there for transactional file system operations? Thanks for your reply. John - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: Commons-transaction abandoned?
That would be dead then :) If it's not possible - I think we should retire the library asap with such a statement. Do not use - it's not able to do what it says on the tin. Is there any more conversation we should have before determining that a) it's misleading and b) there shouldn't be a 1.3 or 2.0 release with the improved if not great functionality? Hen On Fri, Mar 5, 2010 at 2:01 AM, Oliver Zeigermann oliver.zeigerm...@gmail.com wrote: Folks! What Henri says is completely right. The project has been abandoned by me as I lost faith in one of its goal - ACID properties (especially atomicity) on any file system. From my (and others) point of view it can not be achieved by *any* implementation. So if you are asking whether there is another implementation that is more suitable, my answer is there can't be any. Certain parts of the 2.0 code are quite reasonable, though, especially the locking and deadlock detection part. That's why I have not been determined what to do with the project. Certainly 2.0 is better than 1.x by any means, but I still think it should not be released as its promises can not be kept. Any thoughts? - Oliver 2010/3/5 Henri Yandell flame...@gmail.com: The current version is 1.2 (released in 2007). 1.3-SNAPSHOT is then the subsequent version in development, but it looks as though it was quickly renamed to 2.0. 2.0 currently has 6 of 9 issues resolved, the most recent being reported and applied in Sept 2009, and 2 of the open issues were opened a month ago. So I wouldn't call it dead - there just hasn't been much to do. Your email does raise the question of whether 2.0 should be released or not. I've cc'd Oliver who has been doing most of the work. Hen On Tue, Feb 9, 2010 at 10:07 PM, John Ericksen johncar...@gmail.com wrote: Hello, I came across the file transaction capabilities in commons-transaction today which was exactly what I was looking for. To my disapointment, however, it looks like there hasn't been an update to the project for over 2 years. The home page says the current version is a SNAPSHOT and from my search of the mailing list, it looks like 2.0 is upcoming (in 2007?). My question is, is the commons-transaction project abandoned, is there a better library out there for transactional file system operations? Thanks for your reply. John - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: Commons CLI : Executing from shell script ?
Does using $* help? Even if it doesn't, it would be more concise. I'm assuming one of the variables you're passing through contains a space and is splitting things up after the quotes surrounding it are lost. Does the number of arguments increase? Hen On Thu, Nov 19, 2009 at 2:21 AM, Ashika Umanga Umagiliya auma...@biggjapan.com wrote: Greetings all, In my application I have used Commons CLI to parse command line arguments. I want to run my JAR file using shell script because , I have to setup some environment variables. But it seems that shell script messing around with argument order/number. My shell script is as follows: export ARCH=lx24-amd64 export SGE_ROOT=/SGE6/sge6.2 export LD_LIBRARY_PATH=$SGE_ROOT/lib/$ARCH/ #echo $SGE_ROOT #echo $LD_LIBRARY_PATH java -jar analyse.jar $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 But when I run directly from shell using java -jar analyse.jar . everything works fine. Any tips? Thanks in advance. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: [LANG] 2.4: ExceptionUtils.getFullStackTrace()
I think if the full stack trace isn't being shown, then it's a bug. I think the bug is in the first nested exception though - it should be printing the rest of the stack trace and it sounds like it isn't in your situation. Which matches my experience with the ServletException (and I guess JasperException) in Tomcat. They don't print the rest of their stack trace, making debugging very hard. Hen On Fri, Nov 6, 2009 at 11:26 AM, Charles Deal chuckdea...@gmail.com wrote: If the code is trying to protect against cycles, maybe it should try a different approach. In my specific case, I have a JasperException thrown by Tomcat 5.5.17. It contains a NPE as the rootCause. When I simply printStackTrace() (via slf4j logger) I only get the JasperException stackTrace. When I used the getFullStackTrace() method, I still only got the JasperException trace. I suppose it is a good idea to prevent cyclic stacktraces and too many exceptions being rendered, but I think at least ONE of the nested exceptions should be printed. Ultimately, though, the developer asked for the fullstacktrace, so I'm not so sure that the total number of exceptions being printed is a concern. Cyclic exceptions, however, would be problematic and while I agree that this code prevents the cycles, it also prevents it from displaying any nested exceptions (at least in the cause of the Tomcat JasperException). I'm ok using the modified version of the method, but before I wrote JIRA on the issue, I figured I'd better see if it is truly an issue. It seems to be a misleading method name at the very least. On Thu, Nov 5, 2009 at 12:57 PM, Paul Benedict pbened...@apache.org wrote: Exception traces can also be cyclic. An exception may set itself as the root cause, or A - B - A. On Thu, Nov 5, 2009 at 11:21 AM, Henri Yandell flame...@gmail.com wrote: I think the issue is that if you print the nested exception and keep going, you'll get a lot of duplicates as the nested exception will print all its children, then you'll go ahead and loop into the child. Looking at the source to getThrowableList - it seems to me that the throwable list is top down (ie: exception received and then into its causes and its causes causes etc) so much like your comment on reverse. On Wed, Nov 4, 2009 at 2:08 PM, Charles Deal chuckdea...@gmail.com wrote: The getFullStackTrace() method javadoc states A way to get the entire nested stack-trace of an throwable. However, after gathering the nested Throwables, it performs a check while processing the array of Throwables that causes it to abort before it renders the nested stacktraces. My question is: Should the if check be there? Why go through the trouble of getting the nested Throwables if you are going to short-circuit the rendering loop? I suppose it is possible that the intent was to iterate the list in REVERSE and stop the rendering when you hit the Throwable that had a root Cause. Any thoughts? I ended up capturing the getFullStackTrace method and removed the if check within the loop and got exactly what I was looking for. - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: utils for notnulll
On Thu, Sep 3, 2009 at 7:39 AM, tubin genfachh...@gmail.com wrote: I have a form with start date and end date fields, form makes sense only if both the fields are present,any one of tow is null it is not right , I am wondering there is any util which checks if both the values are not null , I can write the code to check if start date is not null and end date id null add error message , and vice versa , is there any such util present or do I have to write one ? Nope. Things like Lang's StringUtils.isEmpty (null or empty String) can be useful here but you would need to handle the ; and Validator can be useful in a larger architectural sense. Hen - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: Commons lang parseDate fails to parse ISO8601 date?
Issue seems to be that DateFormatUtils.ISO_DATETIME objects are FastDateFormat objects; whereas parseDate uses SimpleDateFormat. The former supports ZZ whereas the latter does not. Java 1.4 (not sure about later) had 'Z' which meant +0100. FastDateFormat adds 'ZZ' to support the ISO standard of +01:00. ie) presumably your actual value is +0100+0100. Solution is probably to have parseDate use FastDateFormat, though there will always be the issue that getPattern from FastDateFormat may not work with SimpleDateFormat. Could I get you to open up a JIRA issue? http://issues.apache.org/jira/browse/LANG Thanks for finding this, Hen On Thu, Sep 3, 2009 at 5:32 AM, Aaron Zeckoskiazecko...@gmail.com wrote: I cannot see why this is failing but here is my code: Date parseDate(String dateStr) { Date d = null; if (dateStr != null ! .equals(dateStr)) { try { // try to parse the date from ISO8601, general formats, and RFC-2822 d = DateUtils.parseDate(dateStr, new String[] { DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.getPattern() }); } catch (ParseException e) { // nothing to do log.info(Failed to parse: + dateStr + : + e, e); d = null; } } return d; } The string I am sending in to that method was generated like this: String isoDateStr = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.format(date); The exception is: 2009-09-03 13:29:37,644 [399355...@qtp3-2] INFO search.SOLRSearchService - Failed to parse: 2009-09-03T13:29:30+01:00:java.text.ParseException: Unable to parse the date: 2009-09-03T13:29:30+01:00 java.text.ParseException: Unable to parse the date: 2009-09-03T13:29:30+01:00 at org.apache.commons.lang.time.DateUtils.parseDate(DateUtils.java:285) at org.steeple.impl.search.SOLRSearchService.parseDate(SOLRSearchService.java:412) at org.steeple.impl.search.SOLRSearchService.execute(SOLRSearchService.java:311) I am open to absolutely any suggestion as I am completely baffled. -AZ -- Aaron Zeckoski (azeckoski (at) vt.edu) Senior Research Engineer - CARET - University of Cambridge https://twitter.com/azeckoski - http://www.linkedin.com/in/azeckoski http://aaronz-sakai.blogspot.com/ - http://tinyurl.com/azprofile - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: ArrayList nullIfEmpty
(Presumably the title was meant to be ArrayUtils nullIfEmpty :) ) Best way is to open a JIRA issue up (http://issues.apache.org/jira/browse/LANG). The below should be defaultIfEmpty rather than nullIfEmpty I suspect to match StringUtils/ObjectUtils. Hen On Thu, Aug 27, 2009 at 6:48 PM, Guy Rouillierguyr-...@burntmail.com wrote: I'm new to this list. I searched the archives and could not find the subject method discussed. Has it ever been proposed? StringUtils has defaultIfEmpty, and ObjectUtils has defaultIfNull, but ObjectUtils doesn't have anything similar. Since ArrayUtils already has all the necessary isEmtpy methods defined, the following would appear to be sufficient: public static T T[] nullIfEmpty(T[] array) { return(isEmpty(array)); } Thanks. -- Guy Rouillier - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: problem with StringEscapeUtils on linux inside tomcat
Apologies for the slow reply. Common approach on this list is to tag the subject, ie: [lang] problem with StringEscapeUtils that can help it to be noticed. escapeHtml has a much disagreed with 'feature' that it escapes non-ASCII characters. That could be what you're seeing; perhaps mixed with unexpected encoding setup on your side that obscure it. ie) using SHIFT_JIS instead of UTF-8 and then seeing the escaped ASCII making it weirder. Hen On Mon, Jul 20, 2009 at 12:27 AM, Diego Zanganaar...@gmail.com wrote: hi, i'm using the class StringEscapeUtils, to replace the text to be published in html page value = StringEscapeUtils.escapeHtml( value ); it's full working on linux and windows, with command line application to test it, then in windows with a web app in tomcat, but: when i use it on linux with a web app in tomcat, something strange appens: it converts text to wrong values... is there something to setup before runinng the class? cya, thanks all Diego Zanga -- Tutti a pensare che la verità sia una cosa giusta, e invece è la fine del mondo, e noi non possiamo consentire la fine del mondo in nome di una cosa giusta. Abbiamo un mandato, noi. Un mandato divino. Bisogna amare così tanto Dio per capire quanto sia necessario il male per avere il bene. Questo Dio lo sa, e lo so anch'io. (Il Divo) - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: Port of the Commons libraries to .NET
The subject has come up before, but generally it's not happened. I've not heard of any of Lang being ported (though I'm all for the idea). Hen On Thu, Jul 9, 2009 at 6:20 AM, Steven Whatmoresteven.whatm...@purefacts.com wrote: Good morning, I am in the middle of a port of an application written in Java to .NET and I am using a number of the commons libraries. In particular StringUtils, StringEscapeUtils, etc Does anyone know if these have been ported to .NET? Whatty - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
[ANNOUNCE] Commons CLI 1.2 Released
I'd like to announce that Commons CLI 1.2 has been released. Commons CLI provides an API for processing command line interfaces. This is a minor release, containing the last 2 years of bugfixes and minor improvements to the CLI codebase. Full details of this can be found in the release notes: http://commons.apache.org/cli/release_1_2.html The major item of note is an accidental change of behaviour between CLI 1.0 and CLI 1.1 (as noted in CLI-137) that has now been reverted. For more information on Commons CLI, please visit the CLI website: http://commons.apache.org/cli/ The CLI jars have have been uploaded to the Maven repository, and CLI is also available in either binary or source form from: http://commons.apache.org/downloads/download_cli.cgi Henri Yandell on behalf of the Commons community - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: Adding logging to DBUTILS
P6Spy would be the method I use here. It's a debugging driver wrapper that you would put between DbUtils and your database driver. On Mon, Mar 9, 2009 at 4:32 AM, kpowerinfinity kpowerinfin...@gmail.com wrote: Hi, We are using DbUtils for a number of our projects, and were wondering if there is a way to attach a logger instance to the QueryRunner so that the queries being executed can be logged for debugging purpose. I have been trying to explore the JavaDoc but to no avail. In case this is not supported out of the box, is there a way to extend the QueryRunner and add this hook somehow? Will appreciate if somebody can guide us to some relevant Documentation. Best, Krishna -- http://kpowerinfinity.wordpress.com http://www.linkedin.com/in/kpowerinfinity - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org - To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org
Re: BooleanUtils
There's been no request for it. If you'd like to see that, opening a JIRA ticket is the best way - even better if you attach a patch with unit test. Thanks, Hen On Wed, Nov 19, 2008 at 4:32 AM, [EMAIL PROTECTED] wrote: Hi, I am using commons.lang and other sub-packages in our project at an insurance in Switzerland. I wonder why isn't an equal methode implemented in the class BooleanUtils? There are situations when we model booleans as optional attributes Boolean [0..1]. Is there a chance that I'll see this functionality in a future release? (otherweise I have to use my own) regards, magnus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[COLLECTIONS] Heads up on 3.3 release
If you look at https://issues.apache.org/jira/browse/COLLECTIONS you'll see that Collections 3.3 is getting extremely close. In case anyone is holding back on a bug, wants to take a look or mentally reserve some time etc to look at the rc :) I'm loosely thinking on making a first release candidate at the end of the week. Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: export control: Commons (-collections 2.1.1, -io 1.2, -lang 2.1, -logging 1.0.3, -beanutils 1.7.0, -codec 1.3, -digester 1.6, -el 1.0, -fileupload 1.1.1) and cglib 2.1.3
None of the Commons libraries below have been identified as needing to be on the exports page and have one of the ECCNs you mention. No idea for cglib - that's a project over on sourceforge. Hen On Thu, Oct 30, 2008 at 4:57 PM, Export Control [EMAIL PROTECTED] wrote: Hi, I am engaged in export control compliance and need to know the ECCN of *Commons (-collections 2.1.1, -io 1.2, -lang 2.1, -logging 1.0.3, -beanutils 1.7.0, -codec 1.3, -digester 1.6, -el 1.0, -fileupload 1.1.1) and cglib 2.1.3* and whether any license exceptions are available. I know that there is some information on export control at http://www.apache.org/licenses/export/ but especially for the named software there is none. On this webpage is stated that each and every ASF-product that is not on the list provided there, does not have one of the two possible ECCNs 5D002 or 5D992. Is that true for the above mentioned software? Who can help? Regards, Michelle. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Common DbUtils
Ah I see. You build the ? marks up using something like StringUtils.repeat(,?).substring(1). I don't think we have named parameters in there - though Brian McCallister's JDBI does and might be worth a look: http://jdbi.org/ Hen On Wed, Aug 27, 2008 at 12:12 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: But I have only one paramter in query. I can't pass an array parameter. Again, the number of parameter is unknown and for this I use the IN statement in sql. Thanks, Pietro Try: String[] params = {1, 2}; Hen On Mon, Aug 25, 2008 at 2:12 PM, Pietro Santurelli [EMAIL PROTECTED] wrote: Hi all, I'm using common DbUtils 1.1 to execute this query: SELECT column1 FROM table WHERE id_table IN (?). Java fragment code is: String params = 1,2; String query = SELECT column1 FROM table WHERE id_table IN (?); QueryRunner qRunner = new QueryRunner(); ArrayListStore stores = (ArrayListIncasso)qRunner.query(connection,query, params, new BeanListHandler(Store.class)); The ArrayList obtained is populated only with stores with id = 1. In other words, the stores with id = 2 aren't retrieved. The semicolon seems to be the problem. Is this a bug of common DbUtils? Thanks in advance, Pietro - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Common DbUtils
Try: String[] params = {1, 2}; Hen On Mon, Aug 25, 2008 at 2:12 PM, Pietro Santurelli [EMAIL PROTECTED] wrote: Hi all, I'm using common DbUtils 1.1 to execute this query: SELECT column1 FROM table WHERE id_table IN (?). Java fragment code is: String params = 1,2; String query = SELECT column1 FROM table WHERE id_table IN (?); QueryRunner qRunner = new QueryRunner(); ArrayListStore stores = (ArrayListIncasso)qRunner.query(connection,query, params, new BeanListHandler(Store.class)); The ArrayList obtained is populated only with stores with id = 1. In other words, the stores with id = 2 aren't retrieved. The semicolon seems to be the problem. Is this a bug of common DbUtils? Thanks in advance, Pietro - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Release of commons-cli?
CLI 2.0 I don't see any time soon (ever) unless someone gets a big urge. CLI 1.2 I have on my list as a 'sometime soon' along with the next Collections 3.x and Codec 1.x - looking at it I think it could go very easily, none of the 4 tickets are blocked (ignoring that CLI-137 is a painful one to close as WONTFIX). Hen On Tue, May 27, 2008 at 7:39 AM, Mike DeLaurentis [EMAIL PROTECTED] wrote: Are there any plans to release either 1.2 or 2.0 of commons-cli? I'm particularly interested in the fix for CLI-155. The issue is fixed in the head for 1.x and seems to be a non-issue in 2.x. There was a patch attached to the Jira issue, but I'd like to be able to depend on a non-patched version. When is the next time a release is planned for either of those branches? Thanks, Mike DeLaurentis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can I use Apache CLI to develop command line interpreter using Java
I don't know - for parsing the parameters for the main script, sure. It probably could be useful for the remote service's command line, but you'd definitely have to play around to be sure. Hen On Sun, May 25, 2008 at 10:15 PM, lahiru gunathilake [EMAIL PROTECTED] wrote: Hi devs, I'm writing a command line interpreter for Apache Qpid using java and I'm thinking whether I can use Apache CLI for that. With more details I'm going to write a CLI which is capable of extracting JMX information from Apache Qpid since it's JMX thing I have to develop it using Java and I'm confuse whether I have to develop the command line related thing from the scratch and while I'm searching some library to use for the command line thing I found this Apache CLI and I just want to know whether I can use Apache CLI as an intermediate library or intermediate code for my command line interface. My command line interpreter is like this, First user runs the main script with appropriate parameters then it connects with a remote machine and display a command prompt and user is allow to run it's native commands and get different information from the remote machine. So in this kind of a purpose can I use Apache CLI..? Could you please tell me can I use Apache CLI for my project and if you need some more about what I'm going to do I can let you know ASAP. Any thoughts please..:-) Thanks in advance Regards lahiru - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Release of commons-cli?
On Wed, May 28, 2008 at 12:30 AM, Russel Winder [EMAIL PROTECTED] wrote: On Tue, 2008-05-27 at 23:54 -0700, Henri Yandell wrote: CLI 2.0 I don't see any time soon (ever) unless someone gets a big urge. What is needed to move 2.0 to release? Given that the policy decision was made to shift any new activity to 2.0, saying 2.0 is defunct is equivalent to saying Commons CLI is defunct. No life happened on 2.0. I've been applying patches that show up for the 1.x branch, just because. :) Can I suggest that 2.0-SNAPSHOT could happily be released into the snapshot repository to give things a kick start? I'll get that done. Been a while since I remember doing a snapshot release so have asked how we do that nowadays on [EMAIL PROTECTED] Alternatively, the decision to move to 2.0 could be rescinded and 1.x treated as the mainline. However, I had understood that the 1.x architecture was fundamentally inferior to the 2.x architecture. That's what they say. As a user I didn't feel too excited about the 2.x API. CLI 1.2 I have on my list as a 'sometime soon' along with the next Collections 3.x and Codec 1.x - looking at it I think it could go very easily, none of the 4 tickets are blocked (ignoring that CLI-137 is a painful one to close as WONTFIX). I think there is more to CLI-137 than is currently listed. From memory (I will try and dig up the test cases) processing multiple options (e.g. -D) fails to work in CLI 1.1. So unless someone has fixed that I would deem 1.2 as unusable just as 1.1 is :-( Test cases much appreciated :) This is actually an opportune moment for something to happen with COmmons CLI as there are gumblings again about still having to use CLI 1.0 for Groovy. Current favourite is to switch to a new CLI package that has some energy, i.e. someone is actually working on it :-) Currently mooted to move to are JSAP or JOpt. If however there was a Commons CLI 1.2 and it fixed the bugs we found in the Groovy project that mean that 1.1 is basically broken and unusable, then that would be great. Shifting a version of a package is easier than shifting packages. I don't see why not for a 1.2 release that fixed the bugs. All I got from the previous problems was that unfortunately .hasArg had to be changed to .hasArgs, so more test cases for the problems would be great. I was focused on JIRA issues rather than the mailing list archives though. Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: About commons codec ver 1.1 and export control rules
On Mon, May 19, 2008 at 9:35 AM, Niall Pemberton [EMAIL PROTECTED] wrote: On Mon, May 19, 2008 at 3:15 PM, Trevisson Cristina [EMAIL PROTECTED] wrote: Dear All, Would you be so kind to help me in answering the following question ? Does common codec ver 1.1 contain symmetric cryptographic algorithms employing a key length in excess of 56 bits or an asymmetric algorithm ? In general is there any document that gives the export control classification for Commons Codec ? There is documentation on this for the whole ASF here: http://www.apache.org/licenses/exports/ Theres an Apache Commons section - and as Codec is not listed there then AFAIK that means there is no cryptographic functionality in Codec. Right - Codec has wrapper code for one way hash algorithms (sha1/md5 digests), but not to encryption algorithms. Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [cli2] Negative number arguments seen as options
Release it? :) CLI1 and CLI2 are already basically different parsers and living in the same site. If you want the Avalon one out there, go for it and I don't see any reason why it can't be on the same site. Hen On Wed, May 21, 2008 at 3:11 AM, sebb [EMAIL PROTECTED] wrote: Dare I say it: this used to be a problem for the Avalon CLI package used by JMeter, but it was fixed a long time ago. [The parser is very different so I doubt the fix would apply to CLI2] The Avalon CLI was added to SVN some while ago; it would be nice if it could be released ;-) On 21/05/2008, James Carman [EMAIL PROTECTED] wrote: FYI: https://issues.apache.org/jira/browse/CLI-150 On Tue, May 20, 2008 at 11:22 PM, James Carman [EMAIL PROTECTED] wrote: What type of parser are you using? On Tue, May 20, 2008 at 10:51 PM, Roland Roberts [EMAIL PROTECTED] wrote: James Carman wrote: Why the leading space inside the quote? The first part of the answer was and is NO. Quoting does not help. Single quotes, double quotes, backslashes, nada, nothing, zip, zilch, no effect. The second part of the answer was IF I DO and put the quote at the beginning, then the parser does not consider it to be an option, but it fails to convert to an integer. Quoting doesn't help. roland On Tue, May 20, 2008 at 5:51 PM, Roland Roberts [EMAIL PROTECTED] wrote: James Carman wrote: Can you quote it? No. If I do foo --value -2 it works but then 'new Integer( -2) throws NumberException; it doesn't like leading spaces. -- PGP Key ID: 66 BC 3B CD Roland B. Roberts, PhD RL Enterprises [EMAIL PROTECTED]6818 Madeline Court [EMAIL PROTECTED] Brooklyn, NY 11220 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: which commons codec converts space to %20?
Cheesy is how we earn our wages :) I had a quick play at adding it to Codec. The simplest method seems to me to be to add a subclass, as making it an option on URLCodec doesn't feel very clean due to the bitset being static. package org.apache.commons.codec.net; import java.util.BitSet; public class NoPlusURLCodec extends URLCodec { protected BitSet NO_PLUS_WWW_FORM_URL; public NoPlusURLCodec() { super(); cloneBitSet(); } public NoPlusURLCodec(String charset) { super(charset); cloneBitSet(); } private void cloneBitSet() { NO_PLUS_WWW_FORM_URL = WWW_FORM_URL.clone(); NO_PLUS_WWW_FORM_URL.clear(' '); } public byte[] encode(byte[] bytes) { return encodeUrl(NO_PLUS_WWW_FORM_URL, bytes); } } Completely untested/uncompiled etc - it looks like removing the space char from the bitset will turn off the feature. Probably not worth the effort of bothering with given you can do the replace. Hen On Wed, May 7, 2008 at 2:05 PM, Jim the Standing Bear [EMAIL PROTECTED] wrote: Thanks Henri. It sounds like what I have to do after all. I was trying to avoid this - not because it is difficult, but just sort of cheesy if you know what I mean On Wed, May 7, 2008 at 3:29 PM, Henri Yandell [EMAIL PROTECTED] wrote: It probably needs to be an option added to the URLEncoder class. I doubt there's anything that does this for you right now. For now - I would recommend that you use a search and replace on the output of URLEncoder to change the + to %20. Hen On Mon, May 5, 2008 at 9:23 PM, Jim the Standing Bear [EMAIL PROTECTED] wrote: hello, I am always under the impression that URL encoding converts spaces to %20, and only to find out the URLEncoder from both commons-codec and java converts spaces to + signs. So the question is, which codec converts spaces to %20? I am working on a piece of code that allows users to download some files, and if the spaces in the filenames are converted to + signs, then firefox automatically chops off everything from the first + to the end. So I would like to convert them to %20 instead, but not sure which code actually does that. Thanks. - Jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Standing Bear Has Spoken -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: which commons codec converts space to %20?
It probably needs to be an option added to the URLEncoder class. I doubt there's anything that does this for you right now. For now - I would recommend that you use a search and replace on the output of URLEncoder to change the + to %20. Hen On Mon, May 5, 2008 at 9:23 PM, Jim the Standing Bear [EMAIL PROTECTED] wrote: hello, I am always under the impression that URL encoding converts spaces to %20, and only to find out the URLEncoder from both commons-codec and java converts spaces to + signs. So the question is, which codec converts spaces to %20? I am working on a piece of code that allows users to download some files, and if the spaces in the filenames are converted to + signs, then firefox automatically chops off everything from the first + to the end. So I would like to convert them to %20 instead, but not sure which code actually does that. Thanks. - Jim - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [LANG] Add DateUtils.ceiling methods
Makes sense. A JIRA issue with a patch will get committed quickly enough :) Hen On Wed, Apr 16, 2008 at 9:30 AM, Travis Reeder [EMAIL PROTECTED] wrote: It would be nice to have a DateUtils.ceiling methods which would be the opposite of truncate (which is equivalent to floor) DateUtils.ceiling(Date d, int field); For example, if you had the datetime of 28 Mar 2002 13:45:01.231, if you passed with HOUR, it would return 28 Mar 2002 13:59:59.999. If this was passed with MONTH, it would return 31 Mar 2002 23:59:59.999. I find myself needing doing this manually a lot. Travis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Jelly] how is the Jelly development status?
On Fri, Mar 14, 2008 at 1:26 AM, T. H. Lin [EMAIL PROTECTED] wrote: from the website I can see only release 1.0 (from year 2005) On JIRA there are another release 1.0.1 or even 1.1 in plan. but I can not find out the time line. I don't think there's much going on. Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [FileUpload] extra FileSizeLimitExceededException metadata
Seems extremely doable. I recommend you open up a JIRA item: http://issues.apache.org/jira/browse/FILEUPLOAD That way it'll get on the list for the next version etc. Hen On Sun, Mar 9, 2008 at 7:17 AM, bob [EMAIL PROTECTED] wrote: Hi all, Would it be possible to add the file and field name to the FileSizeLimitExceededException as properties? This would really help with error messaging especially localization. Currently we have to parse the error message for the field name while the file name is not available from the message. kind regards bob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: No javadoc or source downloads
On Sun, Mar 2, 2008 at 1:39 PM, Dennis Lundberg [EMAIL PROTECTED] wrote: sebb wrote: On 02/03/2008, Oliver Heger [EMAIL PROTECTED] wrote: Dennis Lundberg schrieb: Parks, Bill (CDC/CCHIS/NCPHI) wrote: Please add javadoc and source downloads for version 1.5. The files on the ibiblio site are corrupt. You might want to contact ibiblio about that. All Apache artifacts are deployed to the central repository, ibiblio is just a mirror of that. I found the files you are looking for at this address and they work fine: http://repo1.maven.org/maven2/commons-configuration/commons-configuration/1.5/ Something strange seems to be going on here. As Dennis pointed out the jars are available in the central maven2 repository. In the maven1 repository [1] they are listed, but cannot be accessed (404 not found). The release was maven1-based, and according to the release guidelines the artifacts were copied to the ibiblio rsync directory - where they obviously still are. No idea why they cannot be accessed any more. Could it be the same cause as: http://jira.codehaus.org/browse/MEV-572 i.e. rewrite rule problems? That seems to be the case. Here's the rewritten URL that I get when clicking on the javadoc jar: /maven2/commons-configuration/commons-configuration/1.5-javadoc/commons-configuration-1.5-javadoc.jar The real file is at: /maven2/commons-configuration/commons-configuration/1.5/commons-configuration-1.5-javadoc.javadoc.jar Two error in there: - The classifier -javadoc is added to the version directory. - The actual file has a strange name with an extra .javadoc near the end. It's the same issue as: http://jira.codehaus.org/browse/MEV-524 At least for the javadoc. I deployed javadoc for all components a while back, but it got mis-synced for some reason. I've a script on the repository that could fix it [didn't have the guts to try it out live] and I stopped volunteering as a repository admin. Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Commons-lang:DurationFormatUtils]how to use letter m in format
On Fri, Feb 29, 2008 at 2:22 AM, liumin HU [EMAIL PROTECTED] wrote: hi, I want to format the duration like 3h53m, but i cant use the 'm' in the pattern. How should i do? Why can't you use the 'm' in the pattern? Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Commands.Lang] StringEscapeUtils failed with the nbsp
Exactly how are you testing it? Bear in mind, that a unicode nbsp is not the same as a HTML nbsp, so it won't necessarily appear properly in a browser (at a guess, it will if you set the content type to unicode). Hen On 9/20/07, maomaode [EMAIL PROTECTED] wrote: Hi, Thanks for the reply, I think my platform is ok, i tried on browser, it works. I'm testing on windows vista, with jdk6, lang version is the latest. I'll test on windows 2000 later, see if I can re-produce. It works on your platform? Can you help me try on your platform? Thanks in advance, James On 9/20/07, James Mao [EMAIL PROTECTED] wrote: Hi, It seems that StringEscapeUtils.unescapeHtml(#160;) will get ??, not a space, is it a known issue? 160 isn't a space, it's an nbsp which is a different character. I suspect the issue is that your console/font/whatever is not able to display it and so shows a ??. Sound possible? Hen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]