public PortfolioPdx() { this.numInstance++; if (DEBUG) Thread.dumpStack(); // GemFireCacheImpl.getInstance().getLogger().fine(new Exception("DEBUG")); }
public static void die(String msg, Exception e) { System.err.println(msg); if (e != null) { System.err.println("Exception: " + e + "\n"); } Thread.dumpStack(); System.exit(2); }
public static void die(String msg, Exception e) { System.err.println(msg); if (e != null) { System.err.println("Exception: " + e + "\n"); } Thread.dumpStack(); System.exit(2); }
@Override public void handleMessage(int source, int type, int id, int severity, String message) { String sourceStr = constMap.get(source); String typeStr = constMap.get(type); String severityStr = constMap.get(severity); System.err.println(String.format(MESSAGE_FORMAT, id, sourceStr, typeStr, severityStr, message)); Thread.dumpStack(); }
public static void errNotWoven() { System.err.println("############################################################"); System.err.println("Task has either not been woven or the classpath is incorrect"); System.err.println("############################################################"); Thread.dumpStack(); System.exit(0); }
public static void errNotWoven(Task t) { System.err.println("############################################################"); System.err.println("Task " + t.getClass() + " has either not been woven or the classpath is incorrect"); System.err.println("############################################################"); Thread.dumpStack(); System.exit(0); }
@Override @After public void tearDown() throws Exception { executor.shutdown(); if (!executor.awaitTermination(30, TimeUnit.SECONDS)) { log.error("Abnormal executor shutdown"); Thread.dumpStack(); } else { log.debug("Test executor completed normal shutdown"); } super.tearDown(); }
public static long parseStamp(String stamp) { long result = 0; if (stamp != null) { double number = parseLocaleSafeDouble(stamp); result = (long) (number * 1000); } else { logger.warn("Could not parse null stamp"); Thread.dumpStack(); } return result; }
public static long parseStamp(String stamp) { long result = 0; if (stamp != null) { double number = parseLocaleSafeDouble(stamp); result = (long) (number * 1000); } else { logger.warn("Could not parse null stamp"); Thread.dumpStack(); } return result; }
@Override @After public void tearDown() throws Exception { executor.shutdown(); if (!executor.awaitTermination(30, TimeUnit.SECONDS)) { log.error("Abnormal executor shutdown"); Thread.dumpStack(); } else { log.debug("Test executor completed normal shutdown"); } super.tearDown(); }
/** dump thread stacks if pool does not terminate promptly. */ private void checkThreadTermination() { try { if (!threadPool.awaitTermination(1, TimeUnit.SECONDS)) { int activeCount = Thread.activeCount(); System.err.println("Thread pool not terminated in time; printing stack traces..."); Thread[] threads = new Thread[activeCount + 2]; int count = Thread.enumerate(threads); for (int i = 0; i < count; i++) { System.err.println("Thread: " + threads[i].getName()); Thread.dumpStack(); } } } catch (InterruptedException e) { e.printStackTrace(); } }
public PortfolioPdx(int i) { aDay = (Day) (dayList.get((i % dayList.size()))); if (DEBUG) Thread.dumpStack(); this.numInstance++; ID = i;
public void draw(UShape ushape, double x, double y, ColorMapper mapper, UParam param, VisioGraphics visio) { final UText shape = (UText) ushape; Thread.dumpStack(); final FontConfiguration fontConfiguration = shape.getFontConfiguration(); final UFont font = fontConfiguration.getFont(); String text = shape.getText(); if (text.startsWith(" ")) { final double space = stringBounder.calculateDimension(font, " ").getWidth(); while (text.startsWith(" ")) { x += space; text = text.substring(1); } } text = StringUtils.trin(text); final Dimension2D dim = stringBounder.calculateDimension(font, text); visio.text(text, x, y, font.getFamily(UFontContext.SVG), font.getSize(), dim.getWidth(), dim.getHeight(), fontConfiguration.getAttributes()); }
@Aspect public class EDTCheck { @Pointcut("call (* javax.swing..*+.*(..)) || " + "call (javax.swing..*+.new(..))") public void swingMethods() {} @Pointcut("call (* com.mystuff.swing..*+.*(..)) || " + "call (com.mystuff.swing..*+.new(..))") public void mySwingMethods() {} @Pointcut("call (* javax.swing..*+.add*Listener(..)) || " + "call (* javax.swing..*+.remove*Listener(..)) || " + "call (void javax.swing.JComponent+.setText(java.lang.String))") public void safeMethods() {} @Before("(swingMethods() || mySwingMethods()) && !safeMethods()") public void checkCallingThread(JoinPoint.StaticPart thisJoinPointStatic) { if(!SwingUtilities.isDispatchThread()) { System.out.println( "Swing single thread rule violation: " + thisJoinPointStatic); Thread.dumpStack(); // or you might throw an unchecked exception } } }
@Override public Iterator<T> iterator() { if (isConsumed()) { logger.error("PagingIterable already consumed, please use Iterables.toList() to be able to iterate a streaming result more than once."); Thread.dumpStack(); } return source; }
public void close() throws InterruptedException, IOException { logger.debug("Closing FS crawler [{}]", settings.getName()); if (fsParser != null) { fsParser.close(); synchronized(fsParser.getSemaphore()) { fsParser.getSemaphore().notifyAll(); } } if (this.fsCrawlerThread != null) { while (fsCrawlerThread.isAlive()) { // We check that the crawler has been closed effectively logger.debug("FS crawler thread is still running"); if (logger.isDebugEnabled()) { Thread.dumpStack(); } Thread.sleep(500); } logger.debug("FS crawler thread is now stopped"); } esClient.close(); logger.debug("ES Client Manager stopped"); logger.info("FS crawler [{}] stopped", settings.getName()); }
public GenericValue getGenericValue() { if (debug) Thread.dumpStack(); return genericValue; }
public Timestamp getTimestamp(String name) { if (debug) Thread.dumpStack(); return genericValue.getTimestamp(name); }
public Long getLong(String name) { if (debug) Thread.dumpStack(); return genericValue.getLong(name); }
public String getString(String name) { if (debug) Thread.dumpStack(); return genericValue.getString(name); }