Skip to content

Commit

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

* Fix package name comparison in Spring Boot

* Fix package name comparison in Spring Boot
  • Loading branch information
baldimir authored Aug 3, 2023
1 parent 75985dd commit e27400f
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,18 +378,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 e27400f

Please sign in to comment.