eolivelli commented on a change in pull request #95:
URL: https://github.com/apache/maven-shade-plugin/pull/95#discussion_r636855651
##########
File path: src/main/java/org/apache/maven/plugins/shade/DefaultShader.java
##########
@@ -706,45 +719,25 @@ public boolean hasRelocators()
public Object mapValue( Object object )
{
- if ( object instanceof String )
- {
- String name = (String) object;
- String value = name;
-
- String prefix = "";
- String suffix = "";
-
- Matcher m = classPattern.matcher( name );
- if ( m.matches() )
- {
- prefix = m.group( 1 ) + "L";
- suffix = ";";
- name = m.group( 2 );
- }
-
- for ( Relocator r : relocators )
- {
- if ( r.canRelocateClass( name ) )
- {
- value = prefix + r.relocateClass( name ) + suffix;
- break;
- }
- else if ( r.canRelocatePath( name ) )
- {
- value = prefix + r.relocatePath( name ) + suffix;
- break;
- }
- }
-
- return value;
- }
-
- return super.mapValue( object );
+ return object instanceof String ? map( (String) object, true ) :
super.mapValue( object );
}
public String map( String name )
{
- String value = name;
+ // TODO: Before the refactoring of duplicate code to 'private
String map(String, boolean)', this method did
Review comment:
I am sorry, I am not sure how to help.
I think that keeping the current behaviour is safer.
we can work on this topic on a follow up change
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]