Skip to content

Commit

Permalink
[MSHADE-371] add .md support to the Apache License and Notice transfo…
Browse files Browse the repository at this point in the history
…rmers

Closes #51
  • Loading branch information
johnmillner authored and slachiewicz committed Jun 27, 2020
1 parent bba67c3 commit ba0cc3c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ public class ApacheLicenseResourceTransformer
private static final String LICENSE_PATH = "META-INF/LICENSE";

private static final String LICENSE_TXT_PATH = "META-INF/LICENSE.txt";

private static final String LICENSE_MD_PATH = "META-INF/LICENSE.md";

public boolean canTransformResource( String resource )
{
return LICENSE_PATH.equalsIgnoreCase( resource )
|| LICENSE_TXT_PATH.regionMatches( true, 0, resource, 0, LICENSE_TXT_PATH.length() );
|| LICENSE_TXT_PATH.regionMatches( true, 0, resource, 0, LICENSE_TXT_PATH.length()
|| LICENSE_MD_PATH.regionMatches( true, 0, resource, 0, LICENSE_MD_PATH.length());
}

public void processResource( String resource, InputStream is, List<Relocator> relocators, long time )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@ public class ApacheNoticeResourceTransformer
private static final String NOTICE_PATH = "META-INF/NOTICE";

private static final String NOTICE_TXT_PATH = "META-INF/NOTICE.txt";

private static final String NOTICE_MD_PATH = "META-INF/NOTICE.md";

public boolean canTransformResource( String resource )
{
return NOTICE_PATH.equalsIgnoreCase( resource ) || NOTICE_TXT_PATH.equalsIgnoreCase( resource );
return NOTICE_PATH.equalsIgnoreCase( resource )
|| NOTICE_TXT_PATH.equalsIgnoreCase( resource )
|| NOTICE_MD_PATH.equalsIgnoreCase( resource );

}

Expand Down

0 comments on commit ba0cc3c

Please sign in to comment.