[
https://issues.apache.org/jira/browse/PIVOT-264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Todd Volkert updated PIVOT-264:
---
Fix Version/s: (was: 1.3.1)
1.3
> Concurrent modification check in ArrayL
[
https://issues.apache.org/jira/browse/PIVOT-264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Greg Brown resolved PIVOT-264.
--
Resolution: Fixed
> Concurrent modification check in ArrayList is too na
Concurrent modification check in ArrayList is too naive
---
Key: PIVOT-264
URL: https://issues.apache.org/jira/browse/PIVOT-264
Project: Pivot
Issue Type: Bug
Components: core
Great, now looks better.
By
After looking at the code, I agree that it could have been written more
cleanly. I have checked in an updated version that I think reads better.
G
On Tuesday, September 01, 2009, at 08:23AM, "Todd Volkert"
wrote:
>I think that sounds like an equitable solution :)
>
>On Tue, Sep 1, 2009 at 8:21
I think that sounds like an equitable solution :)
On Tue, Sep 1, 2009 at 8:21 AM, Sandro Martini wrote:
> Hi to all,
> so what do you think on keeping the tests inside the while as currently,
> but instead of the empty block using only ";" I think it would be
> better a { } block.
> And maybe wit
Hi to all,
so what do you think on keeping the tests inside the while as currently,
but instead of the empty block using only ";" I think it would be
better a { } block.
And maybe with clarifying comment inside like // empty block
At least to avoid warnings from many tools ...
Sandro
I'm not a committer, so take my advice any way you like.
/me ascends high horse
An empty loop is 99.9% of the time a coding error. There's a reason
why pmc, checkstyle and findbugs trigger on this type of programming.
In my opinion, writing code that clearly shows intent is a pre, and
code that d
It's legal and technically correct Java, but I prefer to write such
things like this:
while (iterator.hasNext()) {}
to make it obvious that it's an empty block.
If others feel strongly that this makes the intent more explicit, I
will change it.
What about cases like this:
if (...) {
I like it as-is. I find the other alternatives to be needlessly verbose.
On Sep 1, 2009, at 6:54 AM, Sandro Martini wrote:
Hi,
while (iterator.hasNext()) {}
while (iterator.hasNext()) { /* intentionally left blank */ }
I think moving to one of these blocks formats could be more
reada
Better :)
However, it occurs to me that we need to then check if one list is a subset
of the other, so after the while loop, we would have:
equal = (!iterator.hasNext()
&& !arrayListIterator.hasNext());
This makes the earlier maintenance of 'equal' seem odd to me. The existing
implementatio
Shaving off some lines :-)
boolean equal = true;
while (iterator.hasNext() && linkedListIterator.hasNext() && equal) {
equal = iterator.next().equals(linkedListIterator.next());
}
Martijn
On Tue, Sep 1, 2009 at 12:47 PM, Todd Volkert wrote:
> I personally don't have a problem with it, but if
Hi,
>> while (iterator.hasNext()) {}
>
> while (iterator.hasNext()) { /* intentionally left blank */ }
I think moving to one of these blocks formats could be more readable ...
Sandro
I personally don't have a problem with it, but if some find it hard to read,
then here's the same thing re-phrased:
#!{{{
boolean equal = true;
while (iterator.hasNext()
&& linkedListIterator.hasNext()) {
if (!iterator.next().equals(linkedListIterator.next())) {
equal = false;
On Tue, Sep 1, 2009 at 11:41 AM, Noel Grandin wrote:
>
> It's legal and technically correct Java, but I prefer to write such
> things like this:
>
> while (iterator.hasNext()) {}
>
> to make it obvious that it's an empty block.
>
And even better:
while (iterator.hasNext()) { /* intentionally le
Hi Noel, i agree with you, more clear,adn to avoid warnings ... what other say ?
Bye
It's legal and technically correct Java, but I prefer to write such
things like this:
while (iterator.hasNext()) {}
to make it obvious that it's an empty block.
Sandro Martini wrote:
> Hi, in ArrayList I've just found a warning ... in equals()
>
>
Hi,
also in equals() in LinkedList:
while (iterator.hasNext()
&& linkedListIterator.hasNext()
&& iterator.next().equals(linkedListIterator.next()));
=> the same thing ...
equals = (!iterator.hasNext()
&& !linkedListIterator.
Hi, in ArrayList I've just found a warning ... in equals()
while (iterator.hasNext()
&& arrayListIterator.hasNext()
&& iterator.next().equals(arrayListIterator.next()));
=> there is a ; after the while ... is it righ
19 matches
Mail list logo