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

Uwe Schindler commented on LUCENE-6978:
---------------------------------------

I know why this happens. Will fix later. It is only partly related to this 
Issue.

D)}++2+as+SORT,++CURRENT_TIMESTAMP+as+SECOND_TS,++'${dataimporter.functions.formatDate(FIRST.FIRST_TS,+'yyyy',+'nn_NO')}'+as+SECOND1_S,+++'FISH'+AS+MEAT,++'FRY'+AS+METHOD,++'SIRLOIN'+AS+CUTS,++'BEEF_CUTS'+AS+WHATKIND+from+DUAL+WHERE+1%3D${FIRST.ID}+ORDER+BY+SORT+">%0a+++<field+column%3D"SECOND_S"+name%3D"second_s"+/>+%0a+++<field+column%3D"SECOND1_S"+name%3D"second1_s"+/>+%0a+++<field+column%3D"second2_s"+template%3D"${dataimporter.functions.formatDate(SECOND.SECOND_TS,+'yyyy',+'nn_NO')}"+/>+%0a+++<field+column%3D"second3_s"+template%3D"${dih.functions.formatDate(SECOND.SECOND_TS,+'yyyy',+'nn_NO')}"+/>+%0a+++<field+column%3D"METHOD"+name%3D"${SECOND.MEAT}_s"/>%0a+++<field+column%3D"CUTS"+name%3D"${SECOND.WHATKIND}_mult_s"/>%0a++</entity>%0a</entity>%0a</document>+%0a</dataConfig>+%0a&commit=true}{deleteByQuery=*:*}

--
Uwe Schindler
H.-H.-Meier-Allee 63, 28213 Bremen
http://www.thetaphi.de


> Make LuceneTestCase use language tags instead of parsing locales by hand
> ------------------------------------------------------------------------
>
>                 Key: LUCENE-6978
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6978
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/test-framework
>            Reporter: Uwe Schindler
>            Assignee: Uwe Schindler
>             Fix For: 5.5, Trunk
>
>         Attachments: LUCENE-6978-5x.patch, LUCENE-6978.patch, 
> LUCENE-6978.patch, LUCENE-6978.patch
>
>
> Since we are on Java 7, the JDK supports standardized language tags as 
> identifiers for Locales. Previous versions of JDK were missing a constructor 
> from {{Locale#toString()}} back to a locale, so we had our own, which was 
> broken several times after the JDK changed their Locale internals.
> This patch will do the following:
> - When printing the reproduce line, it will use {{Locale#getLanguageTag()}}, 
> so you can identify the locale in standardized form. Most notable change is 
> (next to more flexibility around asian languages) the change away from 
> undescores. So it prints "en-US", not "en_US".
> - The code that parses a locale uses Locale's Builder and sets the language 
> tag. This will fail if the tag is invalid! A trap is 
> {{Locale#forLanguageTag}}, because this one silently returns root locale if 
> unparseable...
> - The random locale is choosen from all language tags, which are extracted 
> from the JDK as a {{String[]}} array.
> I would also like to place {{Locale#forLanguageTag}} on the forbidden list 
> and disallow directly calling {{Locale#toString()}}, the latter is legacy API 
> (according to Java 7 Javadocs). This would fail code that calls toString() 
> directly, e.g. when formatting stuff like {{"my Locale: " + locale}}. Of 
> course we cannot catch all bad uses.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to