[MPLUGIN-290] Version 3.4 fails to parse enums with Regex patterns

Already fixed by the upgrade of QDox to 2.0-M5 done in r1778362. Test added to prevent regressions.

git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1778912 13f79535-47bb-0310-9956-ffa450edef68
master
Guillaume Boué 2017-01-15 13:08:04 +00:00
parent 1f70e4ea47
commit e44bb78aff
3 changed files with 73 additions and 0 deletions

View File

@ -249,4 +249,12 @@ public class JavaMojoDescriptorExtractorTest
assertNull( results ); assertNull( results );
} }
public void testEnumWithRegexPattern()
throws Exception
{
List<MojoDescriptor> results = extract( "MPLUGIN-290" );
assertNull( results );
}
} }

View File

@ -0,0 +1,32 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import java.util.regex.Pattern;
public enum Test
{
Test( Pattern.compile( "a" ) );
private Test( Pattern p )
{
}
}

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<plugin>
<name></name>
<description></description>
<groupId></groupId>
<artifactId></artifactId>
<version></version>
<goalPrefix>test</goalPrefix>
<isolatedRealm>false</isolatedRealm>
<inheritedByDefault>true</inheritedByDefault>
<mojos/>
<dependencies/>
</plugin>