Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-2223

Unable to create xhtml file

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.16.2.Final
    • 2.13.0.Final
    • Addon Development
    • None

      When creating a file with extension ".xhtml" with the following code the returned XMLResource is null. However creating the same file with extension "xml" works.

      XMLResource config = resourceFactory.create(XMLResource.class, new File(project.toString() + "/src/main/resources/" + filename));

      imho the create() method should produce an exception containing the cause of the error instead of returning null, it would simplify bugfixing.

      Furthermore the code getParent().mkdirs(); (2 occurences) in org.jboss.forge.addon.resource.AbstractFileResource may (and do) produce NullPointerExceptions.

      Is there any suggestion to get the base resource directory via code instead of hardcoding it to "project.toString() + "/src/main/resources"?

      thanks and regards from austria, Mike

              rhn-support-ggastald George Gastaldi
              mikes2221 Michael Schwartz (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: