Uploaded image for project: 'XWork'
  1. XWork
  2. XW-667

Action validation should load class only when required

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1
    • 2.1.2
    • Configuration
    • None
    • Patch

    Description

      See https://issues.apache.org/struts/browse/WW-1821for background. I proposed this change:

      — XmlConfigurationProvider.java (revision 1877)

      +++ XmlConfigurationProvider.java (working copy)

      @@ -380,8 +380,8 @@

      return true;

      }

      try {

      • Class clazz = objectFactory.getClassInstance(className);

      if (objectFactory.isNoArgConstructorRequired()) {

      + Class clazz = objectFactory.getClassInstance(className);

      if (!Modifier.isPublic(clazz.getModifiers()))

      { throw new ConfigurationException("Action class [" + className + "] is not publi c", loc); }

      Side effect is that it would break anyone that is doing some sort of static loading on the actions (which is wrong but hey!). Opening ticket to get more feedback.

      Attachments

        Activity

          People

            Unassigned Unassigned
            musachy Musachy Barroso
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: