Minor code improvements.
This commit is contained in:
@@ -51,29 +51,26 @@ public class L2StaticObjectInstanceAction implements IActionHandler
|
||||
// Notify the L2PcInstance AI with AI_INTENTION_INTERACT
|
||||
activeChar.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, staticObject);
|
||||
}
|
||||
else
|
||||
else if (staticObject.getType() == 2)
|
||||
{
|
||||
if (staticObject.getType() == 2)
|
||||
final String filename = (staticObject.getId() == 24230101) ? "data/html/signboards/tomb_of_crystalgolem.htm" : "data/html/signboards/pvp_signboard.htm";
|
||||
final String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), filename);
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(staticObject.getObjectId());
|
||||
|
||||
if (content == null)
|
||||
{
|
||||
final String filename = (staticObject.getId() == 24230101) ? "data/html/signboards/tomb_of_crystalgolem.htm" : "data/html/signboards/pvp_signboard.htm";
|
||||
final String content = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), filename);
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(staticObject.getObjectId());
|
||||
|
||||
if (content == null)
|
||||
{
|
||||
html.setHtml("<html><body>Signboard is missing:<br>" + filename + "</body></html>");
|
||||
}
|
||||
else
|
||||
{
|
||||
html.setHtml(content);
|
||||
}
|
||||
|
||||
activeChar.sendPacket(html);
|
||||
html.setHtml("<html><body>Signboard is missing:<br>" + filename + "</body></html>");
|
||||
}
|
||||
else if (staticObject.getType() == 0)
|
||||
else
|
||||
{
|
||||
activeChar.sendPacket(staticObject.getMap());
|
||||
html.setHtml(content);
|
||||
}
|
||||
|
||||
activeChar.sendPacket(html);
|
||||
}
|
||||
else if (staticObject.getType() == 0)
|
||||
{
|
||||
activeChar.sendPacket(staticObject.getMap());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@@ -39,7 +39,7 @@ import com.l2jmobius.gameserver.util.GMAudit;
|
||||
|
||||
public class AdminBuffs implements IAdminCommandHandler
|
||||
{
|
||||
private final static int PAGE_LIMIT = 20;
|
||||
private static final int PAGE_LIMIT = 20;
|
||||
|
||||
private static final String[] ADMIN_COMMANDS =
|
||||
{
|
||||
@@ -381,7 +381,7 @@ public class AdminBuffs implements IAdminCommandHandler
|
||||
String slots = "";
|
||||
for (AbnormalType slot : target.getEffectList().getBlockedAbnormalTypes())
|
||||
{
|
||||
slots += slot.toString() + ", ";
|
||||
slots += slot + ", ";
|
||||
}
|
||||
|
||||
if (!slots.isEmpty() && (slots.length() > 3))
|
||||
@@ -395,7 +395,7 @@ public class AdminBuffs implements IAdminCommandHandler
|
||||
|
||||
if (Config.GMAUDIT)
|
||||
{
|
||||
GMAudit.auditGMAction(activeChar.getName() + " [" + activeChar.getObjectId() + "]", "getbuffs", target.getName() + " (" + Integer.toString(target.getObjectId()) + ")", "");
|
||||
GMAudit.auditGMAction(activeChar.getName() + " [" + activeChar.getObjectId() + "]", "getbuffs", target.getName() + " (" + target.getObjectId() + ")", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -620,17 +620,13 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
ps.setString(1, playerName);
|
||||
ps.execute();
|
||||
}
|
||||
else if (changeCreateExpiryTime) // removing penalty
|
||||
{
|
||||
player.setClanCreateExpiryTime(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
// removing penalty
|
||||
if (changeCreateExpiryTime)
|
||||
{
|
||||
player.setClanCreateExpiryTime(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.setClanJoinExpiryTime(0);
|
||||
}
|
||||
player.setClanJoinExpiryTime(0);
|
||||
}
|
||||
|
||||
activeChar.sendMessage("Clan penalty successfully removed to character: " + playerName);
|
||||
@@ -1161,8 +1157,8 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
adminReply.replace("%account%", player.getAccountName());
|
||||
adminReply.replace("%ip%", ip);
|
||||
adminReply.replace("%hwid%", (player.getClient() != null) && (player.getClient().getHardwareInfo() != null) ? player.getClient().getHardwareInfo().getMacAddress() : "Unknown");
|
||||
adminReply.replace("%ai%", String.valueOf(player.getAI().getIntention().name()));
|
||||
adminReply.replace("%inst%", player.isInInstance() ? "<tr><td>InstanceId:</td><td><a action=\"bypass -h admin_instance_spawns " + String.valueOf(player.getInstanceId()) + "\">" + String.valueOf(player.getInstanceId()) + "</a></td></tr>" : "");
|
||||
adminReply.replace("%ai%", player.getAI().getIntention().name());
|
||||
adminReply.replace("%inst%", player.isInInstance() ? "<tr><td>InstanceId:</td><td><a action=\"bypass -h admin_instance_spawns " + player.getInstanceId() + "\">" + player.getInstanceId() + "</a></td></tr>" : "");
|
||||
adminReply.replace("%noblesse%", player.isNoble() ? "Yes" : "No");
|
||||
activeChar.sendPacket(adminReply);
|
||||
}
|
||||
@@ -1292,12 +1288,9 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
{
|
||||
findDisconnected = true;
|
||||
}
|
||||
else
|
||||
else if (!IpAdress.matches("^(?:(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))\\.){3}(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))$"))
|
||||
{
|
||||
if (!IpAdress.matches("^(?:(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))\\.){3}(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))$"))
|
||||
{
|
||||
throw new IllegalArgumentException("Malformed IPv4 number");
|
||||
}
|
||||
throw new IllegalArgumentException("Malformed IPv4 number");
|
||||
}
|
||||
|
||||
int CharactersFound = 0;
|
||||
@@ -1365,7 +1358,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
}
|
||||
else if (CharactersFound > 20)
|
||||
{
|
||||
adminReply.replace("%number%", " more than " + String.valueOf(CharactersFound));
|
||||
adminReply.replace("%number%", " more than " + CharactersFound);
|
||||
replyMSG2 = "s.<br>In order to avoid you a client crash I won't <br1>display results beyond the 20th character.";
|
||||
}
|
||||
else if (CharactersFound == 1)
|
||||
@@ -1605,7 +1598,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
final String owner = target.getActingPlayer().getName();
|
||||
html.replace("%owner%", " <a action=\"bypass -h admin_character_info " + owner + "\">" + owner + "</a>");
|
||||
html.replace("%class%", target.getClass().getSimpleName());
|
||||
html.replace("%ai%", target.hasAI() ? String.valueOf(target.getAI().getIntention().name()) : "NULL");
|
||||
html.replace("%ai%", target.hasAI() ? target.getAI().getIntention().name() : "NULL");
|
||||
html.replace("%hp%", (int) target.getStatus().getCurrentHp() + "/" + target.getStat().getMaxHp());
|
||||
html.replace("%mp%", (int) target.getStatus().getCurrentMp() + "/" + target.getStat().getMaxMp());
|
||||
html.replace("%karma%", Integer.toString(target.getReputation()));
|
||||
@@ -1649,7 +1642,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
text.append("<tr><td><table width=270 border=0 cellpadding=2><tr><td width=30 align=right>");
|
||||
}
|
||||
text.append(member.getLevel() + "</td><td width=130><a action=\"bypass -h admin_character_info " + member.getName() + "\">" + member.getName() + "</a>");
|
||||
text.append("</td><td width=110 align=right>" + member.getClassId().toString() + "</td></tr></table></td></tr>");
|
||||
text.append("</td><td width=110 align=right>" + member.getClassId() + "</td></tr></table></td></tr>");
|
||||
color = !color;
|
||||
}
|
||||
html.replace("%player%", target.getName());
|
||||
|
@@ -381,12 +381,9 @@ public class AdminEventEngine implements IAdminCommandHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else if ((activeChar.getTarget() != null) && (activeChar.getTarget() instanceof L2PcInstance))
|
||||
{
|
||||
if ((activeChar.getTarget() != null) && (activeChar.getTarget() instanceof L2PcInstance))
|
||||
{
|
||||
L2Event.removeAndResetPlayer((L2PcInstance) activeChar.getTarget());
|
||||
}
|
||||
L2Event.removeAndResetPlayer((L2PcInstance) activeChar.getTarget());
|
||||
}
|
||||
showEventControl(activeChar);
|
||||
}
|
||||
@@ -464,7 +461,7 @@ public class AdminEventEngine implements IAdminCommandHandler
|
||||
|
||||
result.append("</table>");
|
||||
|
||||
return note + result.toString();
|
||||
return note + result;
|
||||
}
|
||||
|
||||
public void showMainPage(L2PcInstance activeChar)
|
||||
|
@@ -82,18 +82,15 @@ public class AdminFortSiege implements IAdminCommandHandler
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.THAT_IS_AN_INCORRECT_TARGET);
|
||||
}
|
||||
else if (fort.getSiege().addAttacker(player, false) == 4)
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOUR_CLAN_HAS_BEEN_REGISTERED_TO_S1_S_FORTRESS_BATTLE);
|
||||
sm.addCastleId(fort.getResidenceId());
|
||||
player.sendPacket(sm);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fort.getSiege().addAttacker(player, false) == 4)
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOUR_CLAN_HAS_BEEN_REGISTERED_TO_S1_S_FORTRESS_BATTLE);
|
||||
sm.addCastleId(fort.getResidenceId());
|
||||
player.sendPacket(sm);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendMessage("During registering error occurred!");
|
||||
}
|
||||
player.sendMessage("During registering error occurred!");
|
||||
}
|
||||
}
|
||||
else if (command.equalsIgnoreCase("admin_clear_fortsiege_list"))
|
||||
|
@@ -454,7 +454,7 @@ public final class AdminPForge implements IAdminCommandHandler
|
||||
target = activeChar.getTarget();
|
||||
if ((target != null) && (target instanceof L2Character))
|
||||
{
|
||||
value = String.valueOf(((L2Character) target).getTitle());
|
||||
value = ((L2Character) target).getTitle();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -465,7 +465,7 @@ public final class AdminPForge implements IAdminCommandHandler
|
||||
target = activeChar.getTarget();
|
||||
if (target != null)
|
||||
{
|
||||
value = String.valueOf(target.getName());
|
||||
value = target.getName();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -119,14 +119,14 @@ public class AdminPremium implements IAdminCommandHandler
|
||||
|
||||
// TODO: Add check if account exists XD
|
||||
PremiumManager.getInstance().updatePremiumData(months, accountName);
|
||||
admin.sendMessage("Account " + accountName + " will now have premium status until " + String.valueOf(new SimpleDateFormat("dd.MM.yyyy HH:mm").format(PremiumManager.getInstance().getPremiumEndDate(accountName))) + ".");
|
||||
admin.sendMessage("Account " + accountName + " will now have premium status until " + new SimpleDateFormat("dd.MM.yyyy HH:mm").format(PremiumManager.getInstance().getPremiumEndDate(accountName)) + ".");
|
||||
}
|
||||
|
||||
private void viewPremiumInfo(L2PcInstance admin, String accountName)
|
||||
{
|
||||
if (PremiumManager.getInstance().getPremiumEndDate(accountName) > 0)
|
||||
{
|
||||
admin.sendMessage("Account " + accountName + " has premium status until " + String.valueOf(new SimpleDateFormat("dd.MM.yyyy HH:mm").format(PremiumManager.getInstance().getPremiumEndDate(accountName))) + ".");
|
||||
admin.sendMessage("Account " + accountName + " has premium status until " + new SimpleDateFormat("dd.MM.yyyy HH:mm").format(PremiumManager.getInstance().getPremiumEndDate(accountName)) + ".");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -385,7 +385,7 @@ public class AdminPunishment implements IAdminCommandHandler
|
||||
return true;
|
||||
}
|
||||
|
||||
private static final String findCharId(String key)
|
||||
private static String findCharId(String key)
|
||||
{
|
||||
final int charId = CharNameTable.getInstance().getIdByName(key);
|
||||
if (charId > 0) // Yeah its a char name!
|
||||
|
@@ -90,7 +90,7 @@ public class AdminShowQuests implements IAdminCommandHandler
|
||||
{
|
||||
val[0] = "full";
|
||||
}
|
||||
if (cmdParams[2].indexOf("_") != -1)
|
||||
if (cmdParams[2].contains("_"))
|
||||
{
|
||||
val[0] = "name";
|
||||
val[1] = cmdParams[2];
|
||||
|
@@ -324,16 +324,13 @@ public class AdminSpawn implements IAdminCommandHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (showposition && (npc != null))
|
||||
{
|
||||
activeChar.sendMessage(index + " - " + spawn.getTemplate().getName() + " (" + spawn + "): " + npc.getX() + " " + npc.getY() + " " + npc.getZ());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (showposition && (npc != null))
|
||||
{
|
||||
activeChar.sendMessage(index + " - " + spawn.getTemplate().getName() + " (" + spawn + "): " + npc.getX() + " " + npc.getY() + " " + npc.getZ());
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendMessage(index + " - " + spawn.getTemplate().getName() + " (" + spawn + "): " + spawn.getX() + " " + spawn.getY() + " " + spawn.getZ());
|
||||
}
|
||||
activeChar.sendMessage(index + " - " + spawn.getTemplate().getName() + " (" + spawn + "): " + spawn.getX() + " " + spawn.getY() + " " + spawn.getZ());
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -154,7 +154,7 @@ public class Observation implements IBypassHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
private static final void doObserve(L2PcInstance player, L2Npc npc, Location pos, long cost)
|
||||
private static void doObserve(L2PcInstance player, L2Npc npc, Location pos, long cost)
|
||||
{
|
||||
if (player.reduceAdena("Broadcast", cost, npc, true))
|
||||
{
|
||||
|
@@ -42,7 +42,7 @@ public class PlayerHelp implements IBypassHandler
|
||||
}
|
||||
|
||||
final String path = command.substring(12);
|
||||
if (path.indexOf("..") != -1)
|
||||
if (path.contains(".."))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -73,7 +73,7 @@ public class PrivateWarehouse implements IBypassHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
private static final void showWithdrawWindow(L2PcInstance player)
|
||||
private static void showWithdrawWindow(L2PcInstance player)
|
||||
{
|
||||
player.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
player.setActiveWarehouse(player.getWarehouse());
|
||||
|
@@ -68,7 +68,7 @@ public class Wear implements IBypassHandler
|
||||
return false;
|
||||
}
|
||||
|
||||
private static final void showWearWindow(L2PcInstance player, int val)
|
||||
private static void showWearWindow(L2PcInstance player, int val)
|
||||
{
|
||||
final L2BuyList buyList = BuyListData.getInstance().getBuyList(val);
|
||||
if (buyList == null)
|
||||
|
@@ -69,7 +69,7 @@ public class FavoriteBoard implements IParseBoardHandler
|
||||
{
|
||||
while (rs.next())
|
||||
{
|
||||
String link = list.replaceAll("%fav_bypass%", String.valueOf(rs.getString("favBypass")));
|
||||
String link = list.replaceAll("%fav_bypass%", rs.getString("favBypass"));
|
||||
link = link.replaceAll("%fav_title%", rs.getString("favTitle"));
|
||||
final SimpleDateFormat date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
link = link.replaceAll("%fav_add_date%", date.format(rs.getTimestamp("favAddDate")));
|
||||
|
@@ -64,7 +64,7 @@ public class RegionBoard implements IWriteBoardHandler
|
||||
link = link.replace("%region_name%", String.valueOf(REGIONS[i]));
|
||||
link = link.replace("%region_owning_clan%", (clan != null ? clan.getName() : "NPC"));
|
||||
link = link.replace("%region_owning_clan_alliance%", ((clan != null) && (clan.getAllyName() != null) ? clan.getAllyName() : ""));
|
||||
link = link.replace("%region_tax_rate%", String.valueOf(castle.getTaxRate() * 100) + "%");
|
||||
link = link.replace("%region_tax_rate%", (castle.getTaxRate() * 100) + "%");
|
||||
sb.append(link);
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,7 @@ import com.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillLi
|
||||
public class ClassChange extends AbstractEffect
|
||||
{
|
||||
private final int _index;
|
||||
private final static int IDENTITY_CRISIS_SKILL_ID = 1570;
|
||||
private static final int IDENTITY_CRISIS_SKILL_ID = 1570;
|
||||
|
||||
public ClassChange(StatsSet params)
|
||||
{
|
||||
|
@@ -69,7 +69,8 @@ public class CreateItemRandom extends AbstractEffect
|
||||
double comulativeChance = 0;
|
||||
for (ItemChanceHolder holder : item.getItem().getCreateItems())
|
||||
{
|
||||
if ((comulativeChance += holder.getChance()) >= random)
|
||||
comulativeChance += holder.getChance();
|
||||
if (comulativeChance >= random)
|
||||
{
|
||||
selectedItem = holder;
|
||||
break;
|
||||
|
@@ -131,21 +131,18 @@ public final class Heal extends AbstractEffect
|
||||
{
|
||||
effected.sendPacket(SystemMessageId.REJUVENATING_HP);
|
||||
}
|
||||
else if (effector.isPlayer() && (effector != effected))
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S2_HP_HAS_BEEN_RESTORED_BY_C1);
|
||||
sm.addString(effector.getName());
|
||||
sm.addInt((int) amount);
|
||||
effected.sendPacket(sm);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (effector.isPlayer() && (effector != effected))
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S2_HP_HAS_BEEN_RESTORED_BY_C1);
|
||||
sm.addString(effector.getName());
|
||||
sm.addInt((int) amount);
|
||||
effected.sendPacket(sm);
|
||||
}
|
||||
else
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_HP_HAS_BEEN_RESTORED);
|
||||
sm.addInt((int) amount);
|
||||
effected.sendPacket(sm);
|
||||
}
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.S1_HP_HAS_BEEN_RESTORED);
|
||||
sm.addInt((int) amount);
|
||||
effected.sendPacket(sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -33,8 +33,8 @@ import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
*/
|
||||
public class TwoHandedBluntBonus extends AbstractEffect
|
||||
{
|
||||
private final static Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.BLUNT.mask());
|
||||
private final static Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND);
|
||||
private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.BLUNT.mask());
|
||||
private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND);
|
||||
|
||||
protected final double _pAtkAmount;
|
||||
protected final StatModifierType _pAtkmode;
|
||||
|
@@ -33,8 +33,8 @@ import com.l2jmobius.gameserver.model.stats.Stats;
|
||||
*/
|
||||
public class TwoHandedSwordBonus extends AbstractEffect
|
||||
{
|
||||
private final static Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.SWORD.mask());
|
||||
private final static Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND);
|
||||
private static final Condition _weaponTypeCondition = new ConditionUsingItemType(WeaponType.SWORD.mask());
|
||||
private static final Condition _slotCondition = new ConditionUsingSlotType(L2Item.SLOT_LR_HAND);
|
||||
|
||||
protected final double _pAtkAmount;
|
||||
protected final StatModifierType _pAtkmode;
|
||||
|
@@ -91,20 +91,17 @@ public class FatedSupportBox implements IItemHandler
|
||||
{
|
||||
player.addItem(getClass().getSimpleName(), FATED_BOX_WIZARD, 1, player, true);
|
||||
}
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.SUB_GROUP_ROGUE, classId.getId()))
|
||||
{
|
||||
player.addItem(getClass().getSimpleName(), FATED_BOX_ROGUE, 1, player, true);
|
||||
}
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.SUB_GROUP_KNIGHT, classId.getId()))
|
||||
{
|
||||
player.addItem(getClass().getSimpleName(), FATED_BOX_FIGHTER, 1, player, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CategoryData.getInstance().isInCategory(CategoryType.SUB_GROUP_ROGUE, classId.getId()))
|
||||
{
|
||||
player.addItem(getClass().getSimpleName(), FATED_BOX_ROGUE, 1, player, true);
|
||||
}
|
||||
else if (CategoryData.getInstance().isInCategory(CategoryType.SUB_GROUP_KNIGHT, classId.getId()))
|
||||
{
|
||||
player.addItem(getClass().getSimpleName(), FATED_BOX_FIGHTER, 1, player, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.addItem(getClass().getSimpleName(), FATED_BOX_WARRIOR, 1, player, true);
|
||||
}
|
||||
player.addItem(getClass().getSimpleName(), FATED_BOX_WARRIOR, 1, player, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -252,7 +252,7 @@ public class Debug implements ITelnetCommand
|
||||
final StackTraceElement[] stes = entry.getValue();
|
||||
final Thread t = entry.getKey();
|
||||
sb.append("--------------\r\n");
|
||||
sb.append(t.toString() + " (" + t.getId() + ")\r\n");
|
||||
sb.append(t + " (" + t.getId() + ")\r\n");
|
||||
sb.append("State: " + t.getState() + "\r\n");
|
||||
sb.append("isAlive: " + t.isAlive() + " | isDaemon: " + t.isDaemon() + " | isInterrupted: " + t.isInterrupted() + "\r\n");
|
||||
sb.append("\r\n");
|
||||
|
@@ -136,7 +136,7 @@ public class ThreadPoolDebug implements ITelnetCommand
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
private static final <T> T getObject(Class<?> sourceClass, Object sourceInstance, String fieldName, Class<T> targetClass)
|
||||
private static <T> T getObject(Class<?> sourceClass, Object sourceInstance, String fieldName, Class<T> targetClass)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
Reference in New Issue
Block a user