diff --git a/src/main/java/org/ggp/base/apps/kiosk/games/BiddingTicTacToeCanvas.java b/src/main/java/org/ggp/base/apps/kiosk/games/BiddingTicTacToeCanvas.java index 23e302f35..0c2cfa602 100644 --- a/src/main/java/org/ggp/base/apps/kiosk/games/BiddingTicTacToeCanvas.java +++ b/src/main/java/org/ggp/base/apps/kiosk/games/BiddingTicTacToeCanvas.java @@ -63,7 +63,7 @@ protected void renderCellBackground(Graphics g, int xCell, int yCell) { } else { int nScore = onScoreboard(xCell, yCell); if(nScore >= 0) { - CommonGraphics.fillWithString(g, "" + nScore, 1.2); + CommonGraphics.fillWithString(g, String.valueOf(nScore), 1.2); } else if(nScore == -2) { CommonGraphics.fillWithString(g, "T", 1.2); } diff --git a/src/main/java/org/ggp/base/apps/kiosk/games/CephalopodCanvas.java b/src/main/java/org/ggp/base/apps/kiosk/games/CephalopodCanvas.java index dd4a2a602..b5c8d82d9 100644 --- a/src/main/java/org/ggp/base/apps/kiosk/games/CephalopodCanvas.java +++ b/src/main/java/org/ggp/base/apps/kiosk/games/CephalopodCanvas.java @@ -43,7 +43,7 @@ protected void renderCellContent(Graphics g, String theFact) { g.setColor(Color.BLACK); } - CommonGraphics.fillWithString(g, "" + cellValue, 1.2); + CommonGraphics.fillWithString(g, String.valueOf(cellValue), 1.2); } @Override diff --git a/src/main/java/org/ggp/base/apps/kiosk/games/FFACanvas.java b/src/main/java/org/ggp/base/apps/kiosk/games/FFACanvas.java index 9b1bd74e8..1bd22fdeb 100644 --- a/src/main/java/org/ggp/base/apps/kiosk/games/FFACanvas.java +++ b/src/main/java/org/ggp/base/apps/kiosk/games/FFACanvas.java @@ -81,7 +81,7 @@ protected void renderCellContent(Graphics g, Set theFacts) { } g.setColor(myColor); - CommonGraphics.fillWithString(g, "" + score, 1.5); + CommonGraphics.fillWithString(g, String.valueOf(score), 1.5); } else { String cellType = cellFacts[4]; if(!cellType.equals("b")) { diff --git a/src/main/java/org/ggp/base/apps/kiosk/templates/GameCanvas_Chessboard.java b/src/main/java/org/ggp/base/apps/kiosk/templates/GameCanvas_Chessboard.java index e786c924b..dfa33db18 100644 --- a/src/main/java/org/ggp/base/apps/kiosk/templates/GameCanvas_Chessboard.java +++ b/src/main/java/org/ggp/base/apps/kiosk/templates/GameCanvas_Chessboard.java @@ -39,6 +39,6 @@ protected final void renderCellBackground(Graphics g, int xCell, int yCell) { // This function only works properly when coordinates start at one. public final static String coordinateToLetter(int x) { - return "" + ((char) ('a' + x - 1)); + return String.valueOf((char) ('a' + x - 1)); } } \ No newline at end of file diff --git a/src/main/java/org/ggp/base/apps/research/Counter.java b/src/main/java/org/ggp/base/apps/research/Counter.java index 6212e126b..76825beca 100644 --- a/src/main/java/org/ggp/base/apps/research/Counter.java +++ b/src/main/java/org/ggp/base/apps/research/Counter.java @@ -19,7 +19,7 @@ public double getValue() { @Override public String toString() { - return "" + ((int)(getValue() * 1000.0)/1000.0); + return String.valueOf((int)(getValue() * 1000.0)/1000.0); } @Override diff --git a/src/main/java/org/ggp/base/apps/research/WeightedAverage.java b/src/main/java/org/ggp/base/apps/research/WeightedAverage.java index 8d5c98ba3..47f97f638 100644 --- a/src/main/java/org/ggp/base/apps/research/WeightedAverage.java +++ b/src/main/java/org/ggp/base/apps/research/WeightedAverage.java @@ -28,7 +28,7 @@ public double getWeight() { @Override public String toString() { - return "" + ((int)(getValue() * 1000.0)/1000.0) + " [" + getWeight() + "]"; + return String.valueOf((int)(getValue() * 1000.0)/1000.0) + " [" + getWeight() + "]"; } @Override diff --git a/src/main/java/org/ggp/base/apps/server/states/StatesPanel.java b/src/main/java/org/ggp/base/apps/server/states/StatesPanel.java index b45a6f154..31642e16d 100644 --- a/src/main/java/org/ggp/base/apps/server/states/StatesPanel.java +++ b/src/main/java/org/ggp/base/apps/server/states/StatesPanel.java @@ -57,9 +57,9 @@ public void observe(Event event) { boolean atEnd = (tabs.getSelectedIndex() == tabs.getTabCount()-1); for(int i = tabs.getTabCount(); i < stepNum; i++) - tabs.add(new Integer(i+1).toString(), new JPanel()); + tabs.add(String.valueOf(i+1), new JPanel()); tabs.setComponentAt(stepNum-1, statePanel); - tabs.setTitleAt(stepNum-1, new Integer(stepNum).toString()); + tabs.setTitleAt(stepNum-1, String.valueOf(stepNum)); if(atEnd) { tabs.setSelectedIndex(tabs.getTabCount()-1); diff --git a/src/main/java/org/ggp/base/apps/server/visualization/VisualizationPanel.java b/src/main/java/org/ggp/base/apps/server/visualization/VisualizationPanel.java index 8dc88149c..6b1a0a8cb 100644 --- a/src/main/java/org/ggp/base/apps/server/visualization/VisualizationPanel.java +++ b/src/main/java/org/ggp/base/apps/server/visualization/VisualizationPanel.java @@ -115,9 +115,9 @@ public void render() { boolean atEnd = (tabs.getSelectedIndex() == tabs.getTabCount()-1); try { for(int i = tabs.getTabCount(); i < stepNum; i++) - tabs.add(new Integer(i+1).toString(), new JPanel()); + tabs.add(String.valueOf(i+1), new JPanel()); tabs.setComponentAt(stepNum-1, newPanel); - tabs.setTitleAt(stepNum-1, new Integer(stepNum).toString()); + tabs.setTitleAt(stepNum-1, String.valueOf(stepNum)); if(atEnd) { tabs.setSelectedIndex(tabs.getTabCount()-1); diff --git a/src/main/java/org/ggp/base/player/proxy/ProxyGamePlayer.java b/src/main/java/org/ggp/base/player/proxy/ProxyGamePlayer.java index 5eb7d571b..40b91ab3c 100644 --- a/src/main/java/org/ggp/base/player/proxy/ProxyGamePlayer.java +++ b/src/main/java/org/ggp/base/player/proxy/ProxyGamePlayer.java @@ -103,7 +103,7 @@ public ClientManager(Thread parentThread) { processArgs.add(System.getProperty("java.class.path")); processArgs.add("org.ggp.base.player.proxy.ProxyGamePlayerClient"); processArgs.add(gamerName); - processArgs.add("" + clientListener.getLocalPort()); + processArgs.add(String.valueOf(clientListener.getLocalPort())); if(GamerConfiguration.runningOnLinux()) { processArgs.add(0, "nice"); }