Skip to content

Commit

Permalink
Fixed compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Feb 21, 2014
1 parent 42b6cd5 commit 51322e4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package org.jboss.forge.addon.configuration;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;

import org.apache.commons.configuration.XMLConfiguration;
import org.apache.commons.configuration.reloading.FileChangedReloadingStrategy;
import org.apache.commons.io.FileUtils;
import org.jboss.forge.addon.resource.FileResource;
import org.jboss.forge.furnace.util.OperatingSystemUtils;

Expand Down Expand Up @@ -38,9 +38,9 @@ public Configuration getUserConfiguration() throws ConfigurationException
}
if (!userConfigurationFile.exists() || userConfigurationFile.length() == 0L)
{
try
try (FileWriter fw = new FileWriter(userConfigurationFile))
{
FileUtils.writeStringToFile(userConfigurationFile, "<configuration/>");
fw.write("<configuration/>");
}
catch (IOException e)
{
Expand Down

5 comments on commit 51322e4

@adam-wyluda
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get errors from Configuration addon now, and I noticed that .forge/config.xml/ is directory instead of file.

@lincolnthree
Copy link
Member

@lincolnthree lincolnthree commented on 51322e4 Feb 22, 2014 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gastaldi
Copy link
Member Author

@gastaldi gastaldi commented on 51322e4 Feb 22, 2014 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gastaldi
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 5b11faa
Sorry about the inconvenience

@adam-wyluda
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works ok now, thanks for fix.

Please sign in to comment.