mirror of https://github.com/halo-dev/halo
Remove useless import.
parent
884d23c2c3
commit
6617cb565c
|
@ -1,6 +1,5 @@
|
|||
package run.halo.app.listener;
|
||||
|
||||
import com.sun.nio.zipfs.JarFileSystemProvider;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.context.event.ApplicationStartedEvent;
|
||||
|
@ -10,20 +9,15 @@ import org.springframework.core.Ordered;
|
|||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
import run.halo.app.config.properties.HaloProperties;
|
||||
import run.halo.app.model.entity.User;
|
||||
import run.halo.app.model.params.UserParam;
|
||||
import run.halo.app.model.properties.PrimaryProperties;
|
||||
import run.halo.app.model.support.CreateCheck;
|
||||
import run.halo.app.service.OptionService;
|
||||
import run.halo.app.service.ThemeService;
|
||||
import run.halo.app.service.UserService;
|
||||
import run.halo.app.utils.FileUtils;
|
||||
import run.halo.app.utils.ValidationUtils;
|
||||
|
||||
import java.net.URI;
|
||||
import java.nio.file.*;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* The method executed after the application is started.
|
||||
|
|
|
@ -147,7 +147,7 @@ public class PostServiceImpl extends BasePostServiceImpl<Post> implements PostSe
|
|||
@Override
|
||||
public PostDetailVO createBy(Post postToCreate, Set<Integer> tagIds, Set<Integer> categoryIds, boolean autoSave) {
|
||||
PostDetailVO createdPost = createOrUpdate(postToCreate, tagIds, categoryIds);
|
||||
if(!autoSave){
|
||||
if (!autoSave) {
|
||||
// Log the creation
|
||||
LogEvent logEvent = new LogEvent(this, createdPost.getId().toString(), LogType.POST_PUBLISHED, createdPost.getTitle());
|
||||
eventPublisher.publishEvent(logEvent);
|
||||
|
@ -160,7 +160,7 @@ public class PostServiceImpl extends BasePostServiceImpl<Post> implements PostSe
|
|||
// Set edit time
|
||||
postToUpdate.setEditTime(DateUtils.now());
|
||||
PostDetailVO updatedPost = createOrUpdate(postToUpdate, tagIds, categoryIds);
|
||||
if(!autoSave){
|
||||
if (!autoSave) {
|
||||
// Log the creation
|
||||
LogEvent logEvent = new LogEvent(this, updatedPost.getId().toString(), LogType.POST_EDITED, updatedPost.getTitle());
|
||||
eventPublisher.publishEvent(logEvent);
|
||||
|
@ -349,7 +349,7 @@ public class PostServiceImpl extends BasePostServiceImpl<Post> implements PostSe
|
|||
.orElseGet(LinkedList::new)
|
||||
.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.map(tag -> new TagDTO().<TagDTO>convertFrom(tag))
|
||||
.map(tag -> (TagDTO) new TagDTO().convertFrom(tag))
|
||||
.collect(Collectors.toList()));
|
||||
|
||||
// Set categories
|
||||
|
@ -357,7 +357,7 @@ public class PostServiceImpl extends BasePostServiceImpl<Post> implements PostSe
|
|||
.orElseGet(LinkedList::new)
|
||||
.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.map(category -> new CategoryDTO().<CategoryDTO>convertFrom(category))
|
||||
.map(category -> (CategoryDTO) new CategoryDTO().convertFrom(category))
|
||||
.collect(Collectors.toList()));
|
||||
|
||||
// Set comment count
|
||||
|
|
Loading…
Reference in New Issue