From 89c7a89df24595ef45a507e5c83db397cf7eb3bd Mon Sep 17 00:00:00 2001 From: 502647092 Date: Mon, 19 Sep 2016 17:01:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=80=E8=88=AC?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 502647092 --- src/main/java/pw/yumc/YumCore/paste/PasteXcode.java | 2 +- src/main/java/pw/yumc/YumCore/paste/Pastebin.java | 2 +- src/main/java/pw/yumc/YumCore/paste/StickyNotes.java | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/pw/yumc/YumCore/paste/PasteXcode.java b/src/main/java/pw/yumc/YumCore/paste/PasteXcode.java index 5a47ebe..fbf103c 100644 --- a/src/main/java/pw/yumc/YumCore/paste/PasteXcode.java +++ b/src/main/java/pw/yumc/YumCore/paste/PasteXcode.java @@ -5,7 +5,7 @@ import java.net.HttpURLConnection; import java.net.URL; public class PasteXcode { - private final String POST_URL = "http://paste.xcode.ro/"; + private final static String POST_URL = "http://paste.xcode.ro/"; public static void main(final String[] args) { final PasteXcode p = new PasteXcode(); diff --git a/src/main/java/pw/yumc/YumCore/paste/Pastebin.java b/src/main/java/pw/yumc/YumCore/paste/Pastebin.java index 5f4555b..92ceecb 100644 --- a/src/main/java/pw/yumc/YumCore/paste/Pastebin.java +++ b/src/main/java/pw/yumc/YumCore/paste/Pastebin.java @@ -8,7 +8,7 @@ import java.net.URL; import java.net.URLEncoder; public class Pastebin { - private final String POST_URL = "http://pastebin.com/api/api_post.php"; + private final static String POST_URL = "http://pastebin.com/api/api_post.php"; private final String API_KEY; public Pastebin() { diff --git a/src/main/java/pw/yumc/YumCore/paste/StickyNotes.java b/src/main/java/pw/yumc/YumCore/paste/StickyNotes.java index 5759f3e..3d8a6b3 100644 --- a/src/main/java/pw/yumc/YumCore/paste/StickyNotes.java +++ b/src/main/java/pw/yumc/YumCore/paste/StickyNotes.java @@ -17,15 +17,15 @@ import org.json.simple.JSONValue; */ public class StickyNotes { private final static String DOMAIN = "http://paste.yumc.pw"; - private final String POST_URL = DOMAIN + "/api/json/create"; - private final String VIEW_URL = DOMAIN + "/%s/%s"; + private final static String POST_URL = DOMAIN + "/api/json/create"; + private final static String VIEW_URL = DOMAIN + "/%s/%s"; public static void main(final String[] args) { final StickyNotes p = new StickyNotes(); final PasteContent paste = new PasteContent(); paste.addLine("异常提交测试!"); paste.addThrowable(new Throwable()); - System.out.println(p.post(StickyNotes.Expire.HalfHour, paste));; + System.out.println(p.post(StickyNotes.Expire.HalfHour, paste)); } /** @@ -98,7 +98,7 @@ public class StickyNotes { outputStream.flush(); outputStream.close(); final BufferedReader br = new BufferedReader(new InputStreamReader(connection.getInputStream())); - final StringBuffer request = new StringBuffer(); + final StringBuilder request = new StringBuilder(); String temp; while ((temp = br.readLine()) != null) { request.append(temp);