[jira] [Commented] (LUCENE-4172) clean up redundant throws clauses

2012-06-29 Thread Steven Rowe (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13403733#comment-13403733
 ] 

Steven Rowe commented on LUCENE-4172:
-

bq. What's wrong with?:  import package.*; – especially when there are many 
classes?

Some reasons given here: 
[http://stackoverflow.com/questions/147454/why-is-using-a-wild-card-with-a-java-import-statement-bad]:
 namespace polution; package additions can trigger compilation failure; 
compilation is slower.

My IDE (IntelliJ) automatically folds imports, so assuming most devs have a 
similar experience, many classes in a package don't cause actual clutter.

bq. And is there a coding standard that Lucene/Solr adheres to? I am unaware.

The only standard I've seen referred to is Sun's Java style rules, with the 
exception of 2 spaces per indent level instead of 4.

 clean up redundant throws clauses
 -

 Key: LUCENE-4172
 URL: https://issues.apache.org/jira/browse/LUCENE-4172
 Project: Lucene - Java
  Issue Type: Bug
Reporter: Robert Muir
Assignee: Steven Rowe
 Fix For: 4.0, 5.0

 Attachments: LUCENE-4172.patch, LUCENE-4172.patch, LUCENE-4172.patch


 examples are things like ctors that list throws XYZException but actually 
 dont, and things like 'throws CorruptIndex, LockObtainedFailed, IOException' 
 when all of these are actually IOException.

--
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



-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4172) clean up redundant throws clauses

2012-06-29 Thread Michael McCandless (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13403806#comment-13403806
 ] 

Michael McCandless commented on LUCENE-4172:


I prefer the individual imports, not wildcards.

 clean up redundant throws clauses
 -

 Key: LUCENE-4172
 URL: https://issues.apache.org/jira/browse/LUCENE-4172
 Project: Lucene - Java
  Issue Type: Bug
Reporter: Robert Muir
Assignee: Steven Rowe
 Fix For: 4.0, 5.0

 Attachments: LUCENE-4172.patch, LUCENE-4172.patch, LUCENE-4172.patch


 examples are things like ctors that list throws XYZException but actually 
 dont, and things like 'throws CorruptIndex, LockObtainedFailed, IOException' 
 when all of these are actually IOException.

--
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



-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4172) clean up redundant throws clauses

2012-06-28 Thread Robert Muir (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13402956#comment-13402956
 ] 

Robert Muir commented on LUCENE-4172:
-

+1

I think you should commit before the patch gets out of date!

 clean up redundant throws clauses
 -

 Key: LUCENE-4172
 URL: https://issues.apache.org/jira/browse/LUCENE-4172
 Project: Lucene - Java
  Issue Type: Bug
Reporter: Robert Muir
 Attachments: LUCENE-4172.patch, LUCENE-4172.patch


 examples are things like ctors that list throws XYZException but actually 
 dont, and things like 'throws CorruptIndex, LockObtainedFailed, IOException' 
 when all of these are actually IOException.

--
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



-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4172) clean up redundant throws clauses

2012-06-28 Thread David Smiley (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13403700#comment-13403700
 ] 

David Smiley commented on LUCENE-4172:
--

What's wrong with?:

import package.*;

-- especially when there are many classes?
And is there a coding standard that Lucene/Solr adheres to?  I am unaware.

 clean up redundant throws clauses
 -

 Key: LUCENE-4172
 URL: https://issues.apache.org/jira/browse/LUCENE-4172
 Project: Lucene - Java
  Issue Type: Bug
Reporter: Robert Muir
Assignee: Steven Rowe
 Fix For: 4.0, 5.0

 Attachments: LUCENE-4172.patch, LUCENE-4172.patch, LUCENE-4172.patch


 examples are things like ctors that list throws XYZException but actually 
 dont, and things like 'throws CorruptIndex, LockObtainedFailed, IOException' 
 when all of these are actually IOException.

--
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



-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4172) clean up redundant throws clauses

2012-06-27 Thread Steven Rowe (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13402669#comment-13402669
 ] 

Steven Rowe commented on LUCENE-4172:
-

IntelliJ has two relevant inspections: Redundant throws clause and Duplicate 
throws.  I've applied your patch to trunk and I'm running these on the whole 
project to see what they find.

 clean up redundant throws clauses
 -

 Key: LUCENE-4172
 URL: https://issues.apache.org/jira/browse/LUCENE-4172
 Project: Lucene - Java
  Issue Type: Bug
Reporter: Robert Muir
 Attachments: LUCENE-4172.patch


 examples are things like ctors that list throws XYZException but actually 
 dont, and things like 'throws CorruptIndex, LockObtainedFailed, IOException' 
 when all of these are actually IOException.

--
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



-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Commented] (LUCENE-4172) clean up redundant throws clauses

2012-06-27 Thread Robert Muir (JIRA)

[ 
https://issues.apache.org/jira/browse/LUCENE-4172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13402680#comment-13402680
 ] 

Robert Muir commented on LUCENE-4172:
-

that sounds nice: I think we always want to fix 'duplicate throws'.

But redundant throws requires some decisions... basically i looked at each one 
and:
* nuke the redundant throws if its a static method, private, or 
package-private, or final
* nuke the redundant throws if its a ctor (subclass can always declare its own)
* keep the redundant throws if its public/protected non-final method that can 
be overridden

 clean up redundant throws clauses
 -

 Key: LUCENE-4172
 URL: https://issues.apache.org/jira/browse/LUCENE-4172
 Project: Lucene - Java
  Issue Type: Bug
Reporter: Robert Muir
 Attachments: LUCENE-4172.patch


 examples are things like ctors that list throws XYZException but actually 
 dont, and things like 'throws CorruptIndex, LockObtainedFailed, IOException' 
 when all of these are actually IOException.

--
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



-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org