private static void computeMissingMessages(String bundleName, Class<?> clazz, Map<Object, Object> fieldMap, Field[] fieldArray, boolean isAccessible) { // iterate over the fields in the class to make sure that there aren't any empty ones final int MOD_EXPECTED = Modifier.PUBLIC | Modifier.STATIC; final int MOD_MASK = MOD_EXPECTED | Modifier.FINAL; final int numFields = fieldArray.length; for (int i = 0; i < numFields; i++) { Field field = fieldArray[i]; if ((field.getModifiers() & MOD_MASK) != MOD_EXPECTED) continue; //if the field has a a value assigned, there is nothing to do if (fieldMap.get(field.getName()) == ASSIGNED) continue; try { // Set a value for this empty field. We should never get an exception here because // we know we have a public static non-final field. If we do get an exception, silently // log it and continue. This means that the field will (most likely) be un-initialized and // will fail later in the code and if so then we will see both the NPE and this error. String value = "NLS missing message: " + field.getName() + " in: " + bundleName; //$NON-NLS-1$ //$NON-NLS-2$ if (SupplementDebug.STATIC_DEBUG_MESSAGE_BUNDLES) System.out.println(value); log(SEVERITY_WARNING, value, null); if (!isAccessible) field.setAccessible(true); field.set(null, value); } catch (Exception e) { log(SEVERITY_ERROR, "Error setting the missing message value for: " + field.getName(), e); //$NON-NLS-1$ } } }
private static void computeMissingMessages(String bundleName, Class<?> clazz, Map<Object, Object> fieldMap, Field[] fieldArray, boolean isAccessible) { // iterate over the fields in the class to make sure that there aren't any empty ones final int MOD_EXPECTED = Modifier.PUBLIC | Modifier.STATIC; final int MOD_MASK = MOD_EXPECTED | Modifier.FINAL; final int numFields = fieldArray.length; for (int i = 0; i < numFields; i++) { Field field = fieldArray[i]; if ((field.getModifiers() & MOD_MASK) != MOD_EXPECTED) continue; //if the field has a a value assigned, there is nothing to do if (fieldMap.get(field.getName()) == ASSIGNED) continue; try { // Set a value for this empty field. We should never get an exception here because // we know we have a public static non-final field. If we do get an exception, silently // log it and continue. This means that the field will (most likely) be un-initialized and // will fail later in the code and if so then we will see both the NPE and this error. String value = "NLS missing message: " + field.getName() + " in: " + bundleName; //$NON-NLS-1$ //$NON-NLS-2$ if (Debug.DEBUG_MESSAGE_BUNDLES) System.out.println(value); log(SEVERITY_WARNING, value, null); if (!isAccessible) field.setAccessible(true); field.set(null, value); } catch (Exception e) { log(SEVERITY_ERROR, "Error setting the missing message value for: " + field.getName(), e); //$NON-NLS-1$ } } }
private static void computeMissingMessages(String bundleName, Class<?> clazz, Map<Object, Object> fieldMap, Field[] fieldArray, boolean isAccessible) { // iterate over the fields in the class to make sure that there aren't any empty ones final int MOD_EXPECTED = Modifier.PUBLIC | Modifier.STATIC; final int MOD_MASK = MOD_EXPECTED | Modifier.FINAL; final int numFields = fieldArray.length; for (int i = 0; i < numFields; i++) { Field field = fieldArray[i]; if ((field.getModifiers() & MOD_MASK) != MOD_EXPECTED) continue; //if the field has a a value assigned, there is nothing to do if (fieldMap.get(field.getName()) == ASSIGNED) continue; try { // Set a value for this empty field. We should never get an exception here because // we know we have a public static non-final field. If we do get an exception, silently // log it and continue. This means that the field will (most likely) be un-initialized and // will fail later in the code and if so then we will see both the NPE and this error. String value = "NLS missing message: " + field.getName() + " in: " + bundleName; //$NON-NLS-1$ //$NON-NLS-2$ if (SupplementDebug.STATIC_DEBUG_MESSAGE_BUNDLES) System.out.println(value); log(SEVERITY_WARNING, value, null); if (!isAccessible) field.setAccessible(true); field.set(null, value); } catch (Exception e) { log(SEVERITY_ERROR, "Error setting the missing message value for: " + field.getName(), e); //$NON-NLS-1$ } } }
private static void computeMissingMessages(String bundleName, Class<?> clazz, Map<Object, Object> fieldMap, Field[] fieldArray, boolean isAccessible) { // iterate over the fields in the class to make sure that there aren't any empty ones final int MOD_EXPECTED = Modifier.PUBLIC | Modifier.STATIC; final int MOD_MASK = MOD_EXPECTED | Modifier.FINAL; final int numFields = fieldArray.length; for (int i = 0; i < numFields; i++) { Field field = fieldArray[i]; if ((field.getModifiers() & MOD_MASK) != MOD_EXPECTED) continue; //if the field has a a value assigned, there is nothing to do if (fieldMap.get(field.getName()) == ASSIGNED) continue; try { // Set a value for this empty field. We should never get an exception here because // we know we have a public static non-final field. If we do get an exception, silently // log it and continue. This means that the field will (most likely) be un-initialized and // will fail later in the code and if so then we will see both the NPE and this error. String value = "NLS missing message: " + field.getName() + " in: " + bundleName; //$NON-NLS-1$ //$NON-NLS-2$ if (SupplementDebug.STATIC_DEBUG_MESSAGE_BUNDLES) System.out.println(value); log(SEVERITY_WARNING, value, null); if (!isAccessible) field.setAccessible(true); field.set(null, value); } catch (Exception e) { log(SEVERITY_ERROR, "Error setting the missing message value for: " + field.getName(), e); //$NON-NLS-1$ } } }
private static void computeMissingMessages(String bundleName, Class<?> clazz, Map<Object, Object> fieldMap, Field[] fieldArray, boolean isAccessible) { // iterate over the fields in the class to make sure that there aren't any empty ones final int MOD_EXPECTED = Modifier.PUBLIC | Modifier.STATIC; final int MOD_MASK = MOD_EXPECTED | Modifier.FINAL; final int numFields = fieldArray.length; for (int i = 0; i < numFields; i++) { Field field = fieldArray[i]; if ((field.getModifiers() & MOD_MASK) != MOD_EXPECTED) continue; //if the field has a a value assigned, there is nothing to do if (fieldMap.get(field.getName()) == ASSIGNED) continue; try { // Set a value for this empty field. We should never get an exception here because // we know we have a public static non-final field. If we do get an exception, silently // log it and continue. This means that the field will (most likely) be un-initialized and // will fail later in the code and if so then we will see both the NPE and this error. String value = "NLS missing message: " + field.getName() + " in: " + bundleName; //$NON-NLS-1$ //$NON-NLS-2$ if (SupplementDebug.STATIC_DEBUG_MESSAGE_BUNDLES) System.out.println(value); log(SEVERITY_WARNING, value, null); if (!isAccessible) field.setAccessible(true); field.set(null, value); } catch (Exception e) { log(SEVERITY_ERROR, "Error setting the missing message value for: " + field.getName(), e); //$NON-NLS-1$ } } }
private static void computeMissingMessages(String bundleName, Class<?> clazz, Map<Object, Object> fieldMap, Field[] fieldArray, boolean isAccessible) { // iterate over the fields in the class to make sure that there aren't any empty ones final int MOD_EXPECTED = Modifier.PUBLIC | Modifier.STATIC; final int MOD_MASK = MOD_EXPECTED | Modifier.FINAL; final int numFields = fieldArray.length; for (int i = 0; i < numFields; i++) { Field field = fieldArray[i]; if ((field.getModifiers() & MOD_MASK) != MOD_EXPECTED) continue; //if the field has a a value assigned, there is nothing to do if (fieldMap.get(field.getName()) == ASSIGNED) continue; try { // Set a value for this empty field. We should never get an exception here because // we know we have a public static non-final field. If we do get an exception, silently // log it and continue. This means that the field will (most likely) be un-initialized and // will fail later in the code and if so then we will see both the NPE and this error. String value = "NLS missing message: " + field.getName() + " in: " + bundleName; //$NON-NLS-1$ //$NON-NLS-2$ if (SupplementDebug.STATIC_DEBUG_MESSAGE_BUNDLES) System.out.println(value); log(SEVERITY_WARNING, value, null); if (!isAccessible) field.setAccessible(true); field.set(null, value); } catch (Exception e) { log(SEVERITY_ERROR, "Error setting the missing message value for: " + field.getName(), e); //$NON-NLS-1$ } } }
private static void computeMissingMessages(String bundleName, Class<?> clazz, Map<Object, Object> fieldMap, Field[] fieldArray, boolean isAccessible) { // iterate over the fields in the class to make sure that there aren't any empty ones final int MOD_EXPECTED = Modifier.PUBLIC | Modifier.STATIC; final int MOD_MASK = MOD_EXPECTED | Modifier.FINAL; final int numFields = fieldArray.length; for (int i = 0; i < numFields; i++) { Field field = fieldArray[i]; if ((field.getModifiers() & MOD_MASK) != MOD_EXPECTED) continue; //if the field has a a value assigned, there is nothing to do if (fieldMap.get(field.getName()) == ASSIGNED) continue; try { // Set a value for this empty field. We should never get an exception here because // we know we have a public static non-final field. If we do get an exception, silently // log it and continue. This means that the field will (most likely) be un-initialized and // will fail later in the code and if so then we will see both the NPE and this error. String value = "NLS missing message: " + field.getName() + " in: " + bundleName; //$NON-NLS-1$ //$NON-NLS-2$ if (Debug.DEBUG_MESSAGE_BUNDLES) System.out.println(value); log(SEVERITY_WARNING, value, null); if (!isAccessible) field.setAccessible(true); field.set(null, value); } catch (Exception e) { log(SEVERITY_ERROR, "Error setting the missing message value for: " + field.getName(), e); //$NON-NLS-1$ } } }
private static void computeMissingMessages(String bundleName, Class<?> clazz, Map<Object, Object> fieldMap, Field[] fieldArray, boolean isAccessible) { // iterate over the fields in the class to make sure that there aren't any empty ones final int MOD_EXPECTED = Modifier.PUBLIC | Modifier.STATIC; final int MOD_MASK = MOD_EXPECTED | Modifier.FINAL; final int numFields = fieldArray.length; for (int i = 0; i < numFields; i++) { Field field = fieldArray[i]; if ((field.getModifiers() & MOD_MASK) != MOD_EXPECTED) continue; //if the field has a a value assigned, there is nothing to do if (fieldMap.get(field.getName()) == ASSIGNED) continue; try { // Set a value for this empty field. We should never get an exception here because // we know we have a public static non-final field. If we do get an exception, silently // log it and continue. This means that the field will (most likely) be un-initialized and // will fail later in the code and if so then we will see both the NPE and this error. String value = "NLS missing message: " + field.getName() + " in: " + bundleName; //$NON-NLS-1$ //$NON-NLS-2$ if (SupplementDebug.STATIC_DEBUG_MESSAGE_BUNDLES) System.out.println(value); log(SEVERITY_WARNING, value, null); if (!isAccessible) field.setAccessible(true); field.set(null, value); } catch (Exception e) { log(SEVERITY_ERROR, "Error setting the missing message value for: " + field.getName(), e); //$NON-NLS-1$ } } }
properties.load(input); } catch (IOException e) { log(SEVERITY_ERROR, "Error loading " + variants[i], e); //$NON-NLS-1$ } finally { if (input != null)
properties.load(input); } catch (IOException e) { log(SEVERITY_ERROR, "Error loading " + variants[i], e); //$NON-NLS-1$ } finally { if (input != null)
properties.load(input); } catch (IOException e) { log(SEVERITY_ERROR, "Error loading " + variants[i], e); //$NON-NLS-1$ } finally { if (input != null)
properties.load(input); } catch (IOException e) { log(SEVERITY_ERROR, "Error loading " + variants[i], e); //$NON-NLS-1$ } finally { if (input != null)
properties.load(input); } catch (IOException e) { log(SEVERITY_ERROR, "Error loading " + variants[i], e); //$NON-NLS-1$ } finally { if (input != null)