Skip to content

Commit

Permalink
minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
maxcom committed Jan 2, 2025
1 parent 6c17c91 commit e549d2e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1998-2024 Linux.org.ru
* Copyright 1998-2025 Linux.org.ru
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -15,11 +15,11 @@

package ru.org.linux.comment

import org.apache.pekko.actor.typed.ActorRef
import io.circe.generic.semiauto.*
import io.circe.syntax.*
import io.circe.{Encoder, Json}
import jakarta.servlet.http.HttpServletRequest
import org.apache.pekko.actor.typed.ActorRef
import org.springframework.beans.factory.annotation.Qualifier
import org.springframework.stereotype.Controller
import org.springframework.validation.Errors
Expand All @@ -30,7 +30,7 @@ import org.springframework.web.servlet.view.RedirectView
import ru.org.linux.auth.AuthUtil.MaybeAuthorized
import ru.org.linux.auth.{AccessViolationException, AuthUtil, IPBlockDao, IPBlockInfo}
import ru.org.linux.csrf.CSRFNoAuto
import ru.org.linux.markup.{MarkupType, MessageTextService}
import ru.org.linux.markup.MessageTextService
import ru.org.linux.realtime.RealtimeEventHub
import ru.org.linux.search.SearchQueueSender
import ru.org.linux.spring.dao.MessageText
Expand Down
15 changes: 4 additions & 11 deletions src/main/scala/ru/org/linux/comment/CommentCreateService.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1998-2024 Linux.org.ru
* Copyright 1998-2025 Linux.org.ru
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -24,22 +24,15 @@ import org.springframework.validation.Errors
import org.springframework.web.bind.WebDataBinder
import ru.org.linux.auth.*
import ru.org.linux.csrf.CSRFProtectionService
import ru.org.linux.edithistory.EditHistoryObjectTypeEnum
import ru.org.linux.edithistory.EditHistoryRecord
import ru.org.linux.edithistory.EditHistoryService
import ru.org.linux.markup.MarkupType.ofFormId
import ru.org.linux.edithistory.{EditHistoryObjectTypeEnum, EditHistoryRecord, EditHistoryService}
import ru.org.linux.markup.{MarkupType, MessageTextService}
import ru.org.linux.site.MessageNotFoundException
import ru.org.linux.spring.dao.MessageText
import ru.org.linux.spring.dao.MsgbaseDao
import ru.org.linux.topic.Topic
import ru.org.linux.topic.TopicDao
import ru.org.linux.topic.TopicPermissionService
import ru.org.linux.spring.dao.{MessageText, MsgbaseDao}
import ru.org.linux.topic.{Topic, TopicDao, TopicPermissionService}
import ru.org.linux.user.*
import ru.org.linux.util.ExceptionBindingErrorProcessor

import java.beans.PropertyEditorSupport
import java.time.Instant
import scala.collection.mutable
import scala.jdk.OptionConverters.RichOption

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 1998-2024 Linux.org.ru
* Copyright 1998-2025 Linux.org.ru
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -20,8 +20,8 @@ import ru.org.linux.util.bbcode.LorCodeService
@Service
class GroupInfoPrepareService(lorCodeService: LorCodeService) {
def prepareGroupInfo(group: Group): PreparedGroupInfo = {
val longInfo = if (group.getLongInfo != null) {
lorCodeService.parseComment(group.getLongInfo, nofollow = false, LorCodeService.Plain)
val longInfo = if (group.longInfo != null) {
lorCodeService.parseComment(group.longInfo, nofollow = false, LorCodeService.Plain)
} else {
null
}
Expand Down

0 comments on commit e549d2e

Please sign in to comment.