On 2/21/2013 4:12 AM, Jörn Kottmann wrote:
On 02/21/2013 06:34 AM, jko...@apache.org wrote:
-  public RegexNameFinder(Pattern patterns[]) {
+  public RegexNameFinder(Pattern patterns[], String type) {
      if (patterns == null || patterns.length == 0) {
throw new IllegalArgumentException("patterns must not be null or empty!");
      }
        mPatterns = patterns;
+    sType = type;
    }
  +  public RegexNameFinder(Pattern patterns[]) {
+    if (patterns == null || patterns.length == 0) {
+ throw new IllegalArgumentException("patiierns must not be null or empty!");
+    }
+
+    mPatterns = patterns;
+    sType = null;
+  }
+

Thanks for fixing this James. If I am not mistaken, then the second constructor could just call the first one and pass null for the type right? Then we do not need to duplicate the init code.

Jörn

Jorn,

I tried but was trying differently... this(patterns, null) should work. But null may need to be cast as a String.

James

Reply via email to