lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andi Vajda (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-507) CLONE -[PATCH] remove unused variables
Date Fri, 28 Apr 2006 05:04:38 GMT
    [ http://issues.apache.org/jira/browse/LUCENE-507?page=comments#action_12376874 ] 

Andi Vajda commented on LUCENE-507:
-----------------------------------

My apologies, I didn't notice this until it was mentioned today.

The "//required by gcj" comment is not something I added or need.
The few patches for gcj support that were added at my request are listed as such in the Lucene
sources. The main one has to do with gcj's bug 15411 in Searcher.java, the other with naming
a method 'delete'.
In general, it is easier to use javac or jikes to compile the .java sources to .class files
and then use gcj on the resulting .class (or .jar) files to produce native binaries. Thus,
one runs around a number of bugs in the gcj java compiler front-end.
Still, there are some patches I need to apply to Lucene in order for it to run when compiled
with gcj. Some are in QueryParser.java and the first of those could be applied to the actual
.jj file instead, see here: http://svn.osafoundation.org/pylucene/trunk/patches.lucene

The next patches in the file above are because of limitations in gcjh (the Java to C++ header
file generator) or because exception catching doesn't seem to work well with gcj on Windows.
Throwing and catching exceptions in Java is not such an efficient coding practice when there
isn't an actual error, maybe the code in FieldInfos.java could be changed then (see patch
file above) ?
As for the last patch, well, the java runtime that comes with gcj 3.x doesn't implement regex,
so PyLucene calls into python's regex support instead.

> CLONE -[PATCH] remove unused variables
> --------------------------------------
>
>          Key: LUCENE-507
>          URL: http://issues.apache.org/jira/browse/LUCENE-507
>      Project: Lucene - Java
>         Type: Improvement

>   Components: Search
>     Versions: unspecified
>  Environment: Operating System: other
> Platform: Other
>     Reporter: Steven Tamm
>     Assignee: Lucene Developers
>     Priority: Minor
>  Attachments: Unused.patch
>
> Seems I'm the only person who has the "unused variable" warning turned on in 
> Eclipse :-) This patch removes those unused variables and imports (for now 
> only in the "search" package). This doesn't introduce changes in 
> functionality, but it should be reviewed anyway: there might be cases where 
> the variables *should* be used, but they are not because of a bug.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


Mime
View raw message