ICEpdf
  1. ICEpdf
  2. PDF-26

org.icepdf.core.util.Defs.setProperty will fail with stackoverflow exception if a SecurityException is produced

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 4.3
    • Component/s: None
    • Labels:
      None
    • Environment:
      JDK1.6u7

      Description

      In org.icepdf.core.util.Defs.setProperty


      public static void setProperty(String property, Object value) {
              try {
                  Properties prop = System.getProperties();
                  if (value != null) {
                      prop.put(property, value);
                  }
              }
              catch (SecurityException ex) {
                 // recall method so that property change takes effect
                  setProperty(property, value);
              }
          }

      If (when?) a SecurityException is produced second time, the setProperty will be called again, and again, until a StackOverflow is thrown, and that will prevent the developer from seeing the message of the root cause of the problem, the SecurityException

        Activity

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Francisco Peredo
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: