From a31da7be317ef0c59f0694c8f1887591c0df6679 Mon Sep 17 00:00:00 2001 From: Mishiranu Date: Sat, 26 Sep 2020 01:45:37 +0300 Subject: [PATCH] Remove unused chan API --- src-api/chan/content/ChanConfiguration.java | 2 +- src-api/chan/content/ChanPerformer.java | 13 ---- .../chan/content/ThreadRedirectException.java | 22 +------ src-api/chan/content/model/Threads.java | 62 ------------------- src-api/chan/text/TemplateParser.java | 33 +++------- src-api/chan/util/CommonUtils.java | 9 --- 6 files changed, 12 insertions(+), 129 deletions(-) delete mode 100644 src-api/chan/content/model/Threads.java diff --git a/src-api/chan/content/ChanConfiguration.java b/src-api/chan/content/ChanConfiguration.java index 0b900195..85e487a3 100644 --- a/src-api/chan/content/ChanConfiguration.java +++ b/src-api/chan/content/ChanConfiguration.java @@ -85,7 +85,7 @@ public final void init() { // TODO CHAN // Remove this field after updating - // allchan arhivach cablesix dvach fourchan meguca ronery sevenchan tumbach + // allchan arhivach sevenchan tumbach // Added: 28.07.20 22:23 @Public public static final String CAPTCHA_TYPE_RECAPTCHA_1 = "recaptcha_1"; @Public public static final String CAPTCHA_TYPE_RECAPTCHA_2 = "recaptcha_2"; diff --git a/src-api/chan/content/ChanPerformer.java b/src-api/chan/content/ChanPerformer.java index ed7ba6f9..591e70d0 100644 --- a/src-api/chan/content/ChanPerformer.java +++ b/src-api/chan/content/ChanPerformer.java @@ -11,7 +11,6 @@ import chan.content.model.Post; import chan.content.model.Posts; import chan.content.model.ThreadSummary; -import chan.content.model.Threads; import chan.http.ChanFileOpenable; import chan.http.HttpException; import chan.http.HttpHolder; @@ -223,18 +222,6 @@ public ReadThreadsResult setValidator(HttpValidator validator) { this.validator = validator; return this; } - - // TODO CHAN - // Remove this constructor after updating - // apachan - // Added: 24.08.16 03:39 - @Public - public ReadThreadsResult(Threads threads) { - this(threads != null ? threads.getThreads() : null); - if (threads != null) { - boardSpeed = threads.getBoardSpeed(); - } - } } @Public diff --git a/src-api/chan/content/ThreadRedirectException.java b/src-api/chan/content/ThreadRedirectException.java index 5cc84b8b..8dd6dc19 100644 --- a/src-api/chan/content/ThreadRedirectException.java +++ b/src-api/chan/content/ThreadRedirectException.java @@ -1,26 +1,10 @@ -/* - * Copyright 2016-2017 Fukurou Mishiranu - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package chan.content; import chan.annotation.Public; // TODO CHAN -// Remove this class aafter updating -// apachan archiveliom desustorage exach fourplebs krautchan meguca ronery +// Remove this class after updating +// exach fourplebs // Added: 13.10.16 14:55 @Public public final class ThreadRedirectException extends Exception { @@ -47,4 +31,4 @@ public RedirectException.Target obtainTarget(String chanName, String boardName) return RedirectException.toThread(this.boardName != null ? this.boardName : boardName, threadNumber, postNumber).obtainTarget(chanName); } -} \ No newline at end of file +} diff --git a/src-api/chan/content/model/Threads.java b/src-api/chan/content/model/Threads.java deleted file mode 100644 index fd026996..00000000 --- a/src-api/chan/content/model/Threads.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2014-2017 Fukurou Mishiranu - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package chan.content.model; - -import java.util.Collection; - -import chan.annotation.Public; -import chan.util.CommonUtils; - -// TODO CHAN -// Remove this class after updating -// apachan -// Added: 24.08.16 03:39 -@Public -public final class Threads { - private Posts[] threads; - private int boardSpeed; - - public Posts[] getThreads() { - return threads; - } - - public Threads setThreads(Posts[] threads) { - this.threads = threads; - return this; - } - - @Public - public int getBoardSpeed() { - return boardSpeed; - } - - @Public - public Threads setBoardSpeed(int boardSpeed) { - this.boardSpeed = boardSpeed; - return this; - } - - @Public - public Threads(Posts... threads) { - setThreads(CommonUtils.removeNullItems(threads, Posts.class)); - } - - @Public - public Threads(Collection threads) { - this(CommonUtils.toArray(threads, Posts.class)); - } -} diff --git a/src-api/chan/text/TemplateParser.java b/src-api/chan/text/TemplateParser.java index f2156dfd..3a2224af 100644 --- a/src-api/chan/text/TemplateParser.java +++ b/src-api/chan/text/TemplateParser.java @@ -1,36 +1,19 @@ -/* - * Copyright 2016-2017 Fukurou Mishiranu - * - * 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 - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - package chan.text; -import java.util.ArrayList; -import java.util.HashMap; - import android.util.Pair; - import chan.annotation.Extendable; import chan.annotation.Public; import chan.util.StringUtils; +import java.util.ArrayList; +import java.util.HashMap; // TODO CHAN -// Make internal builder methods private and remove dynamic safety check after updating alphachan alterchan arhivach -// bonzibuddy britfags bunbunmaru candydollchan chaosach chiochan desustorage exach fourplebs freeportseven gurochan -// haibane infinite kropyvach nowere nulldvachnet nulleu nullnyan nulltirech onechanca ozuchan ponyach randomarchive -// sevenchan tiretirech uboachan valkyria xyntach -// Added: 07.03.17 22:33 +// Remove this class after updating +// alphachan alterchan arhivach brchan candydollchan chaosach chiochan dangeru dobrochan erlach exach fiftyfive +// fourplebs haibane kropyvach lainchan lolifox nulltirech onechanca ponyach randomarchive sevenchan synch taima +// tiretirech twentyseven uboachan valkyria wizardchan +// Added: 24.09.20 08:23 +@SuppressWarnings("ALL") @Public public final class TemplateParser { private final HashMap>> openMatchers = new HashMap<>(); diff --git a/src-api/chan/util/CommonUtils.java b/src-api/chan/util/CommonUtils.java index 8358f419..100041f5 100644 --- a/src-api/chan/util/CommonUtils.java +++ b/src-api/chan/util/CommonUtils.java @@ -27,15 +27,6 @@ public static boolean sleepMaxRealtime(long startRealtime, long interval) { } } - // TODO CHAN - // Remove method after updating - // endchan - // Added: 24.08.20 00:02 - @Public - public static boolean sleepMaxTime(long startTime, long interval) { - return sleepMaxRealtime(SystemClock.elapsedRealtime() - System.currentTimeMillis() + startTime, interval); - } - @Public public static String optJsonString(JSONObject jsonObject, String name) { return optJsonString(jsonObject, name, null);