Skip to content

Commit

Permalink
client: use guava Strings instead of joptsimple
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam- committed May 14, 2024
1 parent 98b6fb5 commit 4907121
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
*/
package net.runelite.client.plugins.cluescrolls;

import com.google.common.base.Joiner;
import com.google.common.base.MoreObjects;
import com.google.common.base.Strings;
import com.google.inject.Binder;
import com.google.inject.Provides;
import java.awt.Color;
Expand All @@ -47,7 +49,6 @@
import javax.annotation.Nullable;
import javax.inject.Inject;
import javax.inject.Named;
import joptsimple.internal.Strings;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import net.runelite.api.ChatMessageType;
Expand Down Expand Up @@ -695,7 +696,7 @@ public void onCommandExecuted(CommandExecuted commandExecuted)
{
if (developerMode && commandExecuted.getCommand().equals("clue"))
{
String text = Strings.join(commandExecuted.getArguments(), " ");
var text = Joiner.on(' ').join(commandExecuted.getArguments());

if (text.isEmpty())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
*/
package net.runelite.client.plugins.emojis;

import com.google.common.base.Joiner;
import java.awt.image.BufferedImage;
import java.util.regex.Pattern;
import javax.annotation.Nullable;
import javax.inject.Inject;
import joptsimple.internal.Strings;
import net.runelite.api.MessageNode;
import net.runelite.api.Player;
import net.runelite.api.events.ChatMessage;
Expand Down Expand Up @@ -160,6 +160,6 @@ String updateMessage(final String message)
return null;
}

return Strings.join(messageWords, " ");
return Joiner.on(' ').join(messageWords);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
package net.runelite.client.plugins.slayer;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Joiner;
import com.google.common.base.Strings;
import com.google.inject.Binder;
import com.google.inject.Provides;
import java.awt.Color;
Expand All @@ -43,7 +45,6 @@
import java.util.regex.Pattern;
import javax.inject.Inject;
import javax.inject.Named;
import joptsimple.internal.Strings;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
Expand Down Expand Up @@ -277,7 +278,7 @@ public void onCommandExecuted(CommandExecuted commandExecuted)
{
if (developerMode && commandExecuted.getCommand().equals("task"))
{
var task = Strings.join(commandExecuted.getArguments(), " ");
var task = Joiner.on(' ').join(commandExecuted.getArguments());
setTask(task, 42, 42);
log.debug("Set task to {}", task);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/
package net.runelite.client.plugins.timetracking.clocks;

import com.google.common.base.Strings;
import com.google.common.collect.Comparators;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
Expand All @@ -34,7 +35,6 @@
import java.util.concurrent.CopyOnWriteArrayList;
import javax.inject.Inject;
import javax.swing.SwingUtilities;
import joptsimple.internal.Strings;
import lombok.Getter;
import net.runelite.client.Notifier;
import net.runelite.client.config.ConfigManager;
Expand Down

0 comments on commit 4907121

Please sign in to comment.