File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
src/main/java/org/spdx/utility/compare Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 3333import java .util .Arrays ;
3434import java .util .Collection ;
3535
36- import org .apache .commons .lang3 .ArrayUtils ;
3736import org .slf4j .Logger ;
3837import org .slf4j .LoggerFactory ;
3938import org .spdx .library .InvalidSPDXAnalysisException ;
@@ -784,6 +783,18 @@ public static String[] matchingStandardLicenseIds(String licenseText) throws Inv
784783 return matchingIds .toArray (new String [matchingIds .size ()]);
785784 }
786785
786+ private static <T > boolean contains (
787+ T [] array ,
788+ T value
789+ ) {
790+ for (T t : array ) {
791+ if (Objects .equals (t , value )) {
792+ return true ;
793+ }
794+ }
795+ return false ;
796+ }
797+
787798 /**
788799 * Detect if a license pass black lists
789800 * @param license license
@@ -816,7 +827,7 @@ public static boolean isLicensePassBlackList(
816827 }
817828 return false ;
818829 } else {
819- return !ArrayUtils . contains (blackList , license .toString ());
830+ return !contains (blackList , license .toString ());
820831 }
821832 }
822833
@@ -852,7 +863,7 @@ public static boolean isLicensePassWhiteList(
852863 }
853864 return false ;
854865 } else {
855- return ArrayUtils . contains (whiteList , license .toString ());
866+ return contains (whiteList , license .toString ());
856867 }
857868 }
858869
You can’t perform that action at this time.
0 commit comments