Update copyright

This commit is contained in:
Fabian Becker 2014-10-21 18:50:11 +02:00
parent 12c7db9251
commit 0eaddb26ef
3 changed files with 10 additions and 7 deletions

View File

@ -43,7 +43,7 @@ public class EvAInfo {
public static final String splashLocation = "images/EvASplashScreen.png";
public static final String infoTitle = productName + " Information";
public static final String copyrightYear = "2010-2012";
public static final String copyrightYear = "2010-2014";
////////////// Property handling...

View File

@ -89,9 +89,7 @@ public class GenericObjectEditor implements PropertyEditor {
* not have this field.
*/
LOGGER.log(Level.FINER, String.format("%1$s does not have a hideFromGOE field", clazz.toString()), e);
} catch (IllegalArgumentException e) {
LOGGER.log(Level.FINER, e.getMessage(), e);
} catch (IllegalAccessException e) {
} catch (IllegalArgumentException | IllegalAccessException e) {
LOGGER.log(Level.FINER, e.getMessage(), e);
}
@ -122,7 +120,7 @@ public class GenericObjectEditor implements PropertyEditor {
*
* @param cls class the property belongs to
* @param property string name of the property
* @param hide desired value to set, true for hidden, false for visible
* @param expertValue desired value to set, true for hidden, false for visible
* @return false, if an error occurs, else true
*/
public static boolean setExpertProperty(Class<?> cls, String property, boolean expertValue) {
@ -393,8 +391,7 @@ public class GenericObjectEditor implements PropertyEditor {
if (getNameMethod >= 0) {
try {
rep = (String) methods[getNameMethod].getMethod().invoke(object, (Object[]) null);
} catch (java.lang.IllegalAccessException e1) {
} catch (java.lang.reflect.InvocationTargetException e2) {
} catch (IllegalAccessException | java.lang.reflect.InvocationTargetException ignored) {
}
}
if (rep.length() <= 0) {

View File

@ -1,5 +1,7 @@
package eva2.tools;
import com.google.gson.Gson;
import java.io.*;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -46,6 +48,10 @@ public class Serializer {
objectStream.writeObject(objToStore);
objectStream.flush();
objectStream.close();
String output;
Gson gson = new Gson();
output = gson.toJson(objToStore);
System.out.println(output);
} catch (java.io.NotSerializableException ex) {
LOGGER.log(Level.SEVERE, "Object is not serializable!", ex);
}