kwin opened a new issue, #793: URL: https://github.com/apache/maven-shade-plugin/issues/793
### Affected version 3.6.2 ### Bug description In https://github.com/apache/maven-shade-plugin/issues/461 there was a use case described to move a package from [unnamed/default package](https://docs.oracle.com/javase/specs/jls/se8/html/jls-7.html#jls-7.4.2) to another package. Although back then there was a fix provided which prevents a NPE I don't think this was ever working fully due to these reasons: - Moving from unnamed to some other package requires *new* import statement for referencing code (those are not generated by m-shade-p). Compare with > A type in an unnamed package ([ยง7.4.2](https://docs.oracle.com/javase/specs/jls/se7/html/jls-7.html#jls-7.4.2)) has no canonical name, so the requirement for a canonical name in every kind of import declaration implies that (a) types in an unnamed package cannot be imported... (from https://docs.oracle.com/javase/specs/jls/se7/html/jls-7.html#jls-7.5) - Calling some of the `relocate` methods from `SimpleRelocator` where pattern is the empty string leads to incorrect results Given that I would therefore recommend to bail out with an exception whenever there is a relocation given without a `pattern` ``` <relocation> <pattern /> <shadedPattern>org.example.foo.bar</shadedPattern> </relocation> ``` or ``` <relocation> <shadedPattern>org.example.foo.bar</shadedPattern> </relocation> ``` -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
