[jira] [Commented] (COLLECTIONS-530) Rejecting items on predicate failure without throwing an Exception

2015-01-14 Thread Erik (JIRA)

[ 
https://issues.apache.org/jira/browse/COLLECTIONS-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14277665#comment-14277665
 ] 

Erik commented on COLLECTIONS-530:
--

I created a suggested implementation.
Not sure what the procedure is, but I will attach it to this issue, tell me 
what you think.

 Rejecting items on predicate failure without throwing an Exception
 --

 Key: COLLECTIONS-530
 URL: https://issues.apache.org/jira/browse/COLLECTIONS-530
 Project: Commons Collections
  Issue Type: Improvement
  Components: List
Affects Versions: 4.0
Reporter: Erik
 Fix For: 4.x


 The PredicatedList class doesn't allow entries that fail the predicate, but 
 throws an Exception on entry.
 The problem I have with this, is that it places the onus of filtering out 
 invalid entries on the caller.
 I typically add items in a loop. The item added is the result of a method 
 call (which returns null if it can't create one).
 This problem is so common for me that I have created my own FilteredList 
 class that simply ignores invalid entries.
 I would like the PredicatedList class to be capable of rejecting items 
 without throwing an exception.
 I don't mind writing the code for this, but there are a great many ways in 
 which this can be done.
 So I was wondering what the interface should look like.
 Separate FilteredList class.
 Works, but seems a little verbose for the purpose
 New factory method: filteredList(ListT list, Predicate? super T 
 predicate) 
 Nice and simple, but doesn't allow extension; other ways of dealing with 
 predicate failure.
 New factory method with enum: predicatedList(ListT list, Predicate? super 
 T predicate, PredicateFailEnum action)
 More verbose to use and adds an extra class, but allows more alternative ways 
 to deal with predicate failure.
 One more nice thing is that it might be less confusing, 
 because choosing between predicatedList and the above filteredList might not 
 be so obvious.
 New factory method with interface: filteredList(ListT list, Predicate? 
 super T predicate, PredicateFailInterface action)
 Complex, but the most flexible way of dealing with predicate failure.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Issue Comment Deleted] (COLLECTIONS-530) Rejecting items on predicate failure without throwing an Exception

2015-01-14 Thread Erik (JIRA)

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

Erik updated COLLECTIONS-530:
-
Comment: was deleted

(was: first implementation suggestion)

 Rejecting items on predicate failure without throwing an Exception
 --

 Key: COLLECTIONS-530
 URL: https://issues.apache.org/jira/browse/COLLECTIONS-530
 Project: Commons Collections
  Issue Type: Improvement
  Components: List
Affects Versions: 4.0
Reporter: Erik
 Fix For: 4.x

 Attachments: COLLECTIONS-530-v0.0.1.alpha.zip


 The PredicatedList class doesn't allow entries that fail the predicate, but 
 throws an Exception on entry.
 The problem I have with this, is that it places the onus of filtering out 
 invalid entries on the caller.
 I typically add items in a loop. The item added is the result of a method 
 call (which returns null if it can't create one).
 This problem is so common for me that I have created my own FilteredList 
 class that simply ignores invalid entries.
 I would like the PredicatedList class to be capable of rejecting items 
 without throwing an exception.
 I don't mind writing the code for this, but there are a great many ways in 
 which this can be done.
 So I was wondering what the interface should look like.
 Separate FilteredList class.
 Works, but seems a little verbose for the purpose
 New factory method: filteredList(ListT list, Predicate? super T 
 predicate) 
 Nice and simple, but doesn't allow extension; other ways of dealing with 
 predicate failure.
 New factory method with enum: predicatedList(ListT list, Predicate? super 
 T predicate, PredicateFailEnum action)
 More verbose to use and adds an extra class, but allows more alternative ways 
 to deal with predicate failure.
 One more nice thing is that it might be less confusing, 
 because choosing between predicatedList and the above filteredList might not 
 be so obvious.
 New factory method with interface: filteredList(ListT list, Predicate? 
 super T predicate, PredicateFailInterface action)
 Complex, but the most flexible way of dealing with predicate failure.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (COLLECTIONS-530) Rejecting items on predicate failure without throwing an Exception

2015-01-14 Thread Erik (JIRA)

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

Erik updated COLLECTIONS-530:
-
Attachment: (was: COLLECTIONS-530-v0.0.1.alpha.zip)

 Rejecting items on predicate failure without throwing an Exception
 --

 Key: COLLECTIONS-530
 URL: https://issues.apache.org/jira/browse/COLLECTIONS-530
 Project: Commons Collections
  Issue Type: Improvement
  Components: List
Affects Versions: 4.0
Reporter: Erik
 Fix For: 4.x

 Attachments: COLLECTIONS-530-v0.0.1.alpha.zip


 The PredicatedList class doesn't allow entries that fail the predicate, but 
 throws an Exception on entry.
 The problem I have with this, is that it places the onus of filtering out 
 invalid entries on the caller.
 I typically add items in a loop. The item added is the result of a method 
 call (which returns null if it can't create one).
 This problem is so common for me that I have created my own FilteredList 
 class that simply ignores invalid entries.
 I would like the PredicatedList class to be capable of rejecting items 
 without throwing an exception.
 I don't mind writing the code for this, but there are a great many ways in 
 which this can be done.
 So I was wondering what the interface should look like.
 Separate FilteredList class.
 Works, but seems a little verbose for the purpose
 New factory method: filteredList(ListT list, Predicate? super T 
 predicate) 
 Nice and simple, but doesn't allow extension; other ways of dealing with 
 predicate failure.
 New factory method with enum: predicatedList(ListT list, Predicate? super 
 T predicate, PredicateFailEnum action)
 More verbose to use and adds an extra class, but allows more alternative ways 
 to deal with predicate failure.
 One more nice thing is that it might be less confusing, 
 because choosing between predicatedList and the above filteredList might not 
 be so obvious.
 New factory method with interface: filteredList(ListT list, Predicate? 
 super T predicate, PredicateFailInterface action)
 Complex, but the most flexible way of dealing with predicate failure.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (COLLECTIONS-530) Rejecting items on predicate failure without throwing an Exception

2015-01-14 Thread Erik (JIRA)

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

Erik updated COLLECTIONS-530:
-
Attachment: COLLECTIONS-530-v0.0.1.alpha.zip

first implementation suggestion

 Rejecting items on predicate failure without throwing an Exception
 --

 Key: COLLECTIONS-530
 URL: https://issues.apache.org/jira/browse/COLLECTIONS-530
 Project: Commons Collections
  Issue Type: Improvement
  Components: List
Affects Versions: 4.0
Reporter: Erik
 Fix For: 4.x

 Attachments: COLLECTIONS-530-v0.0.1.alpha.zip


 The PredicatedList class doesn't allow entries that fail the predicate, but 
 throws an Exception on entry.
 The problem I have with this, is that it places the onus of filtering out 
 invalid entries on the caller.
 I typically add items in a loop. The item added is the result of a method 
 call (which returns null if it can't create one).
 This problem is so common for me that I have created my own FilteredList 
 class that simply ignores invalid entries.
 I would like the PredicatedList class to be capable of rejecting items 
 without throwing an exception.
 I don't mind writing the code for this, but there are a great many ways in 
 which this can be done.
 So I was wondering what the interface should look like.
 Separate FilteredList class.
 Works, but seems a little verbose for the purpose
 New factory method: filteredList(ListT list, Predicate? super T 
 predicate) 
 Nice and simple, but doesn't allow extension; other ways of dealing with 
 predicate failure.
 New factory method with enum: predicatedList(ListT list, Predicate? super 
 T predicate, PredicateFailEnum action)
 More verbose to use and adds an extra class, but allows more alternative ways 
 to deal with predicate failure.
 One more nice thing is that it might be less confusing, 
 because choosing between predicatedList and the above filteredList might not 
 be so obvious.
 New factory method with interface: filteredList(ListT list, Predicate? 
 super T predicate, PredicateFailInterface action)
 Complex, but the most flexible way of dealing with predicate failure.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (COLLECTIONS-530) Rejecting items on predicate failure without throwing an Exception

2015-01-14 Thread Erik (JIRA)

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

Erik updated COLLECTIONS-530:
-
Attachment: COLLECTIONS-530-v0.0.1.alpha.zip

 Rejecting items on predicate failure without throwing an Exception
 --

 Key: COLLECTIONS-530
 URL: https://issues.apache.org/jira/browse/COLLECTIONS-530
 Project: Commons Collections
  Issue Type: Improvement
  Components: List
Affects Versions: 4.0
Reporter: Erik
 Fix For: 4.x

 Attachments: COLLECTIONS-530-v0.0.1.alpha.zip


 The PredicatedList class doesn't allow entries that fail the predicate, but 
 throws an Exception on entry.
 The problem I have with this, is that it places the onus of filtering out 
 invalid entries on the caller.
 I typically add items in a loop. The item added is the result of a method 
 call (which returns null if it can't create one).
 This problem is so common for me that I have created my own FilteredList 
 class that simply ignores invalid entries.
 I would like the PredicatedList class to be capable of rejecting items 
 without throwing an exception.
 I don't mind writing the code for this, but there are a great many ways in 
 which this can be done.
 So I was wondering what the interface should look like.
 Separate FilteredList class.
 Works, but seems a little verbose for the purpose
 New factory method: filteredList(ListT list, Predicate? super T 
 predicate) 
 Nice and simple, but doesn't allow extension; other ways of dealing with 
 predicate failure.
 New factory method with enum: predicatedList(ListT list, Predicate? super 
 T predicate, PredicateFailEnum action)
 More verbose to use and adds an extra class, but allows more alternative ways 
 to deal with predicate failure.
 One more nice thing is that it might be less confusing, 
 because choosing between predicatedList and the above filteredList might not 
 be so obvious.
 New factory method with interface: filteredList(ListT list, Predicate? 
 super T predicate, PredicateFailInterface action)
 Complex, but the most flexible way of dealing with predicate failure.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (COLLECTIONS-530) Rejecting items on predicate failure without throwing an Exception

2014-06-01 Thread Erik (JIRA)

[ 
https://issues.apache.org/jira/browse/COLLECTIONS-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14015107#comment-14015107
 ] 

Erik commented on COLLECTIONS-530:
--

Thanks Thomas, I was not aware of that.
In that case, I agree that this feature should not be added to 
common-collections in the above form.

Alternatively I could write a FilteredCollectionBuilder class like so:

FilteredCollectionBuilderE builder = new 
FilteredCollectionBuilder(predicate);
builder.addIfPredicateAccepts(e);
builder.addAllAcceptedByPredicate(collection);
PredicatedListE list = builder.createPredicatedListFromAcceptedElements(new 
ArrayListE());
PredicatedSetE set = builder.createPredicatedSetFromAcceptedElements(new 
ArrayListE());

Would you be interested in that?

 Rejecting items on predicate failure without throwing an Exception
 --

 Key: COLLECTIONS-530
 URL: https://issues.apache.org/jira/browse/COLLECTIONS-530
 Project: Commons Collections
  Issue Type: Improvement
  Components: List
Affects Versions: 4.0
Reporter: Erik

 The PredicatedList class doesn't allow entries that fail the predicate, but 
 throws an Exception on entry.
 The problem I have with this, is that it places the onus of filtering out 
 invalid entries on the caller.
 I typically add items in a loop. The item added is the result of a method 
 call (which returns null if it can't create one).
 This problem is so common for me that I have created my own FilteredList 
 class that simply ignores invalid entries.
 I would like the PredicatedList class to be capable of rejecting items 
 without throwing an exception.
 I don't mind writing the code for this, but there are a great many ways in 
 which this can be done.
 So I was wondering what the interface should look like.
 Separate FilteredList class.
 Works, but seems a little verbose for the purpose
 New factory method: filteredList(ListT list, Predicate? super T 
 predicate) 
 Nice and simple, but doesn't allow extension; other ways of dealing with 
 predicate failure.
 New factory method with enum: predicatedList(ListT list, Predicate? super 
 T predicate, PredicateFailEnum action)
 More verbose to use and adds an extra class, but allows more alternative ways 
 to deal with predicate failure.
 One more nice thing is that it might be less confusing, 
 because choosing between predicatedList and the above filteredList might not 
 be so obvious.
 New factory method with interface: filteredList(ListT list, Predicate? 
 super T predicate, PredicateFailInterface action)
 Complex, but the most flexible way of dealing with predicate failure.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (COLLECTIONS-530) Rejecting items on predicate failure without throwing an Exception

2014-05-21 Thread Erik (JIRA)
Erik created COLLECTIONS-530:


 Summary: Rejecting items on predicate failure without throwing an 
Exception
 Key: COLLECTIONS-530
 URL: https://issues.apache.org/jira/browse/COLLECTIONS-530
 Project: Commons Collections
  Issue Type: Improvement
  Components: List
Affects Versions: 4.0
Reporter: Erik



The PredicatedList class doesn't allow entries that fail the predicate, but 
throws an Exception on entry.
The problem I have with this, is that it places the onus of filtering out 
invalid entries on the caller.
I typically add items in a loop. The item added is the result of a method call 
(which returns null if it can't create one).
This problem is so common for me that I have created my own FilteredList class 
that simply ignores invalid entries.
I would like the PredicatedList class to be capable of rejecting items without 
throwing an exception.
I don't mind writing the code for this, but there are a great many ways in 
which this can be done.
So I was wondering what the interface should look like.

Separate FilteredList class.
Works, but seems a little verbose for the purpose

New factory method: filteredList(ListT list, Predicate? super T predicate) 
Nice and simple, but doesn't allow extension; other ways of dealing with 
predicate failure.

New factory method with enum: predicatedList(ListT list, Predicate? super T 
predicate, PredicateFailEnum action)
More verbose to use and adds an extra class, but allows more alternative ways 
to deal with predicate failure.
One more nice thing is that it might be less confusing, 
because choosing between predicatedList and the above filteredList might not be 
so obvious.

New factory method with interface: filteredList(ListT list, Predicate? super 
T predicate, PredicateFailInterface action)
Complex, but the most flexible way of dealing with predicate failure.




--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] Created: (NET-277) nntp AUTHENTICATION_REQUIRED costant has the wrong value

2009-05-03 Thread Erik (JIRA)
nntp AUTHENTICATION_REQUIRED costant has the wrong value


 Key: NET-277
 URL: https://issues.apache.org/jira/browse/NET-277
 Project: Commons Net
  Issue Type: Bug
Affects Versions: 2.0
Reporter: Erik
Priority: Trivial


In the class NNTPReply, I found the following status code:

public static final int AUTHENTICATION_REQUIRED = CODE_408;

My server returns 480, which I believe is the correct code.

   480: The client must authenticate itself to the server (that is, it
  must provide information as to the identity of the client) before
  the facility can be used on this connection.  This will involve
  the use of an authentication extension such as [NNTP-AUTH].


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