Skip to content

Commit

Permalink
[7.67.x][kie-issues#394] Unnecessary warning when DRL file is placed …
Browse files Browse the repository at this point in the history
…in BOOT-INF/classes directory (#5412)

* Fix package name comparison in Spring Boot

* Fix package name comparison in Spring Boot
  • Loading branch information
baldimir authored Aug 4, 2023
1 parent 0e8271d commit c9dd829
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,18 +374,13 @@ private static boolean isFileInKieBase( KieBaseModel kieBase, String fileName, S
return true;
} else {
String folderNameForFile = lastSep > 0 ? fileName.substring( 0, lastSep ) : "";
int resourcesPos = folderNameForFile.indexOf( RESOURCES_ROOT );
if (resourcesPos >= 0) {
folderNameForFile = folderNameForFile.substring( resourcesPos + RESOURCES_ROOT.length() );
}
String pkgNameForFile = packageNameForFile( fileName, folderNameForFile, !useFolders, file );
return isPackageInKieBase( kieBase, pkgNameForFile );
}
}

private static String packageNameForFile( String fileName, String folderNameForFile, boolean discoverPackage, Supplier<InternalResource> file ) {
String packageNameFromFolder = folderNameForFile.replace( '/', '.' );

String packageNameFromFolder = getRelativePackageName(folderNameForFile.replace( '/', '.' ));
if (discoverPackage) {
String packageNameForFile = packageNameFromAsset(fileName, file.get());
if (packageNameForFile != null) {
Expand Down

0 comments on commit c9dd829

Please sign in to comment.