Skip to content
This repository was archived by the owner on Dec 30, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion java/app/controllers/Application.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package controllers;

import models.PaintRoom;
import org.codehaus.jackson.JsonNode;
import com.fasterxml.jackson.databind.JsonNode;
import play.mvc.Controller;
import play.mvc.Result;
import play.mvc.WebSocket;
Expand Down
6 changes: 3 additions & 3 deletions java/app/models/PaintRoom.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package models;

import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.node.ObjectNode;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import play.Logger;
import play.libs.F;
import play.libs.Json;
Expand Down Expand Up @@ -33,7 +33,7 @@ public void createPainter(final WebSocket.In<JsonNode> in, final WebSocket.Out<J
in.onMessage(new F.Callback<JsonNode>() {
@Override
public void invoke(JsonNode json) throws Throwable {
String type = json.get("type").getTextValue();
String type = json.get("type").textValue();

// The painter wants to change some of his property
if("change".equals(type)) {
Expand Down
10 changes: 5 additions & 5 deletions java/app/models/Painter.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package models;

import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.node.ObjectNode;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import play.libs.Json;
import play.mvc.WebSocket;

Expand All @@ -25,11 +25,11 @@ public Painter(String name, String color, Long size, WebSocket.Out<JsonNode> cha

public void updateFromJson(JsonNode json) {
if(json.has("name"))
this.name = json.get("name").getTextValue();
this.name = json.get("name").textValue();
if(json.has("color"))
this.color = json.get("color").getTextValue();
this.color = json.get("color").textValue();
if(json.has("size"))
this.size = json.get("size").getLongValue();
this.size = json.get("size").longValue();
}

public JsonNode toJson() {
Expand Down
6 changes: 3 additions & 3 deletions java/project/Build.scala
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import sbt._
import Keys._
import PlayProject._
import play.Project._

object ApplicationBuild extends Build {

val appName = "Play Painter"
val appName = "PlayPainter"
val appVersion = "1.0.1"

val appDependencies = Seq(
// Add your project dependencies here,
)

val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
val main = play.Project(appName, appVersion, appDependencies).settings(
// Add your own project settings here
)

Expand Down
2 changes: 1 addition & 1 deletion java/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=0.11.3
sbt.version=0.13.0
2 changes: 1 addition & 1 deletion java/project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ logLevel := Level.Warn
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

// Use the Play sbt plugin for Play projects
addSbtPlugin("play" % "sbt-plugin" % "2.0.2")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.2.1")