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

Dawid Weiss commented on LUCENE-5098:
-------------------------------------

{code}
TestBroadWord extends TestCase
{code}

Could we extend LuceneTestCase for tests, please? I know it doesn't have any 
impact here but if it's good to have a single superclass for all tests in case 
we need to tweak/ alter something.

As for longHex -- I always liked the "assembly" version better:
{code}
    final static char [] HEX = "0123456789abcdef".toCharArray();
    private static String longHex(long x)
    {
        char [] asHex = new char [16];
        for (int i = 16; --i >= 0; x >>>= 4) {
            asHex[i] = HEX[(int) x & 0x0F];
        }
        return "0x" + new String(asHex);
    }
{code}

but if you strive for simplicity this should do too:
{code}
    private static String longHex(long x)
    {
        return String.format(Locale.ENGLISH, "%016x", x);
    }
{code}
                
> Broadword bit selection
> -----------------------
>
>                 Key: LUCENE-5098
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5098
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/other
>            Reporter: Paul Elschot
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-5098.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to