From: Roland Haeder Date: Mon, 10 Aug 2015 13:08:15 +0000 (+0200) Subject: Ignored some strings for internationalization + some debug messages added X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6d337a85f1ce70856d438dae7379f5705a2ca020;p=jcore.git Ignored some strings for internationalization + some debug messages added Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/jcore/BaseFrameworkSystem.java b/src/org/mxchange/jcore/BaseFrameworkSystem.java index efee713..d31239b 100644 --- a/src/org/mxchange/jcore/BaseFrameworkSystem.java +++ b/src/org/mxchange/jcore/BaseFrameworkSystem.java @@ -613,16 +613,16 @@ public class BaseFrameworkSystem implements FrameworkInterface { */ protected Object convertNullToEmpty (final Object str) { // Trace message - this.getLogger().trace(MessageFormat.format("str={0}", str)); + this.getLogger().trace(MessageFormat.format("str={0}", str)); //NOI18N // Is it null? if (str == null) { // Return empty string - return ""; + return ""; //NOI18N } // Trace message - this.getLogger().trace(MessageFormat.format("str={0} - EXIT!", str)); + this.getLogger().trace(MessageFormat.format("str={0} - EXIT!", str)); //NOI18N // Return it return str; @@ -637,40 +637,46 @@ public class BaseFrameworkSystem implements FrameworkInterface { */ protected Iterator> fieldIterator (final FrameworkInterface instance, final String className) { // Trace message - this.getLogger().trace(MessageFormat.format("instance={0},className={1} - CALLED!", instance, className)); - + this.getLogger().trace(MessageFormat.format("instance={0},className={1} - CALLED!", instance, className)); //NOI18N + // Get all attributes from given instance Field[] fields = this.getClassFromTarget(instance, className).getDeclaredFields(); - + // Debug message - this.getLogger().debug(MessageFormat.format("Found {0} fields.", fields.length)); - + this.getLogger().debug(MessageFormat.format("Found {0} fields.", fields.length)); //NOI18N + // A simple map with K=fieldName and V=Value is fine Map map = new HashMap<>(fields.length); - + // Walk through all for (final Field field : fields) { // Debug log - this.getLogger().debug(MessageFormat.format("field={0}", field.getName())); + this.getLogger().debug(MessageFormat.format("field={0}", field.getName())); //NOI18N // Does the field start with "$"? - if (field.getName().startsWith("$")) { + if (field.getName().startsWith("$")) { //NOI18N + // Debug message + this.getLogger().debug(MessageFormat.format("Skipping field={0} as it starts with a dollar character.", field.getName())); //NOI18N + // Skip it silently continue; } + // Debug message + this.getLogger().debug(MessageFormat.format("Calling getValueFromColumn({0}) on instance {1} ...", field.getName(), instance)); + // Get value from it - Object value = this.getValueFromColumn(field.getName()); + Object value = instance.getValueFromColumn(field.getName()); // Debug message - this.getLogger().debug(MessageFormat.format("value={0}", value)); + this.getLogger().debug(MessageFormat.format("Adding field={0},value={1}", field.getName(), value)); //NOI18N // Add it to list map.put(field, value); } // Debug message - this.getLogger().debug(MessageFormat.format("Returning iterator for {0} entries ...", map.size())); + this.getLogger().debug(MessageFormat.format("Returning iterator for {0} entries ...", map.size())); //NOI18N // Return list iterator return map.entrySet().iterator(); @@ -737,7 +743,7 @@ public class BaseFrameworkSystem implements FrameworkInterface { // Is the bundle set? if (bundle instanceof ResourceBundle) { // Is already set - throw new IllegalStateException("called twice"); + throw new IllegalStateException("called twice"); //NOI18N } // Set instance diff --git a/src/org/mxchange/jcore/contact/BaseContact.java b/src/org/mxchange/jcore/contact/BaseContact.java index 75f51fd..465289a 100644 --- a/src/org/mxchange/jcore/contact/BaseContact.java +++ b/src/org/mxchange/jcore/contact/BaseContact.java @@ -171,7 +171,7 @@ public class BaseContact extends BaseFrameworkSystem implements Contact { * @return the cellphoneNumber */ @Override - public String getCellphoneNumber () { + public final String getCellphoneNumber () { return this.cellphoneNumber; } @@ -327,6 +327,7 @@ public class BaseContact extends BaseFrameworkSystem implements Contact { */ @Override public String getFamilyName () { + //* NOISY-DEBUG: */ this.getLogger().trace("CALLED!"); return this.familyName; } @@ -337,6 +338,7 @@ public class BaseContact extends BaseFrameworkSystem implements Contact { */ @Override public final void setFamilyName (final String familyName) { + /* NOISY-DEBUG: */ this.getLogger().trace(MessageFormat.format("familyName={0} - CALLED!", familyName)); this.familyName = familyName; } diff --git a/src/org/mxchange/jcore/contact/Contact.java b/src/org/mxchange/jcore/contact/Contact.java index 85896f5..c3f5476 100644 --- a/src/org/mxchange/jcore/contact/Contact.java +++ b/src/org/mxchange/jcore/contact/Contact.java @@ -30,6 +30,7 @@ import org.mxchange.jcore.client.Client; public interface Contact extends FrameworkInterface { /** * Returns an iterator of all values from this object + * * @return An iterator */ public Iterator> iterator ();