[ 
https://issues.apache.org/jira/browse/LUCENE-2285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12839254#action_12839254
 ] 

Shai Erera commented on LUCENE-2285:
------------------------------------

bq. copy the entire patch to clipboard

Super Robert ! That worked !!

Now that I apply the patch, I'm back to 1,400 warnings (900 up). Many of them 
related to generated code and Snowball, but here are few comments:
* AnalyzingQueyrParser (contrib/misc), line 144 --> wlist cannot be null at 
this point because it is created (line 80) as new ArrayList. The same should be 
removed in line 161, though Eclipse does not complain, which is weird. But 
wlist cannot be null.
** Besides, the entire code segment in lines 158-164 can be improved, but let's 
leave it outside the scope of this issue.
* TestCharacterUtils - Uwe, note how there are many unnecessary casts to int 
(from char), while the actual assert method that's called is a long :). Do you 
still think these are required?
* UnicodeUtil - the chars are cast to int in code like this: _int utf32 = (int) 
str.charAt(i); --> Is that necessary too?

Besides these, I'm fine w/ the rest. Still a 2400 warnings reduction, and many 
of the ones left are either in generated code, or related to deliberate use of 
deprecated API.

> Code cleanup from all sorts of (trivial) warnings
> -------------------------------------------------
>
>                 Key: LUCENE-2285
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2285
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Shai Erera
>            Assignee: Uwe Schindler
>            Priority: Minor
>             Fix For: 3.1
>
>         Attachments: LUCENE-2285.patch, LUCENE-2285.patch, LUCENE-2285.patch
>
>
> I would like to do some code cleanup and remove all sorts of trivial 
> warnings, like unnecessary casts, problems w/ javadocs, unused variables, 
> redundant null checks, unnecessary semicolon etc. These are all very trivial 
> and should not pose any problem.
> I'll create another issue for getting rid of deprecated code usage, like 
> LuceneTestCase and all sorts of deprecated constructors. That's also trivial 
> because it only affects Lucene code, but it's a different type of change.
> Another issue I'd like to create is about introducing more generics in the 
> code, where it's missing today - not changing existing API. There are many 
> places in the code like that.
> So, with you permission, I'll start with the trivial ones first, and then 
> move on to the others.

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


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

Reply via email to