You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Claudio Martella (Created) (JIRA)" <ji...@apache.org> on 2011/11/17 15:32:51 UTC
[jira] [Created] (MAHOUT-889) size() returns wrong value (10) on
freshly instantiated ObjectArrayList.
size() returns wrong value (10) on freshly instantiated ObjectArrayList.
------------------------------------------------------------------------
Key: MAHOUT-889
URL: https://issues.apache.org/jira/browse/MAHOUT-889
Project: Mahout
Issue Type: Bug
Components: collections
Affects Versions: 0.1
Reporter: Claudio Martella
Assignee: Benson Margulies
ObjectArrayList returns 10 for a freshly instantiated object:
{code}
ObjectArrayList<String> list = new ObjectArrayList<String>();
System.out.println(list.size());
{code}
prints 10.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (MAHOUT-889) size() returns wrong value (10) on
freshly instantiated ObjectArrayList.
Posted by "Claudio Martella (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claudio Martella updated MAHOUT-889:
------------------------------------
Affects Version/s: (was: 0.1)
collections-1.0
> size() returns wrong value (10) on freshly instantiated ObjectArrayList.
> ------------------------------------------------------------------------
>
> Key: MAHOUT-889
> URL: https://issues.apache.org/jira/browse/MAHOUT-889
> Project: Mahout
> Issue Type: Bug
> Components: collections
> Affects Versions: collections-1.0
> Reporter: Claudio Martella
> Assignee: Benson Margulies
>
> ObjectArrayList returns 10 for a freshly instantiated object:
> {code}
> ObjectArrayList<String> list = new ObjectArrayList<String>();
> System.out.println(list.size());
> {code}
> prints 10.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (MAHOUT-889) size() returns wrong value (10) on
freshly instantiated ObjectArrayList.
Posted by "Sebastian Schelter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebastian Schelter resolved MAHOUT-889.
---------------------------------------
Resolution: Fixed
Fix Version/s: 0.8
Done. Thank for pointing to this, Claudio.
> size() returns wrong value (10) on freshly instantiated ObjectArrayList.
> ------------------------------------------------------------------------
>
> Key: MAHOUT-889
> URL: https://issues.apache.org/jira/browse/MAHOUT-889
> Project: Mahout
> Issue Type: Bug
> Components: collections
> Affects Versions: collections-1.0
> Reporter: Claudio Martella
> Assignee: Benson Margulies
> Fix For: 0.8
>
> Attachments: MAHOUT-889.patch
>
>
> ObjectArrayList returns 10 for a freshly instantiated object:
> {code}
> ObjectArrayList<String> list = new ObjectArrayList<String>();
> System.out.println(list.size());
> {code}
> prints 10.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MAHOUT-889) size() returns wrong value (10) on
freshly instantiated ObjectArrayList.
Posted by "Isabel Drost (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13153102#comment-13153102 ]
Isabel Drost commented on MAHOUT-889:
-------------------------------------
Thanks for the test.
As to your confusion about why Ted asked for the test: Adding a test that shows your issue is a nice and simple option to make changes to the Mahout code base, create a patch file and submit that to jira - which in turn is a trivial way to get more involved with the project. If you are interested you can find more information at https://cwiki.apache.org/MAHOUT/how-to-contribute.html
> size() returns wrong value (10) on freshly instantiated ObjectArrayList.
> ------------------------------------------------------------------------
>
> Key: MAHOUT-889
> URL: https://issues.apache.org/jira/browse/MAHOUT-889
> Project: Mahout
> Issue Type: Bug
> Components: collections
> Affects Versions: collections-1.0
> Reporter: Claudio Martella
> Assignee: Benson Margulies
>
> ObjectArrayList returns 10 for a freshly instantiated object:
> {code}
> ObjectArrayList<String> list = new ObjectArrayList<String>();
> System.out.println(list.size());
> {code}
> prints 10.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (MAHOUT-889) size() returns wrong value (10) on
freshly instantiated ObjectArrayList.
Posted by "Sebastian Schelter (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebastian Schelter updated MAHOUT-889:
--------------------------------------
Attachment: MAHOUT-889.patch
> size() returns wrong value (10) on freshly instantiated ObjectArrayList.
> ------------------------------------------------------------------------
>
> Key: MAHOUT-889
> URL: https://issues.apache.org/jira/browse/MAHOUT-889
> Project: Mahout
> Issue Type: Bug
> Components: collections
> Affects Versions: collections-1.0
> Reporter: Claudio Martella
> Assignee: Benson Margulies
> Fix For: 0.8
>
> Attachments: MAHOUT-889.patch
>
>
> ObjectArrayList returns 10 for a freshly instantiated object:
> {code}
> ObjectArrayList<String> list = new ObjectArrayList<String>();
> System.out.println(list.size());
> {code}
> prints 10.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MAHOUT-889) size() returns wrong value (10) on
freshly instantiated ObjectArrayList.
Posted by "Claudio Martella (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152150#comment-13152150 ]
Claudio Martella commented on MAHOUT-889:
-----------------------------------------
I don't get it. What do you need exactly that the sample doesn't say already?
For what it's worth:
{code}
import static org.junit.Assert.*;
import org.apache.mahout.math.list.ObjectArrayList;
import org.junit.Test;
public class MAHOUT889 {
private ObjectArrayList<String> list = new ObjectArrayList<String>();
@Test
public void testSizeReturns0onFreshObject() {
assertTrue(list.size() == 0);
}
}
{code}
> size() returns wrong value (10) on freshly instantiated ObjectArrayList.
> ------------------------------------------------------------------------
>
> Key: MAHOUT-889
> URL: https://issues.apache.org/jira/browse/MAHOUT-889
> Project: Mahout
> Issue Type: Bug
> Components: collections
> Affects Versions: collections-1.0
> Reporter: Claudio Martella
> Assignee: Benson Margulies
>
> ObjectArrayList returns 10 for a freshly instantiated object:
> {code}
> ObjectArrayList<String> list = new ObjectArrayList<String>();
> System.out.println(list.size());
> {code}
> prints 10.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MAHOUT-889) size() returns wrong value (10) on
freshly instantiated ObjectArrayList.
Posted by "Suneel Marthi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273345#comment-13273345 ]
Suneel Marthi commented on MAHOUT-889:
--------------------------------------
What was the resolution of this? Presently it defaults to creating 10 elements on instantiation.
> size() returns wrong value (10) on freshly instantiated ObjectArrayList.
> ------------------------------------------------------------------------
>
> Key: MAHOUT-889
> URL: https://issues.apache.org/jira/browse/MAHOUT-889
> Project: Mahout
> Issue Type: Bug
> Components: collections
> Affects Versions: collections-1.0
> Reporter: Claudio Martella
> Assignee: Benson Margulies
>
> ObjectArrayList returns 10 for a freshly instantiated object:
> {code}
> ObjectArrayList<String> list = new ObjectArrayList<String>();
> System.out.println(list.size());
> {code}
> prints 10.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MAHOUT-889) size() returns wrong value (10) on
freshly instantiated ObjectArrayList.
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13399367#comment-13399367 ]
Hudson commented on MAHOUT-889:
-------------------------------
Integrated in Mahout-Quality #1556 (See [https://builds.apache.org/job/Mahout-Quality/1556/])
MAHOUT-889 size() returns wrong value (10) on freshly instantiated ObjectArrayList (Revision 1352835)
Result = SUCCESS
ssc : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1352835
Files :
* /mahout/trunk/math/src/main/java/org/apache/mahout/math/list/ObjectArrayList.java
* /mahout/trunk/math/src/test/java/org/apache/mahout/math/list
* /mahout/trunk/math/src/test/java/org/apache/mahout/math/list/ObjectArrayListTest.java
> size() returns wrong value (10) on freshly instantiated ObjectArrayList.
> ------------------------------------------------------------------------
>
> Key: MAHOUT-889
> URL: https://issues.apache.org/jira/browse/MAHOUT-889
> Project: Mahout
> Issue Type: Bug
> Components: collections
> Affects Versions: collections-1.0
> Reporter: Claudio Martella
> Assignee: Benson Margulies
> Fix For: 0.8
>
> Attachments: MAHOUT-889.patch
>
>
> ObjectArrayList returns 10 for a freshly instantiated object:
> {code}
> ObjectArrayList<String> list = new ObjectArrayList<String>();
> System.out.println(list.size());
> {code}
> prints 10.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (MAHOUT-889) size() returns wrong value (10) on
freshly instantiated ObjectArrayList.
Posted by "Ted Dunning (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/MAHOUT-889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13152139#comment-13152139 ]
Ted Dunning commented on MAHOUT-889:
------------------------------------
Good catch!
Can you code up your example as a unit test?
A nice simple thing like this is a great way to get started on contributing.
> size() returns wrong value (10) on freshly instantiated ObjectArrayList.
> ------------------------------------------------------------------------
>
> Key: MAHOUT-889
> URL: https://issues.apache.org/jira/browse/MAHOUT-889
> Project: Mahout
> Issue Type: Bug
> Components: collections
> Affects Versions: collections-1.0
> Reporter: Claudio Martella
> Assignee: Benson Margulies
>
> ObjectArrayList returns 10 for a freshly instantiated object:
> {code}
> ObjectArrayList<String> list = new ObjectArrayList<String>();
> System.out.println(list.size());
> {code}
> prints 10.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira