//Add all changes to KieFileSystem before executing the build
final List<String> changedFilesKieBuilderPaths = new ArrayList<String>();
for ( ResourceChange change : changes ) {
final ChangeType type = change.getType();
final Path resource = paths.convert( change.getPath() );
//Only files can be processed
if ( !Files.isRegularFile( resource ) ) {
continue;
}
PortablePreconditions.checkNotNull( "type",
type );
PortablePreconditions.checkNotNull( "resource",
resource );
final String destinationPath = resource.toUri().toString().substring( projectPrefix.length() + 1 );
switch ( type ) {
case ADD:
case UPDATE:
//Add/update resource
final InputStream is = ioService.newInputStream( resource );