Update copyright
This commit is contained in:
parent
12c7db9251
commit
0eaddb26ef
@ -43,7 +43,7 @@ public class EvAInfo {
|
|||||||
public static final String splashLocation = "images/EvASplashScreen.png";
|
public static final String splashLocation = "images/EvASplashScreen.png";
|
||||||
|
|
||||||
public static final String infoTitle = productName + " Information";
|
public static final String infoTitle = productName + " Information";
|
||||||
public static final String copyrightYear = "2010-2012";
|
public static final String copyrightYear = "2010-2014";
|
||||||
|
|
||||||
////////////// Property handling...
|
////////////// Property handling...
|
||||||
|
|
||||||
|
@ -89,9 +89,7 @@ public class GenericObjectEditor implements PropertyEditor {
|
|||||||
* not have this field.
|
* not have this field.
|
||||||
*/
|
*/
|
||||||
LOGGER.log(Level.FINER, String.format("%1$s does not have a hideFromGOE field", clazz.toString()), e);
|
LOGGER.log(Level.FINER, String.format("%1$s does not have a hideFromGOE field", clazz.toString()), e);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException | IllegalAccessException e) {
|
||||||
LOGGER.log(Level.FINER, e.getMessage(), e);
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
LOGGER.log(Level.FINER, e.getMessage(), 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 cls class the property belongs to
|
||||||
* @param property string name of the property
|
* @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
|
* @return false, if an error occurs, else true
|
||||||
*/
|
*/
|
||||||
public static boolean setExpertProperty(Class<?> cls, String property, boolean expertValue) {
|
public static boolean setExpertProperty(Class<?> cls, String property, boolean expertValue) {
|
||||||
@ -393,8 +391,7 @@ public class GenericObjectEditor implements PropertyEditor {
|
|||||||
if (getNameMethod >= 0) {
|
if (getNameMethod >= 0) {
|
||||||
try {
|
try {
|
||||||
rep = (String) methods[getNameMethod].getMethod().invoke(object, (Object[]) null);
|
rep = (String) methods[getNameMethod].getMethod().invoke(object, (Object[]) null);
|
||||||
} catch (java.lang.IllegalAccessException e1) {
|
} catch (IllegalAccessException | java.lang.reflect.InvocationTargetException ignored) {
|
||||||
} catch (java.lang.reflect.InvocationTargetException e2) {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rep.length() <= 0) {
|
if (rep.length() <= 0) {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package eva2.tools;
|
package eva2.tools;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
@ -46,6 +48,10 @@ public class Serializer {
|
|||||||
objectStream.writeObject(objToStore);
|
objectStream.writeObject(objToStore);
|
||||||
objectStream.flush();
|
objectStream.flush();
|
||||||
objectStream.close();
|
objectStream.close();
|
||||||
|
String output;
|
||||||
|
Gson gson = new Gson();
|
||||||
|
output = gson.toJson(objToStore);
|
||||||
|
System.out.println(output);
|
||||||
} catch (java.io.NotSerializableException ex) {
|
} catch (java.io.NotSerializableException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Object is not serializable!", ex);
|
LOGGER.log(Level.SEVERE, "Object is not serializable!", ex);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user