Commits

Stefan Saasen committed 28a3312

Minor code cleanup: reused unused imports, comments etc.

Comments (0)

Files changed (4)

src/main/scala/com/atlassian/plugins/polyglot/scalaexample/action/SaveApiKeyConfigurationAction.scala

 
   override def validate() {
     if (StringUtils.isBlank(hipChatAuthToken)) {
-      // https://issues.scala-lang.org/browse/SI-2991
-      // Overloaded methods with var args can't be distinguished in Scala. E.g.
-      // addActionError(String)
-      // vs.
-      // addActionError(String, String...)
       addActionError(getText("hipchat.token.form.invalidtokenerror"), Nil)
     }
   }

src/main/scala/com/atlassian/plugins/polyglot/scalaexample/hipchat/HipChat.scala

   }
 }
 
+// See http://www.scala-lang.org/api/current/scala/annotation/target/package.html
+// for the usage of meta-annotations
 object HipChatEntity {
   type SerializeWith = JsonSerialize @beanGetter
 }
                                created: Date, isArchived: Boolean, isPrivate: Boolean,
                                participants: Seq[Person]) extends HipChatEntity
 
-// See http://www.scala-lang.org/api/current/scala/annotation/target/package.html
-// for the usage of meta-annotations
 @JsonAutoDetect
 case class Message @JsonCreator()(@SerializeWith(using = classOf[CustomDateSerializer]) @BeanProperty date:Date,
-                                  @(JsonSerialize @getter)(using = classOf[CustomOptionSerializer]) @BeanProperty from:Option[Person],
+                                  @SerializeWith(using = classOf[CustomOptionSerializer]) @BeanProperty from:Option[Person],
                                   @BeanProperty message:String,
                                   file:Option[File]) extends HipChatEntity
 @JsonAutoDetect

src/main/scala/com/atlassian/plugins/polyglot/scalaexample/macro/HipChatMacro.scala

 import java.io.StringWriter
 import com.atlassian.plugins.polyglot.scalaexample.TemplateEngineAware
 import com.atlassian.confluence.macro.Macro.{OutputType, BodyType}
-import com.atlassian.confluence.xhtml.api.XhtmlContent
 import java.util.{Map => JMap}
 import com.atlassian.confluence.pages.thumbnail.Dimensions
 import com.atlassian.confluence.macro.{DefaultImagePlaceholder, EditorImagePlaceholder, Macro}

src/main/scala/com/atlassian/plugins/polyglot/scalaexample/servlet/HipChatViewServlet.scala

 import com.atlassian.confluence.user.AuthenticatedUserThreadLocal
 import javax.servlet.http.{HttpServletResponse, HttpServletRequest, HttpServlet}
 import com.atlassian.plugins.polyglot.scalaexample.TemplateEngineAware
-import com.atlassian.user.User
 
 class HipChatViewServlet(val templateRenderer:TemplateRenderer)
   extends HttpServlet