You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Simon Willnauer (JIRA)" <ji...@apache.org> on 2009/06/30 12:01:47 UTC

[jira] Created: (LUCENE-1724) Analysis package calls Java 1.5 API

Analysis package calls Java 1.5 API
-----------------------------------

                 Key: LUCENE-1724
                 URL: https://issues.apache.org/jira/browse/LUCENE-1724
             Project: Lucene - Java
          Issue Type: Improvement
          Components: Analysis
            Reporter: Simon Willnauer
             Fix For: 2.9


I found compile errors when I tried to compile trunk with 1.4 JVM.
org.apache.lucene.analysis.NormalizeCharMap
org.apache.lucene.analysis.MappingCharFilter

uses Character.valueOf() which has been added in 1.5.
I added a CharacterCache (+ testcase) with a valueOf method as a replacement for that quite useful method.

org.apache.lucene.analysis.BaseTokenTestCase

uses StringBuilder instead of the synchronized version StringBuffer (available in 1.4)

I will attach a patch shortly.

-- 
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Resolved: (LUCENE-1724) Analysis package calls Java 1.5 API

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless resolved LUCENE-1724.
----------------------------------------

    Resolution: Fixed

Thanks Simon, I just committed this!  I added a deprecated note to CharacterCache to remind us to move to the 1.5 APIs, and replaced the <= 127 with < cache.length.

> Analysis package calls Java 1.5 API
> -----------------------------------
>
>                 Key: LUCENE-1724
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1724
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>             Fix For: 2.9
>
>         Attachments: CharacterCache.patch
>
>
> I found compile errors when I tried to compile trunk with 1.4 JVM.
> org.apache.lucene.analysis.NormalizeCharMap
> org.apache.lucene.analysis.MappingCharFilter
> uses Character.valueOf() which has been added in 1.5.
> I added a CharacterCache (+ testcase) with a valueOf method as a replacement for that quite useful method.
> org.apache.lucene.analysis.BaseTokenTestCase
> uses StringBuilder instead of the synchronized version StringBuffer (available in 1.4)
> I will attach a patch shortly.

-- 
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1724) Analysis package calls Java 1.5 API

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725586#action_12725586 ] 

Uwe Schindler commented on LUCENE-1724:
---------------------------------------

A possible solution would be LUCENE-718.

> Analysis package calls Java 1.5 API
> -----------------------------------
>
>                 Key: LUCENE-1724
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1724
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>             Fix For: 2.9
>
>         Attachments: CharacterCache.patch
>
>
> I found compile errors when I tried to compile trunk with 1.4 JVM.
> org.apache.lucene.analysis.NormalizeCharMap
> org.apache.lucene.analysis.MappingCharFilter
> uses Character.valueOf() which has been added in 1.5.
> I added a CharacterCache (+ testcase) with a valueOf method as a replacement for that quite useful method.
> org.apache.lucene.analysis.BaseTokenTestCase
> uses StringBuilder instead of the synchronized version StringBuffer (available in 1.4)
> I will attach a patch shortly.

-- 
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1724) Analysis package calls Java 1.5 API

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725589#action_12725589 ] 

Uwe Schindler commented on LUCENE-1724:
---------------------------------------

bq. Second Step: build contrib with 1.5 JDK

Only those with 1.5, all other contribs  together with core. So add something -Djavac.target to ant, that specifies what to compile and test. If it is 1.4, all 1.5 contribs are left out.

In my opinion, this is too late to change. After 2.9 will come 3.0 with Java 1.5 support. As noted in the mailing lists before, I would suggest, that the release process should simply include a test-compilation with 1.4 (I think it is noted in the Wiki, that this must be done before packaging the artifacts).

> Analysis package calls Java 1.5 API
> -----------------------------------
>
>                 Key: LUCENE-1724
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1724
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>             Fix For: 2.9
>
>         Attachments: CharacterCache.patch
>
>
> I found compile errors when I tried to compile trunk with 1.4 JVM.
> org.apache.lucene.analysis.NormalizeCharMap
> org.apache.lucene.analysis.MappingCharFilter
> uses Character.valueOf() which has been added in 1.5.
> I added a CharacterCache (+ testcase) with a valueOf method as a replacement for that quite useful method.
> org.apache.lucene.analysis.BaseTokenTestCase
> uses StringBuilder instead of the synchronized version StringBuffer (available in 1.4)
> I will attach a patch shortly.

-- 
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1724) Analysis package calls Java 1.5 API

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725585#action_12725585 ] 

Uwe Schindler commented on LUCENE-1724:
---------------------------------------

The problem is, some contribs must be build with 1.5. So you need to use at least 1.5 for the whole build. The core and anaylsis javac are parametrized with -source and -target to 1.4 which generates 1.4 java classes out of only 1.4 compatible source code.

The problem here is, that the java compiler has no possibility to check if a *method/class* is available in 1.4, as it only knows his own rt.jar (normally it could e.g. use the @since javadoc tag, but this is not includedin the rt.jar and an annotation is not available). This is a well known problem to all java developers.

> Analysis package calls Java 1.5 API
> -----------------------------------
>
>                 Key: LUCENE-1724
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1724
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>             Fix For: 2.9
>
>         Attachments: CharacterCache.patch
>
>
> I found compile errors when I tried to compile trunk with 1.4 JVM.
> org.apache.lucene.analysis.NormalizeCharMap
> org.apache.lucene.analysis.MappingCharFilter
> uses Character.valueOf() which has been added in 1.5.
> I added a CharacterCache (+ testcase) with a valueOf method as a replacement for that quite useful method.
> org.apache.lucene.analysis.BaseTokenTestCase
> uses StringBuilder instead of the synchronized version StringBuffer (available in 1.4)
> I will attach a patch shortly.

-- 
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1724) Analysis package calls Java 1.5 API

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725583#action_12725583 ] 

Simon Willnauer commented on LUCENE-1724:
-----------------------------------------

Michael, I wonder why hudson does still not catch this. Who is the hudson admin? We should change the JVM to a 1.4 VM on hudson if possible. If we need to send a request to infrastructure I could do so.

simon

> Analysis package calls Java 1.5 API
> -----------------------------------
>
>                 Key: LUCENE-1724
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1724
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>             Fix For: 2.9
>
>         Attachments: CharacterCache.patch
>
>
> I found compile errors when I tried to compile trunk with 1.4 JVM.
> org.apache.lucene.analysis.NormalizeCharMap
> org.apache.lucene.analysis.MappingCharFilter
> uses Character.valueOf() which has been added in 1.5.
> I added a CharacterCache (+ testcase) with a valueOf method as a replacement for that quite useful method.
> org.apache.lucene.analysis.BaseTokenTestCase
> uses StringBuilder instead of the synchronized version StringBuffer (available in 1.4)
> I will attach a patch shortly.

-- 
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Assigned: (LUCENE-1724) Analysis package calls Java 1.5 API

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael McCandless reassigned LUCENE-1724:
------------------------------------------

    Assignee: Michael McCandless

> Analysis package calls Java 1.5 API
> -----------------------------------
>
>                 Key: LUCENE-1724
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1724
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>             Fix For: 2.9
>
>         Attachments: CharacterCache.patch
>
>
> I found compile errors when I tried to compile trunk with 1.4 JVM.
> org.apache.lucene.analysis.NormalizeCharMap
> org.apache.lucene.analysis.MappingCharFilter
> uses Character.valueOf() which has been added in 1.5.
> I added a CharacterCache (+ testcase) with a valueOf method as a replacement for that quite useful method.
> org.apache.lucene.analysis.BaseTokenTestCase
> uses StringBuilder instead of the synchronized version StringBuffer (available in 1.4)
> I will attach a patch shortly.

-- 
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Commented: (LUCENE-1724) Analysis package calls Java 1.5 API

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12725587#action_12725587 ] 

Simon Willnauer commented on LUCENE-1724:
-----------------------------------------

bq. A possible solution would be LUCENE-718. 
Either this way (I use setting boot classpath all the time for different rt.jar) or we split the build procedure into two steps. Frist step: build core with 1.4 JDK Second Step: build contrib with 1.5 JDK. That way we need two hudson "Jobs" with dependencies to each other. I guess hudson lets you define this quite flexible. 

simon

> Analysis package calls Java 1.5 API
> -----------------------------------
>
>                 Key: LUCENE-1724
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1724
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis
>            Reporter: Simon Willnauer
>            Assignee: Michael McCandless
>             Fix For: 2.9
>
>         Attachments: CharacterCache.patch
>
>
> I found compile errors when I tried to compile trunk with 1.4 JVM.
> org.apache.lucene.analysis.NormalizeCharMap
> org.apache.lucene.analysis.MappingCharFilter
> uses Character.valueOf() which has been added in 1.5.
> I added a CharacterCache (+ testcase) with a valueOf method as a replacement for that quite useful method.
> org.apache.lucene.analysis.BaseTokenTestCase
> uses StringBuilder instead of the synchronized version StringBuffer (available in 1.4)
> I will attach a patch shortly.

-- 
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


[jira] Updated: (LUCENE-1724) Analysis package calls Java 1.5 API

Posted by "Simon Willnauer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-1724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Willnauer updated LUCENE-1724:
------------------------------------

    Attachment: CharacterCache.patch

> Analysis package calls Java 1.5 API
> -----------------------------------
>
>                 Key: LUCENE-1724
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1724
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Analysis
>            Reporter: Simon Willnauer
>             Fix For: 2.9
>
>         Attachments: CharacterCache.patch
>
>
> I found compile errors when I tried to compile trunk with 1.4 JVM.
> org.apache.lucene.analysis.NormalizeCharMap
> org.apache.lucene.analysis.MappingCharFilter
> uses Character.valueOf() which has been added in 1.5.
> I added a CharacterCache (+ testcase) with a valueOf method as a replacement for that quite useful method.
> org.apache.lucene.analysis.BaseTokenTestCase
> uses StringBuilder instead of the synchronized version StringBuffer (available in 1.4)
> I will attach a patch shortly.

-- 
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org