Java tutorial
//package com.java2s; /******************************************************************************* * psiKeds :- ps induced knowledge entity delivery system * * Copyright (c) 2013, 2014 Karsten Reincke, Marco Juliano, Deutsche Telekom AG * * This file is free software: you can redistribute * it and/or modify it under the terms of the * [x] GNU Affero General Public License * [ ] GNU General Public License * [ ] GNU Lesser General Public License * [ ] Creatice Commons ShareAlike License * * For details see file LICENSING in the top project directory *******************************************************************************/ public class Main { /** * Paranoid version of tostring() * * @param obj * Object * @return String * */ private static String getPrettyObjectValue(final Object obj) { try { return obj.toString(); } catch (final Throwable t) { // either obj is null or has a very strange toString() method. return ""; } } }