mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Matthew Swift
19.02.2011 24a59808a15d20c81962616aebd883e43ad4f659
Use Exception.getMessage() instead of Exception.toString() where possible in order to avoid including the Exception type in error messages.
3 files modified
59 ■■■■ changed files
opendj3/opendj-sdk/src/main/java/org/opends/sdk/Matcher.java 30 ●●●● patch | view | raw | blame | history
opendj3/opendj-sdk/src/main/java/org/opends/sdk/schema/DistinguishedNameEqualityMatchingRuleImpl.java 4 ●●●● patch | view | raw | blame | history
opendj3/opendj-sdk/src/main/java/org/opends/sdk/schema/SchemaBuilder.java 25 ●●●●● patch | view | raw | blame | history
opendj3/opendj-sdk/src/main/java/org/opends/sdk/Matcher.java
@@ -346,7 +346,7 @@
        if (DEBUG_LOG.isLoggable(Level.WARNING))
        {
          DEBUG_LOG.warning("Attribute description " + attributeDescription
              + " is not recognized: " + e.toString());
              + " is not recognized: " + e.getMessage());
        }
        return UNDEFINED;
      }
@@ -370,7 +370,7 @@
        if (DEBUG_LOG.isLoggable(Level.WARNING))
        {
          DEBUG_LOG.warning("The assertion value " + assertionValue
              + " is invalid: " + de.toString());
              + " is invalid: " + de.getMessage());
        }
        return UNDEFINED;
      }
@@ -395,7 +395,7 @@
        if (DEBUG_LOG.isLoggable(Level.WARNING))
        {
          DEBUG_LOG.warning("Attribute description " + attributeDescription
              + " is not recognized: " + e.toString());
              + " is not recognized: " + e.getMessage());
        }
        return UNDEFINED;
      }
@@ -419,7 +419,7 @@
        if (DEBUG_LOG.isLoggable(Level.WARNING))
        {
          DEBUG_LOG.warning("The assertion value " + assertionValue
              + " is invalid: " + de.toString());
              + " is invalid: " + de.getMessage());
        }
        return UNDEFINED;
      }
@@ -448,7 +448,7 @@
          if (DEBUG_LOG.isLoggable(Level.WARNING))
          {
            DEBUG_LOG.warning("Matching rule " + matchingRule
                + " is not recognized: " + e.toString());
                + " is not recognized: " + e.getMessage());
          }
          return UNDEFINED;
        }
@@ -465,7 +465,7 @@
          if (DEBUG_LOG.isLoggable(Level.WARNING))
          {
            DEBUG_LOG.warning("Attribute description " + attributeDescription
                + " is not recognized: " + e.toString());
                + " is not recognized: " + e.getMessage());
          }
          return UNDEFINED;
        }
@@ -534,7 +534,7 @@
        if (DEBUG_LOG.isLoggable(Level.WARNING))
        {
          DEBUG_LOG.warning("The assertion value " + assertionValue
              + " is invalid: " + de.toString());
              + " is invalid: " + de.getMessage());
        }
        return UNDEFINED;
      }
@@ -560,7 +560,7 @@
        if (DEBUG_LOG.isLoggable(Level.WARNING))
        {
          DEBUG_LOG.warning("Attribute description " + attributeDescription
              + " is not recognized: " + e.toString());
              + " is not recognized: " + e.getMessage());
        }
        return UNDEFINED;
      }
@@ -584,7 +584,7 @@
        if (DEBUG_LOG.isLoggable(Level.WARNING))
        {
          DEBUG_LOG.warning("The assertion value " + assertionValue
              + " is invalid: " + de.toString());
              + " is invalid: " + de.getMessage());
        }
        return UNDEFINED;
      }
@@ -609,7 +609,7 @@
        if (DEBUG_LOG.isLoggable(Level.WARNING))
        {
          DEBUG_LOG.warning("Attribute description " + attributeDescription
              + " is not recognized: " + e.toString());
              + " is not recognized: " + e.getMessage());
        }
        return UNDEFINED;
      }
@@ -633,7 +633,7 @@
        if (DEBUG_LOG.isLoggable(Level.WARNING))
        {
          DEBUG_LOG.warning("The assertion value " + assertionValue
              + " is invalid: " + de.toString());
              + " is invalid: " + de.getMessage());
        }
        return UNDEFINED;
      }
@@ -688,7 +688,7 @@
        if (DEBUG_LOG.isLoggable(Level.WARNING))
        {
          DEBUG_LOG.warning("Attribute description " + attributeDescription
              + " is not recognized: " + e.toString());
              + " is not recognized: " + e.getMessage());
        }
        return UNDEFINED;
      }
@@ -715,7 +715,7 @@
        if (DEBUG_LOG.isLoggable(Level.WARNING))
        {
          DEBUG_LOG.warning("Attribute description " + attributeDescription
              + " is not recognized: " + e.toString());
              + " is not recognized: " + e.getMessage());
        }
        return UNDEFINED;
      }
@@ -741,7 +741,7 @@
        {
          DEBUG_LOG
              .warning("The substring assertion values contain an invalid value: "
                  + de.toString());
                  + de.getMessage());
        }
        return UNDEFINED;
      }
@@ -811,7 +811,7 @@
      {
        DEBUG_LOG.warning("The attribute value " + v.toString() + " is "
            + "invalid for matching rule " + rule.getNameOrOID()
            + ". Possible schema error? : " + de.toString());
            + ". Possible schema error? : " + de.getMessage());
      }
      return ConditionResult.UNDEFINED;
    }
opendj3/opendj-sdk/src/main/java/org/opends/sdk/schema/DistinguishedNameEqualityMatchingRuleImpl.java
@@ -63,10 +63,6 @@
    {
      throw DecodeException.error(e.getMessageObject());
    }
    catch (final Exception e)
    {
      throw DecodeException.error(LocalizableMessage.raw(e.toString()));
    }
  }
  /**
opendj3/opendj-sdk/src/main/java/org/opends/sdk/schema/SchemaBuilder.java
@@ -2992,8 +2992,8 @@
      catch (final SchemaException e)
      {
        removeSyntax(syntax);
        warnings.add(ERR_SYNTAX_VALIDATION_FAIL.get(syntax.toString(), e
            .toString()));
        warnings.add(ERR_SYNTAX_VALIDATION_FAIL.get(
            syntax.toString(), e.getMessageObject()));
      }
    }
@@ -3007,7 +3007,8 @@
      catch (final SchemaException e)
      {
        removeMatchingRule(rule);
        warnings.add(ERR_MR_VALIDATION_FAIL.get(rule.toString(), e.toString()));
        warnings.add(ERR_MR_VALIDATION_FAIL.get(rule.toString(),
            e.getMessageObject()));
      }
    }
@@ -3022,7 +3023,7 @@
      {
        removeAttributeType(attribute);
        warnings.add(ERR_ATTR_TYPE_VALIDATION_FAIL.get(attribute.toString(), e
            .toString()));
            .getMessageObject()));
      }
    }
@@ -3036,7 +3037,8 @@
      catch (final SchemaException e)
      {
        removeObjectClass(oc);
        warnings.add(ERR_OC_VALIDATION_FAIL.get(oc.toString(), e.toString()));
        warnings.add(ERR_OC_VALIDATION_FAIL.get(oc.toString(),
            e.getMessageObject()));
      }
    }
@@ -3051,7 +3053,8 @@
      catch (final SchemaException e)
      {
        removeMatchingRuleUse(use);
        warnings.add(ERR_MRU_VALIDATION_FAIL.get(use.toString(), e.toString()));
        warnings.add(ERR_MRU_VALIDATION_FAIL.get(use.toString(),
            e.getMessageObject()));
      }
    }
@@ -3084,7 +3087,7 @@
      {
        removeNameForm(form);
        warnings.add(ERR_NAMEFORM_VALIDATION_FAIL.get(form.toString(), e
            .toString()));
            .getMessageObject()));
      }
    }
@@ -3098,8 +3101,8 @@
      catch (final SchemaException e)
      {
        removeDITContentRule(rule);
        warnings
            .add(ERR_DCR_VALIDATION_FAIL.get(rule.toString(), e.toString()));
        warnings.add(ERR_DCR_VALIDATION_FAIL.get(rule.toString(),
            e.getMessageObject()));
      }
    }
@@ -3131,8 +3134,8 @@
      catch (final SchemaException e)
      {
        removeDITStructureRule(rule);
        warnings
            .add(ERR_DSR_VALIDATION_FAIL.get(rule.toString(), e.toString()));
        warnings.add(ERR_DSR_VALIDATION_FAIL.get(rule.toString(),
            e.getMessageObject()));
      }
    }
  }