<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>issues@commons.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/commons-issues/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/commons-issues/"/>
<id>http://mail-archives.apache.org/mod_mbox/commons-issues/</id>
<updated>2009-12-05T20:25:46Z</updated>
<entry>
<title>[jira] Commented: (MATH-321) Support for Sparse (Thin) SVD</title>
<author><name>&quot;Jake Mannix (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c420824330.1259971040642.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c420824330-1259971040642-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T23:57:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/MATH-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12786250#action_12786250
] 

Jake Mannix commented on MATH-321:
----------------------------------

I'm in the process of porting my sparse SVD work from decomposer (http://decomposer.googlecode.com)
to Apache Mahout (see ticket MAHOUT-180 on the mahout JIRA), which has both non-parallized
stream-based sparse SVD (using the generalized hebbian algorithm) as well as Hadoopified Lanczos
and probabalistic partial decomposition.  These are designed to scale to tens of millions
of dimensions (the GHA version), and to billions of dimensions or more (in the Hadoopified
version - add more machines to your Hadoop cluster, and you can go higher!).

&gt; Support for Sparse (Thin) SVD
&gt; -----------------------------
&gt;
&gt;                 Key: MATH-321
&gt;                 URL: https://issues.apache.org/jira/browse/MATH-321
&gt;             Project: Commons Math
&gt;          Issue Type: New Feature
&gt;            Reporter: David Jurgens
&gt;
&gt; Current the SingularValueDecomposition implementation computes the full SVD.  However,
for some applications, e.g. LSA, vision applications, only the most significant singular values
are needed.  For these applications, the full decomposition is impractical, and for large
matrices, computationally infeasible.   The sparse SVD avoids computing the unnecessary data,
and more importantly, has significantly lower computational complexity, which allows it to
scale to larger matrices.
&gt; Other linear algebra implementation have support for the sparse svd.  Both Matlab and
Octave have the svds function.  C has SVDLIBC.  SVDPACK is also available in Fortran and C.
 However, after extensive searching, I do not believe there is any existing Java-based sparse
SVD implementation.  This added functionality would be widely used for any pure Java application
that requires a sparse SVD, as the only current solution is to call out to a library in another
language.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (MATH-321) Support for Sparse (Thin) SVD</title>
<author><name>&quot;David Jurgens (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c76628109.1259968280809.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c76628109-1259968280809-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T23:11:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Support for Sparse (Thin) SVD
-----------------------------

                 Key: MATH-321
                 URL: https://issues.apache.org/jira/browse/MATH-321
             Project: Commons Math
          Issue Type: New Feature
            Reporter: David Jurgens


Current the SingularValueDecomposition implementation computes the full SVD.  However, for
some applications, e.g. LSA, vision applications, only the most significant singular values
are needed.  For these applications, the full decomposition is impractical, and for large
matrices, computationally infeasible.   The sparse SVD avoids computing the unnecessary data,
and more importantly, has significantly lower computational complexity, which allows it to
scale to larger matrices.

Other linear algebra implementation have support for the sparse svd.  Both Matlab and Octave
have the svds function.  C has SVDLIBC.  SVDPACK is also available in Fortran and C.  However,
after extensive searching, I do not believe there is any existing Java-based sparse SVD implementation.
 This added functionality would be widely used for any pure Java application that requires
a sparse SVD, as the only current solution is to call out to a library in another language.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (CODEC-95) Base64: optionally allow strict parsing of base64 strings</title>
<author><name>&quot;Adam Rabung (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c1105099001.1259961321776.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1105099001-1259961321776-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T21:15:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/CODEC-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12786172#action_12786172
] 

Adam Rabung commented on CODEC-95:
----------------------------------

Doh, my patch should have been 1.5 compatible (not chaining IOException), and DefaultIllegalEncodingCharacterPolicy
should allow ASCII 13 and 10.

&gt; Base64: optionally allow strict parsing of base64 strings
&gt; ---------------------------------------------------------
&gt;
&gt;                 Key: CODEC-95
&gt;                 URL: https://issues.apache.org/jira/browse/CODEC-95
&gt;             Project: Commons Codec
&gt;          Issue Type: Improvement
&gt;    Affects Versions: 1.4
&gt;            Reporter: Adam Rabung
&gt;            Priority: Minor
&gt;         Attachments: strictMode.zip
&gt;
&gt;
&gt; Currently, Codec skips base64 characters that are outside of the encode table.  I realize
this is perfectly to spec, but I wonder if other users might appreciate a "strict" mode that
throws an exception when one of these illegal characters are encountered.  For example, I
would love an exception to be thrown here:
&gt; new Base64().decode("!@#$ iHaveIllegalCharsAtBeginningAndEnd %^&amp;"));

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Updated: (CODEC-95) Base64: optionally allow strict parsing of base64 strings</title>
<author><name>&quot;Adam Rabung (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c949246615.1259948420778.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c949246615-1259948420778-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T17:40:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

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

Adam Rabung updated CODEC-95:
-----------------------------

    Attachment: strictMode.zip

Not sure how much this will really help, as I don't know much about the base 64 spec or Apache
coding guidelines (adding checked exceptions to existing methods?), but it's a start.

&gt; Base64: optionally allow strict parsing of base64 strings
&gt; ---------------------------------------------------------
&gt;
&gt;                 Key: CODEC-95
&gt;                 URL: https://issues.apache.org/jira/browse/CODEC-95
&gt;             Project: Commons Codec
&gt;          Issue Type: Improvement
&gt;    Affects Versions: 1.4
&gt;            Reporter: Adam Rabung
&gt;            Priority: Minor
&gt;         Attachments: strictMode.zip
&gt;
&gt;
&gt; Currently, Codec skips base64 characters that are outside of the encode table.  I realize
this is perfectly to spec, but I wonder if other users might appreciate a "strict" mode that
throws an exception when one of these illegal characters are encountered.  For example, I
would love an exception to be thrown here:
&gt; new Base64().decode("!@#$ iHaveIllegalCharsAtBeginningAndEnd %^&amp;"));

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (CODEC-95) Base64: optionally allow strict parsing of base64 strings</title>
<author><name>&quot;Adam Rabung (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c580178671.1259948420706.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c580178671-1259948420706-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T17:40:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Base64: optionally allow strict parsing of base64 strings
---------------------------------------------------------

                 Key: CODEC-95
                 URL: https://issues.apache.org/jira/browse/CODEC-95
             Project: Commons Codec
          Issue Type: Improvement
    Affects Versions: 1.4
            Reporter: Adam Rabung
            Priority: Minor
         Attachments: strictMode.zip

Currently, Codec skips base64 characters that are outside of the encode table.  I realize
this is perfectly to spec, but I wonder if other users might appreciate a "strict" mode that
throws an exception when one of these illegal characters are encountered.  For example, I
would love an exception to be thrown here:
new Base64().decode("!@#$ iHaveIllegalCharsAtBeginningAndEnd %^&amp;"));


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (NET-303) FTP: FTPFileEntryParser API samples are wrong</title>
<author><name>=?utf-8?Q?J=C3=BCrgen_Weber_=28JIRA=29?= &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c443576573.1259922260711.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c443576573-1259922260711-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T10:24:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
FTP: FTPFileEntryParser API samples are wrong
---------------------------------------------

                 Key: NET-303
                 URL: https://issues.apache.org/jira/browse/NET-303
             Project: Commons Net
          Issue Type: Bug
            Reporter: Jürgen Weber


The samples in the FTPFileEntryParser API doc use non-existent methods

FTPClient.createFileList(directory, parser);

FTPClient.FTPFile[] files = f.listFiles(parser, ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Updated: (NET-302) FTP: initiateListParsing should not cache entryParser</title>
<author><name>=?utf-8?Q?J=C3=BCrgen_Weber_=28JIRA=29?= &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c1377526476.1259922140795.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1377526476-1259922140795-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T10:22:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

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

Jürgen Weber updated NET-302:
-----------------------------

    Summary: FTP: initiateListParsing should not cache entryParser  (was: initiateListParsing
should not cache entryParser)

&gt; FTP: initiateListParsing should not cache entryParser
&gt; -----------------------------------------------------
&gt;
&gt;                 Key: NET-302
&gt;                 URL: https://issues.apache.org/jira/browse/NET-302
&gt;             Project: Commons Net
&gt;          Issue Type: Bug
&gt;    Affects Versions: 2.0
&gt;         Environment: z/OS based ftp server
&gt;            Reporter: Jürgen Weber
&gt;
&gt; if you use initiateListParsing with a  FTPFileEntryParser  this code can fail:
&gt; FTPClient.listFiles()
&gt; ftp.initiateListParsing(parserKey, ...
&gt; It seems that the listFiles() already set a parser, that gets cached and the parser in
the initiateListParsing gets ignored.
&gt; For z/OS you can use ftp for file transfer and for submitting jobs, in the second case
you'd want another parser than for the first call.
&gt; c.f. http://www.ibm.com/developerworks/systems/library/es-zosbatchjavav/index.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (NET-302) initiateListParsing should not cache entryParser</title>
<author><name>=?utf-8?Q?J=C3=BCrgen_Weber_=28JIRA=29?= &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c63679685.1259921600608.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c63679685-1259921600608-JavaMail-jira@brutus%3e</id>
<updated>2009-12-04T10:13:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
initiateListParsing should not cache entryParser
------------------------------------------------

                 Key: NET-302
                 URL: https://issues.apache.org/jira/browse/NET-302
             Project: Commons Net
          Issue Type: Bug
    Affects Versions: 2.0
         Environment: z/OS based ftp server
            Reporter: Jürgen Weber


if you use initiateListParsing with a  FTPFileEntryParser  this code can fail:

FTPClient.listFiles()

ftp.initiateListParsing(parserKey, ...

It seems that the listFiles() already set a parser, that gets cached and the parser in the
initiateListParsing gets ignored.

For z/OS you can use ftp for file transfer and for submitting jobs, in the second case you'd
want another parser than for the first call.
c.f. http://www.ibm.com/developerworks/systems/library/es-zosbatchjavav/index.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (CODEC-94) unexpected CRLF at end of base64 encoded string</title>
<author><name>=?utf-8?Q?Lorenzo_Ingrill=C3=AC_=28JIRA=29?= &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c360085071.1259883021263.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c360085071-1259883021263-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T23:30:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/CODEC-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12785630#action_12785630
] 

Lorenzo Ingrillì commented on CODEC-94:
---------------------------------------

Static method Base64.encodeBase64() seems work correctly, so now i'm using it instead the
instance method encode()

this code work as expected:

{code:title=Test2.java}
import org.apache.commons.codec.binary.Base64;

public class Test2 {
	public static void main(String args[]) throws Exception {

		byte[] input = new byte[] {
				25, 109, -39, -23, 82, -47, -88, 115, 
				-34, 126, -57, 16, -110, -110, 60, -7, 
				-123, -3, 60, 91, 112, -93, -67, -65, -71,
				-107, 123, -15, -106, 86, -80, 79
		};

		// wrong behaviour:
		// Base64 b64 = new Base64(64);
		// String output = new String(b64.encode(input));

		// correct behaviour:
		String output = new String(Base64.encodeBase64(input));
		
		System.out.println("*"+output+"*");
	}
}
{code}

&gt; unexpected CRLF at end of base64 encoded string
&gt; -----------------------------------------------
&gt;
&gt;                 Key: CODEC-94
&gt;                 URL: https://issues.apache.org/jira/browse/CODEC-94
&gt;             Project: Commons Codec
&gt;          Issue Type: Bug
&gt;    Affects Versions: 1.4
&gt;         Environment: java 1.6u17
&gt; ubuntu linux 9.10
&gt;            Reporter: Lorenzo Ingrillì
&gt;
&gt; Sometimes, a base64 encoded string ends inappropriately with \r\n characters.
&gt; In the example below, i used value 64 as line lenght and the generated base64 string
lenght was 44; nevertheless string ends with CRLF .
&gt; (i think, this bug is not related to bug #CODEC-89)
&gt; How to reproduce:
&gt; {code:title=Test.java|borderStyle=solid}
&gt; public class Test {
&gt; 	public static void main(String args[]) throws Exception {
&gt; 		byte[] input = new byte[] {
&gt; 				25, 109, -39, -23, 82, -47, -88, 115, 
&gt; 				-34, 126, -57, 16, -110, -110, 60, -7, 
&gt; 				-123, -3, 60, 91, 112, -93, -67, -65, -71,
&gt; 				-107, 123, -15, -106, 86, -80, 79
&gt; 		};
&gt; 		Base64 b64 = new Base64(64);
&gt; 		String output = new String(b64.encode(input));
&gt; 		System.out.println("*"+output+"*");
&gt; 	}
&gt; }
&gt; {code}
&gt; the output was: GW3Z6VLRqHPefscQkpI8+YX9PFtwo72/uZV78ZZWsE8=\r\n

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Updated: (COMMONSSITE-46) Multi-module projects fail when using the &quot;rc&quot; profile in commons-parent</title>
<author><name>&quot;Niall Pemberton (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c1739097992.1259882540987.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1739097992-1259882540987-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T23:22:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

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

Niall Pemberton updated COMMONSSITE-46:
---------------------------------------

    Attachment: commons-parent-pom.patch

&gt; Multi-module projects fail when using the "rc" profile in commons-parent
&gt; ------------------------------------------------------------------------
&gt;
&gt;                 Key: COMMONSSITE-46
&gt;                 URL: https://issues.apache.org/jira/browse/COMMONSSITE-46
&gt;             Project: Commons All
&gt;          Issue Type: Bug
&gt;          Components: Commons Parent Pom
&gt;            Reporter: Niall Pemberton
&gt;         Attachments: commons-parent-pom.patch
&gt;
&gt;
&gt; The "rc" profile doesn't current work with multi-module projects (when the project has
not been previously installed in your local repo for the current version)
&gt; For example running the following command on JCI
&gt; {code}
&gt;     mvn -Prc clean install
&gt; {code}
&gt; fails with the following error:
&gt; {code}
&gt; [INFO] ------------------------------------------------------------------------
&gt; [ERROR] BUILD ERROR
&gt; [INFO] ------------------------------------------------------------------------
&gt; [INFO] Error during page generation
&gt; Embedded error: Error rendering Maven report: Missing:
&gt; ----------
&gt; 1) org.apache.commons:commons-jci-core:jar:1.1-SNAPSHOT
&gt; ...
&gt; {code}
&gt; I found this is caused by trying to run the site plugin in the "rc" profile:
&gt; {code}
&gt;           &lt;plugin&gt;
&gt;             &lt;artifactId&gt;maven-site-plugin&lt;/artifactId&gt;
&gt;             &lt;executions&gt;
&gt;               &lt;execution&gt;
&gt;                 &lt;goals&gt;
&gt;                   &lt;goal&gt;site&lt;/goal&gt;
&gt;                 &lt;/goals&gt;
&gt;                 &lt;phase&gt;package&lt;/phase&gt;
&gt;               &lt;/execution&gt;
&gt;             &lt;/executions&gt;
&gt;           &lt;/plugin&gt;
&gt; {code}
&gt; The intention of the above was so that when the assembly plugin ran to create the binary
distros then the site would be available to include in the distro. AFAIK we are now only shipping
javadocs in the binary distros and not any component sites. So I plan to remove the site plugin
from the "rc" profile and add a "javadoc" goal in the javadoc plugin in the "rc" profile.
This resolves the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (COMMONSSITE-46) Multi-module projects fail when using the &quot;rc&quot; profile in commons-parent</title>
<author><name>&quot;Niall Pemberton (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c910334652.1259882300761.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c910334652-1259882300761-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T23:18:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Multi-module projects fail when using the "rc" profile in commons-parent
------------------------------------------------------------------------

                 Key: COMMONSSITE-46
                 URL: https://issues.apache.org/jira/browse/COMMONSSITE-46
             Project: Commons All
          Issue Type: Bug
          Components: Commons Parent Pom
            Reporter: Niall Pemberton


The "rc" profile doesn't current work with multi-module projects (when the project has not
been previously installed in your local repo for the current version)

For example running the following command on JCI

{code}
    mvn -Prc clean install
{code}

fails with the following error:

{code}
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error during page generation

Embedded error: Error rendering Maven report: Missing:
----------
1) org.apache.commons:commons-jci-core:jar:1.1-SNAPSHOT
...
{code}

I found this is caused by trying to run the site plugin in the "rc" profile:
{code}
          &lt;plugin&gt;
            &lt;artifactId&gt;maven-site-plugin&lt;/artifactId&gt;
            &lt;executions&gt;
              &lt;execution&gt;
                &lt;goals&gt;
                  &lt;goal&gt;site&lt;/goal&gt;
                &lt;/goals&gt;
                &lt;phase&gt;package&lt;/phase&gt;
              &lt;/execution&gt;
            &lt;/executions&gt;
          &lt;/plugin&gt;
{code}

The intention of the above was so that when the assembly plugin ran to create the binary distros
then the site would be available to include in the distro. AFAIK we are now only shipping
javadocs in the binary distros and not any component sites. So I plan to remove the site plugin
from the "rc" profile and add a "javadoc" goal in the javadoc plugin in the "rc" profile.
This resolves the issue.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (COMPRESS-92) ZipFile.getEntries() should be generified.</title>
<author><name>&quot;Christian Grobmeier (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c1520721487.1259879180850.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1520721487-1259879180850-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T22:26:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/COMPRESS-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12785575#action_12785575
] 

Christian Grobmeier commented on COMPRESS-92:
---------------------------------------------

Until now compress was meant for working with java prior version 5.


&gt; ZipFile.getEntries() should be generified.
&gt; ------------------------------------------
&gt;
&gt;                 Key: COMPRESS-92
&gt;                 URL: https://issues.apache.org/jira/browse/COMPRESS-92
&gt;             Project: Commons Compress
&gt;          Issue Type: Improvement
&gt;    Affects Versions: 1.0
&gt;            Reporter: Sean Cote
&gt;            Priority: Minor
&gt;
&gt; Right now, ZipFile.getEntries() simply returns Enumeration, but it should return Enumeration&lt;?
extends ZipArchiveEntry&gt; so that callers don't have to cast the results, much like java.util.zip.ZipFile.entries().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (IO-224) IOUtils.closeQuietly() should take a Closeable as a parameter.</title>
<author><name>&quot;Paul Benedict (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c914624195.1259877860993.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c914624195-1259877860993-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T22:04:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/IO-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12785562#action_12785562
] 

Paul Benedict commented on IO-224:
----------------------------------

Great idea, Sean. The other methods could then be deprecated in 1.5. (The others shouldn't
be removed until a 2.0 release because it would break binary compatibility.)

&gt; IOUtils.closeQuietly() should take a Closeable as a parameter.
&gt; --------------------------------------------------------------
&gt;
&gt;                 Key: IO-224
&gt;                 URL: https://issues.apache.org/jira/browse/IO-224
&gt;             Project: Commons IO
&gt;          Issue Type: Improvement
&gt;          Components: Utilities
&gt;    Affects Versions: 1.4
&gt;            Reporter: Sean Cote
&gt;            Priority: Minor
&gt;
&gt; Right now, there are several IOUtils.closeQuietly methods that take things like InputStream,
OutputStream, Reader, Writer, but why not simply have one IOUtils.closeQuietly method which
takes a Closeable? It seems like this would simplify things and also enhance the usability
of the function.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (CODEC-94) unexpected CRLF at end of base64 encoded string</title>
<author><name>&quot;Julius Davies (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c236601970.1259877740719.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c236601970-1259877740719-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T22:02:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/CODEC-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12785557#action_12785557
] 

Julius Davies commented on CODEC-94:
------------------------------------

Just making sure this isn't a regression.  Here's what I found:

- The only way to chunk the encoding in commons-codec-1.3 is via this static method:

{code}
// 76 character chunking is hard-coded.
// 64 character chunking is not possible!
Base64.encodeBase64Chunked( byte[] data );
{code}


- commons-codec-1.3 appends a final CRLF no matter what when using "chunked" mode:

[YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==
]

[YWFhYWFhYWFhYQ==
]

[YQ==
]



Question for Lorenzo:  how would you feel about just calling new String().trim() yourself?

A direct byte[] trim is also possible.  Involves some System.arraycopy().  Maybe commons-codec
could even offer up such a method ( bytesTrim() ).




&gt; unexpected CRLF at end of base64 encoded string
&gt; -----------------------------------------------
&gt;
&gt;                 Key: CODEC-94
&gt;                 URL: https://issues.apache.org/jira/browse/CODEC-94
&gt;             Project: Commons Codec
&gt;          Issue Type: Bug
&gt;    Affects Versions: 1.4
&gt;         Environment: java 1.6u17
&gt; ubuntu linux 9.10
&gt;            Reporter: Lorenzo Ingrillì
&gt;
&gt; Sometimes, a base64 encoded string ends inappropriately with \r\n characters.
&gt; In the example below, i used value 64 as line lenght and the generated base64 string
lenght was 44; nevertheless string ends with CRLF .
&gt; (i think, this bug is not related to bug #CODEC-89)
&gt; How to reproduce:
&gt; {code:title=Test.java|borderStyle=solid}
&gt; public class Test {
&gt; 	public static void main(String args[]) throws Exception {
&gt; 		byte[] input = new byte[] {
&gt; 				25, 109, -39, -23, 82, -47, -88, 115, 
&gt; 				-34, 126, -57, 16, -110, -110, 60, -7, 
&gt; 				-123, -3, 60, 91, 112, -93, -67, -65, -71,
&gt; 				-107, 123, -15, -106, 86, -80, 79
&gt; 		};
&gt; 		Base64 b64 = new Base64(64);
&gt; 		String output = new String(b64.encode(input));
&gt; 		System.out.println("*"+output+"*");
&gt; 	}
&gt; }
&gt; {code}
&gt; the output was: GW3Z6VLRqHPefscQkpI8+YX9PFtwo72/uZV78ZZWsE8=\r\n

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (CODEC-94) unexpected CRLF at end of base64 encoded string</title>
<author><name>&quot;Julius Davies (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c1315328061.1259877740798.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1315328061-1259877740798-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T22:02:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/CODEC-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12785558#action_12785558
] 

Julius Davies commented on CODEC-94:
------------------------------------

ps.  Julius Davies is very relieved that this isn't yet another regression!  Whew!  Yay for
commons-codec-1.3 appending CRLF !

&gt; unexpected CRLF at end of base64 encoded string
&gt; -----------------------------------------------
&gt;
&gt;                 Key: CODEC-94
&gt;                 URL: https://issues.apache.org/jira/browse/CODEC-94
&gt;             Project: Commons Codec
&gt;          Issue Type: Bug
&gt;    Affects Versions: 1.4
&gt;         Environment: java 1.6u17
&gt; ubuntu linux 9.10
&gt;            Reporter: Lorenzo Ingrillì
&gt;
&gt; Sometimes, a base64 encoded string ends inappropriately with \r\n characters.
&gt; In the example below, i used value 64 as line lenght and the generated base64 string
lenght was 44; nevertheless string ends with CRLF .
&gt; (i think, this bug is not related to bug #CODEC-89)
&gt; How to reproduce:
&gt; {code:title=Test.java|borderStyle=solid}
&gt; public class Test {
&gt; 	public static void main(String args[]) throws Exception {
&gt; 		byte[] input = new byte[] {
&gt; 				25, 109, -39, -23, 82, -47, -88, 115, 
&gt; 				-34, 126, -57, 16, -110, -110, 60, -7, 
&gt; 				-123, -3, 60, 91, 112, -93, -67, -65, -71,
&gt; 				-107, 123, -15, -106, 86, -80, 79
&gt; 		};
&gt; 		Base64 b64 = new Base64(64);
&gt; 		String output = new String(b64.encode(input));
&gt; 		System.out.println("*"+output+"*");
&gt; 	}
&gt; }
&gt; {code}
&gt; the output was: GW3Z6VLRqHPefscQkpI8+YX9PFtwo72/uZV78ZZWsE8=\r\n

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (IO-224) IOUtils.closeQuietly() should take a Closeable as a parameter.</title>
<author><name>&quot;Sean Cote (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c1263988501.1259877260771.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1263988501-1259877260771-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T21:54:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
IOUtils.closeQuietly() should take a Closeable as a parameter.
--------------------------------------------------------------

                 Key: IO-224
                 URL: https://issues.apache.org/jira/browse/IO-224
             Project: Commons IO
          Issue Type: Improvement
          Components: Utilities
    Affects Versions: 1.4
            Reporter: Sean Cote
            Priority: Minor


Right now, there are several IOUtils.closeQuietly methods that take things like InputStream,
OutputStream, Reader, Writer, but why not simply have one IOUtils.closeQuietly method which
takes a Closeable? It seems like this would simplify things and also enhance the usability
of the function.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (COMPRESS-92) ZipFile.getEntries() should be generified.</title>
<author><name>&quot;Sean Cote (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c320932370.1259876660786.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c320932370-1259876660786-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T21:44:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
ZipFile.getEntries() should be generified.
------------------------------------------

                 Key: COMPRESS-92
                 URL: https://issues.apache.org/jira/browse/COMPRESS-92
             Project: Commons Compress
          Issue Type: Improvement
    Affects Versions: 1.0
            Reporter: Sean Cote
            Priority: Minor


Right now, ZipFile.getEntries() simply returns Enumeration, but it should return Enumeration&lt;?
extends ZipArchiveEntry&gt; so that callers don't have to cast the results, much like java.util.zip.ZipFile.entries().

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (CODEC-88) Base32 encoder</title>
<author><name>&quot;Gary Gregory (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c38143868.1259865560714.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c38143868-1259865560714-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T18:39:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/CODEC-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12785438#action_12785438
] 

Gary Gregory commented on CODEC-88:
-----------------------------------

The code comment talk about licenses that are not Apache 2.0, so I am not sure if we can use
this as is.

If you want this feature included, we need help with:

- The code must be submitted under the Apache 2.0 license.
- The code must fit in the Commons Codec style/framework/interfaces.
- The code must have unit tests.

&gt; Base32 encoder
&gt; --------------
&gt;
&gt;                 Key: CODEC-88
&gt;                 URL: https://issues.apache.org/jira/browse/CODEC-88
&gt;             Project: Commons Codec
&gt;          Issue Type: New Feature
&gt;    Affects Versions: 1.x
&gt;            Reporter: Eric Olander
&gt;            Priority: Minor
&gt;         Attachments: Base32.java
&gt;
&gt;
&gt; Any chance of getting Base32 encoding support along the lines of the existing Base64
encoder?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Updated: (CODEC-94) unexpected CRLF at end of base64 encoded string</title>
<author><name>=?utf-8?Q?Lorenzo_Ingrill=C3=AC_=28JIRA=29?= &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c736681804.1259859572169.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c736681804-1259859572169-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T16:59:32Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

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

Lorenzo Ingrillì updated CODEC-94:
----------------------------------

    Description: 
Sometimes, a base64 encoded string ends inappropriately with \r\n characters.

In the example below, i used value 64 as line lenght and the generated base64 string lenght
was 44; nevertheless string ends with CRLF .

(i think, this bug is not related to bug #CODEC-89)

How to reproduce:

{code:title=Test.java|borderStyle=solid}
public class Test {
	public static void main(String args[]) throws Exception {

		byte[] input = new byte[] {
				25, 109, -39, -23, 82, -47, -88, 115, 
				-34, 126, -57, 16, -110, -110, 60, -7, 
				-123, -3, 60, 91, 112, -93, -67, -65, -71,
				-107, 123, -15, -106, 86, -80, 79
		};

		Base64 b64 = new Base64(64);
		String output = new String(b64.encode(input));

		System.out.println("*"+output+"*");
	}
}
{code}

the output was: GW3Z6VLRqHPefscQkpI8+YX9PFtwo72/uZV78ZZWsE8=\r\n


  was:
Sometimes, a base64 encoded string ends inappropriately with \r\n characters.

In the example below, i used value 64 as line lenght and the generated base64 string lenght
was 44; nevertheless string ends with CRLF .

(i think, this bug is not related to bug #CODEC-89)

How to reproduce:

public class Test {
	public static void main(String args[]) throws Exception {

		byte[] input = new byte[] {
				25, 109, -39, -23, 82, -47, -88, 115, 
				-34, 126, -57, 16, -110, -110, 60, -7, 
				-123, -3, 60, 91, 112, -93, -67, -65, -71,
				-107, 123, -15, -106, 86, -80, 79
		};

		Base64 b64 = new Base64(64);
		String output = new String(b64.encode(input));

		System.out.println("*"+output+"*");
	}
}

the output was: GW3Z6VLRqHPefscQkpI8+YX9PFtwo72/uZV78ZZWsE8=\r\n



&gt; unexpected CRLF at end of base64 encoded string
&gt; -----------------------------------------------
&gt;
&gt;                 Key: CODEC-94
&gt;                 URL: https://issues.apache.org/jira/browse/CODEC-94
&gt;             Project: Commons Codec
&gt;          Issue Type: Bug
&gt;    Affects Versions: 1.4
&gt;         Environment: java 1.6u17
&gt; ubuntu linux 9.10
&gt;            Reporter: Lorenzo Ingrillì
&gt;
&gt; Sometimes, a base64 encoded string ends inappropriately with \r\n characters.
&gt; In the example below, i used value 64 as line lenght and the generated base64 string
lenght was 44; nevertheless string ends with CRLF .
&gt; (i think, this bug is not related to bug #CODEC-89)
&gt; How to reproduce:
&gt; {code:title=Test.java|borderStyle=solid}
&gt; public class Test {
&gt; 	public static void main(String args[]) throws Exception {
&gt; 		byte[] input = new byte[] {
&gt; 				25, 109, -39, -23, 82, -47, -88, 115, 
&gt; 				-34, 126, -57, 16, -110, -110, 60, -7, 
&gt; 				-123, -3, 60, 91, 112, -93, -67, -65, -71,
&gt; 				-107, 123, -15, -106, 86, -80, 79
&gt; 		};
&gt; 		Base64 b64 = new Base64(64);
&gt; 		String output = new String(b64.encode(input));
&gt; 		System.out.println("*"+output+"*");
&gt; 	}
&gt; }
&gt; {code}
&gt; the output was: GW3Z6VLRqHPefscQkpI8+YX9PFtwo72/uZV78ZZWsE8=\r\n

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (CODEC-94) unexpected CRLF at end of base64 encoded string</title>
<author><name>=?utf-8?Q?Lorenzo_Ingrill=C3=AC_=28JIRA=29?= &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c2103291398.1259859323426.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c2103291398-1259859323426-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T16:55:23Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
unexpected CRLF at end of base64 encoded string
-----------------------------------------------

                 Key: CODEC-94
                 URL: https://issues.apache.org/jira/browse/CODEC-94
             Project: Commons Codec
          Issue Type: Bug
    Affects Versions: 1.4
         Environment: java 1.6u17
ubuntu linux 9.10
            Reporter: Lorenzo Ingrillì


Sometimes, a base64 encoded string ends inappropriately with \r\n characters.

In the example below, i used value 64 as line lenght and the generated base64 string lenght
was 44; nevertheless string ends with CRLF .

(i think, this bug is not related to bug #CODEC-89)

How to reproduce:

public class Test {
	public static void main(String args[]) throws Exception {

		byte[] input = new byte[] {
				25, 109, -39, -23, 82, -47, -88, 115, 
				-34, 126, -57, 16, -110, -110, 60, -7, 
				-123, -3, 60, 91, 112, -93, -67, -65, -71,
				-107, 123, -15, -106, 86, -80, 79
		};

		Base64 b64 = new Base64(64);
		String output = new String(b64.encode(input));

		System.out.println("*"+output+"*");
	}
}

the output was: GW3Z6VLRqHPefscQkpI8+YX9PFtwo72/uZV78ZZWsE8=\r\n


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Updated: (CODEC-88) Base32 encoder</title>
<author><name>&quot;Eric Olander (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c1391449417.1259859205978.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1391449417-1259859205978-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T16:53:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

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

Eric Olander updated CODEC-88:
------------------------------

    Attachment: Base32.java

This is code I ended up using - not sure about licensing issues for just including it as is
into commons-codec.

&gt; Base32 encoder
&gt; --------------
&gt;
&gt;                 Key: CODEC-88
&gt;                 URL: https://issues.apache.org/jira/browse/CODEC-88
&gt;             Project: Commons Codec
&gt;          Issue Type: New Feature
&gt;    Affects Versions: 1.x
&gt;            Reporter: Eric Olander
&gt;            Priority: Minor
&gt;         Attachments: Base32.java
&gt;
&gt;
&gt; Any chance of getting Base32 encoding support along the lines of the existing Base64
encoder?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Updated: (CODEC-89) new Base64().encode() appends a CRLF, and chunks results into 76 character lines</title>
<author><name>&quot;Sebb (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c1619677979.1259804600875.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1619677979-1259804600875-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T01:43:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

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

Sebb updated CODEC-89:
----------------------

    Attachment: Base64.patch

Minimal patch to revert null ctor to 1.3 behaviour.

Note that the tests all still work, so clearly the tests are inadequate.

In fact the tests still work even if the IO Stream files are not patched.

&gt; new Base64().encode() appends a CRLF, and chunks results into 76 character lines
&gt; --------------------------------------------------------------------------------
&gt;
&gt;                 Key: CODEC-89
&gt;                 URL: https://issues.apache.org/jira/browse/CODEC-89
&gt;             Project: Commons Codec
&gt;          Issue Type: Bug
&gt;    Affects Versions: 1.4
&gt;            Reporter: Julius Davies
&gt;         Attachments: Base64.patch, codec-89.patch
&gt;
&gt;
&gt; The instance encode() method (e.g. new Base64().encode()) appends a CRLF.  Actually it's
fully chunking the output into 76 character lines.  Commons-Codec-1.3 did not do this.  The
static Base64.encodeBase64() method behaves the same in both 1.3 and 1.4, so this problem
only affects the instance encode() method.
&gt; {code}
&gt; import org.apache.commons.codec.binary.*;
&gt; public class B64 {
&gt;   public static void main(String[] args) throws Exception {
&gt;     Base64 b64 = new Base64();
&gt;     String s1 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
&gt;     String s2 = "aaaaaaaaaa";
&gt;     String s3 = "a";
&gt;     
&gt;     byte[] b1 = s1.getBytes("UTF-8");
&gt;     byte[] b2 = s2.getBytes("UTF-8");
&gt;     byte[] b3 = s3.getBytes("UTF-8");
&gt;     byte[] result;
&gt;     result = Base64.encodeBase64(b1);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b1);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = Base64.encodeBase64(b2);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b2);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = Base64.encodeBase64(b3);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b3);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;   }
&gt; }
&gt; {code}
&gt; Here's my output:
&gt; {noformat}
&gt; $ java -cp commons-codec-1.3.jar:. B64
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YQ==]
&gt; [YQ==]
&gt; $ java -cp commons-codec-1.4.jar:. B64
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
&gt; YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==
&gt; ]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==
&gt; ]
&gt; [YQ==]
&gt; [YQ==
&gt; ]
&gt; {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (CODEC-89) new Base64().encode() appends a CRLF, and chunks results into 76 character lines</title>
<author><name>&quot;Sebb (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c1595389460.1259803640977.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1595389460-1259803640977-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T01:27:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/CODEC-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12785116#action_12785116
] 

Sebb commented on CODEC-89:
---------------------------

Having second thoughts - although the patch looks OK, it actually changes the behaviour of
*two* constructors:

public Base64()
public Base64(boolean urlSafe)

Since the second ctor is @since 1.4, there is no need to - and therefore we should not - change
its behaviour.

The simplest fix is to change the null ctor to call this(0), and change any code that calls
the null ctor to call Base64(false) instead.

Patch to follow.

&gt; new Base64().encode() appends a CRLF, and chunks results into 76 character lines
&gt; --------------------------------------------------------------------------------
&gt;
&gt;                 Key: CODEC-89
&gt;                 URL: https://issues.apache.org/jira/browse/CODEC-89
&gt;             Project: Commons Codec
&gt;          Issue Type: Bug
&gt;    Affects Versions: 1.4
&gt;            Reporter: Julius Davies
&gt;         Attachments: codec-89.patch
&gt;
&gt;
&gt; The instance encode() method (e.g. new Base64().encode()) appends a CRLF.  Actually it's
fully chunking the output into 76 character lines.  Commons-Codec-1.3 did not do this.  The
static Base64.encodeBase64() method behaves the same in both 1.3 and 1.4, so this problem
only affects the instance encode() method.
&gt; {code}
&gt; import org.apache.commons.codec.binary.*;
&gt; public class B64 {
&gt;   public static void main(String[] args) throws Exception {
&gt;     Base64 b64 = new Base64();
&gt;     String s1 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
&gt;     String s2 = "aaaaaaaaaa";
&gt;     String s3 = "a";
&gt;     
&gt;     byte[] b1 = s1.getBytes("UTF-8");
&gt;     byte[] b2 = s2.getBytes("UTF-8");
&gt;     byte[] b3 = s3.getBytes("UTF-8");
&gt;     byte[] result;
&gt;     result = Base64.encodeBase64(b1);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b1);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = Base64.encodeBase64(b2);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b2);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = Base64.encodeBase64(b3);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b3);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;   }
&gt; }
&gt; {code}
&gt; Here's my output:
&gt; {noformat}
&gt; $ java -cp commons-codec-1.3.jar:. B64
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YQ==]
&gt; [YQ==]
&gt; $ java -cp commons-codec-1.4.jar:. B64
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
&gt; YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==
&gt; ]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==
&gt; ]
&gt; [YQ==]
&gt; [YQ==
&gt; ]
&gt; {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (CODEC-89) new Base64().encode() appends a CRLF, and chunks results into 76 character lines</title>
<author><name>&quot;Sebb (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c144407087.1259802940112.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c144407087-1259802940112-JavaMail-jira@brutus%3e</id>
<updated>2009-12-03T01:15:40Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/CODEC-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12785109#action_12785109
] 

Sebb commented on CODEC-89:
---------------------------

Patch (dated 2009-10-28 04:52 PM) looks OK, except I think it looks odd to do:

this(NO_CHUNKING, CHUNK_SEPARATOR, urlSafe);

Why provide a CHUNK_SEPARATOR if there's no chunking?

Seems to me it would be better to use null, and make corresponding changes to the ctor 
Base64(int lineLength, byte[] lineSeparator, boolean urlSafe)
so that lineSeparator == null IFF lineLength==0
This would have the benefit that accidental use of the lineSeparator would trigger an NPE.

The current code outside the ctor only accesses lineSeparator if lineLength &gt; 0, which
is as it should be.

&gt; new Base64().encode() appends a CRLF, and chunks results into 76 character lines
&gt; --------------------------------------------------------------------------------
&gt;
&gt;                 Key: CODEC-89
&gt;                 URL: https://issues.apache.org/jira/browse/CODEC-89
&gt;             Project: Commons Codec
&gt;          Issue Type: Bug
&gt;    Affects Versions: 1.4
&gt;            Reporter: Julius Davies
&gt;         Attachments: codec-89.patch
&gt;
&gt;
&gt; The instance encode() method (e.g. new Base64().encode()) appends a CRLF.  Actually it's
fully chunking the output into 76 character lines.  Commons-Codec-1.3 did not do this.  The
static Base64.encodeBase64() method behaves the same in both 1.3 and 1.4, so this problem
only affects the instance encode() method.
&gt; {code}
&gt; import org.apache.commons.codec.binary.*;
&gt; public class B64 {
&gt;   public static void main(String[] args) throws Exception {
&gt;     Base64 b64 = new Base64();
&gt;     String s1 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
&gt;     String s2 = "aaaaaaaaaa";
&gt;     String s3 = "a";
&gt;     
&gt;     byte[] b1 = s1.getBytes("UTF-8");
&gt;     byte[] b2 = s2.getBytes("UTF-8");
&gt;     byte[] b3 = s3.getBytes("UTF-8");
&gt;     byte[] result;
&gt;     result = Base64.encodeBase64(b1);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b1);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = Base64.encodeBase64(b2);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b2);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = Base64.encodeBase64(b3);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b3);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;   }
&gt; }
&gt; {code}
&gt; Here's my output:
&gt; {noformat}
&gt; $ java -cp commons-codec-1.3.jar:. B64
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YQ==]
&gt; [YQ==]
&gt; $ java -cp commons-codec-1.4.jar:. B64
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
&gt; YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==
&gt; ]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==
&gt; ]
&gt; [YQ==]
&gt; [YQ==
&gt; ]
&gt; {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Updated: (LANG-560) New TimedSemaphore class</title>
<author><name>&quot;Oliver Heger (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c278012074.1259786781338.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c278012074-1259786781338-JavaMail-jira@brutus%3e</id>
<updated>2009-12-02T20:46:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

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

Oliver Heger updated LANG-560:
------------------------------

    Attachment: TimedSemaphore.patch

Patch including the {{TimedSemaphore}} implementation and a unit test.

The test makes use of EasyMock, therefore this dependency is added to the pom.

&gt; New TimedSemaphore class
&gt; ------------------------
&gt;
&gt;                 Key: LANG-560
&gt;                 URL: https://issues.apache.org/jira/browse/LANG-560
&gt;             Project: Commons Lang
&gt;          Issue Type: New Feature
&gt;            Reporter: Oliver Heger
&gt;             Fix For: 3.0
&gt;
&gt;         Attachments: TimedSemaphore.patch
&gt;
&gt;
&gt; {{TimedSemaphore}} is a specialized Semaphore implementation that also has a timing component:
In a configurable time period a given number of permits is available. Threads call the semaphore's
{{acquire()}} method to request a permit. When no more permits are available {{acquire()}}
blocks the calling thread. At the end of the time period the permits are restored, and all
blocking threads are waked up.
&gt; The main use case for this class is to provide a convenient means for controlling the
load produced by a process. When used correctly, {{TimedSemaphore}} ensures that only a given
number of steps (e.g. database queries, file operations, or computations) are performed in
a specific time period. This may be useful for many applications.
&gt; More information including a usage example can be found in the Javadocs of the class.
Comments or suggestions for improvements are appreciated.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (CODEC-93) Add test(s) to check that encodeBase64() does not chunk output</title>
<author><name>&quot;Sebb (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c1012386806.1259786781324.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1012386806-1259786781324-JavaMail-jira@brutus%3e</id>
<updated>2009-12-02T20:46:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Add test(s) to check that encodeBase64() does not chunk output
--------------------------------------------------------------

                 Key: CODEC-93
                 URL: https://issues.apache.org/jira/browse/CODEC-93
             Project: Commons Codec
          Issue Type: Sub-task
    Affects Versions: 1.4
            Reporter: Sebb


There don't appear to be any tests to specifically check that encodeBase64(byte[]) does not
chunk output.

Also, there don't seem to be any direct tests of the following static method:

encodeBase64(byte[] binaryData, boolean isChunked, boolean urlSafe)

There are not many of some of the other static methods either.





-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (LANG-560) New TimedSemaphore class</title>
<author><name>&quot;Oliver Heger (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c122754718.1259786661825.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c122754718-1259786661825-JavaMail-jira@brutus%3e</id>
<updated>2009-12-02T20:44:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
New TimedSemaphore class
------------------------

                 Key: LANG-560
                 URL: https://issues.apache.org/jira/browse/LANG-560
             Project: Commons Lang
          Issue Type: New Feature
            Reporter: Oliver Heger
             Fix For: 3.0


{{TimedSemaphore}} is a specialized Semaphore implementation that also has a timing component:
In a configurable time period a given number of permits is available. Threads call the semaphore's
{{acquire()}} method to request a permit. When no more permits are available {{acquire()}}
blocks the calling thread. At the end of the time period the permits are restored, and all
blocking threads are waked up.

The main use case for this class is to provide a convenient means for controlling the load
produced by a process. When used correctly, {{TimedSemaphore}} ensures that only a given number
of steps (e.g. database queries, file operations, or computations) are performed in a specific
time period. This may be useful for many applications.

More information including a usage example can be found in the Javadocs of the class. Comments
or suggestions for improvements are appreciated.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (CODEC-92) Many test cases use getBytes() which uses the default platform encoding so tests may fail on some platforms</title>
<author><name>&quot;Sebb (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c1724577674.1259782280740.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1724577674-1259782280740-JavaMail-jira@brutus%3e</id>
<updated>2009-12-02T19:31:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Many test cases use getBytes() which uses the default platform encoding so tests may fail on
some platforms
-----------------------------------------------------------------------------------------------------------

                 Key: CODEC-92
                 URL: https://issues.apache.org/jira/browse/CODEC-92
             Project: Commons Codec
          Issue Type: Bug
    Affects Versions: 1.4
            Reporter: Sebb
            Priority: Minor


Many test cases use getBytes() or new .String(byte[] bytes).
These both use the default platform encoding so the tests may fail on some platforms.

The tests should either use a known encoding (e.g. UTF-8) or should use bytes directly (e.g.
'h','e','l','l','o' instead of "hello".getBytes())

There don't seem to be any examples of such method calls in the main code, so the priority
has been set to minor.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (DBCP-309) First example for FSContext is invalid</title>
<author><name>&quot;Ondrej Tisler (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c947754503.1259759182260.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c947754503-1259759182260-JavaMail-jira@brutus%3e</id>
<updated>2009-12-02T13:06:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/DBCP-309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12784807#action_12784807
] 

Ondrej Tisler commented on DBCP-309:
------------------------------------

I use this code for registring JNDI inFSContext:
      // JNDI with datasource
      InitialContext ic = new InitialContext();
      // Construct BasicDataSource reference
      Configuration poolConfig = dbConfig.subset("datasource");
      DriverAdapterCPDS cpds = new DriverAdapterCPDS();
      cpds.setDriver(poolConfig.getString("driver.driverClassName"));
      cpds.setUrl(poolConfig.getString("driver.url"));
      cpds.setUser(poolConfig.getString("driver.username"));
      cpds.setPassword(CryptPass.encryptPass(poolConfig.getString("driver.password")));
      SharedPoolDataSource ds = new SharedPoolDataSource();
      ds.setConnectionPoolDataSource(cpds);
      ds.setDefaultAutoCommit(poolConfig.getBoolean("connection.defaultAutoCommit", true));
      ds.setValidationQuery(poolConfig.getString("validation.validationQuery"));
      ic.rebind(poolConfig.getString("[@jndi]"), ds);
      log.info("JNDI datasource is inicialized");

next you can normaly use JNDI lookup:
      InitialContext ic2 = new InitialContext();
      ds = (DataSource) ic2.lookup(poolConfig.getString("[@jndi]"));
      conn = ds.getConnection();

&gt; First example for FSContext is invalid
&gt; --------------------------------------
&gt;
&gt;                 Key: DBCP-309
&gt;                 URL: https://issues.apache.org/jira/browse/DBCP-309
&gt;             Project: Commons Dbcp
&gt;          Issue Type: Bug
&gt;    Affects Versions: 1.2.2
&gt;            Reporter: Ondrej Tisler
&gt;            Priority: Trivial
&gt;
&gt; First example on page http://commons.apache.org/dbcp/guide/jndi-howto.html is invalid,
with this code every call of  
&gt;   InitialContext ic2 = new InitialContext();
&gt;   DataSource ds = (DataSource) ic2.lookup("jdbc/basic");
&gt;   Connection conn = ds.getConnection();
&gt;   conn.close();
&gt; ends with new datasource with unclosed connection in it becase new Reference("javax.sql.DataSource",
 "org.apache.commons.dbcp.BasicDataSourceFactory", null); reference creates new DataSource
instead using created one while calling  ic2.lookup("jdbc/basic").
&gt; At the end it ends with many opened connections to DB until JVM is ended.
&gt; Second example I didn't test, i use direct aproach with manualy creating SharedPoolDataSource
and registring it in FSContext JNDI itself.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (CODEC-89) new Base64().encode() appends a CRLF, and chunks results into 76 character lines</title>
<author><name>&quot;Mat Booth (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c586227100.1259747180721.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c586227100-1259747180721-JavaMail-jira@brutus%3e</id>
<updated>2009-12-02T09:46:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/CODEC-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12784741#action_12784741
] 

Mat Booth commented on CODEC-89:
--------------------------------

&gt; Note that the behaviour of
&gt; 
&gt; new Base64(0).encode()
&gt; is the same as
&gt; Base64.encodeBase64()

So it is... Is that documented anywhere?

A note in the compatibility section of the release notes that "new Base64()" should be changed
to "new Base64(0)" would be awesome.

&gt; new Base64().encode() appends a CRLF, and chunks results into 76 character lines
&gt; --------------------------------------------------------------------------------
&gt;
&gt;                 Key: CODEC-89
&gt;                 URL: https://issues.apache.org/jira/browse/CODEC-89
&gt;             Project: Commons Codec
&gt;          Issue Type: Bug
&gt;    Affects Versions: 1.4
&gt;            Reporter: Julius Davies
&gt;         Attachments: codec-89.patch
&gt;
&gt;
&gt; The instance encode() method (e.g. new Base64().encode()) appends a CRLF.  Actually it's
fully chunking the output into 76 character lines.  Commons-Codec-1.3 did not do this.  The
static Base64.encodeBase64() method behaves the same in both 1.3 and 1.4, so this problem
only affects the instance encode() method.
&gt; {code}
&gt; import org.apache.commons.codec.binary.*;
&gt; public class B64 {
&gt;   public static void main(String[] args) throws Exception {
&gt;     Base64 b64 = new Base64();
&gt;     String s1 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
&gt;     String s2 = "aaaaaaaaaa";
&gt;     String s3 = "a";
&gt;     
&gt;     byte[] b1 = s1.getBytes("UTF-8");
&gt;     byte[] b2 = s2.getBytes("UTF-8");
&gt;     byte[] b3 = s3.getBytes("UTF-8");
&gt;     byte[] result;
&gt;     result = Base64.encodeBase64(b1);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b1);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = Base64.encodeBase64(b2);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b2);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = Base64.encodeBase64(b3);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b3);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;   }
&gt; }
&gt; {code}
&gt; Here's my output:
&gt; {noformat}
&gt; $ java -cp commons-codec-1.3.jar:. B64
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YQ==]
&gt; [YQ==]
&gt; $ java -cp commons-codec-1.4.jar:. B64
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
&gt; YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==
&gt; ]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==
&gt; ]
&gt; [YQ==]
&gt; [YQ==
&gt; ]
&gt; {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (CODEC-89) new Base64().encode() appends a CRLF, and chunks results into 76 character lines</title>
<author><name>&quot;Sebb (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c399163202.1259719640657.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c399163202-1259719640657-JavaMail-jira@brutus%3e</id>
<updated>2009-12-02T02:07:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/CODEC-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12784589#action_12784589
] 

Sebb commented on CODEC-89:
---------------------------

Note that the behaviour of 

new Base64(0).encode() 
is the same as 
Base64.encodeBase64()

&gt; new Base64().encode() appends a CRLF, and chunks results into 76 character lines
&gt; --------------------------------------------------------------------------------
&gt;
&gt;                 Key: CODEC-89
&gt;                 URL: https://issues.apache.org/jira/browse/CODEC-89
&gt;             Project: Commons Codec
&gt;          Issue Type: Bug
&gt;    Affects Versions: 1.4
&gt;            Reporter: Julius Davies
&gt;         Attachments: codec-89.patch
&gt;
&gt;
&gt; The instance encode() method (e.g. new Base64().encode()) appends a CRLF.  Actually it's
fully chunking the output into 76 character lines.  Commons-Codec-1.3 did not do this.  The
static Base64.encodeBase64() method behaves the same in both 1.3 and 1.4, so this problem
only affects the instance encode() method.
&gt; {code}
&gt; import org.apache.commons.codec.binary.*;
&gt; public class B64 {
&gt;   public static void main(String[] args) throws Exception {
&gt;     Base64 b64 = new Base64();
&gt;     String s1 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
&gt;     String s2 = "aaaaaaaaaa";
&gt;     String s3 = "a";
&gt;     
&gt;     byte[] b1 = s1.getBytes("UTF-8");
&gt;     byte[] b2 = s2.getBytes("UTF-8");
&gt;     byte[] b3 = s3.getBytes("UTF-8");
&gt;     byte[] result;
&gt;     result = Base64.encodeBase64(b1);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b1);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = Base64.encodeBase64(b2);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b2);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = Base64.encodeBase64(b3);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b3);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;   }
&gt; }
&gt; {code}
&gt; Here's my output:
&gt; {noformat}
&gt; $ java -cp commons-codec-1.3.jar:. B64
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YQ==]
&gt; [YQ==]
&gt; $ java -cp commons-codec-1.4.jar:. B64
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
&gt; YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==
&gt; ]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==
&gt; ]
&gt; [YQ==]
&gt; [YQ==
&gt; ]
&gt; {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (CODEC-89) new Base64().encode() appends a CRLF, and chunks results into 76 character lines</title>
<author><name>&quot;Mat Booth (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c1635037527.1259704520868.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1635037527-1259704520868-JavaMail-jira@brutus%3e</id>
<updated>2009-12-01T21:55:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/CODEC-89?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12784460#action_12784460
] 

Mat Booth commented on CODEC-89:
--------------------------------

I'd prefer to see a 1.4.1 release with the old behaviour. It seems against the spirit of minor
version bump (like 1.3 to 1.4) to change the behaviour of the interface.

It definitely feels like a regression to me -- I'm tempted to apply this patch to the commons-codec
distributed by Fedora Linux (I am the maintainer there).

&gt; new Base64().encode() appends a CRLF, and chunks results into 76 character lines
&gt; --------------------------------------------------------------------------------
&gt;
&gt;                 Key: CODEC-89
&gt;                 URL: https://issues.apache.org/jira/browse/CODEC-89
&gt;             Project: Commons Codec
&gt;          Issue Type: Bug
&gt;    Affects Versions: 1.4
&gt;            Reporter: Julius Davies
&gt;         Attachments: codec-89.patch
&gt;
&gt;
&gt; The instance encode() method (e.g. new Base64().encode()) appends a CRLF.  Actually it's
fully chunking the output into 76 character lines.  Commons-Codec-1.3 did not do this.  The
static Base64.encodeBase64() method behaves the same in both 1.3 and 1.4, so this problem
only affects the instance encode() method.
&gt; {code}
&gt; import org.apache.commons.codec.binary.*;
&gt; public class B64 {
&gt;   public static void main(String[] args) throws Exception {
&gt;     Base64 b64 = new Base64();
&gt;     String s1 = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
&gt;     String s2 = "aaaaaaaaaa";
&gt;     String s3 = "a";
&gt;     
&gt;     byte[] b1 = s1.getBytes("UTF-8");
&gt;     byte[] b2 = s2.getBytes("UTF-8");
&gt;     byte[] b3 = s3.getBytes("UTF-8");
&gt;     byte[] result;
&gt;     result = Base64.encodeBase64(b1);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b1);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = Base64.encodeBase64(b2);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b2);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = Base64.encodeBase64(b3);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;     result = b64.encode(b3);
&gt;     System.out.println("[" + new String(result, "UTF-8") + "]");
&gt;   }
&gt; }
&gt; {code}
&gt; Here's my output:
&gt; {noformat}
&gt; $ java -cp commons-codec-1.3.jar:. B64
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YQ==]
&gt; [YQ==]
&gt; $ java -cp commons-codec-1.4.jar:. B64
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
&gt; YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==
&gt; ]
&gt; [YWFhYWFhYWFhYQ==]
&gt; [YWFhYWFhYWFhYQ==
&gt; ]
&gt; [YQ==]
&gt; [YQ==
&gt; ]
&gt; {noformat}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (LANG-559) New Validate utility methods</title>
<author><name>&quot;Paul Benedict (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200912.mbox/%3c462664778.1259645420874.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c462664778-1259645420874-JavaMail-jira@brutus%3e</id>
<updated>2009-12-01T05:30:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
New Validate utility methods
----------------------------

                 Key: LANG-559
                 URL: https://issues.apache.org/jira/browse/LANG-559
             Project: Commons Lang
          Issue Type: New Feature
            Reporter: Paul Benedict
            Assignee: Paul Benedict
             Fix For: 3.0


Methods for consideration:
 * isInstanceOf(Class&lt;?&gt; type, Object o);
 * isAssignable(Class&lt;?&gt; superType, Class&lt;?&gt; subType);
 * state(boolean condition);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (DBCP-309) First example for FSContext is invalid</title>
<author><name>&quot;Phil Steitz (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200911.mbox/%3c297571608.1259598380820.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c297571608-1259598380820-JavaMail-jira@brutus%3e</id>
<updated>2009-11-30T16:26:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/DBCP-309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12783729#action_12783729
] 

Phil Steitz commented on DBCP-309:
----------------------------------

Strike last comment.  DataSoources do not implement Referenceable, so direct references will
not work.  When using the FileSystem provider, datasources are created new for each lookup
(as reported in the issue).  Tomcat's in-memory provider, however, returns the same datasource
for repeated lookups.  The following test, for example, succeeds with the Tomcat provider,
but fails with the FS provider

{code}
Hashtable environment = new Hashtable();
        environment.put(Context.INITIAL_CONTEXT_FACTORY,
                org.apache.naming.java.javaURLContextFactory.class.getName());
        InitialContext ic = new InitialContext(environment);
        ic.createSubcontext("jdbc"); 
        // Construct BasicDataSource reference
        Reference ref = new Reference("javax.sql.DataSource",
          "org.apache.commons.dbcp.BasicDataSourceFactory", null);
        ref.add(new StringRefAddr("driverClassName", "TesterDriver"));
        ref.add(new StringRefAddr("url", "jdbc:apache:commons:testdriver"));
        ref.add(new StringRefAddr("username", "username"));
        ref.add(new StringRefAddr("password", "password"));
        ic.rebind("jdbc/basic", ref);
         
        // Use
        InitialContext ic2 = new InitialContext(environment);
        DataSource ds = (DataSource) ic2.lookup("jdbc/basic");
        ((BasicDataSource) ds).setAccessToUnderlyingConnectionAllowed(true);
        Assert.assertNotNull(ds);
        Connection conn = ds.getConnection();
        Connection uconn = ((DelegatingConnection) conn).getInnermostDelegate();
        Assert.assertNotNull(conn);
        conn.close();
        
        DataSource ds2 = (DataSource) ic2.lookup("jdbc/basic");
        ((BasicDataSource) ds2).setAccessToUnderlyingConnectionAllowed(true);
        Assert.assertNotNull(ds2);
        Connection conn2 = ds2.getConnection();
        Connection uconn2 = ((DelegatingConnection) conn2).getInnermostDelegate();
        Assert.assertNotNull(conn2);
        conn2.close();
        Assert.assertEquals(ds, ds2);
        Assert.assertEquals(uconn2, uconn);
{code}

To make the examples less misleading, it seems we have two choices - 1) change to use the
Tomcat provider or 2) comment that the FS provider creates new datasources each time.  Would
appreciate comments / patches from JNDI spi experts on this.


&gt; First example for FSContext is invalid
&gt; --------------------------------------
&gt;
&gt;                 Key: DBCP-309
&gt;                 URL: https://issues.apache.org/jira/browse/DBCP-309
&gt;             Project: Commons Dbcp
&gt;          Issue Type: Bug
&gt;    Affects Versions: 1.2.2
&gt;            Reporter: Ondrej Tisler
&gt;            Priority: Trivial
&gt;
&gt; First example on page http://commons.apache.org/dbcp/guide/jndi-howto.html is invalid,
with this code every call of  
&gt;   InitialContext ic2 = new InitialContext();
&gt;   DataSource ds = (DataSource) ic2.lookup("jdbc/basic");
&gt;   Connection conn = ds.getConnection();
&gt;   conn.close();
&gt; ends with new datasource with unclosed connection in it becase new Reference("javax.sql.DataSource",
 "org.apache.commons.dbcp.BasicDataSourceFactory", null); reference creates new DataSource
instead using created one while calling  ic2.lookup("jdbc/basic").
&gt; At the end it ends with many opened connections to DB until JVM is ended.
&gt; Second example I didn't test, i use direct aproach with manualy creating SharedPoolDataSource
and registring it in FSContext JNDI itself.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (JEXL-92) JexlContext API should be more flexible</title>
<author><name>&quot;Rahul Akolkar (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200911.mbox/%3c1894483550.1259597481275.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1894483550-1259597481275-JavaMail-jira@brutus%3e</id>
<updated>2009-11-30T16:11:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/JEXL-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12783722#action_12783722
] 

Rahul Akolkar commented on JEXL-92:
-----------------------------------

Please see feedback on dev list, email titled "Re: [JEXL] JexlContext API changes in JEXL-92
(was: svn commit: r884650 [1/2] ...)" sent today, markmail pointer below:

  http://markmail.org/message/667oycd7lom2mq26


&gt; JexlContext API should be more flexible
&gt; ---------------------------------------
&gt;
&gt;                 Key: JEXL-92
&gt;                 URL: https://issues.apache.org/jira/browse/JEXL-92
&gt;             Project: Commons JEXL
&gt;          Issue Type: Improvement
&gt;    Affects Versions: 1.1
&gt;            Reporter: Henri Biestro
&gt;            Assignee: Henri Biestro
&gt;             Fix For: 2.0
&gt;
&gt;
&gt; JexlContext is a bit heavy since it forces implementors to wrap their environment in
Maps.
&gt; It would be more convenient to have fine-grain methods (setVar, getVar).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Updated: (DBUTILS-65) Duplicate code introduced during Java 1.5 branch merge</title>
<author><name>&quot;Brandon Atkinson (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200911.mbox/%3c1030162390.1259596400684.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1030162390-1259596400684-JavaMail-jira@brutus%3e</id>
<updated>2009-11-30T15:53:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

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

Brandon Atkinson updated DBUTILS-65:
------------------------------------

    Attachment: BeanProcessor-patch.diff

Remove duplicated code in BeanProcessor#processColumn 

&gt; Duplicate code introduced during Java 1.5 branch merge
&gt; ------------------------------------------------------
&gt;
&gt;                 Key: DBUTILS-65
&gt;                 URL: https://issues.apache.org/jira/browse/DBUTILS-65
&gt;             Project: Commons DbUtils
&gt;          Issue Type: Bug
&gt;    Affects Versions: 1.3
&gt;            Reporter: Brandon Atkinson
&gt;         Attachments: BeanProcessor-patch.diff
&gt;
&gt;
&gt; The merge of Java 1.5 code into the main line introduced duplicate code in at least one
place (BeanProcessor.java).
&gt; My guess is that some patches were applied to both the trunk and 1.5 branch during development.
 When the merge occurred, the patches contents were duplicated.
&gt; I haven't analyzed all files for duplicate code, but I will be attaching a patch for
the BeanProcessor class.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Created: (DBUTILS-65) Duplicate code introduced during Java 1.5 branch merge</title>
<author><name>&quot;Brandon Atkinson (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200911.mbox/%3c221396921.1259596280810.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c221396921-1259596280810-JavaMail-jira@brutus%3e</id>
<updated>2009-11-30T15:51:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Duplicate code introduced during Java 1.5 branch merge
------------------------------------------------------

                 Key: DBUTILS-65
                 URL: https://issues.apache.org/jira/browse/DBUTILS-65
             Project: Commons DbUtils
          Issue Type: Bug
    Affects Versions: 1.3
            Reporter: Brandon Atkinson


The merge of Java 1.5 code into the main line introduced duplicate code in at least one place
(BeanProcessor.java).

My guess is that some patches were applied to both the trunk and 1.5 branch during development.
 When the merge occurred, the patches contents were duplicated.

I haven't analyzed all files for duplicate code, but I will be attaching a patch for the BeanProcessor
class.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Issue Comment Edited: (IO-170) Scalable Iterator for files, better than FileUtils.iterateFiles</title>
<author><name>&quot;Vincent Bouscasse (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200911.mbox/%3c1411385654.1259587520795.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1411385654-1259587520795-JavaMail-jira@brutus%3e</id>
<updated>2009-11-30T13:25:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/IO-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12783648#action_12783648
] 

Vincent Bouscasse edited comment on IO-170 at 11/30/09 1:23 PM:
----------------------------------------------------------------

Hi Matthew. 

I'm not sure i got the point but i think Damian was thinking about an iterator that allows
for processing results on the fly as soon as they are available. The code in your patch does
not allow this: we have to wait until the result files are found before the first file object
can be used as a return of iterator.next(). It can be long if we search files in large directory
trees.

I've written a recursive Iterator&lt;File&gt; implementation allowing to get the first matches
as soon as they're discovered. The next match is computed in the hasNext() method and it uses
linked lists to store matches and subdirectories. The complete iteration speed is the same
as the actual one (Commons IO 1.4) but first results are provided more quickly. This iterator
implementation typical usage is in a producer thread whereas the file processing is done in
a consumer thread allowing to speeding up the file processing

I can provide you a code sample if it can match your needs.

Best regards.




      was (Author: vbouscasse):
    Hi Matthew. 

I'm not sure i got the point but i think Damian was thinking about an iterator that allows
for processing results on the fly as soon as they are available. The code in your patch does
not allow this: we have to wait until the result files are found before the first file object
can be used as a return of iterator.next(). It can be long if we search files in large directory
trees.

I've written a recursive Iterator&lt;File&gt; implementation allowing to get the first matches
as soon as they're discovered. The next match is computed in the hasNext() method and it uses
linked lists to store matches and subdirectories. The complete iteration speed is the same
as the actual one but first results are provided more quickly. This iterator implementation
typical usage is in a producer thread whereas the file processing is done in a consumer thread
allowing to speeding up the file processing

I can provide you a code sample if it can match your needs.

Best regards.



  
&gt; Scalable Iterator for files, better than FileUtils.iterateFiles
&gt; ---------------------------------------------------------------
&gt;
&gt;                 Key: IO-170
&gt;                 URL: https://issues.apache.org/jira/browse/IO-170
&gt;             Project: Commons IO
&gt;          Issue Type: Improvement
&gt;          Components: Utilities
&gt;    Affects Versions: 1.4
&gt;         Environment: generic file systems
&gt;            Reporter: Damian Noseda
&gt;            Priority: Minor
&gt;             Fix For: 2.x
&gt;
&gt;         Attachments: real_iterators.patch
&gt;
&gt;   Original Estimate: 5h
&gt;  Remaining Estimate: 5h
&gt;
&gt; Improve the way that iterateFiles generate an iterator. The current way it not scale.
It's try to add all files in a list and then return the iterator of that list. A better way
it would be create an customize Iterator&lt;File&gt; with a stack of arrays of File to go
up and down in the directory tree.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Commented: (IO-170) Scalable Iterator for files, better than FileUtils.iterateFiles</title>
<author><name>&quot;Vincent Bouscasse (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200911.mbox/%3c445208454.1259587401302.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c445208454-1259587401302-JavaMail-jira@brutus%3e</id>
<updated>2009-11-30T13:23:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

    [ https://issues.apache.org/jira/browse/IO-170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12783648#action_12783648
] 

Vincent Bouscasse commented on IO-170:
--------------------------------------

Hi Matthew. 

I'm not sure i got the point but i think Damian was thinking about an iterator that allows
for processing results on the fly as soon as they are available. The code in your patch does
not allow this: we have to wait until the result files are found before the first file object
can be used as a return of iterator.next(). It can be long if we search files in large directory
trees.

I've written a recursive Iterator&lt;File&gt; implementation allowing to get the first matches
as soon as they're discovered. The next match is computed in the hasNext() method and it uses
linked lists to store matches and subdirectories. The complete iteration speed is the same
as the actual one but first results are provided more quickly. This iterator implementation
typical usage is in a producer thread whereas the file processing is done in a consumer thread
allowing to speeding up the file processing

I can provide you a code sample if it can match your needs.

Best regards.




&gt; Scalable Iterator for files, better than FileUtils.iterateFiles
&gt; ---------------------------------------------------------------
&gt;
&gt;                 Key: IO-170
&gt;                 URL: https://issues.apache.org/jira/browse/IO-170
&gt;             Project: Commons IO
&gt;          Issue Type: Improvement
&gt;          Components: Utilities
&gt;    Affects Versions: 1.4
&gt;         Environment: generic file systems
&gt;            Reporter: Damian Noseda
&gt;            Priority: Minor
&gt;             Fix For: 2.x
&gt;
&gt;         Attachments: real_iterators.patch
&gt;
&gt;   Original Estimate: 5h
&gt;  Remaining Estimate: 5h
&gt;
&gt; Improve the way that iterateFiles generate an iterator. The current way it not scale.
It's try to add all files in a list and then return the iterator of that list. A better way
it would be create an customize Iterator&lt;File&gt; with a stack of arrays of File to go
up and down in the directory tree.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
<entry>
<title>[jira] Closed: (MATH-305) NPE in  KMeansPlusPlusClusterer unittest</title>
<author><name>&quot;Erik van Ingen (JIRA)&quot; &lt;jira@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/commons-issues/200911.mbox/%3c1904803176.1259568803126.JavaMail.jira@brutus%3e"/>
<id>urn:uuid:%3c1904803176-1259568803126-JavaMail-jira@brutus%3e</id>
<updated>2009-11-30T08:13:23Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

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

Erik van Ingen closed MATH-305.
-------------------------------


I have tested the fix and I can confirm that it is working in my environment. Thanks a lot!

&gt; NPE in  KMeansPlusPlusClusterer unittest
&gt; ----------------------------------------
&gt;
&gt;                 Key: MATH-305
&gt;                 URL: https://issues.apache.org/jira/browse/MATH-305
&gt;             Project: Commons Math
&gt;          Issue Type: Bug
&gt;    Affects Versions: 2.0
&gt;         Environment: java 6, eclipse, apache commons math trunk
&gt;            Reporter: Erik van Ingen
&gt;             Fix For: 2.1
&gt;
&gt;   Original Estimate: 4h
&gt;  Remaining Estimate: 4h
&gt;
&gt; When running this unittest, I am facing this NPE:
&gt; java.lang.NullPointerException
&gt; 	at org.apache.commons.math.stat.clustering.KMeansPlusPlusClusterer.assignPointsToClusters(KMeansPlusPlusClusterer.java:91)
&gt; This is the unittest:
&gt; package org.fao.fisheries.chronicles.calcuation.cluster;
&gt; import static org.junit.Assert.assertEquals;
&gt; import static org.junit.Assert.assertTrue;
&gt; import java.util.Arrays;
&gt; import java.util.List;
&gt; import java.util.Random;
&gt; import org.apache.commons.math.stat.clustering.Cluster;
&gt; import org.apache.commons.math.stat.clustering.EuclideanIntegerPoint;
&gt; import org.apache.commons.math.stat.clustering.KMeansPlusPlusClusterer;
&gt; import org.fao.fisheries.chronicles.input.CsvImportProcess;
&gt; import org.fao.fisheries.chronicles.input.Top200Csv;
&gt; import org.junit.Test;
&gt; public class ClusterAnalysisTest {
&gt; 	@Test
&gt; 	public void testPerformClusterAnalysis2() {
&gt; 		KMeansPlusPlusClusterer&lt;EuclideanIntegerPoint&gt; transformer = new KMeansPlusPlusClusterer&lt;EuclideanIntegerPoint&gt;(
&gt; 				new Random(1746432956321l));
&gt; 		EuclideanIntegerPoint[] points = new EuclideanIntegerPoint[] {
&gt; 				new EuclideanIntegerPoint(new int[] { 1959, 325100 }),
&gt; 				new EuclideanIntegerPoint(new int[] { 1960, 373200 }), };
&gt; 		List&lt;Cluster&lt;EuclideanIntegerPoint&gt;&gt; clusters = transformer.cluster(Arrays.asList(points),
1, 1);
&gt; 		assertEquals(1, clusters.size());
&gt; 	}
&gt; }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



</pre>
</div>
</content>
</entry>
</feed>
