You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (Created) (JIRA)" <ji...@apache.org> on 2011/11/14 16:00:52 UTC
[jira] [Created] (LUCENE-3574) Add some more constants for newer
Java versions to Constants.class, remove outdated ones.
Add some more constants for newer Java versions to Constants.class, remove outdated ones.
-----------------------------------------------------------------------------------------
Key: LUCENE-3574
URL: https://issues.apache.org/jira/browse/LUCENE-3574
Project: Lucene - Java
Issue Type: New Feature
Components: core/other
Reporter: Uwe Schindler
Assignee: Uwe Schindler
Fix For: 3.5, 4.0
Preparation for LUCENE-3235:
This adds constants to quickly detect Java6 and Java7 to Constants.java. It also deprecated and removes the outdated historical Java versions.
--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-3574) Add some more constants for newer
Java versions to Constants.class, remove outdated ones.
Posted by "Shai Erera (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149667#comment-13149667 ]
Shai Erera commented on LUCENE-3574:
------------------------------------
One typo: "nsme" -> "name"
Also, not sure if it's worth it, but perhaps instead of constants like MIMINUM_JAVA_X we can have a class JavaVersion that follows the same logic we have in Version and can compare itself to other JavaVersions? Then we can have constants for JAVA_6 = new JavaVersion(6) and similar for JAVA_7, and another CURRENT_JAVA_VER that is initialized with the code you wrote. And you can then compare CURRENT to JAVA_6/7?
Just an idea.
> Add some more constants for newer Java versions to Constants.class, remove outdated ones.
> -----------------------------------------------------------------------------------------
>
> Key: LUCENE-3574
> URL: https://issues.apache.org/jira/browse/LUCENE-3574
> Project: Lucene - Java
> Issue Type: New Feature
> Components: core/other
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: 3.5, 4.0
>
> Attachments: LUCENE-3574-3x.patch
>
>
> Preparation for LUCENE-3235:
> This adds constants to quickly detect Java6 and Java7 to Constants.java. It also deprecated and removes the outdated historical Java versions.
--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-3574) Add some more constants for newer
Java versions to Constants.class, remove outdated ones.
Posted by "Shai Erera (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149679#comment-13149679 ]
Shai Erera commented on LUCENE-3574:
------------------------------------
Exactly (I think that's what I meant) -- we detect the Java version as best we can and store it in a constant JAVA_VERSION. It can be compared to JAVA_6/7 thru an atLeast() API, like JAVA_VERSION.atLeast(JAVA_7).
The code in 3.5 will only know to detect up to Java 7, while the code in 5.2 will know to detect Java 8.
Wouldn't that work?
> Add some more constants for newer Java versions to Constants.class, remove outdated ones.
> -----------------------------------------------------------------------------------------
>
> Key: LUCENE-3574
> URL: https://issues.apache.org/jira/browse/LUCENE-3574
> Project: Lucene - Java
> Issue Type: New Feature
> Components: core/other
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: 3.5, 4.0
>
> Attachments: LUCENE-3574-3x.patch
>
>
> Preparation for LUCENE-3235:
> This adds constants to quickly detect Java6 and Java7 to Constants.java. It also deprecated and removes the outdated historical Java versions.
--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-3574) Add some more constants for newer
Java versions to Constants.class, remove outdated ones.
Posted by "Uwe Schindler (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149677#comment-13149677 ]
Uwe Schindler commented on LUCENE-3574:
---------------------------------------
bq. One typo: "nsme" -> "name"
nsme -> NoSuchMethodException
> Add some more constants for newer Java versions to Constants.class, remove outdated ones.
> -----------------------------------------------------------------------------------------
>
> Key: LUCENE-3574
> URL: https://issues.apache.org/jira/browse/LUCENE-3574
> Project: Lucene - Java
> Issue Type: New Feature
> Components: core/other
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: 3.5, 4.0
>
> Attachments: LUCENE-3574-3x.patch
>
>
> Preparation for LUCENE-3235:
> This adds constants to quickly detect Java6 and Java7 to Constants.java. It also deprecated and removes the outdated historical Java versions.
--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-3574) Add some more constants for newer
Java versions to Constants.class, remove outdated ones.
Posted by "Robert Muir (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149671#comment-13149671 ]
Robert Muir commented on LUCENE-3574:
-------------------------------------
{quote}
Also, not sure if it's worth it, but perhaps instead of constants like MIMINUM_JAVA_X we can have a class JavaVersion that follows the same logic we have in Version
{quote}
I think the problem here would be that say we release 3.5 in a week.
Then two years later Java 8 comes out... we can't know today how to detect it. So all we can do is say that we are 'at least' java 7 because we have XYZ.
> Add some more constants for newer Java versions to Constants.class, remove outdated ones.
> -----------------------------------------------------------------------------------------
>
> Key: LUCENE-3574
> URL: https://issues.apache.org/jira/browse/LUCENE-3574
> Project: Lucene - Java
> Issue Type: New Feature
> Components: core/other
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: 3.5, 4.0
>
> Attachments: LUCENE-3574-3x.patch
>
>
> Preparation for LUCENE-3235:
> This adds constants to quickly detect Java6 and Java7 to Constants.java. It also deprecated and removes the outdated historical Java versions.
--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-3574) Add some more constants for newer
Java versions to Constants.class, remove outdated ones.
Posted by "Robert Muir (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149685#comment-13149685 ]
Robert Muir commented on LUCENE-3574:
-------------------------------------
{quote}
The code in 3.5 will only know to detect up to Java 7, while the code in 5.2 will know to detect Java 8.
Wouldn't that work?
{quote}
I would prefer not to, because it opens up the opportunity to wrongly record this somewhere (e.g. diagnostics map)
or even just System.out.println or checkindex or something... it would be misleading.
> Add some more constants for newer Java versions to Constants.class, remove outdated ones.
> -----------------------------------------------------------------------------------------
>
> Key: LUCENE-3574
> URL: https://issues.apache.org/jira/browse/LUCENE-3574
> Project: Lucene - Java
> Issue Type: New Feature
> Components: core/other
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: 3.5, 4.0
>
> Attachments: LUCENE-3574-3x.patch
>
>
> Preparation for LUCENE-3235:
> This adds constants to quickly detect Java6 and Java7 to Constants.java. It also deprecated and removes the outdated historical Java versions.
--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-3574) Add some more constants for newer
Java versions to Constants.class, remove outdated ones.
Posted by "Uwe Schindler (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149697#comment-13149697 ]
Uwe Schindler commented on LUCENE-3574:
---------------------------------------
One example where it might be bad: If it's an enum, you can also do if (JAVA_VERSION==JAVA_7, so the enum constants are not named like the fact they represent.
I think thats all too much logic for something simple. For one major version we will have mostly 2 or 3 constants. In trunk we currently only have Java7 and a deprecated one which is always true. New constants are only added on request, when we want to test for features/bugs.
> Add some more constants for newer Java versions to Constants.class, remove outdated ones.
> -----------------------------------------------------------------------------------------
>
> Key: LUCENE-3574
> URL: https://issues.apache.org/jira/browse/LUCENE-3574
> Project: Lucene - Java
> Issue Type: New Feature
> Components: core/other
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: 3.5, 4.0
>
> Attachments: LUCENE-3574-3x.patch
>
>
> Preparation for LUCENE-3235:
> This adds constants to quickly detect Java6 and Java7 to Constants.java. It also deprecated and removes the outdated historical Java versions.
--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-3574) Add some more constants for newer
Java versions to Constants.class, remove outdated ones.
Posted by "Shai Erera (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149682#comment-13149682 ]
Shai Erera commented on LUCENE-3574:
------------------------------------
bq. nsme -> NoSuchMethodException
ah, ok :).
> Add some more constants for newer Java versions to Constants.class, remove outdated ones.
> -----------------------------------------------------------------------------------------
>
> Key: LUCENE-3574
> URL: https://issues.apache.org/jira/browse/LUCENE-3574
> Project: Lucene - Java
> Issue Type: New Feature
> Components: core/other
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: 3.5, 4.0
>
> Attachments: LUCENE-3574-3x.patch
>
>
> Preparation for LUCENE-3235:
> This adds constants to quickly detect Java6 and Java7 to Constants.java. It also deprecated and removes the outdated historical Java versions.
--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-3574) Add some more constants for newer
Java versions to Constants.class, remove outdated ones.
Posted by "Uwe Schindler (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler updated LUCENE-3574:
----------------------------------
Attachment: LUCENE-3574-3x.patch
Patch for Lucene 3.x
will remove deprecations in trunk and make JRE_IS_MINIMUM_JRE6 = true (+ deprecate it there)
> Add some more constants for newer Java versions to Constants.class, remove outdated ones.
> -----------------------------------------------------------------------------------------
>
> Key: LUCENE-3574
> URL: https://issues.apache.org/jira/browse/LUCENE-3574
> Project: Lucene - Java
> Issue Type: New Feature
> Components: core/other
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: 3.5, 4.0
>
> Attachments: LUCENE-3574-3x.patch
>
>
> Preparation for LUCENE-3235:
> This adds constants to quickly detect Java6 and Java7 to Constants.java. It also deprecated and removes the outdated historical Java versions.
--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-3574) Add some more constants for newer
Java versions to Constants.class, remove outdated ones.
Posted by "Uwe Schindler (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149665#comment-13149665 ]
Uwe Schindler commented on LUCENE-3574:
---------------------------------------
Committed 3.x revision: 1201739
> Add some more constants for newer Java versions to Constants.class, remove outdated ones.
> -----------------------------------------------------------------------------------------
>
> Key: LUCENE-3574
> URL: https://issues.apache.org/jira/browse/LUCENE-3574
> Project: Lucene - Java
> Issue Type: New Feature
> Components: core/other
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: 3.5, 4.0
>
> Attachments: LUCENE-3574-3x.patch
>
>
> Preparation for LUCENE-3235:
> This adds constants to quickly detect Java6 and Java7 to Constants.java. It also deprecated and removes the outdated historical Java versions.
--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Resolved] (LUCENE-3574) Add some more constants for newer
Java versions to Constants.class, remove outdated ones.
Posted by "Uwe Schindler (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler resolved LUCENE-3574.
-----------------------------------
Resolution: Fixed
Committed trunk revision: 1201741
> Add some more constants for newer Java versions to Constants.class, remove outdated ones.
> -----------------------------------------------------------------------------------------
>
> Key: LUCENE-3574
> URL: https://issues.apache.org/jira/browse/LUCENE-3574
> Project: Lucene - Java
> Issue Type: New Feature
> Components: core/other
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: 3.5, 4.0
>
> Attachments: LUCENE-3574-3x.patch
>
>
> Preparation for LUCENE-3235:
> This adds constants to quickly detect Java6 and Java7 to Constants.java. It also deprecated and removes the outdated historical Java versions.
--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-3574) Add some more constants for newer
Java versions to Constants.class, remove outdated ones.
Posted by "Shai Erera (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13149732#comment-13149732 ]
Shai Erera commented on LUCENE-3574:
------------------------------------
Ok I'm convinced :). Was just a thought
> Add some more constants for newer Java versions to Constants.class, remove outdated ones.
> -----------------------------------------------------------------------------------------
>
> Key: LUCENE-3574
> URL: https://issues.apache.org/jira/browse/LUCENE-3574
> Project: Lucene - Java
> Issue Type: New Feature
> Components: core/other
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: 3.5, 4.0
>
> Attachments: LUCENE-3574-3x.patch
>
>
> Preparation for LUCENE-3235:
> This adds constants to quickly detect Java6 and Java7 to Constants.java. It also deprecated and removes the outdated historical Java versions.
--
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org