private static LicenseChoice resolveViaAlternativeMapping ( String licenseString ) { if ( licenseString == null ) { return null ; } try { for ( final Map . Entry < String , List < String > > mapping : mappings . entrySet ( ) ) { final List < String > names = mapping . getValue ( ) ; if ( names != null ) { for ( final String name : names ) { if ( licenseString . equalsIgnoreCase ( name ) ) { return resolveSpdxLicenseString ( mapping . getKey ( ) ) ; } } } } } catch ( InvalidLicenseStringException e ) { // throw it away } return null ; }
Attempts to perform high - confidence license resolution with unstructured text as input .