harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Yu (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-5858) [classlib][regex] Regex LITERAL flag can't be identified
Date Tue, 03 Jun 2008 11:56:45 GMT
[classlib][regex] Regex LITERAL flag can't be identified
--------------------------------------------------------

                 Key: HARMONY-5858
                 URL: https://issues.apache.org/jira/browse/HARMONY-5858
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
    Affects Versions: 5.0M6
            Reporter: Jim Yu
             Fix For: 5.0M7


The LITERAL flag can't be identified by Harmony. 

import java.util.regex.Pattern;
import java.util.regex.Matcher;

public class RegexFlag {

    /**
     * @param args
     */
    public static void main(String[] args) {
        try{
            Pattern regex = Pattern.compile("\\u6211", Pattern.LITERAL);  
            Matcher matcher = regex.matcher("\\u6211");
            System.out.println(matcher.matches());
        }
        catch(IllegalArgumentException e){
            e.printStackTrace();
        }       

    }

}

Output of RI: true
Output of Harmony: 
java.lang.IllegalArgumentException: Invalid match flags value
	at java.util.regex.Pattern.compile(Pattern.java:278)
	at com.ibm.Jim.RegexFlag.main(RegexFlag.java:13)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message