[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2849) DSLMappingEntryTest fails with Java 1.5 on hudson (but not in Java 1.6)

Geoffrey De Smet (JIRA) jira-events at lists.jboss.org
Fri Dec 24 09:20:17 EST 2010


    [ https://issues.jboss.org/browse/JBRULES-2849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572280#comment-12572280 ] 

Geoffrey De Smet commented on JBRULES-2849:
-------------------------------------------

I believe the usage of "?" in the regexes is wrong (which is causing the issue).
For example: regex "(?<=\\W|^)-\\s*\\s+(.*?)\\s+is\\s+(.*?)$"

The "?" means the character before me might or might not be there.
so "ab?c" matches on "abc" and "ac"
The "(" means start of a group.
So "(?" should fail-fast (but it doesn't, just behave differently in jdk5 and jdk6).
Also ".*?" should fail-fast: either you want ".*" (none or more) or ".+" (one ore more).

> DSLMappingEntryTest fails with Java 1.5 on hudson (but not in Java 1.6)
> -----------------------------------------------------------------------
>
>                 Key: JBRULES-2849
>                 URL: https://issues.jboss.org/browse/JBRULES-2849
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-compiler
>            Reporter: Geoffrey De Smet
>            Assignee: Geoffrey De Smet
>             Fix For: 5.2.0.M2
>
>
> with java 1.5 fails it on hudson:
> https://hudson.qa.jboss.com/hudson/view/Drools/job/drools/6242/testReport/org.drools.lang.dsl/DSLMappingEntryTest/testExpandWithDots/
> the next build, with java 1.6 does not fail it on hudson:
> https://hudson.qa.jboss.com/hudson/view/Drools/job/drools/6243/testReport/org.drools.lang.dsl/DSLMappingEntryTest/testExpandWithDots/

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list