Projects >> izpack >>61c860d80eecdf162a0bfdc24680ed4f3253ebb2

Chunk
Conflicting content
            document.setXmlVersion("1.0");
            element = document.createElement(name);
            document.appendChild(element);
<<<<<<< HEAD:src/lib/com/izforge/izpack/adaptator/impl/XMLElementImpl.java
        }
        catch (ParserConfigurationException e)
        {
=======
        } catch (ParserConfigurationException e) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/adaptator/impl/XMLElementImpl.java
            e.printStackTrace();
        }
    }
Solution content
            document.setXmlVersion("1.0");
            element = document.createElement(name);
            document.appendChild(element);
        } catch (ParserConfigurationException e) {
            e.printStackTrace();
        }
    }
File
XMLElementImpl.java
Developer's decision
Version 1
Kind of conflict
Catch clause
Chunk
Conflicting content
        Vector children = getChildren();
        for (int i = 0; i < children.size(); i++) {
            IXMLElement child = children.elementAt(i);
<<<<<<< HEAD:src/lib/com/izforge/izpack/adaptator/impl/XMLElementImpl.java
            if (child.getName() != null && child.getName().equals(name))
            {
=======
            if (child.getName() != null && child.getName().equals(name)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/adaptator/impl/XMLElementImpl.java
                res.add(new XMLElementImpl(child.getElement()));
            }
        }
Solution content
        Vector children = getChildren();
        for (int i = 0; i < children.size(); i++) {
            IXMLElement child = children.elementAt(i);
            if (child.getName() != null && child.getName().equals(name)) {
                res.add(new XMLElementImpl(child.getElement()));
            }
        }
File
XMLElementImpl.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
=======
        {
            XMLReader xmlReader = saxParserFactory.newSAXParser().getXMLReader();
            filter = new LineNumberFilter(xmlReader);

<<<<<<< HEAD:src/lib/com/izforge/izpack/adaptator/impl/XMLParser.java
        }
        catch (ParserConfigurationException e)
        {
            throw new XMLException(e);
        }
        catch (SAXException e)
        } catch (ParserConfigurationException e) {
            throw new XMLException(e);
        } catch (SAXException e) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/adaptator/impl/XMLParser.java
            throw new XMLException(e);
        }
    }
Solution content
            XMLReader xmlReader = saxParserFactory.newSAXParser().getXMLReader();
            filter = new LineNumberFilter(xmlReader);

        }
        catch (ParserConfigurationException e)
        {
            throw new XMLException(e);
        }
        catch (SAXException e)
        {
            throw new XMLException(e);
        }
    }
File
XMLParser.java
Developer's decision
Version 1
Kind of conflict
Catch clause
Chunk
Conflicting content
            SAXSource source = new SAXSource(inputSource);
            source.setXMLReader(filter);
            URL xslResourceUrl = IXMLParser.class.getResource(XSL_FILE_NAME);
<<<<<<< HEAD:src/lib/com/izforge/izpack/adaptator/impl/XMLParser.java
            if (xslResourceUrl == null)
            {
=======
            if (xslResourceUrl == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/adaptator/impl/XMLParser.java
                throw new XMLException("Can't find IzPack internal file \"" + XSL_FILE_NAME + "\"");
            }
            Source xsltSource = new StreamSource(xslResourceUrl.openStream());
Solution content
            SAXSource source = new SAXSource(inputSource);
            source.setXMLReader(filter);
            URL xslResourceUrl = IXMLParser.class.getResource(XSL_FILE_NAME);
            if (xslResourceUrl == null)
            {
                throw new XMLException("Can't find IzPack internal file \"" + XSL_FILE_NAME + "\"");
            }
            Source xsltSource = new StreamSource(xslResourceUrl.openStream());
File
XMLParser.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
            Transformer xformer = TransformerFactory.newInstance().newTransformer(xsltSource);
            xformer.transform(source, result);
            filter.applyLN(result);
<<<<<<< HEAD:src/lib/com/izforge/izpack/adaptator/impl/XMLParser.java
        }
        catch (TransformerException e)
        {
=======
        } catch (TransformerException e) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/adaptator/impl/XMLParser.java
            String extraInfos = null;
            if (this.parsedItem != null) {
                extraInfos = " in " + parsedItem;
Solution content
            Transformer xformer = TransformerFactory.newInstance().newTransformer(xsltSource);
            xformer.transform(source, result);
            filter.applyLN(result);
        }
        catch (TransformerException e)
        {
            String extraInfos = null;
            if (this.parsedItem != null)
            {
                extraInfos = " in " + parsedItem;
File
XMLParser.java
Developer's decision
Manual
Kind of conflict
Catch clause
Chunk
Conflicting content
                throw new XMLException("Error" + extraInfos + " : " + e.getMessage(), e);
            }
            throw new XMLException(e);
<<<<<<< HEAD:src/lib/com/izforge/izpack/adaptator/impl/XMLParser.java
        }
        catch (IOException e)
        {
=======
        } catch (IOException e) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/adaptator/impl/XMLParser.java
            throw new XMLException(e);
        }
        finally {
Solution content
                throw new XMLException("Error" + extraInfos + " : " + e.getMessage(), e);
            }
            throw new XMLException(e);
        }
        catch (IOException e)
        {
            throw new XMLException(e);
        }
File
XMLParser.java
Developer's decision
Version 1
Kind of conflict
Catch clause
Chunk
Conflicting content
            Result result;
            if (outputStream != null) {
                result = new StreamResult(outputStream);
<<<<<<< HEAD:src/lib/com/izforge/izpack/adaptator/impl/XMLWriter.java
            }
            else
            {
=======
            } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/adaptator/impl/XMLWriter.java
                result = new StreamResult(systemId);
            }
            transformer.transform(source, result);
Solution content
            Result result;
            if (outputStream != null) {
                result = new StreamResult(outputStream);
            }
            else
                result = new StreamResult(systemId);
            }
            transformer.transform(source, result);
File
XMLWriter.java
Developer's decision
Combination
Kind of conflict
Other
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/DynamicVariable.java

package com.izforge.izpack.compiler;
=======
package com.izforge.izpack.api.data;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/DynamicVariable.java

import java.io.Serializable;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.api.data;

import java.io.Serializable;
File
DynamicVariable.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
        this.requirePrivilegedExecution = requirePrivilegedExecution;
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/Info.java
    public boolean isPrivilegedExecutionRequiredUninstaller()
    {
        return requirePrivilegedExecutionUninstaller;
    }

    public void setRequirePrivilegedExecutionUninstaller(boolean required)
    {
=======
    public boolean isPrivilegedExecutionRequiredUninstaller() {
        return requirePrivilegedExecutionUninstaller;
    }

    public void setRequirePrivilegedExecutionUninstaller(boolean required) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/Info.java
        this.requirePrivilegedExecutionUninstaller = required;
    }
Solution content
        this.requirePrivilegedExecution = requirePrivilegedExecution;
    }

    public boolean isPrivilegedExecutionRequiredUninstaller() {
        return requirePrivilegedExecutionUninstaller;
    }

    public void setRequirePrivilegedExecutionUninstaller(boolean required) {
        this.requirePrivilegedExecutionUninstaller = required;
    }
File
Info.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Method signature
Chunk
Conflicting content
     */
     *
     * @param path the path to the uninstaller
<<<<<<< HEAD:src/lib/com/izforge/izpack/Info.java
    public void setUninstallerPath(String path)
    {
=======
    public void setUninstallerPath(String path) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/Info.java
        this.uninstallerPath = path;
    }
Solution content
     *
     * @param path the path to the uninstaller
     */
    public void setUninstallerPath(String path)
    {
        this.uninstallerPath = path;
    }
File
Info.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
     *
     * @return the path to the uninstaller
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/Info.java
    public String getUninstallerPath()
    {
=======
    public String getUninstallerPath() {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/Info.java
        return this.uninstallerPath;
    }
Solution content
     *
     * @return the path to the uninstaller
     */
    public String getUninstallerPath()
    {
        return this.uninstallerPath;
    }
File
Info.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerRequirement.java
package com.izforge.izpack.installer;

import java.io.Serializable;

/**
 * A requirement which has to be fulfilled to start the installer.
 *
 * @author dennis.reil
 */
public class InstallerRequirement implements Serializable
{
    /**
     *
     */
    private static final long serialVersionUID = 2567455022706542974L;
    private String condition;
    private String message;

    public String getCondition()
    {
        return condition;
    }

    public void setCondition(String condition)
    {
        this.condition = condition;
    }

    public String getMessage()
    {
        return message;
    }

    public void setMessage(String message)
    {
        this.message = message;
    }
}
=======
package com.izforge.izpack.api.data;

import java.io.Serializable;

/**
 * A requirement which has to be fulfilled to start the installer.
 *
 * @author dennis.reil
 */
public class InstallerRequirement implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 2567455022706542974L;
    private String condition;
    private String message;

    public String getCondition() {
        return condition;
    }

    public void setCondition(String condition) {
        this.condition = condition;
    }

    public String getMessage() {
        return message;
    public void setMessage(String message) {
        this.message = message;
    }
}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/InstallerRequirement.java
Solution content
package com.izforge.izpack.api.data;

import java.io.Serializable;

/**
 * A requirement which has to be fulfilled to start the installer.
 *
 * @author dennis.reil
 */
public class InstallerRequirement implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 2567455022706542974L;
    private String condition;
    private String message;

    public String getCondition() {
        return condition;
    }

    public void setCondition(String condition) {
        this.condition = condition;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
File
InstallerRequirement.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
     *
     */
    private static final char TEMP_QUOTING_CHARACTER = '\uffff';

<<<<<<< HEAD:src/lib/com/izforge/izpack/LocaleDatabase.java
    /**
     * Load a locale database. If the database has already been loaded it will not be reloaded.
     *
     * @param isoCode The io code of the locale database.
     * @return The locale database or null if it cannot be found.
     * @throws Exception
     */
    public static synchronized LocaleDatabase getLocaleDatabase(String isoCode) throws Exception
    {
        return getLocaleDatabase(isoCode, false);
    }

    /**
     * Load a LocaleDatabase.
     * @param isoCode The ISO language prefix for the locale.
     * @param reload  Whether or not to reload the locale database if it has already been loaded.
     * @return The locale database or null if it cannot be found. 

FIXME Maybe we should define * some custom exception like LocaleLoadException or something similar so that this class can * have a method signature that does not throw Exception */ public static synchronized LocaleDatabase getLocaleDatabase(String isoCode, boolean reload) throws Exception { LocaleDatabase langpack = cachedLocales.get(isoCode); if (reload || langpack == null) { StringBuffer localeDefPath = new StringBuffer(); localeDefPath.append(LOCALE_DATABASE_DIRECTORY); localeDefPath.append(isoCode); localeDefPath.append(LOCALE_DATABASE_DEF_SUFFIX); String path = localeDefPath.toString(); // The resource exists if (LocaleDatabase.class.getResource(path) != null) { langpack = new LocaleDatabase(LocaleDatabase.class.getResourceAsStream(path)); cachedLocales.put(isoCode, langpack); } } return langpack; } /** * Load the current default LocaleDatabase. * * @throws Exception FIXME */ public static synchronized LocaleDatabase getLocaleDatabase() throws Exception { ResourceManager resourceManager = ResourceManager.getInstance(); String defaultLocale = resourceManager.getLocale(); return getLocaleDatabase(defaultLocale); } // End JCF changes ======= >>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/LocaleDatabase.java static final long serialVersionUID = 4941525634108401848L; /**

Solution content
     */
    private static final char TEMP_QUOTING_CHARACTER = '\uffff';

    static final long serialVersionUID = 4941525634108401848L;

    /**
File
LocaleDatabase.java
Developer's decision
Version 2
Kind of conflict
Comment
Method declaration
Chunk
Conflicting content
        return this.condition != null;
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/Pack.java
    public void addValidator(String validatorClassName)
    {
        validators.add(validatorClassName);
    }

    public List getValidators()
    {
=======
    public void addValidator(String validatorClassName) {
        validators.add(validatorClassName);
    }

    public List getValidators() {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/Pack.java
        return validators;
    }
Solution content
    }

        return this.condition != null;
    }

    public void addValidator(String validatorClassName) {
        validators.add(validatorClassName);
    public List getValidators() {
        return validators;
    }
File
Pack.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Method signature
Chunk
Conflicting content
    }


<<<<<<< HEAD:src/lib/com/izforge/izpack/Pack.java
    public boolean isHidden()
    {
=======
    public boolean isHidden() {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/Pack.java
        return hidden;
    }
Solution content
    }


    public boolean isHidden() {
        return hidden;
    }
File
Pack.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
    }


<<<<<<< HEAD:src/lib/com/izforge/izpack/Pack.java
    public void setHidden(boolean hidden)
    {
=======
    public void setHidden(boolean hidden) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/Pack.java
        this.hidden = hidden;
    }
}
Solution content
    }


    public void setHidden(boolean hidden) {
        this.hidden = hidden;
    }
}
File
Pack.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/Panel.java
package com.izforge.izpack;
=======
package com.izforge.izpack.api.data;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/Panel.java

import com.izforge.izpack.installer.PanelActionConfiguration;
import com.izforge.izpack.util.OsConstraint;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.api.data;

import com.izforge.izpack.installer.PanelActionConfiguration;
import com.izforge.izpack.util.OsConstraint;
File
Panel.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
        return this.helps;
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/Panel.java
    public List getPreConstructionActions()
    {
=======
    public List getPreConstructionActions() {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/Panel.java
        return preConstructionActions;
    }
Solution content
        return this.helps;
    }

    public List getPreConstructionActions() {
        return preConstructionActions;
    }
File
Panel.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
        this.postValidationActions.add(postValidationAction);
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/Panel.java
    public void putPanelActionConfiguration(String panelActionClassName, PanelActionConfiguration configuration)
    {
        if (this.actionConfiguration == null)
        {
=======
    public void putPanelActionConfiguration(String panelActionClassName, PanelActionConfiguration configuration) {
        if (this.actionConfiguration == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/Panel.java
            this.actionConfiguration = new HashMap();
        }
        this.actionConfiguration.put(panelActionClassName, configuration);
Solution content
        this.postValidationActions.add(postValidationAction);
    }

    public void putPanelActionConfiguration(String panelActionClassName, PanelActionConfiguration configuration)
    {
        if (this.actionConfiguration == null)
        {
            this.actionConfiguration = new HashMap();
        }
        this.actionConfiguration.put(panelActionClassName, configuration);
File
Panel.java
Developer's decision
Version 1
Kind of conflict
If statement
Method signature
Chunk
Conflicting content
        this.actionConfiguration.put(panelActionClassName, configuration);
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/Panel.java
    public PanelActionConfiguration getPanelActionConfiguration(String panelActionClassName)
    {
        PanelActionConfiguration result = null;
        if (this.actionConfiguration != null)
        {
=======
    public PanelActionConfiguration getPanelActionConfiguration(String panelActionClassName) {
        PanelActionConfiguration result = null;
        if (this.actionConfiguration != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/Panel.java
            result = this.actionConfiguration.get(panelActionClassName);
        }
        return result;
Solution content
        {
        this.actionConfiguration.put(panelActionClassName, configuration);
    }

    public PanelActionConfiguration getPanelActionConfiguration(String panelActionClassName)
    {
        PanelActionConfiguration result = null;
        if (this.actionConfiguration != null)
            result = this.actionConfiguration.get(panelActionClassName);
        }
        return result;
File
Panel.java
Developer's decision
Version 1
Kind of conflict
If statement
Method signature
Variable
Chunk
Conflicting content
        return result;
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/Panel.java
    public boolean hasConfiguration()
    {
        return this.configuration != null;
    }

    public void addConfiguration(String key, String value)
    {
        if (this.configuration == null)
        {
=======
    public boolean hasConfiguration() {
        return this.configuration != null;
    }

    public void addConfiguration(String key, String value) {
        if (this.configuration == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/Panel.java
            this.configuration = new HashMap();
        }
        this.configuration.put(key, value);
Solution content
        return result;
    }

    public boolean hasConfiguration()
    {
        return this.configuration != null;
    }

    public void addConfiguration(String key, String value)
    {
        if (this.configuration == null)
        {
            this.configuration = new HashMap();
        }
        this.configuration.put(key, value);
File
Panel.java
Developer's decision
Version 1
Kind of conflict
If statement
Method declaration
Method signature
Chunk
Conflicting content
        this.configuration.put(key, value);
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/Panel.java
    public String getConfiguration(String key)
    {
        String result = null;
        if (this.configuration != null)
        {
=======
    public String getConfiguration(String key) {
        String result = null;
        if (this.configuration != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/Panel.java
            result = this.configuration.get(key);
        }
        return result;
Solution content
        this.configuration.put(key, value);
    }

    public String getConfiguration(String key)
    {
        String result = null;
        if (this.configuration != null)
        {
            result = this.configuration.get(key);
        }
        return result;
File
Panel.java
Developer's decision
Version 1
Kind of conflict
If statement
Method signature
Variable
Chunk
Conflicting content
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/PanelActionConfiguration.java
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/ http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */

package com.izforge.izpack.installer;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class PanelActionConfiguration implements Serializable
{
    private Map properties;

    public PanelActionConfiguration()
    {
        this.properties = new HashMap();
    }

    public void addProperty(String key, String value)
    {
        this.properties.put(key, value);
    }

    public String getProperty(String key)
    {
        return this.properties.get(key);
    }

    public String getProperty(String key, String defaultValue)
    {
        String result = getProperty(key);
        if (result == null)
        {
            result = defaultValue;
        }
        return result;
    }

    public Map getProperties()
    {
        return properties;
    }


    public void setProperties(Map properties)
    {
        this.properties = properties;
    }
}
=======
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/ http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.api.data;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class PanelActionConfiguration implements Serializable {
    private Map properties;

    public PanelActionConfiguration() {
        this.properties = new HashMap();
    }

    public void addProperty(String key, String value) {
        this.properties.put(key, value);
    }

    public String getProperty(String key) {
        return this.properties.get(key);
    }

    public String getProperty(String key, String defaultValue) {
        String result = getProperty(key);
        if (result == null) {
            result = defaultValue;
        }
        return result;
    }
    public Map getProperties() {
        return properties;
    }


    public void setProperties(Map properties) {
        this.properties = properties;
    }
}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/PanelActionConfiguration.java
Solution content
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/ http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.api.data;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class PanelActionConfiguration implements Serializable {
    private Map properties;

    public PanelActionConfiguration()
    {
        this.properties = new HashMap();
    }

    public void addProperty(String key, String value)
    {
        this.properties.put(key, value);
    }

    public String getProperty(String key)
    {
        return this.properties.get(key);
    }

    public String getProperty(String key, String defaultValue)
    {
        String result = getProperty(key);
        if (result == null)
        {
            result = defaultValue;
        }
        return result;
    }

    public Map getProperties() {
        return properties;
    }


    public void setProperties(Map properties) {
        this.properties = properties;
    }
}
File
PanelActionConfiguration.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
package com.izforge.izpack.api.data;

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ResourceManager.java
import javax.swing.ImageIcon;
=======
import com.izforge.izpack.api.exception.ResourceNotFoundException;

import javax.swing.*;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/ResourceManager.java
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
Solution content
package com.izforge.izpack.api.data;

import com.izforge.izpack.api.exception.ResourceNotFoundException;

import javax.swing.*;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
File
ResourceManager.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.net.URL;
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ResourceManager.java
=======
import java.util.List;
import java.util.Properties;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/ResourceManager.java

/**
 * With this ResourceManager you are able to get resources from the jar file.
Solution content
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.net.URL;
import java.util.List;
import java.util.Properties;

/**
 * With this ResourceManager you are able to get resources from the jar file.
File
ResourceManager.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
    /**
     * Internel used resourceBasePath = "/resources/"
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ResourceManager.java
    public final String resourceBasePathDefaultConstant = "/res/";

    /**
     * Internel used resourceBasePath = "/res/"
     */
    protected String resourceBasePath = "/res/";
=======
    private String resourceBasePath = "/resources/";
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/ResourceManager.java

    /**
     * Contains current bundle name. The bundleName is taken from
Solution content
    /**
     * Internel used resourceBasePath = "/resources/"
     */
    private String resourceBasePath = "/resources/";

    /**
     * Contains current bundle name. The bundleName is taken from
File
ResourceManager.java
Developer's decision
Version 2
Kind of conflict
Attribute
Comment
Chunk
Conflicting content
    private static ResourceManager instance = null;

    /**
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ResourceManager.java
     * Constructor. Protected because this is a singleton.
     *
     * @param data - the current installData
     */
    protected ResourceManager(AutomatedInstallData data)
    {
        this.installData = data;
        if (data.localeISO3 != null)
        {
            this.locale = data.localeISO3;
        }
        else
        {
            // try to figure out ourself
            this.locale = installData.xmlData.getAttribute("langpack", "eng");
        }
        final String systemPropertyBundleName = this.installData
                .getVariable("resource.bundle.system.property");
        if (systemPropertyBundleName != null)
        {
            setBundleName(System.getProperty(systemPropertyBundleName));
        }

    }

    /**
     * Create the resource manager.
     * 

* This method should be called only once. If it is called a second time, the already existing * instance is returned. The resource manager should be called after the language has * been set in {@link AutomatedInstallData#localeISO3} * * @param data the installation information * @return the created instance ======= * Return the resource manager. * * @return the resource manager instance, null if no instance has been created >>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/ResourceManager.java */ public static ResourceManager getInstance() {

Solution content
    private static ResourceManager instance = null;

    /**
     * Return the resource manager.
     *
     * @return the resource manager instance, null if no instance has been created
     */
    public static ResourceManager getInstance()
    {
File
ResourceManager.java
Developer's decision
Version 2
Kind of conflict
Comment
Method declaration
Chunk
Conflicting content
    }

    /**
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ResourceManager.java
     * Return the resource manager.
     *
     * @return the resource manager instance, null if no instance has been created
=======
     * Constructor. Protected because this is a singleton.
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/ResourceManager.java
     */
    public ResourceManager(Properties properties)
    {
Solution content
    }

    /**
     * Constructor. Protected because this is a singleton.
     */
    public ResourceManager(Properties properties)
    {
File
ResourceManager.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
    }

    /**
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ResourceManager.java
     * If null was given the Default BasePath "/res/" is set If otherwise the basepath is set to the
     * given String. This is useful if someone needs direct access to Resources in the jar.
=======
     * If null was given the Default BasePath "/res/" is set
     * If otherwise the Basepath is set to the given String.
     * This is useful if someone needs direct access to Reosurces in the jar.
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/ResourceManager.java
     *
     * @param aDefaultBasePath If null was given the DefaultBasepath is re/set "/res/"
     */
Solution content
    }

    /**
     * If null was given the Default BasePath "/res/" is set
     * If otherwise the Basepath is set to the given String.
     * This is useful if someone needs direct access to Reosurces in the jar.
     *
     * @param aDefaultBasePath If null was given the DefaultBasepath is re/set "/res/"
     */
File
ResourceManager.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
        // For direct access of named resources the BasePath should be empty
        if (null != aDefaultBasePath)
        {
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ResourceManager.java
            this.resourceBasePath = aDefaultBasePath;
        }
        else
        {
            this.resourceBasePath = resourceBasePathDefaultConstant;
=======
            this.setResourceBasePath(aDefaultBasePath);
        }
        else
        {
            this.setResourceBasePath(resourceBasePathDefaultConstant);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/ResourceManager.java
        }
    }
Solution content
        // For direct access of named resources the BasePath should be empty
        if (null != aDefaultBasePath)
        {
            this.setResourceBasePath(aDefaultBasePath);
        }
        else
        {
            this.setResourceBasePath(resourceBasePathDefaultConstant);
        }
    }
File
ResourceManager.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Variable
Chunk
Conflicting content
    /**
     * This method is used to get the language dependent path of the given resource. If there is a
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ResourceManager.java
     * resource for the current language the path of the language dependent resource is returned. If
     * there's no resource for the current language the default path is returned.
     *
     * @param resource Resource to load language dependent
=======
     * resource for the current language the path of the language dependen resource is returnd. If
     * there's no resource for the current lanuage the default path is returned.
     *
     * @param resource Resource to load language dependen
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/ResourceManager.java
     * @return the language dependent path of the given resource
     * @throws com.izforge.izpack.api.exception.ResourceNotFoundException
     *          If the resource is not found
Solution content
    /**
     * This method is used to get the language dependent path of the given resource. If there is a
     * resource for the current language the path of the language dependen resource is returnd. If
     * there's no resource for the current lanuage the default path is returned.
     *
     * @param resource Resource to load language dependen
     * @return the language dependent path of the given resource
     * @throws com.izforge.izpack.api.exception.ResourceNotFoundException
     *          If the resource is not found
File
ResourceManager.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
     */
    private String getLanguageResourceString(String resource)
    {
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ResourceManager.java
        String localeSuffix = "_" + this.locale;
        String resourcePath = getBundlePath() + resource + localeSuffix;
        if (resourceExists(resourcePath))
        {
            return resourcePath;
        }

        // if there's no language dependent resource found
        resourcePath = getBundlePath() + resource;
        if (resourceExists(resourcePath))
        {
            return resourcePath;
        }

        resourcePath = this.resourceBasePath + resource + localeSuffix;
        if (resourceExists(resourcePath))
        {
            return resourcePath;
        }

        // if there's no language dependent resource found
        resourcePath = this.resourceBasePath + resource;
        if (resourceExists(resourcePath))
        {
            return resourcePath;
        }
=======
        if (resource.charAt(0) == '/')
        {
            return getAbsoluteLanguageResourceString(resource);
        }
        else
        {
            return getAbsoluteLanguageResourceString(this.getResourceBasePath() + resource);
        }

//        String localeSuffix = "_" + this.locale;
//        String resourcePath = getBundlePath() + resource + localeSuffix;
//        if (resourceExists(resourcePath))
//        {
//            return resourcePath;
//        }
//
//        // if there's no language dependent resource found
//        resourcePath = getBundlePath() + resource;
//        if (resourceExists(resourcePath))
//        {
//            return resourcePath;
//        }
//
//        resourcePath = this.resourceBasePath + resource + localeSuffix;
//        if (resourceExists(resourcePath))
//        {
//            return resourcePath;
//        }
//
//        // if there's no language dependent resource found
//        resourcePath = this.resourceBasePath + resource;
//        if (resourceExists(resourcePath))
//        {
//            return resourcePath;
//        }
//
//        throw new ResourceNotFoundException("Cannot find named Resource: '" + getBundlePath()
//                + resource + "', '" + getBundlePath() + resource + localeSuffix + "'" + ", '"
//                + this.resourceBasePath + resource + "' AND '" + this.resourceBasePath + resource
//                + localeSuffix + "'");
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/ResourceManager.java

    }
Solution content
     */
    private String getLanguageResourceString(String resource)
    {
        if (resource.charAt(0) == '/')
        {
            return getAbsoluteLanguageResourceString(resource);
        }
        else
        {
            return getAbsoluteLanguageResourceString(this.getResourceBasePath() + resource);
        }

//        String localeSuffix = "_" + this.locale;
//        String resourcePath = getBundlePath() + resource + localeSuffix;
//        if (resourceExists(resourcePath))
//        {
//            return resourcePath;
//        }
//
//        // if there's no language dependent resource found
//        resourcePath = getBundlePath() + resource;
//        if (resourceExists(resourcePath))
//        {
//            return resourcePath;
//        }
//
//        resourcePath = this.resourceBasePath + resource + localeSuffix;
//        if (resourceExists(resourcePath))
//        {
//            return resourcePath;
//        }
//
//        // if there's no language dependent resource found
//        resourcePath = this.resourceBasePath + resource;
//        if (resourceExists(resourcePath))
//        {
//            return resourcePath;
//        }
//
//        throw new ResourceNotFoundException("Cannot find named Resource: '" + getBundlePath()
//                + resource + "', '" + getBundlePath() + resource + localeSuffix + "'" + ", '"
//                + this.resourceBasePath + resource + "' AND '" + this.resourceBasePath + resource
//                + localeSuffix + "'");

    }
File
ResourceManager.java
Developer's decision
Version 2
Kind of conflict
Attribute
Comment
If statement
Method invocation
Variable
Chunk
Conflicting content
     * @param resource - a text resource to load
     * @param encoding - the encoding, which should be used to read the resource
     * @return a String contains the text of the resource
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ResourceManager.java
     * @throws ResourceNotFoundException if the resource can not be found
     * @throws IOException               if the resource can not be loaded
=======
     * @throws com.izforge.izpack.api.exception.ResourceNotFoundException
     *                     if the resource can not be found
     * @throws IOException if the resource can not be loaded
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/ResourceManager.java
     */
    // Maybe we can add a text parser for this method
    public String getTextResource(String resource, String encoding) throws IOException
Solution content
     * @param resource - a text resource to load
     * @param encoding - the encoding, which should be used to read the resource
     * @return a String contains the text of the resource
     * @throws com.izforge.izpack.api.exception.ResourceNotFoundException
     *                     if the resource can not be found
     * @throws IOException if the resource can not be loaded
     */
    // Maybe we can add a text parser for this method
    public String getTextResource(String resource, String encoding) throws IOException
File
ResourceManager.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
     * @param resource resrouce of the Icon
     * @return a ImageIcon loaded from the given Resource
     * @throws ResourceNotFoundException thrown when the resource can not be found
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ResourceManager.java
     * @throws IOException               if the resource can not be loaded
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/data/ResourceManager.java
     */
    public ImageIcon getImageIconResource(String resource)
    {
Solution content
     * @param resource resrouce of the Icon
     * @return a ImageIcon loaded from the given Resource
     * @throws ResourceNotFoundException thrown when the resource can not be found
     */
    public ImageIcon getImageIconResource(String resource)
    {
File
ResourceManager.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/DataValidator.java
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2008 Patrick Zbinden.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.installer;

public interface DataValidator
{

    public enum Status
    {
        OK, WARNING, ERROR
    }

    /**
     * tag-name of the datavalidator
     */
    public static final String DATA_VALIDATOR_TAG = "validator";

    /**
     * attribute for class to use
     */
    public static final String DATA_VALIDATOR_CLASSNAME_TAG = "classname";

    /**
     * Method to validate on {@link AutomatedInstallData}
     *
     * @param adata
     * @return {@link Status} the result of the validation
     */
    public Status validateData(final AutomatedInstallData adata);

    /**
     * Returns the string with messageId for an error
     *
     * @return String the messageId
     */
    public String getErrorMessageId();

    /**
     * Returns the string with messageId for a warning
     *
     * @return String the messageId
     */
    public String getWarningMessageId();

    /**
     * if Installer is run in automated mode, and validator returns a warning, this method is asked,
     * how to go on
     *
     * @return boolean
     */

    public boolean getDefaultAnswer();
}
=======
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2008 Patrick Zbinden.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.api.installer;

import com.izforge.izpack.api.data.AutomatedInstallData;

public interface DataValidator {

    public enum Status {
        OK, WARNING, ERROR
    }

    /**
     * tag-name of the datavalidator
    public static final String DATA_VALIDATOR_TAG = "validator";

    /**
     * attribute for class to use
     */
    public static final String DATA_VALIDATOR_CLASSNAME_TAG = "classname";

    /**
     * Method to validate on {@link AutomatedInstallData}
     *
     * @param adata
     * @return {@link Status} the result of the validation
     */
    public Status validateData(final AutomatedInstallData adata);

    /**
     * Returns the string with messageId for an error
     *
     * @return String the messageId
     */
    public String getErrorMessageId();

    /**
     * Returns the string with messageId for a warning
     *
     * @return String the messageId
     */
    public String getWarningMessageId();

    /**
     * if Installer is run in automated mode, and validator returns a warning, this method is asked,
     * how to go on
     *
     * @return boolean
     */

    public boolean getDefaultAnswer();
}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/installer/DataValidator.java
Solution content
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2008 Patrick Zbinden.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.api.installer;

import com.izforge.izpack.api.data.AutomatedInstallData;

public interface DataValidator {

    public enum Status
    {
        OK, WARNING, ERROR
    }

    /**
     * tag-name of the datavalidator
     */
    public static final String DATA_VALIDATOR_TAG = "validator";

    /**
     * attribute for class to use
     */
    public static final String DATA_VALIDATOR_CLASSNAME_TAG = "classname";

    /**
     * Method to validate on {@link AutomatedInstallData}
     *
     * @param adata
     * @return {@link Status} the result of the validation
     */
    public Status validateData(final AutomatedInstallData adata);

    /**
     * Returns the string with messageId for an error
     *
     * @return String the messageId
     */
    public String getErrorMessageId();

    /**
     * Returns the string with messageId for a warning
     *
     * @return String the messageId
     */
    public String getWarningMessageId();

    /**
     * if Installer is run in automated mode, and validator returns a warning, this method is asked,
     * how to go on
     *
     * @return boolean
     */

    public boolean getDefaultAnswer();
}
File
DataValidator.java
Developer's decision
Version 2
Kind of conflict
Comment
Import
Interface declaration
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/Condition.java

package com.izforge.izpack.rules;
=======
package com.izforge.izpack.api.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/main/java/com/izforge/izpack/api/rules/Condition.java

import java.io.Serializable;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.api.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;

import java.io.Serializable;
File
Condition.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
package com.izforge.izpack.api.adaptator;

<<<<<<< HEAD:src/tests/com/izforge/izpack/adaptator/XMLWriterTest.java
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.adaptator.impl.XMLParser;
import com.izforge.izpack.adaptator.impl.XMLWriter;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
=======
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.adaptator.impl.XMLParser;
import com.izforge.izpack.api.adaptator.impl.XMLWriter;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/test/java/com/izforge/izpack/api/adaptator/XMLWriterTest.java

import java.io.*;
Solution content
package com.izforge.izpack.api.adaptator;

import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.adaptator.impl.XMLParser;
import com.izforge.izpack.api.adaptator.impl.XMLWriter;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;

import java.io.*;
File
XMLWriterTest.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/tests/com/izforge/izpack/adaptator/xinclude/XIncludeParseFileTestCase.java

package com.izforge.izpack.adaptator.xinclude;
=======
package com.izforge.izpack.api.adaptator.xinclude;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/test/java/com/izforge/izpack/api/adaptator/xinclude/XIncludeParseFileTestCase.java

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.api.adaptator.xinclude;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
File
XIncludeParseFileTestCase.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/tests/com/izforge/izpack/adaptator/xinclude/XIncludeParseStreamTestCase.java

package com.izforge.izpack.adaptator.xinclude;
=======
package com.izforge.izpack.api.adaptator.xinclude;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/test/java/com/izforge/izpack/api/adaptator/xinclude/XIncludeParseStreamTestCase.java

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.api.adaptator.xinclude;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
File
XIncludeParseStreamTestCase.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/tests/com/izforge/izpack/adaptator/xinclude/XIncludeParseURLTestCase.java

package com.izforge.izpack.adaptator.xinclude;
=======
package com.izforge.izpack.api.adaptator.xinclude;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-api/src/test/java/com/izforge/izpack/api/adaptator/xinclude/XIncludeParseURLTestCase.java

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.api.adaptator.xinclude;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
File
XIncludeParseURLTestCase.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
    }

    /**
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
     * Parses the blockable element value and adds automatically the OS constraint family=windows if
     * not already se in the given constraint list. Throws a parsing warning if the constraint list
     * was implicitely modified.
=======
     * Parses the blockable element value and adds automatically the OS constraint
     * family=windows if not already se in the given constraint list.
     * Throws a parsing warning if the constraint list was implicitely modified.
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
     *
     * @param f      the blockable XML element to parse
     * @param osList constraint list to maintain and return
Solution content
    }

    /**
     * Parses the blockable element value and adds automatically the OS constraint
     * family=windows if not already se in the given constraint list.
     * Throws a parsing warning if the constraint list was implicitely modified.
     *
     * @param f      the blockable XML element to parse
     * @param osList constraint list to maintain and return
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
package com.izforge.izpack.compiler;

<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
import com.izforge.izpack.*;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.IXMLParser;
import com.izforge.izpack.adaptator.IXMLWriter;
import com.izforge.izpack.adaptator.impl.XMLParser;
import com.izforge.izpack.adaptator.impl.XMLWriter;
import com.izforge.izpack.compiler.Compiler.CmdlinePackagerListener;
import com.izforge.izpack.event.CompilerListener;
import com.izforge.izpack.installer.DataValidator;
import com.izforge.izpack.installer.InstallerRequirement;
import com.izforge.izpack.installer.PanelAction;
import com.izforge.izpack.installer.PanelAction.ActionStage;
import com.izforge.izpack.installer.PanelActionConfiguration;
import com.izforge.izpack.panels.HelpWindow;
import com.izforge.izpack.rules.Condition;
import com.izforge.izpack.rules.RulesEngine;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.OsConstraint;
import com.izforge.izpack.util.VariableSubstitutor;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
import com.izforge.izpack.api.adaptator.IXMLWriter;
import com.izforge.izpack.api.adaptator.impl.XMLParser;
import com.izforge.izpack.api.adaptator.impl.XMLWriter;
import com.izforge.izpack.api.data.*;
import com.izforge.izpack.api.exception.CompilerException;
import com.izforge.izpack.api.installer.DataValidator;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.api.substitutor.SubstitutionType;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.compiler.data.CompilerData;
import com.izforge.izpack.compiler.data.PropertyManager;
import com.izforge.izpack.compiler.helper.AssertionHelper;
import com.izforge.izpack.compiler.helper.CompilerHelper;
import com.izforge.izpack.compiler.helper.XmlCompilerHelper;
import com.izforge.izpack.compiler.listener.CompilerListener;
import com.izforge.izpack.compiler.packager.IPackager;
import com.izforge.izpack.core.rules.RulesEngineImpl;
import com.izforge.izpack.data.*;
import com.izforge.izpack.data.PanelAction.ActionStage;
import com.izforge.izpack.merge.MergeManager;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.IoHelper;
import com.izforge.izpack.util.OsConstraint;
import org.apache.commons.lang.StringUtils;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
import org.apache.tools.ant.DirectoryScanner;

import java.io.*;
Solution content
package com.izforge.izpack.compiler;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
import com.izforge.izpack.api.adaptator.IXMLWriter;
import com.izforge.izpack.api.adaptator.impl.XMLParser;
import com.izforge.izpack.api.adaptator.impl.XMLWriter;
import com.izforge.izpack.api.data.*;
import com.izforge.izpack.api.exception.CompilerException;
import com.izforge.izpack.api.installer.DataValidator;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.api.substitutor.SubstitutionType;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.compiler.data.CompilerData;
import com.izforge.izpack.compiler.data.PropertyManager;
import com.izforge.izpack.compiler.helper.AssertionHelper;
import com.izforge.izpack.compiler.helper.CompilerHelper;
import com.izforge.izpack.compiler.helper.XmlCompilerHelper;
import com.izforge.izpack.compiler.listener.CompilerListener;
import com.izforge.izpack.compiler.packager.IPackager;
import com.izforge.izpack.core.rules.RulesEngineImpl;
import com.izforge.izpack.data.*;
import com.izforge.izpack.data.PanelAction.ActionStage;
import com.izforge.izpack.merge.MergeManager;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.IoHelper;
import com.izforge.izpack.util.OsConstraint;
import org.apache.commons.lang.StringUtils;
import org.apache.tools.ant.DirectoryScanner;

import java.io.*;
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
import java.io.*;
import java.net.MalformedURLException;
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
import java.net.URI;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.*;
import java.util.jar.JarInputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream;
=======
import java.net.URL;
import java.net.URLClassLoader;
import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream;

>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java

/**
 * A parser for the installer xml configuration. This parses a document conforming to the
Solution content
import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
import java.util.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream;


/**
 * A parser for the installer xml configuration. This parses a document conforming to the
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
    /**
     * A list of packsLang-files that were defined by the user in the resource-section The key of
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
     * this map is an packsLang-file identifier, e.g. packsLang.xml_eng, the values are
     * lists of {@link URL} pointing to the concrete packsLang-files.
=======
     * this map is an packsLang-file identifier, e.g. packsLang.xml_eng, the values
     * are lists of {@link URL} pointing to the concrete packsLang-files.
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
     *
     * @see #mergePacksLangFiles()
     */
Solution content
    /**
     * A list of packsLang-files that were defined by the user in the resource-section The key of
     * this map is an packsLang-file identifier, e.g. packsLang.xml_eng, the values
     * are lists of {@link URL} pointing to the concrete packsLang-files.
     *
     * @see #mergePacksLangFiles()
     */
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
    {
    }

    /**
    private MergeManager mergeManager;

    /**
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
     * Set the IzPack home directory
     *
     * @param izHome - the izpack home directory
     */
    public static void setIzpackHome(String izHome)
    {
        Compiler.setIzpackHome(izHome);
    }

    /**
     * The constructor.
     *
     * @param filename The XML filename.
     * @param basedir  The base directory.
     * @param kind     The installer kind.
     * @param output   The installer filename.
     * @throws CompilerException
     */
    public CompilerConfig(String filename, String basedir, String kind, String output)
            throws CompilerException
    {
        this(filename, basedir, kind, output, null);
    }

    /**
     * The constructor.
     *
     * @param filename The XML filename.
     * @param basedir  The base directory.
     * @param kind     The installer kind.
     * @param output   The installer filename.
     * @param listener The PackagerListener.
     * @throws CompilerException
     */
    public CompilerConfig(String filename, String basedir, String kind, String output,
                          PackagerListener listener) throws CompilerException
    {
        this(filename, basedir, kind, output, "default", listener);
    }

    /**
     * @param filename     The XML filename.
     * @param kind         The installer kind.
     * @param output       The installer filename.
     * @param compr_format The compression format to be used for packs.
     * @param listener     The PackagerListener.
     * @throws CompilerException
     */
    public CompilerConfig(String filename, String base, String kind, String output,
                          String compr_format, PackagerListener listener) throws CompilerException
    {
        this(filename, base, kind, output, compr_format, listener, null);
    }

    /**
     * @param basedir     The base directory.
     * @param kind        The installer kind.
     * @param output      The installer filename.
     * @param listener    The PackagerListener.
     * @param installText The install xml configuration text
     * @throws CompilerException
     */
    public CompilerConfig(String basedir, String kind, String output, PackagerListener listener,
                          String installText) throws CompilerException
     * @param filename     The XML filename.
        this(null, basedir, kind, output, "default", listener, installText);
     * @param basedir      The base directory.
     * @param kind         The installer kind.
     * @param output       The installer filename.
     * @param compr_format The compression format to be used for packs.
     * @param listener     The PackagerListener.
     * @param installText  The install xml configuration text
     * @throws CompilerException
     */
    public CompilerConfig(String filename, String basedir, String kind, String output,
                          String compr_format, PackagerListener listener, String installText)
            throws CompilerException
    {
        this(filename, basedir, kind, output, compr_format, -1, listener, installText);
    }

    /**
     * @param filename     The XML filename.
     * @param basedir      The base directory.
     * @param kind         The installer kind.
     * @param output       The installer filename.
     * @param compr_format The compression format to be used for packs.
     * @param compr_level  Compression level to be used if supported.
     * @param listener     The PackagerListener.
     * @param installText  The install xml configuration text
     * @throws CompilerException
     */
    public CompilerConfig(String filename, String basedir, String kind, String output,
                          String compr_format, int compr_level, PackagerListener listener, String installText)
            throws CompilerException
    {
        this.filename = filename;
        this.installText = installText;
        this.basedir = basedir;
        this.compiler = new Compiler(basedir, kind, output, compr_format, compr_level);
        compiler.setPackagerListener(listener);
    }

    /**
     * Add a name value pair to the project property set. It is not replaced it is already in
     * the set of properties.
     *
     * @param name  the name of the property
     * @param value the value to set
     * @return true if the property was not already set
     */
    public boolean addProperty(String name, String value)
    {
        return compiler.addProperty(name, value);
    }

    /**
     * Access the install compiler
     *
     * @return the install compiler
     */
    public Compiler getCompiler()
    {
        return compiler;
    }

    /**
     * Retrieves the packager listener
     */
    public PackagerListener getPackagerListener()
    {
        return compiler.getPackagerListener();
    }

    /**
     * Compile the installation
     */
    public void compile()
    {
        start();
=======
     * Constructor
     *
     * @param compilerData Object containing all informations found in command line
     */
    public CompilerConfig(CompilerData compilerData, VariableSubstitutor variableSubstitutor, Compiler compiler, CompilerHelper compilerHelper, XmlCompilerHelper xmlCompilerHelper, PropertyManager propertyManager, IPackager packager, MergeManager mergeManager) {
        this.compilerData = compilerData;
        this.variableSubstitutor = variableSubstitutor;
        this.compiler = compiler;
        this.compilerHelper = compilerHelper;
        this.xmlCompilerHelper = xmlCompilerHelper;
        this.propertyManager = propertyManager;
        this.packager = packager;
        this.mergeManager = mergeManager;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
    }

    /**
Solution content
    private MergeManager mergeManager;

    /**
     * Constructor
     *
     * @param compilerData Object containing all informations found in command line
     */
    public CompilerConfig(CompilerData compilerData, VariableSubstitutor variableSubstitutor, Compiler compiler, CompilerHelper compilerHelper, XmlCompilerHelper xmlCompilerHelper, PropertyManager propertyManager, IPackager packager, MergeManager mergeManager) {
        this.compilerData = compilerData;
        this.variableSubstitutor = variableSubstitutor;
        this.compiler = compiler;
        this.compilerHelper = compilerHelper;
        this.xmlCompilerHelper = xmlCompilerHelper;
        this.propertyManager = propertyManager;
        this.packager = packager;
        this.mergeManager = mergeManager;
    }

    /**
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Attribute
Comment
Method declaration
Method invocation
Method signature
Chunk
Conflicting content
=======
    {
        // normalize and test: TODO: may allow failure if we require write
        // access
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
        File base = new File(basedir).getAbsoluteFile();
        File base = new File(compilerData.getBasedir()).getAbsoluteFile();
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
        if (!base.canRead() || !base.isDirectory())
        {
            throw new CompilerException(
Solution content
    {
        // normalize and test: TODO: may allow failure if we require write
        // access
        File base = new File(compilerData.getBasedir()).getAbsoluteFile();
        if (!base.canRead() || !base.isDirectory())
        {
            throw new CompilerException(
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
     * @throws CompilerException

    /**
     * Add packs and their contents to the installer without checking the dependencies and includes.
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
     * 

* Helper method to recursively add more packs from refpack XML packs definitions ======= *

Helper method to recursively add more packs from refpack XML packs definitions >>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java * * @param data The XML data

Solution content
    /**
     * Add packs and their contents to the installer without checking the dependencies and includes.
     * 

Helper method to recursively add more packs from refpack XML packs definitions * * @param data The XML data * @throws CompilerException

File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
        {
            throw new CompilerException("Invalid file: " + refXMLFile);
        }
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
        if (!refXMLFile.canRead())
        {
            throw new CompilerException("Invalid file: " + refXMLFile);
        }
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java

        InputStream specin;
Solution content
        {
            throw new CompilerException("Invalid file: " + refXMLFile);
        }

        InputStream specin;
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
If statement
Chunk
Conflicting content
        {
    }

    /**
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
     * Checks whether the dependencies stated in the configuration file are correct. Specifically it
     * checks that no pack point to a non existent pack and also that there are no circular
     * dependencies in the packs.
     */
    public void checkDependencies(List packs) throws CompilerException
    {
        // Because we use package names in the configuration file we assosiate
        // the names with the objects
        Map names = new HashMap();
        for (PackInfo pack : packs)
        {
            names.put(pack.getPack().name, pack);
        }
        int result = dfs(packs, names);
        // @todo More informative messages to include the source of the error
        if (result == -2)
        {
            parseError("Circular dependency detected");
        }
        else if (result == -1)
        {
            parseError("A dependency doesn't exist");
        }
    }

    /**
     * We use the dfs graph search algorithm to check whether the graph is acyclic as described in:
     * Thomas H. Cormen, Charles Leiserson, Ronald Rivest and Clifford Stein. Introduction to
     * algorithms 2nd Edition 540-549,MIT Press, 2001
     *
     * @param packs The graph
     * @param names The name map
     */
    private int dfs(List packs, Map names)
    {
        Map edges = new HashMap();
        for (PackInfo pack : packs)
        {
            if (pack.colour == PackInfo.WHITE)
            {
                if (dfsVisit(pack, names, edges) != 0)
                {
                    return -1;
                }
            }

        }
        return checkBackEdges(edges);
    }

    /**
     * This function checks for the existence of back edges.
     */
    private int checkBackEdges(Map edges)
    {
        Set keys = edges.keySet();
        for (final Edge key : keys)
        {
            int color = edges.get(key);
            if (color == PackInfo.GREY)
            {
                return -2;
            }
        }
        return 0;

    }

    /**
     * This class is used for the classification of the edges
     */
    private class Edge
    {

        PackInfo u;

        PackInfo v;

        Edge(PackInfo u, PackInfo v)
        {
            this.u = u;
            this.v = v;
        }
    }

    private int dfsVisit(PackInfo u, Map names, Map edges)
    {
        u.colour = PackInfo.GREY;
        List deps = u.getDependencies();
        if (deps != null)
            for (String name : deps)
            {
                PackInfo v = names.get(name);
                if (v == null)
                {
                    System.out.println("Failed to find dependency: " + name);
                    return -1;
                }
                Edge edge = new Edge(u, v);
                if (edges.get(edge) == null)
                {
                    edges.put(edge, v.colour);
                }

                if (v.colour == PackInfo.WHITE)
                {

                    final int result = dfsVisit(v, names, edges);
                    if (result != 0)
                    {
                        return result;
                    }
                }
            }
        }
        u.colour = PackInfo.BLACK;
        return 0;
    }

    /**
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
     * Add files in an archive to a pack
     *
     * @param archive     the archive file to unpack
Solution content
    }

    /**
     * Add files in an archive to a pack
     *
     * @param archive     the archive file to unpack
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Comment
Method declaration
Chunk
Conflicting content
     * @param condition
     */
    protected void addArchiveContent(File baseDir, File archive, String targetdir,
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
                                     List osList, int override, int blockable, PackInfo pack, Map additionals,
=======
                                     List osList, OverrideType override, Blockable blockable,
                                     PackInfo pack, Map additionals,
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
                                     String condition) throws IOException
    {
Solution content
     * @param condition
     */
    protected void addArchiveContent(File baseDir, File archive, String targetdir,
                                     List osList, OverrideType override, Blockable blockable,
                                     PackInfo pack, Map additionals,
                                     String condition) throws IOException
    {
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Variable
Chunk
Conflicting content
            tmp.mkdirs();
            tmp.deleteOnExit();
            pack.addFile(baseDir, tmp, targetdir + "/" + dirName, osList,
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
                    blockable, override, additionals, condition);
=======
                    override, blockable, additionals, condition);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
        }
        fin.close();
    }
Solution content
            tmp.mkdirs();
            tmp.deleteOnExit();
            pack.addFile(baseDir, tmp, targetdir + "/" + dirName, osList,
                    override, blockable, additionals, condition);
        }
        fin.close();
    }
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Variable
Chunk
Conflicting content
     * @throws FileNotFoundException if the file does not exist
     */
    protected void addRecursively(File baseDir, File file, String targetdir,
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
                                  List osList, int override, int blockable, PackInfo pack, Map additionals,
                                  String condition) throws IOException
=======
                                  List osList, OverrideType override, Blockable blockable,
                                  PackInfo pack, Map additionals, String condition) throws IOException
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
    {
        String targetfile = targetdir + "/" + file.getName();
        if (!file.isDirectory())
Solution content
     * @throws FileNotFoundException if the file does not exist
     */
    protected void addRecursively(File baseDir, File file, String targetdir,
                                  List osList, OverrideType override, Blockable blockable,
                                  PackInfo pack, Map additionals, String condition) throws IOException
    {
        String targetfile = targetdir + "/" + file.getName();
        if (!file.isDirectory())
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Variable
Chunk
Conflicting content
            }


<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
            String fullClassName = null;
            if (url == null)
            {
                fullClassName = className;
            }
            else
            {
                try
                {
                    fullClassName = getFullClassName(url, className);
                }
                catch (IOException e)
                {
                }
            }

            if (fullClassName != null)
            {
                panel.className = fullClassName;
            }
            else
            {
                panel.className = className;
            }
            IXMLElement configurationElement = xmlPanel.getFirstChildNamed("configuration");
            if (configurationElement != null)
            {
=======
            IXMLElement configurationElement = panelElement.getFirstChildNamed("configuration");
            if (configurationElement != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
                Debug.trace("found a configuration for this panel.");
                Vector params = configurationElement.getChildrenNamed("param");
                if (params != null)
Solution content
            }


            IXMLElement configurationElement = panelElement.getFirstChildNamed("configuration");
            if (configurationElement != null) {
                Debug.trace("found a configuration for this panel.");
                Vector params = configurationElement.getChildrenNamed("param");
                if (params != null)
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
    protected void addResources(IXMLElement data) throws CompilerException
    {
        notifyCompilerListener("addResources", CompilerListener.BEGIN, data);
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
        IXMLElement root = data.getFirstChildNamed(RESOURCES_TAG_NAME);
        if (root == null)
        {
            return;
        }
        Iterator bundleIterator = root.getChildrenNamed(BUNDLE_TAG_NAME).iterator();
        while (bundleIterator.hasNext())
=======
        IXMLElement root = data.getFirstChildNamed("resources");
        if (root == null)
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
        {
            return;
        }
Solution content
    protected void addResources(IXMLElement data) throws CompilerException
    {
        notifyCompilerListener("addResources", CompilerListener.BEGIN, data);
        IXMLElement root = data.getFirstChildNamed("resources");
        if (root == null)
        {
            return;
        }
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
If statement
Method invocation
Variable
While statement
Chunk
Conflicting content
            }
            else
            {
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
                throw new CompilerException("Invalid value ''" + content
                        + "'' of element ''reboot''");
=======
                throw new CompilerException("Invalid value ''" + content + "'' of element ''reboot''");
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
            }

            if (reboot.hasAttribute("condition"))
Solution content
            }
            else
            {
                throw new CompilerException("Invalid value ''" + content + "'' of element ''reboot''");
            }

            if (reboot.hasAttribute("condition"))
File
CompilerConfig.java
Developer's decision
Version 1
Kind of conflict
Throw statement
Chunk
Conflicting content
    /**
     * Variable declaration is a fragment of the xml file. For example: 

*

<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java *

======= >>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java *

     * <p/>
     * <p/>
Solution content
    /**
     * Variable declaration is a fragment of the xml file. For example: 

*

*

     * <p/>
     * <p/>
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
     * <p/>
     * 
*

<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java *

* variable declared in this can be referred to in parsable files. ======= *

variable declared in this can be referred to in parsable files. >>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java * * @param data The XML data. * @throws CompilerException Description of the Exception

Solution content
     * @param data The XML data.
     * @throws CompilerException Description of the Exception
     * <p/>
     * 
*

*

variable declared in this can be referred to in parsable files. *

File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
     * 

/** * Properties declaration is a fragment of the xml file. For example:

<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java *

======= >>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java *

     * <p/>
     * <p/>
Solution content
    /**
     * Properties declaration is a fragment of the xml file. For example: 

*

*

     * <p/>
     * <p/>
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
     * <p/>
     * 
*

<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java *

* variable declared in this can be referred to in parsable files. ======= *

variable declared in this can be referred to in parsable files. >>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java * * @param data The XML data. * @throws CompilerException Description of the Exception

Solution content
     * <p/>
     * 
*

*

variable declared in this can be referred to in parsable files. * * @param data The XML data. * @throws CompilerException Description of the Exception

File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
    /**
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
     * Checks whether a File instance is a regular file, exists and is readable. Throws appropriate
     * CompilerException to report violations of these conditions.
     *
     * @throws CompilerException if the file is either not existing, not a regular file or not
     *                           readable.
     */
    private void assertIsNormalReadableFile(File fileToCheck, String fileDescription)
            throws CompilerException
    {
        if (fileToCheck != null)
        {
            if (!fileToCheck.exists())
            {
                throw new CompilerException(fileDescription
                        + " does not exist: " + fileToCheck);
            }
            if (!fileToCheck.isFile())
            {
                throw new CompilerException(fileDescription
                        + " is not a regular file: " + fileToCheck);
            }
            if (!fileToCheck.canRead())
            {
                throw new CompilerException(fileDescription
                        + " is not readable by application: " + fileToCheck);
            }
        }
    }

    /**
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
     * Returns the IXMLElement representing the installation XML file.
     *
     * @return The XML tree.
Solution content
    }

    /**
     * Returns the IXMLElement representing the installation XML file.
     *
     * @return The XML tree.
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Comment
Method declaration
Chunk
Conflicting content
     * @param path               the relative path (using '/' as separator) to the resource.
     * @param desc               the description of the resource used to report errors
     * @param parent             the IXMLElement the resource is specified in, used to report errors
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
     * @param ignoreWhenNotFound when false, throws a CompilerException indicating fault in the
     *                           parent element when resource not found.
     * @return a URL to the resource.
     */
    private URL findIzPackResource(String path, String desc, IXMLElement parent,
                                   boolean ignoreWhenNotFound) throws CompilerException
=======
     * @param ignoreWhenNotFound when false, throws a CompilerException indicating
     *                           fault in the parent element when resource not found.
     * @return a URL to the resource.
     */
    private URL findIzPackResource(String path, String desc, IXMLElement parent, boolean ignoreWhenNotFound)
            throws CompilerException
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
    {
        URL url = getClass().getResource("/" + path);
        if (url == null)
Solution content
     * @param path               the relative path (using '/' as separator) to the resource.
     * @param desc               the description of the resource used to report errors
     * @param parent             the IXMLElement the resource is specified in, used to report errors
     * @param ignoreWhenNotFound when false, throws a CompilerException indicating
     *                           fault in the parent element when resource not found.
     * @return a URL to the resource.
     */
    private URL findIzPackResource(String path, String desc, IXMLElement parent, boolean ignoreWhenNotFound)
            throws CompilerException
    {
        URL url = getClass().getResource("/" + path);
        if (url == null)
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Comment
Method signature
Chunk
Conflicting content
        return url;
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
    /**
     * Create parse error with consistent messages. Includes file name. For use When parent is
     * unknown.
     *
     * @param message Brief message explaining error
     */
    protected void parseError(String message) throws CompilerException
    {
        throw new CompilerException(filename + ":" + message);
    }

    /**
     * Create parse error with consistent messages. Includes file name and line # of parent. It is
     * an error for 'parent' to be null.
     *
     * @param parent  The element in which the error occured
     * @param message Brief message explaining error
     */
    protected void parseError(IXMLElement parent, String message) throws CompilerException
    {
        throw new CompilerException(filename + ":" + parent.getLineNr() + ": " + message);
    }

    /**
     * Create a chained parse error with consistent messages. Includes file name and line # of
     * parent. It is an error for 'parent' to be null.
     *
     * @param parent  The element in which the error occured
     * @param message Brief message explaining error
     */
    protected void parseError(IXMLElement parent, String message, Throwable cause)
            throws CompilerException
    {
        throw new CompilerException(filename + ":" + parent.getLineNr() + ": " + message, cause);
    }

    /**
     * Create a parse warning with consistent messages. Includes file name and line # of parent. It
     * is an error for 'parent' to be null.
     *
     * @param parent  The element in which the warning occured
     * @param message Warning message
     */
    protected void parseWarn(IXMLElement parent, String message)
    {
        System.out.println("Warning: " + filename + ":" + parent.getLineNr() + ": " + message);
    }

    /**
     * Call getFirstChildNamed on the parent, producing a meaningful error message on failure. It is
     * an error for 'parent' to be null.
     *
     * @param parent The element to search for a child
     * @param name   Name of the child element to get
     */
    protected IXMLElement requireChildNamed(IXMLElement parent, String name)
            throws CompilerException
    {
        IXMLElement child = parent.getFirstChildNamed(name);
        if (child == null)
        {
            parseError(parent, "<" + parent.getName() + "> requires child <" + name + ">");
        }
        return child;
    }

    /**
     * Call getContent on an element, producing a meaningful error message if not present, or empty,
     * or a valid URL. It is an error for 'element' to be null.
     *
     * @param element The element to get content of
     */
    protected URL requireURLContent(IXMLElement element) throws CompilerException
    {
        URL url = null;
        try
        {
            url = new URL(requireContent(element));
        }
        catch (MalformedURLException x)
        {
            parseError(element, "<" + element.getName() + "> requires valid URL", x);
        }
        return url;
    }

    /**
     * Call getContent on an element, producing a meaningful error message if not present, or empty.
     * It is an error for 'element' to be null.
     *
     * @param element The element to get content of
     */
    protected String requireContent(IXMLElement element) throws CompilerException
    {
        String content = element.getContent();
        if (content == null || content.length() == 0)
        {
            parseError(element, "<" + element.getName() + "> requires content");
        }
        return content;
    }

=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
    protected boolean validateYesNo(String value)
    {
        boolean result;
Solution content
        return url;
    }

    protected boolean validateYesNo(String value)
    {
        boolean result;
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Comment
Method declaration
Chunk
Conflicting content
        return result;
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
    /**
     * Call getAttribute on an element, producing a meaningful error message if not present, or
     * empty. It is an error for 'element' or 'attribute' to be null.
     *
     * @param element   The element to get the attribute value of
     * @param attribute The name of the attribute to get
     */
    protected String requireAttribute(IXMLElement element, String attribute)
            throws CompilerException
    {
        String value = element.getAttribute(attribute);
        if (value == null)
        {
            parseError(element, "<" + element.getName() + "> requires attribute '" + attribute
                    + "'");
        }
        return value;
    }

    /**
     * Get a required attribute of an element, ensuring it is an integer. A meaningful error message
     * is generated as a CompilerException if not present or parseable as an int. It is an error for
     * 'element' or 'attribute' to be null.
     *
     * @param element   The element to get the attribute value of
     * @param attribute The name of the attribute to get
     */
    protected int requireIntAttribute(IXMLElement element, String attribute)
            throws CompilerException
    {
        String value = element.getAttribute(attribute);
        if (value == null || value.length() == 0)
        {
            parseError(element, "<" + element.getName() + "> requires attribute '" + attribute
                    + "'");
        }
        try
        {
            return Integer.parseInt(value);
        }
        catch (NumberFormatException x)
        {
            parseError(element, "'" + attribute + "' must be an integer");
        }
        return 0; // never happens
    }

    /**
     * Call getAttribute on an element, producing a meaningful error message if not present, or one
     * of "yes" or "no". It is an error for 'element' or 'attribute' to be null.
     *
     * @param element   The element to get the attribute value of
     * @param attribute The name of the attribute to get
     */
    protected boolean requireYesNoAttribute(IXMLElement element, String attribute)
            throws CompilerException
    {
        String value = requireAttribute(element, attribute);
        if ("yes".equalsIgnoreCase(value))
        {
            return true;
        }
        if ("no".equalsIgnoreCase(value))
        {
            return false;
        }

        parseError(element, "<" + element.getName() + "> invalid attribute '" + attribute
                + "': Expected (yes|no)");

        return false; // never happens
    }

    /**
     * Call getAttribute on an element, producing a meaningful warning if not "yes" or "no". If the
        {
     * 'element' or 'attribute' are null, the default value is returned.
     *
     * @param element      The element to get the attribute value of
     * @param attribute    The name of the attribute to get
     * @param defaultValue Value returned if attribute not present or invalid
     */
    protected boolean validateYesNoAttribute(IXMLElement element, String attribute,
                                             boolean defaultValue)
    {
        if (element == null)
        {
            return defaultValue;
        }

        String value = element.getAttribute(attribute, (defaultValue ? "yes" : "no"));
        if ("yes".equalsIgnoreCase(value))
        {
            return true;
        }
        if ("no".equalsIgnoreCase(value))
            return false;
        }

        // TODO: should this be an error if it's present but "none of the
        // above"?
        parseWarn(element, "<" + element.getName() + "> invalid attribute '" + attribute
                + "': Expected (yes|no) if present");

        return defaultValue;
    }

    /**
     * The main method if the compiler is invoked by a command-line call.
     *
     * @param args The arguments passed on the command-line.
     */
    public static void main(String[] args)
    {
        // Outputs some informations
        System.out.println("");
        System.out.println(".::  IzPack - Version " + Compiler.IZPACK_VERSION + " ::.");
        System.out.println("");
        System.out.println("< compiler specifications version: " + VERSION + " >");
        System.out.println("");
        System.out.println("- Copyright (c) 2001-2008 Julien Ponge");
        System.out.println("- Visit http://izpack.org/ for the latest releases");
        System.out
                .println("- Released under the terms of the Apache Software License version 2.0.");
        System.out.println("");

        // exit code 1 means: error
        int exitCode = 1;
        String home = ".";

        // We get the IzPack home directory
        String izHome = System.getProperty("izpack.home");
        if (izHome != null)
        {
            home = izHome;
        }
        else
        {
            izHome = System.getenv("IZPACK_HOME");
            if (izHome != null)
            {
                home = izHome;
            }
        }

        // We analyse the command line parameters
        try
        {
            // Our arguments
            String filename;
            String base = ".";
            String kind = "standard";
            String output;
            String compr_format = "default";
            int compr_level = -1;

            // First check
            int nArgs = args.length;
            if (nArgs < 1)
            {
                throw new Exception("no arguments given");
            }

            // The users wants to know the command line parameters
            if ("-?".equalsIgnoreCase(args[0]))
            {
                System.out.println("-> Command line parameters are : (xml file) [args]");
                System.out.println("   (xml file): the xml file describing the installation");
                System.out
                        .println("   -h (IzPack home) : the root path of IzPack. This will be needed");
                System.out
                        .println("               if the compiler is not called in the root directory  of IzPack.");
                System.out
                        .println("               Do not forget quotations if there are blanks in the path.");
                System.out
                        .println("   -b (base) : indicates the base path that the compiler will use for filenames");
                System.out
                        .println("               of sources. Default is the current path. Attend to -h.");
                System.out.println("   -k (kind) : indicates the kind of installer to generate");
                System.out.println("               default is standard");
                System.out.println("   -o (out)  : indicates the output file name");
                System.out.println("               default is the xml file name\n");
                System.out
                        .println("   -c (compression)  : indicates the compression format to be used for packs");
                System.out.println("               default is the internal deflate compression\n");
                System.out
                                else
                        .println("   -l (compression-level)  : indicates the level for the used compression format");
                System.out.println("                if supported. Only integer are valid\n");

                System.out
                        .println("   When using vm option -DSTACKTRACE=true there is all kind of debug info ");
                System.out.println("");
                exitCode = 0;
            }
            else
            {
                // We can parse the other parameters & try to compile the
                // installation

                // We get the input file name and we initialize the output file
                // name
                filename = args[0];
                // default jar files names are based on input file name
                output = filename.substring(0, filename.length() - 3) + "jar";

                // We parse the other ones
                int pos = 1;
                while (pos < nArgs)
                {
                    if ((args[pos].startsWith("-")) && (args[pos].length() == 2))
                    {
                        switch (args[pos].toLowerCase().charAt(1))
                        {
                            case 'b':
                                if ((pos + 1) < nArgs)
                                {
                                    pos++;
                                    base = args[pos];
                                }
                                else
                                {
                                    throw new Exception("base argument missing");
                                }
                                break;
                            case 'k':
                                if ((pos + 1) < nArgs)
                                {
                                    pos++;
                                    kind = args[pos];
                                }
                                else
                                {
                                    throw new Exception("kind argument missing");
                                }
                                break;
                            case 'o':
                                if ((pos + 1) < nArgs)
                                {
                                    pos++;
                                    output = args[pos];
                                }
                                else
                                {
                                    throw new Exception("output argument missing");
                                }
                                break;
                            case 'c':
                                if ((pos + 1) < nArgs)
                                {
                                    pos++;
                                    compr_format = args[pos];
                                }
                                else
                                {
                                    throw new Exception("compression format argument missing");
                                }
                                break;
                            case 'l':
                                if ((pos + 1) < nArgs)
                                {
                                    pos++;
                                    compr_level = Integer.parseInt(args[pos]);
                                }
                                else
                                {
                                    throw new Exception("compression level argument missing");
                                }
                                break;
                            case 'h':
                                if ((pos + 1) < nArgs)
                                {
                                    pos++;
                                    home = args[pos];
                                }
                                {
                                    throw new Exception("IzPack home path argument missing");
                                }
                                break;
                            default:
                                throw new Exception("unknown argument");
                        }
                        pos++;
                    }
                    else
                    {
                        throw new Exception("bad argument");
                    }
                }

                home = resolveIzPackHome(home);
                // Outputs what we are going to do
                System.out.println("-> Processing  : " + filename);
                System.out.println("-> Output      : " + output);
                System.out.println("-> Base path   : " + base);
                System.out.println("-> Kind        : " + kind);
                System.out.println("-> Compression : " + compr_format);
                System.out.println("-> Compr. level: " + compr_level);
                System.out.println("-> IzPack home : " + home);
                System.out.println("");

                Compiler.setIzpackHome(home);

                // Calls the compiler
                CmdlinePackagerListener listener = new CmdlinePackagerListener();
                CompilerConfig compiler = new CompilerConfig(filename, base, kind, output,
                        compr_format, compr_level, listener, null);
                compiler.executeCompiler();

                // Waits
                while (compiler.isAlive())
                {
                    Thread.sleep(100);
                }

                if (compiler.wasSuccessful())
                {
                    exitCode = 0;
                }

                System.out.println("Build time: " + new Date());
            }
        }
        catch (Exception err)
        {
            // Something bad has happened
            System.err.println("-> Fatal error :");
            System.err.println("   " + err.getMessage());
            err.printStackTrace();
            System.err.println("");
            System.err.println("(tip : use -? to get the commmand line parameters)");
        }

        // Closes the JVM
        System.exit(exitCode);
    }

    private static String resolveIzPackHome(String home)
    {
        File test = new File(home, IZ_TEST_SUBDIR + File.separator + IZ_TEST_FILE);
        if (test.exists())
        {
            return (home);
        }
        // Try to resolve the path using compiler.jar which also should be under
        // IZPACK_HOME.
        String self = Compiler.class.getName();
        self = self.replace('.', '/');
        self = "/" + self + ".class";
        URL url = Compiler.class.getResource(self);
        String np = url.getFile();
        int start = np.indexOf(self);
        np = np.substring(0, start);
        if (np.endsWith("!"))
        { // Where shut IZPACK_HOME at the standalone-compiler be??
            // No idea.
            if (np.endsWith("standalone-compiler.jar!")
                    || np.endsWith("standalone-compiler-4.0.0.jar!")
                    || np.matches("standalone-compiler-[\\d\\.]+.jar!"))
            {
                return (".");
            }
            np = np.substring(0, np.length() - 1);
        }
        File root = null;
        if (URI.create(np).isAbsolute())
        {
            root = new File(URI.create(np));
        }
        else
        {
            root = new File(np);
        }
        while (true)
        {
            if (root == null)
            {
                throw new IllegalArgumentException(
                        "No valid IzPack home directory found");
            }
            test = new File(root, IZ_TEST_SUBDIR + File.separator + IZ_TEST_FILE);
            if (test.exists())
            {
                return (root.getAbsolutePath());
            }
            root = root.getParentFile();
        }
    }
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java

    // -------------------------------------------------------------------------
    // ------------- Listener stuff ------------------------- START ------------
Solution content
        return result;
    }


    // -------------------------------------------------------------------------
    // ------------- Listener stuff ------------------------- START ------------
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Comment
Method declaration
Chunk
Conflicting content
        {
            return;
        }
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
        Iterator iter = root.getChildrenNamed("listener").iterator();
        while (iter.hasNext())
=======
        for (IXMLElement ixmlElement : root.getChildrenNamed("listener"))
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
        {
            Object[] listener = getCompilerListenerInstance(ixmlElement);
            if (listener != null)
Solution content
        }
        {
            return;
        for (IXMLElement ixmlElement : root.getChildrenNamed("listener"))
        {
            Object[] listener = getCompilerListenerInstance(ixmlElement);
            if (listener != null)
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
For statement
Method invocation
Variable
While statement
Chunk
Conflicting content
                addCompilerListener((CompilerListener) listener[0]);
            }
            String[] typeNames = new String[]{"installer", "uninstaller"};
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
            int[] types = new int[]{CustomData.INSTALLER_LISTENER,
                    CustomData.UNINSTALLER_LISTENER};
=======
            int[] types = new int[]{CustomData.INSTALLER_LISTENER, CustomData.UNINSTALLER_LISTENER};

>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
            for (int i = 0; i < typeNames.length; ++i)
            {
                String className = ixmlElement.getAttribute(typeNames[i]);
Solution content
                addCompilerListener((CompilerListener) listener[0]);
            }
            String[] typeNames = new String[]{"installer", "uninstaller"};
            int[] types = new int[]{CustomData.INSTALLER_LISTENER, CustomData.UNINSTALLER_LISTENER};

            for (int i = 0; i < typeNames.length; ++i)
            {
                String className = ixmlElement.getAttribute(typeNames[i]);
File
CompilerConfig.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    /**
    }

    }

    /**
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java
     * Returns a list which contains the pathes of all files which are included in the given url.
     * This method expects as the url param a jar.
     *
     * @param url url of the jar file
     * @return full qualified paths of the contained files
     * @throws Exception
     */
    private List getContainedFilePaths(URL url) throws Exception
    {
        JarInputStream jis = new JarInputStream(url.openStream());
        ZipEntry zentry = null;
        ArrayList fullNames = new ArrayList();
        while ((zentry = jis.getNextEntry()) != null)
        {
            String name = zentry.getName();
            // Add only files, no directory entries.
            if (!zentry.isDirectory())
            {
                fullNames.add(name);
            }
        }
        jis.close();
        return (fullNames);
            int lastPos = name.lastIndexOf(".class");
     * Returns the qualified class name for the given class. This method expects as the url param a
     * jar file which contains the given class. It scans the zip entries of the jar file.
     *
     * @param url       url of the jar file which contains the class
     * @param className short name of the class for which the full name should be resolved
     * @return full qualified class name
     * @throws IOException
     */
    private String getFullClassName(URL url, String className) throws IOException // throws
    // Exception
    {
        JarInputStream jis = new JarInputStream(url.openStream());
        ZipEntry zentry = null;
        while ((zentry = jis.getNextEntry()) != null)
        {
            String name = zentry.getName();
            if (lastPos < 0)
            {
                continue; // No class file.
            }
            name = name.replace('/', '.');
            int pos = -1;
            int nonCasePos = -1;
            if (className != null)
            {
                pos = name.indexOf(className);
                nonCasePos = name.toLowerCase().indexOf(className.toLowerCase());
            }
            if (pos != -1 && name.length() == pos + className.length() + 6) // "Main" class found
            {
                jis.close();
                return (name.substring(0, lastPos));
            }

            if (nonCasePos != -1 && name.length() == nonCasePos + className.length() + 6)
            // "Main" class with different case found
            {
                throw new IllegalArgumentException(
                        "Fatal error! The declared panel name in the xml file (" + className
                                + ") differs in case to the founded class file (" + name + ").");
            }
        }
        jis.close();
        return (null);
    }

    /**
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java
     * Returns the compiler listener which is defined in the xml element. As xml element a "listner"
     * node will be expected. Additional it is expected, that either "findIzPackResource" returns an
     * url based on "bin/customActions/[className].jar", or that the listener element has a jar
Solution content
    }

    /**
     * Returns the compiler listener which is defined in the xml element. As xml element a "listner"
     * node will be expected. Additional it is expected, that either "findIzPackResource" returns an
     * url based on "bin/customActions/[className].jar", or that the listener element has a jar
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Comment
Method declaration
Chunk
Conflicting content
     * A function to merge multiple packsLang-files into a single file for each identifier, e.g. two
     * resource files
     * 

<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java *

======= >>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java *

     *    <res src="./packsLang01.xml" id="packsLang.xml"/>
     *    <res src="./packsLang02.xml" id="packsLang.xml"/>
Solution content
     * A function to merge multiple packsLang-files into a single file for each identifier, e.g. two
     * resource files
     * 

*

     *    <res src="./packsLang01.xml" id="packsLang.xml"/>
     *    <res src="./packsLang02.xml" id="packsLang.xml"/>
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
     * 

* are merged into a single temp-file to act as if the user had defined: *

<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/CompilerConfig.java *

======= >>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/CompilerConfig.java *

     *    <res src="/tmp/izpp47881.tmp" id="packsLang.xml"/>
     * 
Solution content
     * 

* are merged into a single temp-file to act as if the user had defined: *

*

     *    <res src="/tmp/izpp47881.tmp" id="packsLang.xml"/>
     * 
File
CompilerConfig.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/compressor/BZip2PackCompressor.java

package com.izforge.izpack.compressor;
=======
package com.izforge.izpack.compiler.compressor;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/compressor/BZip2PackCompressor.java

import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.merge.MergeManager;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.compiler.compressor;

import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.merge.MergeManager;
File
BZip2PackCompressor.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/compressor/DefaultPackCompressor.java

package com.izforge.izpack.compressor;
=======
package com.izforge.izpack.compiler.compressor;

import com.izforge.izpack.api.substitutor.VariableSubstitutor;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/compressor/DefaultPackCompressor.java

import java.io.OutputStream;
Solution content
 */
 * See the License for the specific language governing permissions and
 * limitations under the License.
package com.izforge.izpack.compiler.compressor;

import com.izforge.izpack.api.substitutor.VariableSubstitutor;

import java.io.OutputStream;
File
DefaultPackCompressor.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/compressor/PackCompressor.java

package com.izforge.izpack.compressor;

import com.izforge.izpack.compiler.Compiler;
import java.io.OutputStream;

=======
package com.izforge.izpack.compiler.compressor;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/compressor/PackCompressor.java

/**
 * IzPack will be able to support different compression methods for the
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.compiler.compressor;

/**
 * IzPack will be able to support different compression methods for the
File
PackCompressor.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/compressor/RawPackCompressor.java

package com.izforge.izpack.compressor;
=======
package com.izforge.izpack.compiler.compressor;

import com.izforge.izpack.api.substitutor.VariableSubstitutor;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/compressor/RawPackCompressor.java

import java.io.BufferedOutputStream;
import java.io.OutputStream;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.compiler.compressor;

import com.izforge.izpack.api.substitutor.VariableSubstitutor;

import java.io.BufferedOutputStream;
import java.io.OutputStream;
File
RawPackCompressor.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
package com.izforge.izpack.compiler.listener;

<<<<<<< HEAD:src/lib/com/izforge/izpack/event/CompilerListener.java
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.compiler.CompilerException;
import com.izforge.izpack.compiler.IPackager;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.exception.CompilerException;
import com.izforge.izpack.compiler.packager.IPackager;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/listener/CompilerListener.java

import java.util.Map;
Solution content
package com.izforge.izpack.compiler.listener;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.exception.CompilerException;
import com.izforge.izpack.compiler.packager.IPackager;

import java.util.Map;
File
CompilerListener.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
package com.izforge.izpack.compiler.listener;

<<<<<<< HEAD:src/lib/com/izforge/izpack/event/SimpleCompilerListener.java
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.compiler.CompilerException;
import com.izforge.izpack.compiler.IPackager;
import com.izforge.izpack.compiler.PackInfo;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.exception.CompilerException;
import com.izforge.izpack.compiler.packager.IPackager;
import com.izforge.izpack.data.PackInfo;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/listener/SimpleCompilerListener.java

import java.util.Map;
Solution content
package com.izforge.izpack.compiler.listener;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.exception.CompilerException;
import com.izforge.izpack.compiler.packager.IPackager;
import com.izforge.izpack.data.PackInfo;

import java.util.Map;
File
SimpleCompilerListener.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/IPackager.java

package com.izforge.izpack.compiler;

import com.izforge.izpack.CustomData;
import com.izforge.izpack.GUIPrefs;
import com.izforge.izpack.Info;
import com.izforge.izpack.Panel;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.compressor.PackCompressor;
import com.izforge.izpack.installer.InstallerRequirement;
import com.izforge.izpack.rules.Condition;

import java.io.File;
=======
package com.izforge.izpack.compiler.packager;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.DynamicVariable;
import com.izforge.izpack.api.data.Info;
import com.izforge.izpack.api.data.InstallerRequirement;
import com.izforge.izpack.api.data.Panel;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.data.CustomData;
import com.izforge.izpack.data.GUIPrefs;
import com.izforge.izpack.data.PackInfo;

>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/packager/IPackager.java
import java.net.URL;
import java.util.List;
import java.util.Map;
Solution content
import java.util.Map;
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.compiler.packager;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.DynamicVariable;
import com.izforge.izpack.api.data.Info;
import com.izforge.izpack.api.data.InstallerRequirement;
import com.izforge.izpack.api.data.Panel;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.data.CustomData;
import com.izforge.izpack.data.GUIPrefs;
import com.izforge.izpack.data.PackInfo;

import java.net.URL;
import java.util.List;
File
IPackager.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
    public abstract Properties getVariables();

    /**
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/IPackager.java
     * Add a panel, where order is important. Only one copy of the class files needd are inserted in
     * the installer. When jarURL is null, it is assumed that user will do the manual merged
     * using  tag themselves
     */
    public abstract void addPanelJar(Panel panel, URL jarURL);

    /**
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/packager/IPackager.java
     * Add a custom data like custom actions, where order is important. Only one copy of the class
     * files neeed are inserted in the installer.
     *
Solution content
    public abstract Properties getVariables();

    /**
     * Add a custom data like custom actions, where order is important. Only one copy of the class
     * files neeed are inserted in the installer.
     *
File
IPackager.java
Developer's decision
Version 2
Kind of conflict
Comment
Method interface
Chunk
Conflicting content
     * @param data the describing custom action data object
     */
    public abstract void addNativeUninstallerLibrary(CustomData data);
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/IPackager.java

    public abstract void addInstallerRequirements(List conditions);

    /**
     * Returns the current pack compressor
     *
     * @return Returns the current pack compressor.
     */
    public abstract PackCompressor getCompressor();
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/packager/IPackager.java

    public abstract void addInstallerRequirements(List conditions);
Solution content
     * @param data the describing custom action data object
     */
    public abstract void addNativeUninstallerLibrary(CustomData data);

    public abstract void addInstallerRequirements(List conditions);
File
IPackager.java
Developer's decision
Version 2
Kind of conflict
Comment
Method interface
Chunk
Conflicting content
    public void addCustomJar(CustomData ca, URL url) {
        customDataList.add(ca); // serialized to keep order/variables correct
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/PackagerBase.java
        if (url != null)
        {
=======
        if (url != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/packager/impl/PackagerBase.java
            addJarContent(url); // each included once, no matter how many times added
        }
    }
Solution content
    public void addCustomJar(CustomData ca, URL url) {
        customDataList.add(ca); // serialized to keep order/variables correct
        if (url != null) {
            addJarContent(url); // each included once, no matter how many times added
        }
    }
File
PackagerBase.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
    public void addPanel(Panel panel) {
        panelList.add(panel); // serialized to keep order/variables correct
<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/PackagerBase.java

        if (jarURL != null)
        {
            addJarContent(jarURL); // each included once, no matter how many times added
        }
=======
        mergeManager.addResourceToMerge(new PanelMerge(panel.getClassName()));
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/packager/impl/PackagerBase.java
    }

    /* (non-Javadoc)
Solution content
    public void addPanel(Panel panel) {
        panelList.add(panel); // serialized to keep order/variables correct
        mergeManager.addResourceToMerge(new PanelMerge(panel.getClassName()));
    }

    /* (non-Javadoc)
File
PackagerBase.java
Developer's decision
Version 2
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
    }


<<<<<<< HEAD:src/lib/com/izforge/izpack/compiler/PackagerBase.java
    /**
     * @param dynamicvariables the dynamicvariables to set
     */
    public void setDynamicVariables(Map> dynamicvariables)
    {
        this.dynamicvariables = dynamicvariables;
    }

    public void addInstallerRequirements(List conditions)
    {
=======
    public void addInstallerRequirements(List conditions) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-compiler/src/main/java/com/izforge/izpack/compiler/packager/impl/PackagerBase.java
        this.installerrequirements = conditions;
    }
}
Solution content
    }


    public void addInstallerRequirements(List conditions) {
        this.installerrequirements = conditions;
    }
}
File
PackagerBase.java
Developer's decision
Version 2
Kind of conflict
Comment
Method declaration
Method signature
Chunk
Conflicting content
     */
    public RegDataContainer(String data) {
        super();
<<<<<<< HEAD:src/lib/com/coi/tools/os/win/RegDataContainer.java
        if (containsPlaceholder(data))
        {
            setType(REG_EXPAND_SZ);
        }
        else
        {
=======
        if (containsPlaceholder(data)) {
            setType(REG_EXPAND_SZ);
        } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/coi/tools/os/win/RegDataContainer.java
            setType(REG_SZ);
        }
        stringData = data;
Solution content
     */
    public RegDataContainer(String data) {
        super();
        if (containsPlaceholder(data))
        {
            setType(REG_EXPAND_SZ);
        }
        else
        {
            setType(REG_SZ);
        }
        stringData = data;
File
RegDataContainer.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
    {
=======

<<<<<<< HEAD:src/lib/com/coi/tools/os/win/RegDataContainer.java
    private boolean containsPlaceholder(String str)
        return result;
    }
    private boolean containsPlaceholder(String str) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/coi/tools/os/win/RegDataContainer.java
        return str.indexOf("%") >= 0;
    }
Solution content
        return result;
    }

    private boolean containsPlaceholder(String str)
    {
        return str.indexOf("%") >= 0;
    }
File
RegDataContainer.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/io/CorruptVolumeException.java

package com.izforge.izpack.io;
=======
package com.izforge.izpack.core.io;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/io/CorruptVolumeException.java

import java.io.IOException;
Solution content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.core.io;

import java.io.IOException;
File
CorruptVolumeException.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/io/FileSpanningInputStream.java

package com.izforge.izpack.io;
=======
package com.izforge.izpack.core.io;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/io/FileSpanningInputStream.java

import com.izforge.izpack.util.Debug;
Solution content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.core.io;

import com.izforge.izpack.util.Debug;
File
FileSpanningInputStream.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/io/FileSpanningOutputStream.java

package com.izforge.izpack.io;
=======
package com.izforge.izpack.core.io;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/io/FileSpanningOutputStream.java

import com.izforge.izpack.util.Debug;
Solution content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.core.io;

import com.izforge.izpack.util.Debug;
File
FileSpanningOutputStream.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/io/VolumeNotFoundException.java

package com.izforge.izpack.io;
=======
package com.izforge.izpack.core.io;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/io/VolumeNotFoundException.java

import java.io.IOException;
Solution content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.core.io;

import java.io.IOException;
File
VolumeNotFoundException.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
     */
    public AndCondition(Condition operand1, Condition operand2) {
        this.leftoperand = operand1;
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/AndCondition.java
        if (this.leftoperand != null)
        {
=======
        if (this.leftoperand != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/AndCondition.java
            this.leftoperand.setInstalldata(this.installdata);
        }
Solution content
     */
    public AndCondition(Condition operand1, Condition operand2)
    {
        this.leftoperand = operand1;
        if (this.leftoperand != null)
        {
            this.leftoperand.setInstalldata(this.installdata);
        }
File
AndCondition.java
Developer's decision
Manual
Kind of conflict
If statement
Chunk
Conflicting content
        }

        this.rightoperand = operand2;
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/AndCondition.java
        if (this.rightoperand != null)
        {
=======
        if (this.rightoperand != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/AndCondition.java
            this.rightoperand.setInstalldata(this.installdata);
        }
    }
Solution content
        }

        this.rightoperand = operand2;
        if (this.rightoperand != null)
        {
            this.rightoperand.setInstalldata(this.installdata);
        }
    }
File
AndCondition.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/AndCondition.java
    public boolean isTrue()
    {
        if ((this.leftoperand == null) || (this.rightoperand == null))
        {
=======
    public boolean isTrue() {
        if ((this.leftoperand == null) || (this.rightoperand == null)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/AndCondition.java
            Debug.trace("Operands of condition " + this.id + " not initialized correctly.");
            return false;
        }
Solution content
    }


    public boolean isTrue()
    {
        if ((this.leftoperand == null) || (this.rightoperand == null))
        {
            Debug.trace("Operands of condition " + this.id + " not initialized correctly.");
            return false;
        }
File
AndCondition.java
Developer's decision
Version 1
Kind of conflict
If statement
Method signature
Chunk
Conflicting content
        IXMLElement left = RulesEngineImpl.createConditionElement(this.leftoperand, root);
        this.leftoperand.makeXMLData(left);
        root.addChild(left);
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/AndCondition.java
        IXMLElement right = RulesEngine.createConditionElement(this.rightoperand, root);
=======
        IXMLElement right = RulesEngineImpl.createConditionElement(this.rightoperand, root);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/AndCondition.java
        this.rightoperand.makeXMLData(right);
        root.addChild(right);
    }
Solution content
        IXMLElement left = RulesEngineImpl.createConditionElement(this.leftoperand, root);
        this.leftoperand.makeXMLData(left);
        root.addChild(left);
        IXMLElement right = RulesEngineImpl.createConditionElement(this.rightoperand, root);
        this.rightoperand.makeXMLData(right);
        root.addChild(right);
    }
File
AndCondition.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
     * (non-Javadoc)
     * 
        if (this.installdata != null)
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/CompareNumericsCondition.java
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 *
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2007-2009 Dennis Reil
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.rules;

import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.util.Debug;

import java.util.HashMap;

/**
 * @author Dennis Reil, 
 */
public class CompareNumericsCondition extends Condition
{
    private static final long serialVersionUID = 5631805710151645907L;

    protected String variablename;
    protected String value;
    protected String operator;

    public CompareNumericsCondition(String variablename, String value, HashMap packstoremove)
    {
        super();
        this.variablename = variablename;
        this.value = value;
        this.operator = "eq";
    }

    public CompareNumericsCondition(String variablename, String value)
    {
        super();
        this.variablename = variablename;
        this.value = value;
        this.operator = "eq";
    }

    public CompareNumericsCondition()
    {
        super();
    }

    public String getValue()
    {
        return value;
    }

    public void setValue(String value)
    {
        this.value = value;
    }

    public String getVariablename()
    {
        return variablename;
    }

    public void setVariablename(String variablename)
    {
        {
                    }
        this.variablename = variablename;
    }

    /*
     * @see de.reddot.installer.rules.Condition#readFromXML(com.izforge.izpack.adaptator.IXMLElement)
     */
    public void readFromXML(IXMLElement xmlcondition)
    {
        try
        {
            this.variablename = xmlcondition.getFirstChildNamed("name").getContent();
            this.value = xmlcondition.getFirstChildNamed("value").getContent();
            this.operator = xmlcondition.getFirstChildNamed("operator").getContent();
        }
        catch (Exception e)
        {
            Debug.log("missing element in ");
        }

    }

    public boolean isTrue()
    {
        boolean result = false;
                }
            String val = this.installdata.getVariable(variablename);
            if (val != null)
            {
                if (operator == null)
                {
                    operator = "eq";
                }
                try
                {
                    int currentValue = new Integer(val);
                    int comparisonValue = new Integer(value);
                    if ("eq".equalsIgnoreCase(operator))
                    {
                        result = currentValue == comparisonValue;
                    }
                    else if ("gt".equalsIgnoreCase(operator))
                    {
                        result = currentValue > comparisonValue;
                    }
                    else if ("lt".equalsIgnoreCase(operator))
                    {
                        result = currentValue < comparisonValue;
                    }
                    else if ("leq".equalsIgnoreCase(operator))
                    {
                        result = currentValue <= comparisonValue;
                    }
                    else if ("geq".equalsIgnoreCase(operator))
                    {
                        result = currentValue >= comparisonValue;
                    }
                }
                catch (NumberFormatException nfe)
                {
                    Debug.log("The value of the associated variable is not a numeric value or the value which should be compared is not a number.");
                }
            }
        }
        return result;
    }

    /* (non-Javadoc)
     * @see com.izforge.izpack.rules.Condition#getDependenciesDetails()
     */
    public String getDependenciesDetails()
    {
        StringBuffer details = new StringBuffer();
        details.append(this.id);
        details.append(" depends on a value of ");
        details.append(this.value);
        details.append(" on variable ");
        details.append(this.variablename);
        details.append(" (current value: ");
        details.append(this.installdata.getVariable(variablename));
        details.append(")");
        details.append("This value has to be " + this.operator);
        details.append("
"); return details.toString(); } public String getOperator() { return operator; } public void setOperator(String operator) { this.operator = operator; } @Override public void makeXMLData(IXMLElement conditionRoot) { XMLElementImpl nameXml = new XMLElementImpl("name", conditionRoot); nameXml.setContent(this.variablename); conditionRoot.addChild(nameXml); XMLElementImpl valueXml = new XMLElementImpl("value", conditionRoot); valueXml.setContent(this.value); conditionRoot.addChild(valueXml); XMLElementImpl opXml = new XMLElementImpl("op", conditionRoot); opXml.setContent(this.operator); conditionRoot.addChild(opXml); } ======= /* * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved. * * http://izpack.org/ * http://izpack.codehaus.org/ * * Copyright 2007-2009 Dennis Reil * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.izforge.izpack.core.rules; import com.izforge.izpack.api.adaptator.IXMLElement; import com.izforge.izpack.api.adaptator.impl.XMLElementImpl; import com.izforge.izpack.api.rules.Condition; import com.izforge.izpack.util.Debug; import java.util.HashMap; /** * @author Dennis Reil, */ public class CompareNumericsCondition extends Condition { private static final long serialVersionUID = 5631805710151645907L; protected String variablename; protected String value; protected String operator; public CompareNumericsCondition(String variablename, String value, HashMap packstoremove) { super(); this.variablename = variablename; this.value = value; this.operator = "eq"; } public CompareNumericsCondition(String variablename, String value) { super(); this.variablename = variablename; this.value = value; this.operator = "eq"; } public CompareNumericsCondition() { super(); } public String getValue() { return value; } public void setValue(String value) { this.value = value; } public String getVariablename() { return variablename; } public void setVariablename(String variablename) { this.variablename = variablename; } /* * (non-Javadoc) * * @see de.reddot.installer.rules.Condition#readFromXML(com.izforge.izpack.api.adaptator.IXMLElement) */ public void readFromXML(IXMLElement xmlcondition) { try { this.variablename = xmlcondition.getFirstChildNamed("name").getContent(); this.value = xmlcondition.getFirstChildNamed("value").getContent(); this.operator = xmlcondition.getFirstChildNamed("operator").getContent(); } catch (Exception e) { Debug.log("missing element in "); } } public boolean isTrue() { boolean result = false; if (this.installdata != null) { String val = this.installdata.getVariable(variablename); if (val != null) { catch (NumberFormatException nfe) { if (operator == null) { operator = "eq"; } try { int currentValue = new Integer(val); int comparisonValue = new Integer(value); if ("eq".equalsIgnoreCase(operator)) { result = currentValue == comparisonValue; } else if ("gt".equalsIgnoreCase(operator)) { result = currentValue > comparisonValue; } else if ("lt".equalsIgnoreCase(operator)) { result = currentValue < comparisonValue; } else if ("leq".equalsIgnoreCase(operator)) { result = currentValue <= comparisonValue; } else if ("geq".equalsIgnoreCase(operator)) { result = currentValue >= comparisonValue; Debug.log("The value of the associated variable is not a numeric value or the value which should be compared is not a number."); } } } return result; } /* (non-Javadoc) * @see com.izforge.izpack.api.rules.Condition#getDependenciesDetails() */ public String getDependenciesDetails() { StringBuffer details = new StringBuffer(); details.append(this.id); details.append(" depends on a value of "); details.append(this.value); details.append(" on variable "); details.append(this.variablename); details.append(" (current value: "); details.append(this.installdata.getVariable(variablename)); details.append(")"); details.append("This value has to be " + this.operator); details.append("
"); return details.toString(); } public String getOperator() { return operator; } public void setOperator(String operator) { this.operator = operator; } @Override public void makeXMLData(IXMLElement conditionRoot) { XMLElementImpl nameXml = new XMLElementImpl("name", conditionRoot); nameXml.setContent(this.variablename); conditionRoot.addChild(nameXml); XMLElementImpl valueXml = new XMLElementImpl("value", conditionRoot); valueXml.setContent(this.value); conditionRoot.addChild(valueXml); XMLElementImpl opXml = new XMLElementImpl("op", conditionRoot); opXml.setContent(this.operator); conditionRoot.addChild(opXml); } >>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/CompareNumericsCondition.java }
Solution content
                {
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 *
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2007-2009 Dennis Reil
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.util.Debug;

import java.util.HashMap;

/**
 * @author Dennis Reil, 
 */
public class CompareNumericsCondition extends Condition
{
    private static final long serialVersionUID = 5631805710151645907L;

    protected String variablename;
    protected String value;
    protected String operator;

    public CompareNumericsCondition(String variablename, String value, HashMap packstoremove) {
        super();
        this.variablename = variablename;
        this.value = value;
        this.operator = "eq";
    }

    public CompareNumericsCondition(String variablename, String value) {
        super();
        this.variablename = variablename;
        this.value = value;
        this.operator = "eq";
    }

    public CompareNumericsCondition() {
        super();
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getVariablename() {
        return variablename;
    }

    public void setVariablename(String variablename) {
        this.variablename = variablename;
    }

    /*
     * (non-Javadoc)
     * 
     * @see de.reddot.installer.rules.Condition#readFromXML(com.izforge.izpack.api.adaptator.IXMLElement)
     */

    public void readFromXML(IXMLElement xmlcondition) {
        try {
            this.variablename = xmlcondition.getFirstChildNamed("name").getContent();
            this.value = xmlcondition.getFirstChildNamed("value").getContent();
            this.operator = xmlcondition.getFirstChildNamed("operator").getContent();
        }
        catch (Exception e) {
            Debug.log("missing element in ");
        }

    }

    public boolean isTrue() {
        boolean result = false;
        if (this.installdata != null)
        {
            String val = this.installdata.getVariable(variablename);
            if (val != null)
            {
                if (operator == null)
                    operator = "eq";
                }
                try
                {
                    int currentValue = new Integer(val);
                    int comparisonValue = new Integer(value);
                    if ("eq".equalsIgnoreCase(operator))
                    {
                        result = currentValue == comparisonValue;
                    }
                    else if ("gt".equalsIgnoreCase(operator))
                    {
                        result = currentValue > comparisonValue;
                    }
                    else if ("lt".equalsIgnoreCase(operator))
                    {
                        result = currentValue < comparisonValue;
                    }
                    else if ("leq".equalsIgnoreCase(operator))
                    {
                        result = currentValue <= comparisonValue;
                    }
                    else if ("geq".equalsIgnoreCase(operator))
                    {
                        result = currentValue >= comparisonValue;
                    }
                }
                catch (NumberFormatException nfe)
                {
                    Debug.log("The value of the associated variable is not a numeric value or the value which should be compared is not a number.");
                }
            }
        }
        return result;
    }

    /* (non-Javadoc)
     * @see com.izforge.izpack.api.rules.Condition#getDependenciesDetails()
     */
    public String getDependenciesDetails()
    {
        StringBuffer details = new StringBuffer();
        details.append(this.id);
        details.append(" depends on a value of ");
        details.append(this.value);
        details.append(" on variable ");
        details.append(this.variablename);
        details.append(" (current value: ");
        details.append(this.installdata.getVariable(variablename));
        details.append(")");
        details.append("This value has to be " + this.operator);
        details.append("
"); return details.toString(); } public String getOperator() { return operator; } public void setOperator(String operator) { this.operator = operator; } @Override public void makeXMLData(IXMLElement conditionRoot) { XMLElementImpl nameXml = new XMLElementImpl("name", conditionRoot); nameXml.setContent(this.variablename); conditionRoot.addChild(nameXml); XMLElementImpl valueXml = new XMLElementImpl("value", conditionRoot); valueXml.setContent(this.value); conditionRoot.addChild(valueXml); XMLElementImpl opXml = new XMLElementImpl("op", conditionRoot); opXml.setContent(this.operator); conditionRoot.addChild(opXml); } }
File
CompareNumericsCondition.java
Developer's decision
Version 2
Kind of conflict
Annotation
Attribute
Comment
Import
Method declaration
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/JavaCondition.java

package com.izforge.izpack.rules;

import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
=======
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.rules.Condition;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/JavaCondition.java
import com.izforge.izpack.util.Debug;

import java.lang.reflect.Field;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.util.Debug;

import java.lang.reflect.Field;
File
JavaCondition.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
        else
        {
    public boolean isTrue() {
        if (!this.complete) {
            return false;
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/JavaCondition.java
        }
            if (this.usedclass == null)
            {
                try
                {
=======
        } else {
            if (this.usedclass == null) {
                try {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/JavaCondition.java
                    this.usedclass = Class.forName(this.classname);
                }
                catch (ClassNotFoundException e) {
Solution content
            return false;
        }
        else
        {
            if (this.usedclass == null)
            {
                try
                {
                    this.usedclass = Class.forName(this.classname);
                }
File
JavaCondition.java
Developer's decision
Version 1
Kind of conflict
If statement
Try statement
Chunk
Conflicting content
    }

    @Override
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/JavaCondition.java
    public void makeXMLData(IXMLElement conditionRoot)
    {
=======
    public void makeXMLData(IXMLElement conditionRoot) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/JavaCondition.java
        XMLElementImpl javael = new XMLElementImpl("java", conditionRoot);
        conditionRoot.addChild(javael);
        XMLElementImpl classel = new XMLElementImpl("class", javael);
Solution content
    }

    @Override
    public void makeXMLData(IXMLElement conditionRoot)
    {
        XMLElementImpl javael = new XMLElementImpl("java", conditionRoot);
        conditionRoot.addChild(javael);
        XMLElementImpl classel = new XMLElementImpl("class", javael);
File
JavaCondition.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
        XMLElementImpl classel = new XMLElementImpl("class", javael);
        classel.setContent(this.classname);
        javael.addChild(classel);
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/JavaCondition.java
        if (this.methodname != null)
        {
=======
        if (this.methodname != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/JavaCondition.java
            XMLElementImpl methodel = new XMLElementImpl("method", javael);
            methodel.setContent(this.methodname);
            javael.addChild(methodel);
Solution content
        XMLElementImpl classel = new XMLElementImpl("class", javael);
        classel.setContent(this.classname);
        javael.addChild(classel);
        if (this.methodname != null)
        {
            XMLElementImpl methodel = new XMLElementImpl("method", javael);
            methodel.setContent(this.methodname);
            javael.addChild(methodel);
File
JavaCondition.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
            methodel.setContent(this.methodname);
            javael.addChild(methodel);
        }
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/JavaCondition.java
        if (this.fieldname != null)
        {
=======
        if (this.fieldname != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/JavaCondition.java
            XMLElementImpl fieldel = new XMLElementImpl("field", javael);
            fieldel.setContent(this.fieldname);
            javael.addChild(fieldel);
Solution content
            methodel.setContent(this.methodname);
            javael.addChild(methodel);
        }
        if (this.fieldname != null)
        {
            XMLElementImpl fieldel = new XMLElementImpl("field", javael);
            fieldel.setContent(this.fieldname);
            javael.addChild(fieldel);
File
JavaCondition.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/NotCondition.java

package com.izforge.izpack.rules;

import com.izforge.izpack.adaptator.IXMLElement;
=======
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.rules.Condition;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/NotCondition.java
import com.izforge.izpack.util.Debug;

/**
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.util.Debug;

/**
File
NotCondition.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
     */
    public NotCondition(Condition operand) {
        this.operand = operand;
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/NotCondition.java
        if (operand != null)
        {
=======
        if (operand != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/NotCondition.java
            this.operand.setInstalldata(this.installdata);
        }
    }
Solution content
        }
    }
            this.operand.setInstalldata(this.installdata);
     */
    public NotCondition(Condition operand) {
        this.operand = operand;
        if (operand != null)
        {
File
NotCondition.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        return !operand.isTrue(variables, selectedpacks);
    }
    */
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/NotCondition.java
    public boolean isTrue()
    {
        if ((this.operand == null))
        {
=======

    public boolean isTrue() {
        if ((this.operand == null)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/NotCondition.java
            Debug.trace("Operand of condition " + this.id + " not initialized correctly.");
            return false;
        }
Solution content
        return !operand.isTrue(variables, selectedpacks);
    }
    */

    public boolean isTrue() {
        if ((this.operand == null))
        {
            Debug.trace("Operand of condition " + this.id + " not initialized correctly.");
            return false;
        }
File
NotCondition.java
Developer's decision
Version 1
Kind of conflict
If statement
Method signature
Chunk
Conflicting content
    @Override
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/NotCondition.java
    public void makeXMLData(IXMLElement conditionRoot)
    {
        IXMLElement op = RulesEngine.createConditionElement(this.operand, conditionRoot);
=======
    public void makeXMLData(IXMLElement conditionRoot) {
        IXMLElement op = RulesEngineImpl.createConditionElement(this.operand, conditionRoot);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/NotCondition.java
        this.operand.makeXMLData(op);
        conditionRoot.addChild(op);
    }
Solution content
    }

    @Override
    public void makeXMLData(IXMLElement conditionRoot) {
        IXMLElement op = RulesEngineImpl.createConditionElement(this.operand, conditionRoot);
        IXMLElement op = RulesEngine.createConditionElement(this.operand, conditionRoot);
        this.operand.makeXMLData(op);
        conditionRoot.addChild(op);
    }
File
NotCondition.java
Developer's decision
Combination
Kind of conflict
Method invocation
Method signature
Variable
Chunk
Conflicting content
import com.izforge.izpack.adaptator.IXMLElement;
=======
package com.izforge.izpack.core.rules;

 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/OrCondition.java

package com.izforge.izpack.rules;
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.rules.Condition;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/OrCondition.java
import com.izforge.izpack.util.Debug;

/**
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.util.Debug;

/**
File
OrCondition.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
     * this.leftoperand.isTrue(variables, selectedpacks) || this.rightoperand.isTrue(variables,
     * selectedpacks); }
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/OrCondition.java
    public boolean isTrue()
    {
        if ((this.leftoperand == null) || (this.rightoperand == null))
        {
=======

    public boolean isTrue() {
        if ((this.leftoperand == null) || (this.rightoperand == null)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/OrCondition.java
            Debug.trace("Operands of condition " + this.id + " not initialized correctly.");
            return false;
        }
Solution content
     * this.leftoperand.isTrue(variables, selectedpacks) || this.rightoperand.isTrue(variables,
     * selectedpacks); }
     */

    public boolean isTrue() {
        if ((this.leftoperand == null) || (this.rightoperand == null))
        {
            Debug.trace("Operands of condition " + this.id + " not initialized correctly.");
            return false;
        }
File
OrCondition.java
Developer's decision
Version 1
Kind of conflict
If statement
Method signature
Chunk
Conflicting content
        IXMLElement left = RulesEngineImpl.createConditionElement(this.leftoperand, conditionRoot);
        this.leftoperand.makeXMLData(left);
        conditionRoot.addChild(left);
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/OrCondition.java
        IXMLElement right = RulesEngine.createConditionElement(this.rightoperand, conditionRoot);
=======
        IXMLElement right = RulesEngineImpl.createConditionElement(this.rightoperand, conditionRoot);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/OrCondition.java
        this.rightoperand.makeXMLData(right);
        conditionRoot.addChild(right);
    }
Solution content
        IXMLElement left = RulesEngineImpl.createConditionElement(this.leftoperand, conditionRoot);
        this.leftoperand.makeXMLData(left);
        conditionRoot.addChild(left);
        IXMLElement right = RulesEngineImpl.createConditionElement(this.rightoperand, conditionRoot);
        this.rightoperand.makeXMLData(right);
        conditionRoot.addChild(right);
    }
File
OrCondition.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/PackselectionCondition.java

package com.izforge.izpack.rules;

import com.izforge.izpack.Pack;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
=======
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.rules.Condition;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/PackselectionCondition.java
import com.izforge.izpack.util.Debug;

import java.util.List;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.util.Debug;

import java.util.List;
File
PackselectionCondition.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
    }

    @Override
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/PackselectionCondition.java
    public void makeXMLData(IXMLElement conditionRoot)
    {
=======
    public void makeXMLData(IXMLElement conditionRoot) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/PackselectionCondition.java
        XMLElementImpl packel = new XMLElementImpl("packid", conditionRoot);
        packel.setContent(this.packid);
        conditionRoot.addChild(packel);
Solution content
    }

    @Override
    public void makeXMLData(IXMLElement conditionRoot) {
        XMLElementImpl packel = new XMLElementImpl("packid", conditionRoot);
        packel.setContent(this.packid);
        conditionRoot.addChild(packel);
File
PackselectionCondition.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
 * limitations under the License.
 */
 * See the License for the specific language governing permissions and
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/RefCondition.java

package com.izforge.izpack.rules;
=======
package com.izforge.izpack.core.rules;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/RefCondition.java

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.rules.Condition;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.rules.Condition;
File
RefCondition.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
            }
            if (this.referencedcondition == null) {
                this.referencedcondition = RulesEngineImpl.getCondition(this.referencedConditionId);
            }
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/RefCondition.java
            if (this.referencedcondition != null)
            {
=======
            if (this.referencedcondition != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/RefCondition.java
                this.referencedcondition.setInstalldata(this.installdata);
            return (this.referencedcondition != null) ? this.referencedcondition.isTrue() : false;
Solution content
            if (this.referencedcondition == null) {
                this.referencedcondition = RulesEngineImpl.getCondition(this.referencedConditionId);
            }
            if (this.referencedcondition != null)
            {
                this.referencedcondition.setInstalldata(this.installdata);
            }
            return (this.referencedcondition != null) ? this.referencedcondition.isTrue() : false;
File
RefCondition.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
    }

    @Override
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/RefCondition.java
    public void makeXMLData(IXMLElement conditionRoot)
    {
=======
    public void makeXMLData(IXMLElement conditionRoot) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/RefCondition.java
        conditionRoot.setAttribute("refid", this.referencedConditionId);
    }
}
Solution content
    }

    @Override
    public void makeXMLData(IXMLElement conditionRoot) {
        conditionRoot.setAttribute("refid", this.referencedConditionId);
    }
}
File
RefCondition.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/RulesEngine.java

package com.izforge.izpack.rules;

import com.izforge.izpack.Pack;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.XMLException;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.adaptator.impl.XMLWriter;
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.util.Debug;
=======
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.XMLException;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.adaptator.impl.XMLWriter;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.util.Debug;

import java.io.OutputStream;
import java.util.*;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/RulesEngineImpl.java

import java.io.OutputStream;
import java.io.Serializable;
Solution content
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.XMLException;
import com.izforge.izpack.api.adaptator.impl.XMLWriter;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.util.Debug;

import java.io.OutputStream;
import java.util.*;
File
RulesEngineImpl.java
Developer's decision
Combination
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
            try {
                Class conditionClass = getConditionClass(conditionclassname);
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/RulesEngine.java
                if (conditionClass != null)
                {
=======
                if (conditionClass != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/RulesEngineImpl.java
                    result = conditionClass.newInstance();
                    result.readFromXML(condition);
                    if (condid != null) {
Solution content
            try {
                Class conditionClass = getConditionClass(conditionclassname);
                if (conditionClass != null)
                {
                    result = conditionClass.newInstance();
                    result.readFromXML(condition);
                    if (condid != null) {
File
RulesEngineImpl.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                    if (condid != null) {
                        result.setId(condid);
                    }
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/RulesEngine.java
                    result.setInstalldata(RulesEngine.installdata);
=======
                    result.setInstalldata(RulesEngineImpl.installdata);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/RulesEngineImpl.java
                }
            }
            catch (InstantiationException e) {
Solution content
                    if (condid != null) {
                        result.setId(condid);
                    }
                    result.setInstalldata(RulesEngineImpl.installdata);
                }
            }
            catch (InstantiationException e) {
File
RulesEngineImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
        int index = 0;
        while (index < conditionexpr.length()) {
            char currentchar = conditionexpr.charAt(index);
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/RulesEngine.java
            switch (currentchar)
            {
=======
            switch (currentchar) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/RulesEngineImpl.java
                case '+':
                    // and-condition
                    Condition op1 = conditionsmap.get(conditionexpr.substring(0, index));
Solution content
        int index = 0;
        while (index < conditionexpr.length()) {
            char currentchar = conditionexpr.charAt(index);
            switch (currentchar) {
                case '+':
                    // and-condition
                    Condition op1 = conditionsmap.get(conditionexpr.substring(0, index));
File
RulesEngineImpl.java
Developer's decision
Version 1
Kind of conflict
Switch statement
Chunk
Conflicting content
                    Condition op1 = conditionsmap.get(conditionexpr.substring(0, index));
                    conditionexpr.delete(0, index + 1);
                    result = new AndCondition(op1, getConditionByExpr(conditionexpr));
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/RulesEngine.java
                    result.setInstalldata(RulesEngine.installdata);
=======
                    result.setInstalldata(RulesEngineImpl.installdata);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/RulesEngineImpl.java
                    break;
                case '|':
                    // or-condition
Solution content
                    Condition op1 = conditionsmap.get(conditionexpr.substring(0, index));
                    conditionexpr.delete(0, index + 1);
                    result = new AndCondition(op1, getConditionByExpr(conditionexpr));
                    result.setInstalldata(RulesEngineImpl.installdata);
                    break;
                case '|':
                    // or-condition
File
RulesEngineImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
                    op1 = conditionsmap.get(conditionexpr.substring(0, index));
                    conditionexpr.delete(0, index + 1);
                    result = new OrCondition(op1, getConditionByExpr(conditionexpr));
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/RulesEngine.java
                    result.setInstalldata(RulesEngine.installdata);
=======
                    result.setInstalldata(RulesEngineImpl.installdata);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/RulesEngineImpl.java
                    break;
                case '\\':
                    // xor-condition
Solution content
                    op1 = conditionsmap.get(conditionexpr.substring(0, index));
                    conditionexpr.delete(0, index + 1);
                    result = new OrCondition(op1, getConditionByExpr(conditionexpr));
                    result.setInstalldata(RulesEngineImpl.installdata);
                    break;
                case '\\':
                    // xor-condition
File
RulesEngineImpl.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
                    op1 = conditionsmap.get(conditionexpr.substring(0, index));
                    conditionexpr.delete(0, index + 1);
                    result = new XorCondition(op1, getConditionByExpr(conditionexpr));
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/RulesEngine.java
                    result.setInstalldata(RulesEngine.installdata);
                    break;
                case '!':
                    // not-condition
                    if (index > 0)
                    {
                        Debug.trace("error: ! operator only allowed at position 0");
                    }
                    else
                    {
                        // delete not symbol
                        conditionexpr.deleteCharAt(index);
                        result = new NotCondition(getConditionByExpr(conditionexpr));
                        result.setInstalldata(RulesEngine.installdata);
=======
                    result.setInstalldata(RulesEngineImpl.installdata);
                    break;
                case '!':
                    // not-condition
                    if (index > 0) {
                        Debug.trace("error: ! operator only allowed at position 0");
                    } else {
                        // delete not symbol
                        conditionexpr.deleteCharAt(index);
                        result = new NotCondition(getConditionByExpr(conditionexpr));
                        result.setInstalldata(RulesEngineImpl.installdata);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/RulesEngineImpl.java
                    }
                    break;
                default:
Solution content
                    op1 = conditionsmap.get(conditionexpr.substring(0, index));
                    conditionexpr.delete(0, index + 1);
                    result = new XorCondition(op1, getConditionByExpr(conditionexpr));
                    result.setInstalldata(RulesEngineImpl.installdata);
                    break;
                case '!':
                    // not-condition
                    if (index > 0)
                    {
                        Debug.trace("error: ! operator only allowed at position 0");
                    }
                    else
                    {
                        // delete not symbol
                        conditionexpr.deleteCharAt(index);
                        result = new NotCondition(getConditionByExpr(conditionexpr));
                        result.setInstalldata(RulesEngineImpl.installdata);
                    }
                    break;
                default:
File
RulesEngineImpl.java
Developer's decision
Version 2
Kind of conflict
Break statement
Case statement
Comment
If statement
Method invocation
Variable
Chunk
Conflicting content
        }
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/RulesEngine.java
    public boolean isConditionTrue(String id)
    {
        Condition cond = RulesEngine.getCondition(id);
        if (cond != null)
        {
            if (cond.getInstalldata() == null)
            {
                cond.setInstalldata(RulesEngine.installdata);
=======
    public boolean isConditionTrue(String id) {
        Condition cond = RulesEngineImpl.getCondition(id);
        if (cond != null) {
            if (cond.getInstalldata() == null) {
                cond.setInstalldata(RulesEngineImpl.installdata);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/RulesEngineImpl.java
            }
            return this.isConditionTrue(cond);
        } else {
Solution content
        }
    }

    public boolean isConditionTrue(String id)
    {
        Condition cond = RulesEngine.getCondition(id);
        if (cond != null)
        {
            if (cond.getInstalldata() == null)
            {
                cond.setInstalldata(RulesEngine.installdata);
            }
            return this.isConditionTrue(cond);
File
RulesEngineImpl.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Method signature
Variable
Chunk
Conflicting content
    }
        }
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/RulesEngine.java
    public boolean isConditionTrue(Condition cond)
    {
        if (cond.getInstalldata() == null)
        {
            cond.setInstalldata(RulesEngine.installdata);
=======
    public boolean isConditionTrue(Condition cond) {
        if (cond.getInstalldata() == null) {
            cond.setInstalldata(RulesEngineImpl.installdata);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/RulesEngineImpl.java
        }
        return cond.isTrue();
Solution content
        }
    }

    public boolean isConditionTrue(Condition cond)
    {
        if (cond.getInstalldata() == null)
        {
            cond.setInstalldata(RulesEngine.installdata);
        }
        return cond.isTrue();
    }
File
RulesEngineImpl.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Method signature
Chunk
Conflicting content
        }
        Debug.trace("there is a condition");
        Condition condition = getCondition(this.panelconditions.get(panelid));
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/RulesEngine.java
        if (condition != null)
        {
=======
        if (condition != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/RulesEngineImpl.java
            return condition.isTrue();
        }
        return false;
Solution content
        }
        Debug.trace("there is a condition");
        Condition condition = getCondition(this.panelconditions.get(panelid));
        if (condition != null)
        {
            return condition.isTrue();
        }
        return false;
File
RulesEngineImpl.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
     * @return true - there is no condition or condition is met false - there is a condition and the
     *         condition was not met
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/RulesEngine.java
    public boolean canInstallPack(String packid, Properties variables)
    {
        if (packid == null)
        {
=======
    public boolean canInstallPack(String packid, Properties variables) {
        if (packid == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/RulesEngineImpl.java
            return true;
        }
        Debug.trace("can install pack with id " + packid + "?");
Solution content
     * @return true - there is no condition or condition is met false - there is a condition and the
     *         condition was not met
     */
    public boolean canInstallPack(String packid, Properties variables)
    {
        if (packid == null)
        {
            return true;
        }
        Debug.trace("can install pack with id " + packid + "?");
File
RulesEngineImpl.java
Developer's decision
Version 1
Kind of conflict
If statement
Method signature
Chunk
Conflicting content
        }
        Debug.trace("there is a condition");
        Condition condition = getCondition(this.packconditions.get(packid));
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/RulesEngine.java
        if (condition != null)
        {
=======
        if (condition != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/RulesEngineImpl.java
            return condition.isTrue();
        }
        return false;
Solution content
        }
        Debug.trace("there is a condition");
        Condition condition = getCondition(this.packconditions.get(packid));
        if (condition != null)
        {
            return condition.isTrue();
        }
        return false;
File
RulesEngineImpl.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
{
    }

    @Override
public class UserCondition extends Condition
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/UserCondition.java
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 *
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2007-2009 Dennis Reil
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.rules;

import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.util.Debug;

/**
 * Checks to see whether the user who is running the installer is the same as the user who should be
 * running the installer.
 *
 * @author J. Chris Folsom 
 * @author Dennis Reil 
 */
        }
        return result;
    private static final long serialVersionUID = -2076347348048202718L;
    private String requiredUsername;

    @Override
    public boolean isTrue()
    {
        boolean result = false;
        if (this.requiredUsername == null)
        {
            Debug.log("Expected user name not set in user condition. Condition will return false.");
        }
        else
        {
            String actualUsername = System.getProperty("user.name");
            if ((actualUsername != null) || (actualUsername.length() >= 0))
            {
                result = this.requiredUsername.equals(actualUsername);
            }
            else
            {
                Debug.log("No user.name found in system properties. Condition will return false.");
            }
    public void readFromXML(IXMLElement xmlcondition)
    {
        IXMLElement userElement = xmlcondition.getFirstChildNamed("requiredusername");

        if (userElement == null)
        {
            Debug.log("Condition or type \"user\" requires child element: user");
        }
        else
        {
            this.requiredUsername = userElement.getContent();
        }
    }

    @Override
    public void makeXMLData(IXMLElement conditionRoot)
    {
        XMLElementImpl requiredUserEl = new XMLElementImpl("requiredusername", conditionRoot);
        requiredUserEl.setContent(this.requiredUsername);
        conditionRoot.addChild(requiredUserEl);

    }

}
=======
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 *
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2007-2009 Dennis Reil
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.util.Debug;

/**
 * Checks to see whether the user who is running the installer is the same as the user who should be
 * running the installer.
 *
 * @author J. Chris Folsom 
 * @author Dennis Reil 
 */
public class UserCondition extends Condition {
    private static final long serialVersionUID = -2076347348048202718L;
    private String requiredUsername;

    @Override
    public boolean isTrue() {
        boolean result = false;
        if (this.requiredUsername == null) {
            Debug.log("Expected user name not set in user condition. Condition will return false.");
        } else {
            String actualUsername = System.getProperty("user.name");
            if ((actualUsername != null) || (actualUsername.length() >= 0)) {
                result = this.requiredUsername.equals(actualUsername);
            } else {
                Debug.log("No user.name found in system properties. Condition will return false.");
            }
        }
        return result;
    }

    @Override
    public void readFromXML(IXMLElement xmlcondition) {
        IXMLElement userElement = xmlcondition.getFirstChildNamed("requiredusername");

        if (userElement == null) {
            Debug.log("Condition or type \"user\" requires child element: user");
        } else {
            this.requiredUsername = userElement.getContent();
        }
    }

    @Override
    public void makeXMLData(IXMLElement conditionRoot) {
        XMLElementImpl requiredUserEl = new XMLElementImpl("requiredusername", conditionRoot);
        requiredUserEl.setContent(this.requiredUsername);
        conditionRoot.addChild(requiredUserEl);

    }

}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/UserCondition.java
Solution content
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 *
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2007-2009 Dennis Reil
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.rules.Condition;

import com.izforge.izpack.util.Debug;
/**
 * Checks to see whether the user who is running the installer is the same as the user who should be
 * running the installer.
 *
 * @author J. Chris Folsom 
 * @author Dennis Reil 
 */
public class UserCondition extends Condition
}
{
    private static final long serialVersionUID = -2076347348048202718L;
    private String requiredUsername;

    @Override
    public boolean isTrue() {
        boolean result = false;
        if (this.requiredUsername == null) {
            Debug.log("Expected user name not set in user condition. Condition will return false.");
        } else {
            String actualUsername = System.getProperty("user.name");
            if ((actualUsername != null) || (actualUsername.length() >= 0))
            {
                result = this.requiredUsername.equals(actualUsername);
            }
            else
            {
                Debug.log("No user.name found in system properties. Condition will return false.");
            }
        }
        return result;
    }

    @Override
    public void readFromXML(IXMLElement xmlcondition) {
        IXMLElement userElement = xmlcondition.getFirstChildNamed("requiredusername");

        if (userElement == null) {
            Debug.log("Condition or type \"user\" requires child element: user");
        } else {
            this.requiredUsername = userElement.getContent();
        }
    }

    @Override
    public void makeXMLData(IXMLElement conditionRoot) {
        XMLElementImpl requiredUserEl = new XMLElementImpl("requiredusername", conditionRoot);
        requiredUserEl.setContent(this.requiredUsername);
        conditionRoot.addChild(requiredUserEl);

    }
File
UserCondition.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/VariableCondition.java

package com.izforge.izpack.rules;

import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
=======
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.rules.Condition;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/VariableCondition.java
import com.izforge.izpack.util.Debug;

import java.util.HashMap;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.util.Debug;

import java.util.HashMap;
File
VariableCondition.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
    }

    @Override
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/VariableCondition.java
    public void makeXMLData(IXMLElement conditionRoot)
    {
=======
    public void makeXMLData(IXMLElement conditionRoot) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/VariableCondition.java
        XMLElementImpl nameEl = new XMLElementImpl("name", conditionRoot);
        nameEl.setContent(this.variablename);
        conditionRoot.addChild(nameEl);
Solution content
    }

    @Override
    public void makeXMLData(IXMLElement conditionRoot) {
        XMLElementImpl nameEl = new XMLElementImpl("name", conditionRoot);
        nameEl.setContent(this.variablename);
        conditionRoot.addChild(nameEl);
File
VariableCondition.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
    }
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/VariableExistenceCondition.java
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 *
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2009 Dennis Reil
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.rules;

import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.util.Debug;

/**
 * This condition checks if a certain variable has a value. If it is not
 * in the current list of variables it will evaluate to false.
 *
 * @author Dennis Reil,
 */
public class VariableExistenceCondition extends Condition
{
    private static final long serialVersionUID = -7424383017678759732L;

    private String variable;
    public VariableExistenceCondition()
    {
        this.variable = "default.variable";
    }


    @Override
    public boolean isTrue()
    {
        boolean result = false;
        String value = this.installdata.getVariable(this.variable);
        if (value != null)
        {
            result = true;
        }
        return result;
    }

    @Override
    public void readFromXML(IXMLElement xmlcondition)
    {
        if (xmlcondition != null)
        {
            IXMLElement variableElement = xmlcondition.getFirstChildNamed("variable");
            if (variableElement != null)
            {
                this.variable = variableElement.getContent();
            }
            else
            {
                Debug.error("VariableExistenceCondition needs a variable element in its spec.");
            }
        }
    }


    public String getVariable()
    {
        return variable;
    }


    public void setVariable(String variable)
    {
        this.variable = variable;
    }


    @Override
    public void makeXMLData(IXMLElement conditionRoot)
    {
        XMLElementImpl variableEl = new XMLElementImpl("variable", conditionRoot);
        variableEl.setContent(this.variable);
        conditionRoot.addChild(variableEl);
    }

}
=======
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 *
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2009 Dennis Reil
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.util.Debug;

/**
 * This condition checks if a certain variable has a value. If it is not
 * in the current list of variables it will evaluate to false.
 *
 * @author Dennis Reil,
 */
public class VariableExistenceCondition extends Condition {
    private static final long serialVersionUID = -7424383017678759732L;

    private String variable;

    public VariableExistenceCondition() {
        this.variable = "default.variable";
    }


    @Override
    public boolean isTrue() {
        boolean result = false;
        String value = this.installdata.getVariable(this.variable);
        if (value != null) {
            result = true;
        }
        return result;

    @Override
    public void readFromXML(IXMLElement xmlcondition) {
        if (xmlcondition != null) {
            IXMLElement variableElement = xmlcondition.getFirstChildNamed("variable");
            if (variableElement != null) {
                this.variable = variableElement.getContent();
            } else {
                Debug.error("VariableExistenceCondition needs a variable element in its spec.");
            }
        }
    }


    public String getVariable() {
        return variable;
    }


    public void setVariable(String variable) {
        this.variable = variable;
    }


    @Override
    public void makeXMLData(IXMLElement conditionRoot) {
        XMLElementImpl variableEl = new XMLElementImpl("variable", conditionRoot);
        variableEl.setContent(this.variable);
        conditionRoot.addChild(variableEl);
    }

}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/VariableExistenceCondition.java
Solution content
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 *
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2009 Dennis Reil
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.util.Debug;

/**
 * This condition checks if a certain variable has a value. If it is not
 * in the current list of variables it will evaluate to false.
 *
 * @author Dennis Reil,
 */
public class VariableExistenceCondition extends Condition {
    private static final long serialVersionUID = -7424383017678759732L;

    private String variable;

    public VariableExistenceCondition()
    {
        this.variable = "default.variable";
    }


    @Override
    public boolean isTrue() {
        boolean result = false;
        String value = this.installdata.getVariable(this.variable);
        if (value != null)
        {
            result = true;
        }
        return result;
    }

    @Override
    public void readFromXML(IXMLElement xmlcondition) {
        if (xmlcondition != null)
        {
            IXMLElement variableElement = xmlcondition.getFirstChildNamed("variable");
            if (variableElement != null)
            {
                this.variable = variableElement.getContent();
            }
            else
            {
                Debug.error("VariableExistenceCondition needs a variable element in its spec.");
            }
        }
    }


    public String getVariable()
    {
        return variable;
    }


    public void setVariable(String variable)
    {
        this.variable = variable;
    }


    @Override
    public void makeXMLData(IXMLElement conditionRoot)
    {
        XMLElementImpl variableEl = new XMLElementImpl("variable", conditionRoot);
        variableEl.setContent(this.variable);
        conditionRoot.addChild(variableEl);
    }

}
File
VariableExistenceCondition.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
    /*
<<<<<<< HEAD:src/lib/com/izforge/izpack/rules/XorCondition.java
/* 
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved. 
 * 
 * http://izpack.org/ 
 * http://izpack.codehaus.org/ 
 * 
 * Copyright 2007 Dennis Reil 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0 
 * 
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License. 
 */

package com.izforge.izpack.rules;

import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.util.Debug;

/**
 * @author Dennis Reil, 
 * @version $Id: XOrCondition.java,v 1.1 2006/09/29 14:40:38 dennis Exp $
 */
public class XorCondition extends OrCondition
{

    /**
     *
     */
    private static final long serialVersionUID = 3148555083095194992L;

    /**
     *
     */
    public XorCondition()
    {
        super();
    }

    /**
     * @param operand1
     * @param operand2
     */
    public XorCondition(Condition operand1, Condition operand2)
    {
        super(operand1, operand2);
    }

    /*
     * (non-Javadoc)
     * 
     * @see de.reddot.installer.rules.Condition#readFromXML(net.n3.nanoxml.XMLElement)
     */
    public void readFromXML(IXMLElement xmlcondition)
    {
        try
        {
            if (xmlcondition.getChildrenCount() != 2)
            {
                Debug.log("xor-condition needs two conditions as operands");
                return;
            }
            this.leftoperand = RulesEngine.analyzeCondition(xmlcondition.getChildAtIndex(0));
            this.rightoperand = RulesEngine.analyzeCondition(xmlcondition.getChildAtIndex(1));
        }
        catch (Exception e)
        {
            Debug.log("missing element in xor-condition");
        }
    }

    public boolean isTrue()
    {
        if ((this.leftoperand == null) || (this.rightoperand == null))
        {
            Debug.trace("Operands of condition " + this.id + " not initialized correctly.");
            return false;
        }
        this.leftoperand.setInstalldata(this.installdata);
        this.rightoperand.setInstalldata(this.installdata);

        boolean op1true = leftoperand.isTrue();
        boolean op2true = rightoperand.isTrue();

        if (op1true && op2true)
        {
            // in case where both are true
            return false;
        }
        return op1true || op2true;
    }
     * (non-Javadoc)
     * 
     * @see com.izforge.izpack.rules.OrCondition#getDependenciesDetails()
     */
    public String getDependenciesDetails()
    {
        StringBuffer details = new StringBuffer();
        details.append(this.id);
        details.append(" depends on:
  • "); details.append(leftoperand.getDependenciesDetails()); details.append("
  • XOR
  • "); details.append(rightoperand.getDependenciesDetails()); details.append("
"); return details.toString(); } ======= /* * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved. * * http://izpack.org/ * http://izpack.codehaus.org/ * * Copyright 2007 Dennis Reil * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.izforge.izpack.core.rules; import com.izforge.izpack.api.adaptator.IXMLElement; import com.izforge.izpack.api.rules.Condition; import com.izforge.izpack.util.Debug; /** * @author Dennis Reil, * @version $Id: XOrCondition.java,v 1.1 2006/09/29 14:40:38 dennis Exp $ */ public class XorCondition extends OrCondition { /** * */ private static final long serialVersionUID = 3148555083095194992L; /** * */ public XorCondition() { super(); } /** * @param operand1 * @param operand2 */ public XorCondition(Condition operand1, Condition operand2) { super(operand1, operand2); } /* * (non-Javadoc) * * @see de.reddot.installer.rules.Condition#readFromXML(net.n3.nanoxml.XMLElement) */ public void readFromXML(IXMLElement xmlcondition) { try { if (xmlcondition.getChildrenCount() != 2) { Debug.log("xor-condition needs two conditions as operands"); return; } this.leftoperand = RulesEngineImpl.analyzeCondition(xmlcondition.getChildAtIndex(0)); this.rightoperand = RulesEngineImpl.analyzeCondition(xmlcondition.getChildAtIndex(1)); } catch (Exception e) { Debug.log("missing element in xor-condition"); } } public boolean isTrue() { if ((this.leftoperand == null) || (this.rightoperand == null)) { Debug.trace("Operands of condition " + this.id + " not initialized correctly."); return false; } this.leftoperand.setInstalldata(this.installdata); this.rightoperand.setInstalldata(this.installdata); boolean op1true = leftoperand.isTrue(); boolean op2true = rightoperand.isTrue(); if (op1true && op2true) { // in case where both are true return false; } return op1true || op2true; } /* * (non-Javadoc) * * @see com.izforge.izpack.core.rules.OrCondition#getDependenciesDetails() */ public String getDependenciesDetails() { StringBuffer details = new StringBuffer(); details.append(this.id); details.append(" depends on:
  • "); details.append(leftoperand.getDependenciesDetails()); details.append("
  • XOR
  • "); details.append(rightoperand.getDependenciesDetails()); details.append("
"); return details.toString(); } >>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-core/src/main/java/com/izforge/izpack/core/rules/XorCondition.java }
Solution content
/* 
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved. 
 * 
 * http://izpack.org/ 
 * http://izpack.codehaus.org/ 
 * 
 * Copyright 2007 Dennis Reil 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); 
 * you may not use this file except in compliance with the License. 
 * You may obtain a copy of the License at 
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0 
 * 
 * Unless required by applicable law or agreed to in writing, software 
 * distributed under the License is distributed on an "AS IS" BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License. 
 */
package com.izforge.izpack.core.rules;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.rules.Condition;
import com.izforge.izpack.util.Debug;

/**
 * @author Dennis Reil, 
 * @version $Id: XOrCondition.java,v 1.1 2006/09/29 14:40:38 dennis Exp $
 */
public class XorCondition extends OrCondition {

    /**
     *
     */
    private static final long serialVersionUID = 3148555083095194992L;

    /**
     *
     */
    public XorCondition() {
        super();
    }

    /**
     * @param operand1
     * @param operand2
     */
    public XorCondition(Condition operand1, Condition operand2) {
        super(operand1, operand2);
    }

    /*
     * (non-Javadoc)
     * 
     * @see de.reddot.installer.rules.Condition#readFromXML(net.n3.nanoxml.XMLElement)
     */
    public void readFromXML(IXMLElement xmlcondition) {
        try {
            if (xmlcondition.getChildrenCount() != 2) {
                Debug.log("xor-condition needs two conditions as operands");
                return;
            }
            this.leftoperand = RulesEngineImpl.analyzeCondition(xmlcondition.getChildAtIndex(0));
            this.rightoperand = RulesEngineImpl.analyzeCondition(xmlcondition.getChildAtIndex(1));
        }
        catch (Exception e) {
            Debug.log("missing element in xor-condition");
        }
    }

    public boolean isTrue() {
        if ((this.leftoperand == null) || (this.rightoperand == null)) {
            Debug.trace("Operands of condition " + this.id + " not initialized correctly.");
            return false;
        }
        this.leftoperand.setInstalldata(this.installdata);
        this.rightoperand.setInstalldata(this.installdata);

        boolean op1true = leftoperand.isTrue();
        boolean op2true = rightoperand.isTrue();

        if (op1true && op2true) {
            // in case where both are true
            return false;
        }
        return op1true || op2true;
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.izforge.izpack.core.rules.OrCondition#getDependenciesDetails()
     */

    public String getDependenciesDetails() {
        StringBuffer details = new StringBuffer();
        details.append(this.id);
        details.append(" depends on:
  • "); details.append(leftoperand.getDependenciesDetails()); details.append("
  • XOR
  • "); details.append(rightoperand.getDependenciesDetails()); details.append("
"); return details.toString(); } }
File
XorCondition.java
Developer's decision
Version 2
Kind of conflict
Attribute
Comment
Import
Method declaration
Package declaration
Chunk
Conflicting content
package com.izforge.izpack.event;

<<<<<<< HEAD:src/lib/com/izforge/izpack/event/AntActionInstallerListener.java
import com.izforge.izpack.Pack;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.InstallerException;
import com.izforge.izpack.installer.UninstallData;
import com.izforge.izpack.util.*;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.data.UninstallData;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.ExtendedUIProgressHandler;
import com.izforge.izpack.util.helper.SpecHelper;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-event/src/main/java/com/izforge/izpack/event/AntActionInstallerListener.java

import java.io.*;
import java.util.ArrayList;
Solution content
package com.izforge.izpack.event;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.data.UninstallData;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.ExtendedUIProgressHandler;
import com.izforge.izpack.util.helper.SpecHelper;

import java.io.*;
import java.util.ArrayList;
File
AntActionInstallerListener.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
            return null;
        }
        SpecHelper spec = getSpecHelper();
        String buildFile = null;
        String buildResource = null;

<<<<<<< HEAD:src/lib/com/izforge/izpack/event/AntActionInstallerListener.java
        if (el == null)
        {
=======
        if (el == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-event/src/main/java/com/izforge/izpack/event/AntActionInstallerListener.java
Solution content
        String buildFile = null;
        String buildResource = null;

        if (el == null) {
            return null;
        }
        SpecHelper spec = getSpecHelper();
File
AntActionInstallerListener.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        if (null != buildFile && null != buildResource) {
            throw new InstallerException("Invalid " + SPEC_FILE_NAME + ": cannot specify both buildfile and buildresource");
        }
<<<<<<< HEAD:src/lib/com/izforge/izpack/event/AntActionInstallerListener.java
        if (null != buildFile)
        {
=======
        if (null != buildFile) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-event/src/main/java/com/izforge/izpack/event/AntActionInstallerListener.java
            act.setBuildFile(buildFile);
        } else {
            act.setBuildFile(buildResource);
Solution content
        if (null != buildFile && null != buildResource) {
            throw new InstallerException("Invalid " + SPEC_FILE_NAME + ": cannot specify both buildfile and buildresource");
        }
        if (null != buildFile)
        {
            act.setBuildFile(buildFile);
        }
        else
        {
            act.setBuildFile(buildResource);
File
AntActionInstallerListener.java
Developer's decision
Manual
Kind of conflict
If statement
Chunk
Conflicting content
        }

        // see if this was an build_resource and there were uninstall actions
<<<<<<< HEAD:src/lib/com/izforge/izpack/event/AntActionInstallerListener.java
        if (null != buildResource && act.getUninstallTargets().size() > 0)
        {
=======
        if (null != buildResource && act.getUninstallTargets().size() > 0) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-event/src/main/java/com/izforge/izpack/event/AntActionInstallerListener.java
            // We need to add the build_resource file to the uninstaller
            addBuildResourceToUninstallerData(buildResource);
        }
Solution content
        }

        // see if this was an build_resource and there were uninstall actions
        if (null != buildResource && act.getUninstallTargets().size() > 0)
        {
            // We need to add the build_resource file to the uninstaller
            addBuildResourceToUninstallerData(buildResource);
        }
File
AntActionInstallerListener.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        return act;
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/event/AntActionInstallerListener.java
    private String processBuildfileResource(SpecHelper spec, AutomatedInstallData idata, IXMLElement el) throws InstallerException
    {
=======
    private String processBuildfileResource(SpecHelper spec, AutomatedInstallData idata, IXMLElement el) throws InstallerException {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-event/src/main/java/com/izforge/izpack/event/AntActionInstallerListener.java
        String buildResource = null;

        // See if the build file is a resource
Solution content
        return act;
    }

    private String processBuildfileResource(SpecHelper spec, AutomatedInstallData idata, IXMLElement el) throws InstallerException
    {
        String buildResource = null;

        // See if the build file is a resource
File
AntActionInstallerListener.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
        // See if the build file is a resource
        String attr = el.getAttribute(ActionBase.BUILDRESOURCE);
<<<<<<< HEAD:src/lib/com/izforge/izpack/event/AntActionInstallerListener.java
        if (null != attr)
        {
            // Get the resource
            BufferedInputStream bis = new BufferedInputStream(spec.getResource(attr));
            if (null == bis)
            {
=======
        if (null != attr) {
            // Get the resource
            BufferedInputStream bis = new BufferedInputStream(spec.getResource(attr));
            if (null == bis) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-event/src/main/java/com/izforge/izpack/event/AntActionInstallerListener.java
                // Resource not found
                throw new InstallerException("Failed to find buildfile_resource: " + attr);
            }
Solution content
        // See if the build file is a resource
        String attr = el.getAttribute(ActionBase.BUILDRESOURCE);
        if (null != attr)
        {
            // Get the resource
            BufferedInputStream bis = new BufferedInputStream(spec.getResource(attr));
            if (null == bis)
            {
                // Resource not found
                throw new InstallerException("Failed to find buildfile_resource: " + attr);
            }
File
AntActionInstallerListener.java
Developer's decision
Version 1
Kind of conflict
Comment
If statement
Method invocation
Variable
Chunk
Conflicting content
                throw new InstallerException("Failed to find buildfile_resource: " + attr);
            }
            BufferedOutputStream bos = null;
<<<<<<< HEAD:src/lib/com/izforge/izpack/event/AntActionInstallerListener.java
            try
            {
=======
            try {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-event/src/main/java/com/izforge/izpack/event/AntActionInstallerListener.java
                // Write the resource to a temporary file
                File tempFile = File.createTempFile("buildfile_resource", "xml");
                tempFile.deleteOnExit();
Solution content
            BufferedOutputStream bos = null;
            try
            {
                throw new InstallerException("Failed to find buildfile_resource: " + attr);
            }
                // Write the resource to a temporary file
                File tempFile = File.createTempFile("buildfile_resource", "xml");
                tempFile.deleteOnExit();
File
AntActionInstallerListener.java
Developer's decision
Version 1
Kind of conflict
Try statement
Chunk
Conflicting content
            }
            finally {
                bos.close();
                buildResource = tempFile.getAbsolutePath();
            }
<<<<<<< HEAD:src/lib/com/izforge/izpack/event/AntActionInstallerListener.java
            catch (Exception x)
            {
                throw new InstallerException("Failed to write buildfile_resource", x);
            }
            finally
            {
                if (bos != null)
                {
                    try
                    {
                        bos.close();
                    }
                    catch (Exception x)
                    {
=======
            catch (Exception x) {
                throw new InstallerException("Failed to write buildfile_resource", x);
                if (bos != null) {
                    try {
                        bos.close();
                    }
                    catch (Exception x) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-event/src/main/java/com/izforge/izpack/event/AntActionInstallerListener.java
                        // Ignore this exception
                    }
                }
Solution content
                bos.close();
                buildResource = tempFile.getAbsolutePath();
            }
            catch (Exception x)
            {
                throw new InstallerException("Failed to write buildfile_resource", x);
            }
            finally
            {
                if (bos != null)
                {
                    try
                    {
                        bos.close();
                    }
                    catch (Exception x)
                    {
                        // Ignore this exception
                    }
                }
File
AntActionInstallerListener.java
Developer's decision
Version 1
Kind of conflict
Catch clause
If statement
Method invocation
Try statement
Chunk
Conflicting content
                bos.write(c);
            }
            content = bos.toByteArray();
<<<<<<< HEAD:src/lib/com/izforge/izpack/event/AntActionInstallerListener.java
            UninstallData.getInstance().addAdditionalData("build_resource", content);
        }
        catch (Exception x)
        {
=======
            uninstallData.addAdditionalData("build_resource", content);
        } catch (Exception x) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-event/src/main/java/com/izforge/izpack/event/AntActionInstallerListener.java
            throw new InstallerException("Failed to add buildfile_resource to uninstaller", x);
        }
        finally
Solution content
                bos.write(c);
            }
            content = bos.toByteArray();
            uninstallData.addAdditionalData("build_resource", content);
        }
        catch (Exception x)
        {
            throw new InstallerException("Failed to add buildfile_resource to uninstaller", x);
        }
        finally
File
AntActionInstallerListener.java
Developer's decision
Version 2
Kind of conflict
Catch clause
Method invocation
Chunk
Conflicting content
package com.izforge.izpack.event;

<<<<<<< HEAD:src/lib/com/izforge/izpack/event/RegistryInstallerListener.java
import com.coi.tools.os.win.NativeLibException;
import com.izforge.izpack.Pack;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.UninstallData;
import com.izforge.izpack.installer.Unpacker;
import com.izforge.izpack.rules.RulesEngine;
import com.izforge.izpack.util.*;
import com.izforge.izpack.util.os.RegistryDefaultHandler;
import com.izforge.izpack.util.os.RegistryHandler;
import com.izforge.izpack.util.os.WrappedNativeLibException;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.exception.NativeLibException;
import com.izforge.izpack.api.exception.WrappedNativeLibException;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.api.unpacker.IDiscardInterruptable;
import com.izforge.izpack.core.os.RegistryDefaultHandler;
import com.izforge.izpack.core.os.RegistryHandler;
import com.izforge.izpack.installer.data.UninstallData;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.CleanupClient;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.Housekeeper;
import com.izforge.izpack.util.helper.SpecHelper;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-event/src/main/java/com/izforge/izpack/event/RegistryInstallerListener.java

import java.util.Iterator;
import java.util.List;
Solution content
package com.izforge.izpack.event;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.exception.NativeLibException;
import com.izforge.izpack.api.exception.WrappedNativeLibException;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.api.unpacker.IDiscardInterruptable;
import com.izforge.izpack.core.os.RegistryDefaultHandler;
import com.izforge.izpack.core.os.RegistryHandler;
import com.izforge.izpack.installer.data.UninstallData;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.CleanupClient;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.Housekeeper;
import com.izforge.izpack.util.helper.SpecHelper;

import java.util.Iterator;
import java.util.List;
File
RegistryInstallerListener.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
    private List registryModificationLog;

<<<<<<< HEAD:src/lib/com/izforge/izpack/event/RegistryInstallerListener.java
=======
    private IDiscardInterruptable unpacker;
    private VariableSubstitutor variableSubstitutor;
    private UninstallData uninstallData;

>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-event/src/main/java/com/izforge/izpack/event/RegistryInstallerListener.java
    /**
     * Default constructor.
     */
Solution content
    private List registryModificationLog;

    private IDiscardInterruptable unpacker;
    private VariableSubstitutor variableSubstitutor;
    private UninstallData uninstallData;

    /**
     * Default constructor.
     */
File
RegistryInstallerListener.java
Developer's decision
Version 2
Kind of conflict
Attribute
Chunk
Conflicting content
     */

    public void afterPacks(AutomatedInstallData idata, AbstractUIProgressHandler handler)
<<<<<<< HEAD:src/lib/com/izforge/izpack/event/RegistryInstallerListener.java
            throws Exception
    {
        try
        {
=======
            throws Exception {
        try {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-event/src/main/java/com/izforge/izpack/event/RegistryInstallerListener.java
            // Register for cleanup
            Housekeeper.getInstance().registerForCleanup(this);
Solution content
     */

    public void afterPacks(AutomatedInstallData idata, AbstractUIProgressHandler handler)
            throws Exception {
        try {
            // Register for cleanup
            Housekeeper.getInstance().registerForCleanup(this);
File
RegistryInstallerListener.java
Developer's decision
Version 1
Kind of conflict
Try statement
Chunk
Conflicting content
    /**
     * Remove all registry entries on failed installation
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/event/RegistryInstallerListener.java
    public void cleanUp()
    {
        // installation was not successful now rewind all registry changes
        if (AutomatedInstallData.getInstance().installSuccess || registryModificationLog == null || registryModificationLog.size() < 1)
        {
=======
    public void cleanUp() {
        // installation was not successful now rewind all registry changes
        if (AutomatedInstallData.getInstance().isInstallSuccess() || registryModificationLog == null || registryModificationLog.size() < 1) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-event/src/main/java/com/izforge/izpack/event/RegistryInstallerListener.java
            return;
        }
        RegistryHandler registryHandler = RegistryDefaultHandler.getInstance();
Solution content
    /**
     * Remove all registry entries on failed installation
     */
    public void cleanUp() {
        // installation was not successful now rewind all registry changes
        if (AutomatedInstallData.getInstance().isInstallSuccess() || registryModificationLog == null || registryModificationLog.size() < 1) {
            return;
        }
        RegistryHandler registryHandler = RegistryDefaultHandler.getInstance();
File
RegistryInstallerListener.java
Developer's decision
Version 2
Kind of conflict
Comment
If statement
Method signature
Chunk
Conflicting content
        }

        String packcondition = pack.getAttribute("condition");
<<<<<<< HEAD:src/lib/com/izforge/izpack/event/RegistryInstallerListener.java
        if (packcondition != null)
        {
            Debug.trace("condition " + packcondition + " found for pack of registry entries.");
            if (!rules.isConditionTrue(packcondition))
            {
=======
        if (packcondition != null) {
            Debug.trace("condition " + packcondition + " found for pack of registry entries.");
            if (!rules.isConditionTrue(packcondition)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-event/src/main/java/com/izforge/izpack/event/RegistryInstallerListener.java
                // condition not fulfilled, continue with next element.
                Debug.trace("not fulfilled.");
                return;
Solution content
        }

        String packcondition = pack.getAttribute("condition");
        if (packcondition != null)
        {
            Debug.trace("condition " + packcondition + " found for pack of registry entries.");
            if (!rules.isConditionTrue(packcondition))
            {
                // condition not fulfilled, continue with next element.
                Debug.trace("not fulfilled.");
                return;
File
RegistryInstallerListener.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
        while (entriesIter != null && entriesIter.hasNext()) {
            IXMLElement regEntry = (IXMLElement) entriesIter.next();
            String condition = regEntry.getAttribute("condition");
<<<<<<< HEAD:src/lib/com/izforge/izpack/event/RegistryInstallerListener.java
            if (condition != null)
            {
                Debug.trace("condition " + condition + " found for registry entry.");
                if (!rules.isConditionTrue(condition))
                {
=======
            if (condition != null) {
                Debug.trace("condition " + condition + " found for registry entry.");
                if (!rules.isConditionTrue(condition)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-event/src/main/java/com/izforge/izpack/event/RegistryInstallerListener.java
                    // condition not fulfilled, continue with next element.
                    Debug.trace("not fulfilled.");
                    continue;
Solution content
        while (entriesIter != null && entriesIter.hasNext()) {
            IXMLElement regEntry = (IXMLElement) entriesIter.next();
            String condition = regEntry.getAttribute("condition");
            if (condition != null)
            {
                Debug.trace("condition " + condition + " found for registry entry.");
                if (!rules.isConditionTrue(condition))
                {
                    // condition not fulfilled, continue with next element.
                    Debug.trace("not fulfilled.");
                    continue;
File
RegistryInstallerListener.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
package com.izforge.izpack.gui;

<<<<<<< HEAD:src/lib/com/izforge/izpack/gui/LabelFactory.java
import javax.swing.Icon;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import java.awt.Font;
=======
import javax.swing.*;
import java.awt.*;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-gui/src/main/java/com/izforge/izpack/gui/LabelFactory.java

/**
 * 

Solution content
package com.izforge.izpack.gui;

import javax.swing.Icon;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import java.awt.*;

/**
 * 

File
LabelFactory.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
     * 
     * @return a copy of this TwoColumnConstraints
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/gui/TwoColumnConstraints.java
    @Override
    public Object clone()
    {
=======
    public Object clone() {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-gui/src/main/java/com/izforge/izpack/gui/TwoColumnConstraints.java
        TwoColumnConstraints newObject = new TwoColumnConstraints();

        newObject.position = position;
Solution content
     * 
     * @return a copy of this TwoColumnConstraints
     */
    @Override
    public Object clone()
    {
        TwoColumnConstraints newObject = new TwoColumnConstraints();

        newObject.position = position;
File
TwoColumnConstraints.java
Developer's decision
Version 1
Kind of conflict
Annotation
Method signature
Chunk
Conflicting content
     *            width.
     * @param alignment how to align the overall layout. Legal values are LEFT, CENTER, RIGHT.
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/gui/TwoColumnLayout.java
    public TwoColumnLayout(int margin, int gap, int indent, int topBuffer, int colWidth, int alignment)
    {
=======
    public TwoColumnLayout(int margin, int gap, int indent, int topBuffer, int alignment) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-gui/src/main/java/com/izforge/izpack/gui/TwoColumnLayout.java
        this.indent = indent;
        this.gap = gap;
        this.colWidth = colWidth;
Solution content
     *            width.
     * @param alignment how to align the overall layout. Legal values are LEFT, CENTER, RIGHT.
     */
    public TwoColumnLayout(int margin, int gap, int indent, int topBuffer, int colWidth, int alignment)
    {
        this.indent = indent;
        this.gap = gap;
        this.colWidth = colWidth;
File
TwoColumnLayout.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
        if (alignment == LEFT) {
            leftRule = margin;
            rightRule = parent.getWidth() - margin;
<<<<<<< HEAD:src/lib/com/izforge/izpack/gui/TwoColumnLayout.java
            if (colWidth > 0)
            {
                centerRule = leftRule + (rightRule - leftRule) / 100 * colWidth + gap;
            }
            else
            {
                centerRule = leftRule + minimumColumnWidth(LEFT, parent) + gap;
            }
        }
        else if (alignment == CENTER)
        {
            centerRule = (int) (parent.getMinimumSize().getWidth() / 2);
            leftRule = centerRule - minimumColumnWidth(LEFT, parent) - gap;
            rightRule = parent.getWidth() - margin;
        }
        else if (alignment == RIGHT)
        {
=======
        } else if (alignment == CENTER) {
            centerRule = (int) (parent.getMinimumSize().getWidth() / 2);
            leftRule = centerRule - minimumColumnWidth(LEFT, parent) - gap;
            rightRule = parent.getWidth() - margin;
        } else if (alignment == RIGHT) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-gui/src/main/java/com/izforge/izpack/gui/TwoColumnLayout.java
            rightRule = parent.getWidth() - margin;
            leftRule = centerRule - minimumColumnWidth(LEFT, parent) - gap;
            if (colWidth > 0)
Solution content
            else
            {
            }
        if (alignment == LEFT) {
            leftRule = margin;
            rightRule = parent.getWidth() - margin;
            if (colWidth > 0)
            {
                centerRule = leftRule + (rightRule - leftRule) / 100 * colWidth + gap;
                centerRule = leftRule + minimumColumnWidth(LEFT, parent) + gap;
            }
            centerRule = (int) (parent.getMinimumSize().getWidth() / 2);
            leftRule = centerRule - minimumColumnWidth(LEFT, parent) - gap;
            rightRule = parent.getWidth() - margin;
        } else if (alignment == RIGHT) {
            rightRule = parent.getWidth() - margin;
            leftRule = centerRule - minimumColumnWidth(LEFT, parent) - gap;
            if (colWidth > 0)
File
TwoColumnLayout.java
Developer's decision
Combination
Kind of conflict
Attribute
Cast expression
If statement
Method invocation
Chunk
Conflicting content
    private void positionComponent(int y, int row, int column, Container parent) {
        TwoColumnConstraints constraints = null;

<<<<<<< HEAD:src/lib/com/izforge/izpack/gui/TwoColumnLayout.java
        try
        {
            constraints = components[column].elementAt(row);
=======
        try {
            constraints = (TwoColumnConstraints) (components[column].elementAt(row));
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-gui/src/main/java/com/izforge/izpack/gui/TwoColumnLayout.java
        }
        catch (Throwable exception) {
            return;
Solution content
    private void positionComponent(int y, int row, int column, Container parent) {
        TwoColumnConstraints constraints = null;

        try {
            constraints = components[column].elementAt(row);
        }
        catch (Throwable exception) {
            return;
File
TwoColumnLayout.java
Developer's decision
Version 1
Kind of conflict
Cast expression
Method invocation
Try statement
Variable
Chunk
Conflicting content
            // set x to the appropriate rule. The only need to
            // modify this is for indent
            // --------------------------------------------------
<<<<<<< HEAD:src/lib/com/izforge/izpack/gui/TwoColumnLayout.java
            boolean stretchBool = constraints.stretch;
            boolean indentBool = constraints.indent;
            int align = constraints.align;
            if (constraints.position == TwoColumnConstraints.BOTH)
            {
                width = getWidth(leftRule, rightRule, stretchBool, indentBool, width);
                if (width > (rightRule - leftRule))
                {
                    stretchBool = true;
                }
                x = getPosition(leftRule, rightRule, stretchBool, indentBool, width, align);
            }
            else if (column == LEFT)
            {
                width = getWidth(leftRule, centerRule, stretchBool, indentBool, width);
                x = getPosition(leftRule, centerRule, stretchBool, indentBool, width, align);
            }
            else
            {
                width = getWidth(centerRule, rightRule, stretchBool, indentBool, width);
                x = getPosition(centerRule, rightRule, stretchBool, indentBool, width, align);
            }

            if (component != null)
            {
                component.setBounds(x, y, width, height);
            }
        }
    }

    private int getWidth(int left, int right, boolean stretch, boolean indent, int componentWidth)
    {
        int width = componentWidth;
        // --------------------------------------------------
        // set the width for stretch based on BOTH, LEFT and
        // RIGHT positioning
        // --------------------------------------------------
        if (stretch)
        {
            width = right - left;
        }
        // --------------------------------------------------
        // correct for indent if this option is set
        // --------------------------------------------------
        if (indent)
        {
            width -= this.indent;
        }
        return width;
    }
=======
            if (column == LEFT) {
                x = leftRule;
            } else {
                x = centerRule;
            }

            if (component != null) {
                // --------------------------------------------------
                // set the width for stretch based on BOTH, LEFT and
                // RIGHT positionsing
                // --------------------------------------------------
                if ((constraints.stretch) && (constraints.position == TwoColumnConstraints.BOTH)) {
                    width = rightRule - leftRule;
                    x = leftRule;
                } else if ((constraints.stretch) && (column == LEFT)) {
                    width = centerRule - leftRule;
                } else if ((constraints.stretch) && (column == RIGHT)) {
                    width = rightRule - centerRule;
                }

                // --------------------------------------------------
                // if we straddle both columns but are not stretching
                // use the preferred width as long as it is less then
                // the width of both columns combined. Also set the x
                // position to left, just to be sure.
                // --------------------------------------------------
                else if (constraints.position == TwoColumnConstraints.BOTH) {
                    if (width > (rightRule - leftRule)) {
                        width = rightRule - leftRule;
                    }
                    x = leftRule;
                }

                // --------------------------------------------------
                // correct for indent if this option is set
                // --------------------------------------------------
                if (constraints.indent) {
                    width -= indent;
                    x += indent;
                }
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-gui/src/main/java/com/izforge/izpack/gui/TwoColumnLayout.java

    private int getPosition(int left, int right, boolean stretch, boolean indent, int componentWidth, int align)
    {
Solution content
        // RIGHT positioning
            // set x to the appropriate rule. The only need to
            // modify this is for indent
            // --------------------------------------------------
            boolean stretchBool = constraints.stretch;
            boolean indentBool = constraints.indent;
            int align = constraints.align;
            if (constraints.position == TwoColumnConstraints.BOTH)
                width = getWidth(leftRule, rightRule, stretchBool, indentBool, width);
                if (width > (rightRule - leftRule))
                {
                    stretchBool = true;
                }
                x = getPosition(leftRule, rightRule, stretchBool, indentBool, width, align);
            }
            else if (column == LEFT)
            {
                width = getWidth(leftRule, centerRule, stretchBool, indentBool, width);
                x = getPosition(leftRule, centerRule, stretchBool, indentBool, width, align);
                width = getWidth(centerRule, rightRule, stretchBool, indentBool, width);
                x = getPosition(centerRule, rightRule, stretchBool, indentBool, width, align);
            }

            if (component != null) {
                component.setBounds(x, y, width, height);
            }
        }
    }

    private int getWidth(int left, int right, boolean stretch, boolean indent, int componentWidth)
    {
        int width = componentWidth;
        // --------------------------------------------------
        // set the width for stretch based on BOTH, LEFT and
        // --------------------------------------------------
        if (stretch)
        {
            width = right - left;
        }

        // --------------------------------------------------
        // correct for indent if this option is set
        // --------------------------------------------------
        if (indent)
        {
            width -= this.indent;
        }
        return width;
    }

    private int getPosition(int left, int right, boolean stretch, boolean indent, int componentWidth, int align)
    {
File
TwoColumnLayout.java
Developer's decision
Combination
Kind of conflict
Attribute
Comment
If statement
Method declaration
Variable
Chunk
Conflicting content
        int width = 0;
        int temp = 0;

<<<<<<< HEAD:src/lib/com/izforge/izpack/gui/TwoColumnLayout.java
        for (int i = 0; i < components[column].size(); i++)
        {
            constraints = components[column].elementAt(i);
=======
        for (int i = 0; i < components[column].size(); i++) {
            constraints = (TwoColumnConstraints) components[column].elementAt(i);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-gui/src/main/java/com/izforge/izpack/gui/TwoColumnLayout.java

            if ((constraints != null) && (constraints.position != TwoColumnConstraints.BOTH)) {
                component = constraints.component;
Solution content
        int width = 0;
        int temp = 0;

        for (int i = 0; i < components[column].size(); i++) {
            constraints = components[column].elementAt(i);

            if ((constraints != null) && (constraints.position != TwoColumnConstraints.BOTH)) {
                component = constraints.component;
File
TwoColumnLayout.java
Developer's decision
Version 1
Kind of conflict
Cast expression
For statement
Method invocation
Variable
Chunk
Conflicting content
            width = (int) component.getMinimumSize().getWidth();
        }

<<<<<<< HEAD:src/lib/com/izforge/izpack/gui/TwoColumnLayout.java
        for (int i = 0; i < components[LEFT].size(); i++)
        {
            constraints = components[LEFT].elementAt(i);
=======
        for (int i = 0; i < components[LEFT].size(); i++) {
            constraints = (TwoColumnConstraints) components[LEFT].elementAt(i);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-gui/src/main/java/com/izforge/izpack/gui/TwoColumnLayout.java

            if ((constraints != null) && (constraints.position == TwoColumnConstraints.BOTH)) {
                component = constraints.component;
Solution content
            width = (int) component.getMinimumSize().getWidth();
        }

        for (int i = 0; i < components[LEFT].size(); i++) {
            constraints = components[LEFT].elementAt(i);

            if ((constraints != null) && (constraints.position == TwoColumnConstraints.BOTH)) {
                component = constraints.component;
File
TwoColumnLayout.java
Developer's decision
Version 1
Kind of conflict
Cast expression
For statement
Method invocation
Variable
Chunk
Conflicting content
        Component component;
        TwoColumnConstraints constraints;

<<<<<<< HEAD:src/lib/com/izforge/izpack/gui/TwoColumnLayout.java
        try
        {
            constraints = components[column].elementAt(row);
            if (constraints != null)
            {
=======
        try {
            constraints = (TwoColumnConstraints) components[column].elementAt(row);
            if (constraints != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-gui/src/main/java/com/izforge/izpack/gui/TwoColumnLayout.java
                component = constraints.component;
                width = (int) component.getMinimumSize().getWidth();
                height = (int) component.getMinimumSize().getHeight();
Solution content
        Component component;
        TwoColumnConstraints constraints;

        try {
            constraints = components[column].elementAt(row);
            if (constraints != null) {
                component = constraints.component;
                width = (int) component.getMinimumSize().getWidth();
                height = (int) component.getMinimumSize().getHeight();
File
TwoColumnLayout.java
Developer's decision
Version 1
Kind of conflict
Cast expression
If statement
Method invocation
Try statement
Variable
Chunk
Conflicting content
     * 
     * @param comp the component to be removed
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/gui/TwoColumnLayout.java
    public void removeLayoutComponent(Component comp)
    {
        Vector left = components[LEFT];
        Vector right = components[RIGHT];

        for (int i = 0; i < left.size(); i++)
        {
            TwoColumnConstraints constraints = left.get(i);
            if (constraints == null)
            {
                continue;
            }
            Component ctemp = constraints.component;
            if (ctemp != null && ctemp.equals(comp))
            {
                if (constraints.position == TwoColumnConstraints.BOTH
                        || constraints.position == TwoColumnConstraints.WESTONLY)
                {
=======
    public void removeLayoutComponent(Component comp) {
        Vector left = components[LEFT];
        Vector right = components[RIGHT];

        for (int i = 0; i < left.size(); i++) {
            TwoColumnConstraints constraints = (TwoColumnConstraints) left.get(i);
            if (constraints == null) {
                continue;
            }
            Component ctemp = constraints.component;
            if (ctemp != null && ctemp.equals(comp)) {
                if (constraints.position == TwoColumnConstraints.BOTH || constraints.position == TwoColumnConstraints.WESTONLY) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-gui/src/main/java/com/izforge/izpack/gui/TwoColumnLayout.java
                    right.remove(i);
                }
                break;
Solution content
     * 
     * @param comp the component to be removed
     */
    public void removeLayoutComponent(Component comp) {
        Vector left = components[LEFT];
        Vector right = components[RIGHT];

        for (int i = 0; i < left.size(); i++) {
            TwoColumnConstraints constraints = left.get(i);
            if (constraints == null) {
                continue;
            }
            Component ctemp = constraints.component;
            if (ctemp != null && ctemp.equals(comp))
            {
                if (constraints.position == TwoColumnConstraints.BOTH
                        || constraints.position == TwoColumnConstraints.WESTONLY)
                {
                    right.remove(i);
                }
                break;
File
TwoColumnLayout.java
Developer's decision
Version 1
Kind of conflict
Array access
Cast expression
For statement
If statement
Method invocation
Method signature
Variable
Chunk
Conflicting content
            }
        }

<<<<<<< HEAD:src/lib/com/izforge/izpack/gui/TwoColumnLayout.java
        for (int j = 0; j < right.size(); j++)
        {
            TwoColumnConstraints constraints = right.get(j);
            if (constraints == null)
            {
                continue;
            }
            Component ctemp = constraints.component;
            if (ctemp != null && ctemp.equals(comp))
            {
                if (constraints.position == TwoColumnConstraints.BOTH
                        || constraints.position == TwoColumnConstraints.EASTONLY)
                {
=======
        for (int j = 0; j < right.size(); j++) {
            TwoColumnConstraints constraints = (TwoColumnConstraints) right.get(j);
            if (constraints == null) {
                continue;
            }
            Component ctemp = constraints.component;
            if (ctemp != null && ctemp.equals(comp)) {
                if (constraints.position == TwoColumnConstraints.BOTH || constraints.position == TwoColumnConstraints.EASTONLY) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-gui/src/main/java/com/izforge/izpack/gui/TwoColumnLayout.java
                    left.remove(j);
                }
                break;
Solution content
            }
        }

        for (int j = 0; j < right.size(); j++) {
            TwoColumnConstraints constraints = right.get(j);
            if (constraints == null) {
                continue;
            }
            Component ctemp = constraints.component;
            if (ctemp != null && ctemp.equals(comp))
            {
                if (constraints.position == TwoColumnConstraints.BOTH
                        || constraints.position == TwoColumnConstraints.EASTONLY)
                {
                    left.remove(j);
                }
                break;
File
TwoColumnLayout.java
Developer's decision
Version 1
Kind of conflict
Cast expression
For statement
If statement
Method invocation
Variable
Chunk
Conflicting content
                    .append(installData.getLangpack().getString(MESSAGE_PREFIX
                            + Integer.toString(record.message),
                            record.variables));
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/Log.java
        }
        else
        {
=======
        } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-gui/src/main/java/com/izforge/izpack/gui/log/Log.java
            message.append(MessageFormat.format(record.template, (Object[]) record.variables));
        }
Solution content
                    .append(installData.getLangpack().getString(MESSAGE_PREFIX
                            + Integer.toString(record.message),
                            record.variables));
        } else {
            message.append(MessageFormat.format(record.template, (Object[]) record.variables));
        }
File
Log.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
                    .append(installData.getLangpack().getString(WARNING_PREFIX
                            + Integer.toString(record.message - LogWarning.WARNING_BASE),
                            record.variables));
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/Log.java
        }
        else
        {
=======
        } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-gui/src/main/java/com/izforge/izpack/gui/log/Log.java
            message.append(MessageFormat.format(record.template, (Object[]) record.variables));
        }
Solution content
                    .append(installData.getLangpack().getString(WARNING_PREFIX
                            + Integer.toString(record.message - LogWarning.WARNING_BASE),
                            record.variables));
        } else {
            message.append(MessageFormat.format(record.template, (Object[]) record.variables));
        }
File
Log.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
        if (record.message >= 0) {
            message.append(installData.getLangpack().getString(ERROR_PREFIX
                    + Integer.toString(record.message - LogError.ERROR_BASE), record.variables));
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/Log.java
        }
        else
        {
=======
        } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-gui/src/main/java/com/izforge/izpack/gui/log/Log.java
            message.append(MessageFormat.format(record.template, (Object[]) record.variables));
        }
Solution content
        if (record.message >= 0) {
            message.append(installData.getLangpack().getString(ERROR_PREFIX
                    + Integer.toString(record.message - LogError.ERROR_BASE), record.variables));
        } else {
            message.append(MessageFormat.format(record.template, (Object[]) record.variables));
        }
File
Log.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
 * limitations under the License.
 */

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/AutomatedInstaller.java
package com.izforge.izpack.installer;

import com.izforge.izpack.*;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.IXMLParser;
import com.izforge.izpack.adaptator.impl.XMLParser;
import com.izforge.izpack.installer.DataValidator.Status;
import com.izforge.izpack.util.*;
=======
package com.izforge.izpack.installer.automation;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
import com.izforge.izpack.api.adaptator.impl.XMLParser;
import com.izforge.izpack.api.data.*;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.api.installer.DataValidator;
import com.izforge.izpack.api.installer.DataValidator.Status;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.data.PanelAction;
import com.izforge.izpack.installer.base.InstallerBase;
import com.izforge.izpack.installer.console.ConsolePanelAutomationHelper;
import com.izforge.izpack.installer.data.UninstallDataWriter;
import com.izforge.izpack.installer.language.ConditionCheck;
import com.izforge.izpack.installer.manager.DataValidatorFactory;
import com.izforge.izpack.installer.manager.PanelActionFactory;
import com.izforge.izpack.util.AbstractUIHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.Housekeeper;
import com.izforge.izpack.util.OsConstraint;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/automation/AutomatedInstaller.java

import java.io.File;
import java.io.FileInputStream;
Solution content
 * limitations under the License.
 */

package com.izforge.izpack.installer.automation;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
import com.izforge.izpack.api.adaptator.impl.XMLParser;
import com.izforge.izpack.api.data.*;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.api.installer.DataValidator;
import com.izforge.izpack.api.installer.DataValidator.Status;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.data.PanelAction;
import com.izforge.izpack.installer.base.InstallerBase;
import com.izforge.izpack.installer.console.ConsolePanelAutomationHelper;
import com.izforge.izpack.installer.data.UninstallDataWriter;
import com.izforge.izpack.installer.language.ConditionCheck;
import com.izforge.izpack.installer.manager.DataValidatorFactory;
import com.izforge.izpack.installer.manager.PanelActionFactory;
import com.izforge.izpack.util.AbstractUIHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.Housekeeper;
import com.izforge.izpack.util.OsConstraint;

import java.io.File;
import java.io.FileInputStream;
File
AutomatedInstaller.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
            if (idata.isRebootNecessary())
            {
                System.out.println("[ There are file operations pending after reboot ]");
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/AutomatedInstaller.java
                switch (idata.info.getRebootAction())
=======
                switch (idata.getInfo().getRebootAction())
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/automation/AutomatedInstaller.java
                {
                    case Info.REBOOT_ACTION_ALWAYS:
                        reboot = true;
Solution content
            if (idata.isRebootNecessary())
            {
                System.out.println("[ There are file operations pending after reboot ]");
                switch (idata.getInfo().getRebootAction())
                {
                    case Info.REBOOT_ACTION_ALWAYS:
                        reboot = true;
File
AutomatedInstaller.java
Developer's decision
Version 2
Kind of conflict
Switch statement
Chunk
Conflicting content
     * @param p                The panel to install.
     * @param automationHelper The helper of the panel.
     * @param panelRoot        The xml element describing the panel.
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/AutomatedInstaller.java
     * @throws InstallerException if something went wrong while installing.
=======
     * @throws com.izforge.izpack.api.exception.InstallerException
     *          if something went wrong while installing.
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/automation/AutomatedInstaller.java
     */
    private void installPanel(Panel p, PanelAutomation automationHelper, IXMLElement panelRoot) throws InstallerException
    {
Solution content
     * @param p                The panel to install.
     * @param automationHelper The helper of the panel.
     * @param panelRoot        The xml element describing the panel.
     * @throws com.izforge.izpack.api.exception.InstallerException
     *          if something went wrong while installing.
     */
    private void installPanel(Panel p, PanelAutomation automationHelper, IXMLElement panelRoot) throws InstallerException
    {
File
AutomatedInstaller.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
    * @see com.izforge.izpack.util.AbstractUIHandler#emitErrorAndBlockNext(java.lang.String,
    * java.lang.String)
    */
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/PanelAutomationHelper.java
    public void emitErrorAndBlockNext(String title, String message)
    {
=======

    public void emitErrorAndBlockNext(String title, String message) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/automation/PanelAutomationHelper.java
        emitError(title, message);
        Housekeeper.getInstance().shutDown(10);
    }
Solution content
    * @see com.izforge.izpack.util.AbstractUIHandler#emitErrorAndBlockNext(java.lang.String,
    * java.lang.String)
    */

    public void emitErrorAndBlockNext(String title, String message) {
        emitError(title, message);
        Housekeeper.getInstance().shutDown(10);
    }
File
PanelAutomationHelper.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/GUIListener.java

package com.izforge.izpack.installer;
=======
package com.izforge.izpack.installer.base;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/GUIListener.java


/**
Solution content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.installer.base;


/**
File
GUIListener.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 * 
 * http://izpack.org/
    }

    /**
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/HelpWindow.java
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyrght 2008 Patrick Zbinden.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.panels;

import com.izforge.izpack.util.Debug;

import javax.swing.*;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.net.URL;

/**
 * Common HTML Help Window (modal)
 */
public class HelpWindow extends JDialog implements HyperlinkListener, ActionListener
{

    /**
     * Helps information
     */
    public final static String HELP_TAG = "help";

    public final static String ISO3_ATTRIBUTE = "iso3";

    public final static String SRC_ATTRIBUTE = "src";

    private static final long serialVersionUID = -357544689286217809L;

    private JPanel contentPane = null;

    private JEditorPane htmlHelp = null;

    private JButton closeButton = null;

    private JScrollPane scrollPane = null;

    private String closeButtonText = "Close";

    /**
     * This is the default constructor
     *
     * @param owner           - owner Frame
     * @param closeButtonText - Button Text for Close button
     */
    public HelpWindow(Frame owner, String closeButtonText)
    {
        super(owner, true);
        this.closeButtonText = closeButtonText;
        initialize();
    }

    /**
     * This method initializes Help Dialog
     */
    private void initialize()
    {
        this.setSize(600, 400);
        this.setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE);
        this.setContentPane(getJContentPane());
    }

    /**
     * This method initializes jContentPane
     *
     * @return javax.swing.JPanel
     */
    private JPanel getJContentPane()
    {
        if (contentPane == null)
        {
            contentPane = new JPanel();
            contentPane.setLayout(new BoxLayout(getJContentPane(), BoxLayout.Y_AXIS));
            contentPane.add(getScrollPane(), null);
            contentPane.add(getCloseButton(), null);
        }
        return contentPane;
    }

    /**
     * This method initializes _htmlHelp
     *
     * @return javax.swing.JEditorPane
     */
    private JEditorPane getHtmlHelp()
    {
        if (htmlHelp == null)
        {
            try
            {
                htmlHelp = new JEditorPane();
                htmlHelp.setContentType("text/html"); // Generated
                htmlHelp.setEditable(false);
                htmlHelp.addHyperlinkListener(this);
            }
            catch (java.lang.Throwable e)
            {
                Debug.log(e.getLocalizedMessage());
            }
        }
        return htmlHelp;
    }

    private JScrollPane getScrollPane()
    {
        if (scrollPane == null)
        {
            try
            {
                scrollPane = new JScrollPane(getHtmlHelp());
            }
            catch (java.lang.Throwable e)
            {
                Debug.log(e.getLocalizedMessage());
            }
        }
        return scrollPane;
    }

    /**
     * This method initializes _btnClose
     *
     * @return javax.swing.JButton
     */
    private JButton getCloseButton()
    {
        if (closeButton == null)
        {
            try
            {
                closeButton = new JButton(closeButtonText);
                closeButton.setAlignmentX(CENTER_ALIGNMENT);
                closeButton.addActionListener(this);
            }
            catch (java.lang.Throwable e)
            {
                Debug.log(e.getLocalizedMessage());
            }
        }
        return closeButton;
    }

    public void hyperlinkUpdate(HyperlinkEvent e)
    {
        try
        {
            if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED)
            {
                getHtmlHelp().setPage(e.getURL());
            }
        }
        catch (Exception err)
        {
            // Ignore exceptions
        }
    }

    /**
     * displays Help Text in a modal window
     *
     * @param title
     * @param helpDocument
     */
    public void showHelp(String title, URL helpDocument)
    {
        this.setTitle(title);
        try
        {
            getHtmlHelp().setPage(helpDocument);
        }
        catch (IOException e)
        {
            Debug.log(e.getLocalizedMessage());
        }
        setVisible(true);
    }

    public void actionPerformed(ActionEvent e)
    {
        // Close button pressed
        this.setVisible(false);
    }
}
=======
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 * http://izpack.codehaus.org/
 * 
 * Copyrght 2008 Patrick Zbinden.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.installer.base;

import com.izforge.izpack.util.Debug;

import javax.swing.*;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.net.URL;

/**
 * Common HTML Help Window (modal)
 */
public class HelpWindow extends JDialog implements HyperlinkListener, ActionListener {

    private static final long serialVersionUID = -357544689286217809L;

    private JPanel contentPane = null;

    private JEditorPane htmlHelp = null;

    private JButton closeButton = null;

    private JScrollPane scrollPane = null;

    private String closeButtonText = "Close";

    /**
     * This is the default constructor
     *
     * @param owner           - owner Frame
     * @param closeButtonText - Button Text for Close button
     */
    public HelpWindow(Frame owner, String closeButtonText) {
        super(owner, true);
        this.closeButtonText = closeButtonText;
        initialize();
    }

    /**
     * This method initializes Help Dialog
     */
    private void initialize() {
        this.setSize(600, 400);
        this.setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE);
        this.setContentPane(getJContentPane());
    }

    /**
     * This method initializes jContentPane
     *
     * @return javax.swing.JPanel
     */
    private JPanel getJContentPane() {
        if (contentPane == null) {
            contentPane = new JPanel();
            contentPane.setLayout(new BoxLayout(getJContentPane(), BoxLayout.Y_AXIS));
            contentPane.add(getScrollPane(), null);
            contentPane.add(getCloseButton(), null);
        }
        return contentPane;
     * This method initializes _htmlHelp
     *
     * @return javax.swing.JEditorPane
     */
    private JEditorPane getHtmlHelp() {
        if (htmlHelp == null) {
            try {
                htmlHelp = new JEditorPane();
                htmlHelp.setContentType("text/html"); // Generated
                htmlHelp.setEditable(false);
                htmlHelp.addHyperlinkListener(this);
            }
            catch (java.lang.Throwable e) {
                Debug.log(e.getLocalizedMessage());
            }
        }
        return htmlHelp;
    }

    private JScrollPane getScrollPane() {
        if (scrollPane == null) {
            try {
                scrollPane = new JScrollPane(getHtmlHelp());
            }
            catch (java.lang.Throwable e) {
                Debug.log(e.getLocalizedMessage());
            }
        }
        return scrollPane;
    }

    /**
     * This method initializes _btnClose
     *
     * @return javax.swing.JButton
     */
    private JButton getCloseButton() {
        if (closeButton == null) {
            try {
                closeButton = new JButton(closeButtonText);
                closeButton.setAlignmentX(CENTER_ALIGNMENT);
                closeButton.addActionListener(this);
            }
            catch (java.lang.Throwable e) {
                Debug.log(e.getLocalizedMessage());
            }
        }
        return closeButton;
    }

    public void hyperlinkUpdate(HyperlinkEvent e) {
        try {
            if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                getHtmlHelp().setPage(e.getURL());
            }
        }
        catch (Exception err) {
            // Ignore exceptions
        }
    }

    /**
     * displays Help Text in a modal window
     *
     * @param title
     * @param helpDocument
     */
    public void showHelp(String title, URL helpDocument) {
        this.setTitle(title);
        try {
            getHtmlHelp().setPage(helpDocument);
        }
        catch (IOException e) {
            Debug.log(e.getLocalizedMessage());
        }
        setVisible(true);
    }

    public void actionPerformed(ActionEvent e) {
        // Close button pressed
        this.setVisible(false);
    }
}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/HelpWindow.java
Solution content
import java.awt.Frame;

/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyrght 2008 Patrick Zbinden.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.installer.base;

import com.izforge.izpack.util.Debug;

import javax.swing.*;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.net.URL;

/**
 * Common HTML Help Window (modal)
 */
public class HelpWindow extends JDialog implements HyperlinkListener, ActionListener {

    private static final long serialVersionUID = -357544689286217809L;

    private JPanel contentPane = null;

    private JEditorPane htmlHelp = null;

    private JButton closeButton = null;

    private JScrollPane scrollPane = null;

    private String closeButtonText = "Close";

    /**
     * This is the default constructor
     *
     * @param owner           - owner Frame
     * @param closeButtonText - Button Text for Close button
     */
    public HelpWindow(Frame owner, String closeButtonText) {
        super(owner, true);
        this.closeButtonText = closeButtonText;
        initialize();
    }

    /**
     * This method initializes Help Dialog
     */
    private void initialize() {
        this.setSize(600, 400);
        this.setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE);
        this.setContentPane(getJContentPane());
    }

    /**
     * This method initializes jContentPane
     *
     * @return javax.swing.JPanel
     */
    private JPanel getJContentPane() {
        if (contentPane == null) {
            contentPane = new JPanel();
            contentPane.setLayout(new BoxLayout(getJContentPane(), BoxLayout.Y_AXIS));
            contentPane.add(getScrollPane(), null);
            contentPane.add(getCloseButton(), null);
        }
        return contentPane;
    }

    /**
     * This method initializes _htmlHelp
     *
     * @return javax.swing.JEditorPane
     */
    private JEditorPane getHtmlHelp() {
        if (htmlHelp == null) {
            try {
                htmlHelp = new JEditorPane();
                htmlHelp.setContentType("text/html"); // Generated
                htmlHelp.setEditable(false);
                htmlHelp.addHyperlinkListener(this);
            }
            catch (java.lang.Throwable e) {
                Debug.log(e.getLocalizedMessage());
            }
        }
        return htmlHelp;
    }

    private JScrollPane getScrollPane() {
        if (scrollPane == null) {
            try {
                scrollPane = new JScrollPane(getHtmlHelp());
            }
            catch (java.lang.Throwable e) {
                Debug.log(e.getLocalizedMessage());
            }
        }
        return scrollPane;
    }

    /**
     * This method initializes _btnClose
     *
     * @return javax.swing.JButton
     */
    private JButton getCloseButton() {
        if (closeButton == null) {
            try {
                closeButton = new JButton(closeButtonText);
                closeButton.setAlignmentX(CENTER_ALIGNMENT);
                closeButton.addActionListener(this);
            }
            catch (java.lang.Throwable e) {
                Debug.log(e.getLocalizedMessage());
            }
        }
        return closeButton;
    }
    public void hyperlinkUpdate(HyperlinkEvent e) {
        try {
            if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
                getHtmlHelp().setPage(e.getURL());
            }
        }
        catch (Exception err) {
            // Ignore exceptions
        }
    }

    /**
     * displays Help Text in a modal window
     *
     * @param title
     * @param helpDocument
     */
    public void showHelp(String title, URL helpDocument) {
        this.setTitle(title);
        try {
            getHtmlHelp().setPage(helpDocument);
        }
        catch (IOException e) {
            Debug.log(e.getLocalizedMessage());
        }
        setVisible(true);
    }

    public void actionPerformed(ActionEvent e) {
        // Close button pressed
        this.setVisible(false);
    }
}
File
HelpWindow.java
Developer's decision
Combination
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
 * limitations under the License.
 */

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java
package com.izforge.izpack.installer;

import com.izforge.izpack.*;
import com.izforge.izpack.Panel;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.IXMLParser;
import com.izforge.izpack.adaptator.IXMLWriter;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.adaptator.impl.XMLParser;
import com.izforge.izpack.adaptator.impl.XMLWriter;
import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.gui.EtchedLineBorder;
import com.izforge.izpack.gui.IconsDatabase;
import com.izforge.izpack.rules.RulesEngine;
import com.izforge.izpack.util.*;
=======
package com.izforge.izpack.installer.base;
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLWriter;
import com.izforge.izpack.api.adaptator.impl.XMLWriter;
import com.izforge.izpack.api.data.Info;
import com.izforge.izpack.api.data.LocaleDatabase;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.api.exception.ResourceNotFoundException;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.gui.EtchedLineBorder;
import com.izforge.izpack.gui.IconsDatabase;
import com.izforge.izpack.gui.log.Log;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.installer.data.UninstallData;
import com.izforge.izpack.installer.data.UninstallDataWriter;
import com.izforge.izpack.installer.debugger.Debugger;
import com.izforge.izpack.installer.manager.PanelManager;
import com.izforge.izpack.installer.unpacker.IUnpacker;
import com.izforge.izpack.installer.unpacker.Unpacker;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.Housekeeper;
import com.izforge.izpack.util.substitutor.VariableSubstitutorImpl;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java

import javax.swing.*;
import javax.swing.border.TitledBorder;
Solution content
 * limitations under the License.
 */

package com.izforge.izpack.installer.base;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLWriter;
import com.izforge.izpack.api.adaptator.impl.XMLWriter;
import com.izforge.izpack.api.data.Info;
import com.izforge.izpack.api.data.LocaleDatabase;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.api.exception.ResourceNotFoundException;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.gui.EtchedLineBorder;
import com.izforge.izpack.gui.IconsDatabase;
import com.izforge.izpack.gui.log.Log;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.installer.data.UninstallData;
import com.izforge.izpack.installer.data.UninstallDataWriter;
import com.izforge.izpack.installer.debugger.Debugger;
import com.izforge.izpack.installer.manager.PanelManager;
import com.izforge.izpack.installer.unpacker.IUnpacker;
import com.izforge.izpack.installer.unpacker.Unpacker;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.Housekeeper;
import com.izforge.izpack.util.substitutor.VariableSubstitutorImpl;

import javax.swing.*;
import javax.swing.border.TitledBorder;
File
InstallerFrame.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
import javax.swing.text.JTextComponent;
import java.awt.*;
import java.awt.event.*;
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java
import java.io.*;
import java.lang.reflect.Constructor;
import java.net.URL;
import java.util.*;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;
import java.util.zip.ZipOutputStream;
=======
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import static com.izforge.izpack.api.GuiId.*;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java

/**
 * The IzPack installer frame.
Solution content
import javax.swing.text.JTextComponent;
import java.awt.*;
import java.awt.event.*;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import static com.izforge.izpack.api.GuiId.*;

/**
 * The IzPack installer frame.
File
InstallerFrame.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
    /**
     * The constructor (normal mode).
     *
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java
     * @param title       The window title.
     * @param installdata The installation data.
=======
     * @param variableSubstitutor
     * @param uninstallData
     * @param title               The window title.
     * @param installdata         The installation data.
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java
     * @throws Exception Description of the Exception
     */
    public InstallerFrame(String title, GUIInstallData installdata, RulesEngine rules, IconsDatabase icons, PanelManager panelManager, UninstallDataWriter uninstallDataWriter, ResourceManager resourceManager, VariableSubstitutor variableSubstitutor, UninstallData uninstallData)
Solution content
    /**
     * The constructor (normal mode).
     *
     * @param variableSubstitutor
     * @param uninstallData
     * @param title               The window title.
     * @param installdata         The installation data.
     * @throws Exception Description of the Exception
     */
    public InstallerFrame(String title, GUIInstallData installdata, RulesEngine rules, IconsDatabase icons, PanelManager panelManager, UninstallDataWriter uninstallDataWriter, ResourceManager resourceManager, VariableSubstitutor variableSubstitutor, UninstallData uninstallData)
File
InstallerFrame.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
    }

    /**
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java
     * Loads the panels.
     *
     * @throws Exception Description of the Exception
=======
     * Search and construct all necessary panels, prepare and size the frame.
     *
     * @return The frame for fluent interface
     * @throws ClassNotFoundException
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java
     */
    public InstallerFrame loadPanels() throws ClassNotFoundException
    {
Solution content
    }

    /**
     * Search and construct all necessary panels, prepare and size the frame.
     *
     * @return The frame for fluent interface
     * @throws ClassNotFoundException
     */
    public InstallerFrame loadPanels() throws ClassNotFoundException
    {
File
InstallerFrame.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
            }
     */
    public InstallerFrame loadPanels() throws ClassNotFoundException
    {
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java
        // Initialisation
        java.util.List panelsOrder = installdata.panelsOrder;
        int i;
        int size = panelsOrder.size();
        String className;
        Class objectClass;
        Constructor constructor;
        Object object;
        IzPanel panel;
        Class[] paramsClasses = new Class[2];
        paramsClasses[0] = Class.forName("com.izforge.izpack.installer.InstallerFrame");
        paramsClasses[1] = Class.forName("com.izforge.izpack.installer.InstallData");
        Object[] params = {this, installdata};

        // We load each of them
        int curVisPanelNumber = 0;
        int lastVis = 0;
        int count = 0;
        for (i = 0; i < size; i++)
        {
            // We add the panel
            Panel p = panelsOrder.get(i);
            if (!OsConstraint.oneMatchesCurrentSystem(p.osConstraints))
            {
                continue;
            className = p.className;
            String praefix = "com.izforge.izpack.panels.";
            if (className.indexOf('.') > -1)
            // Full qualified class name
            {
                praefix = "";
            }
            objectClass = Class.forName(praefix + className);
            constructor = objectClass.getDeclaredConstructor(paramsClasses);
            installdata.currentPanel = p; // A hack to use meta data in IzPanel constructor
            // Do not call constructor of IzPanel or it's derived at an other place else
            // metadata will be not set.
            List preConstgructionActions = p.getPreConstructionActions();
            if (preConstgructionActions != null)
            {
                for (int actionIndex = 0; actionIndex < preConstgructionActions.size(); actionIndex++)
                {
                    PanelAction action = PanelActionFactory
                            .createPanelAction(preConstgructionActions.get(actionIndex));
                    action.initialize(p.getPanelActionConfiguration(preConstgructionActions
                            .get(actionIndex)));
                    action.executeAction(AutomatedInstallData.getInstance(), null);
                }
            }
            object = constructor.newInstance(params);
            panel = (IzPanel) object;
            String dataValidator = p.getValidator();
            if (dataValidator != null)
            {
                panel.setValidationService(DataValidatorFactory.createDataValidator(dataValidator));
            }

            panel.setHelps(p.getHelpsMap());

            List preActivateActions = p.getPreActivationActions();
            if (preActivateActions != null)
            {
                for (int actionIndex = 0; actionIndex < preActivateActions.size(); actionIndex++)
                {
                    String panelActionClass = preActivateActions.get(actionIndex);
                    PanelAction action = PanelActionFactory.createPanelAction(panelActionClass);
                    action.initialize(p.getPanelActionConfiguration(panelActionClass));
                    panel.addPreActivationAction(action);
                }
            }
            List preValidateActions = p.getPreValidationActions();
            if (preValidateActions != null)
            {
                for (int actionIndex = 0; actionIndex < preValidateActions.size(); actionIndex++)
                {
                    String panelActionClass = preValidateActions.get(actionIndex);
                    PanelAction action = PanelActionFactory.createPanelAction(panelActionClass);
                    action.initialize(p.getPanelActionConfiguration(panelActionClass));
                    panel.addPreValidationAction(action);
                }
            }
            List postValidateActions = p.getPostValidationActions();
            if (postValidateActions != null)
            {
                for (int actionIndex = 0; actionIndex < postValidateActions.size(); actionIndex++)
                {
                    String panelActionClass = postValidateActions.get(actionIndex);
                    PanelAction action = PanelActionFactory.createPanelAction(panelActionClass);
                    action.initialize(p.getPanelActionConfiguration(panelActionClass));
                    panel.addPostValidationAction(action);
                }
            }

            installdata.panels.add(panel);
            if (panel.isHidden())
            {
                visiblePanelMapping.add(count, -1);
            }
            else
            {
                visiblePanelMapping.add(count, curVisPanelNumber);
                curVisPanelNumber++;
                lastVis = count;
            }
            count++;
            // We add the XML data panel root
            IXMLElement panelRoot = new XMLElementImpl(className, installdata.xmlData);
            // if set, we add the id as an attribute to the panelRoot
            String panelId = p.getPanelid();
            if (panelId != null)
            {
                panelRoot.setAttribute("id", panelId);
            }
            installdata.xmlData.addChild(panelRoot);
        }
        visiblePanelMapping.add(count, lastVis);
    }

    /**
     * Loads the icons.
     *
     * @throws Exception Description of the Exception
     */
    private void loadIcons() throws Exception
=======
        panelManager.loadPanelsInContainer();
        panelManager.instanciatePanels();
        buildGUI();
        sizeFrame();
        return this;
    }

    public void enableFrame()
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java
    {
        // We show the frame
        showFrame();
Solution content
     */
    public InstallerFrame loadPanels() throws ClassNotFoundException
    {
        panelManager.loadPanelsInContainer();
        panelManager.instanciatePanels();
        buildGUI();
        sizeFrame();
        return this;
    }

    public void enableFrame()
    {
        // We show the frame
        showFrame();
File
InstallerFrame.java
Developer's decision
Version 2
Kind of conflict
Array access
Array initializer
Attribute
Comment
For statement
Method invocation
Method signature
Return statement
Variable
Chunk
Conflicting content
        switchPanel(0);
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java
    /**
     * Loads custom icons into the installer.
     *
     * @throws Exception
     */
    protected void loadCustomIcons() throws Exception
=======
    public Debugger getDebugger()
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java
    {
        return this.debugger;
    }
Solution content
        switchPanel(0);
    }

    public Debugger getDebugger()
    {
        return this.debugger;
    }
File
InstallerFrame.java
Developer's decision
Version 2
Kind of conflict
Comment
Method signature
Chunk
Conflicting content
            Log.getInstance().addDebugMessage(
                    "InstallerFrame.switchPanel: try switching panel from {0} to {1} ({2} to {3})",
                    new String[]{l_panel.getClass().getName(), panel.getClass().getName(),
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java
                            Integer.toString(last), Integer.toString(installdata.curPanelNumber)},
                    DebugConstants.PANEL_TRACE, null);
=======
                            Integer.toString(last), Integer.toString(installdata.getCurPanelNumber())},
                    Log.PANEL_TRACE, null);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java

            // instead of writing data here which leads to duplicated entries in
            // auto-installation script (bug # 4551), let's make data only immediately before
Solution content
            Log.getInstance().addDebugMessage(
                    "InstallerFrame.switchPanel: try switching panel from {0} to {1} ({2} to {3})",
                    new String[]{l_panel.getClass().getName(), panel.getClass().getName(),
                            Integer.toString(last), Integer.toString(installdata.getCurPanelNumber())},
                    Log.PANEL_TRACE, null);

            // instead of writing data here which leads to duplicated entries in
            // auto-installation script (bug # 4551), let's make data only immediately before
File
InstallerFrame.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
                    getRootPane().setDefaultButton(cdb);
                    Log.getInstance().addDebugMessage(
                            "InstallerFrame.switchPanel: setting {0} as default button",
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java
                            new String[]{buttonName}, DebugConstants.PANEL_TRACE, null);
=======
                            new String[]{buttonName}, Log.PANEL_TRACE, null);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java
                }
            });
Solution content
                    getRootPane().setDefaultButton(cdb);
                    Log.getInstance().addDebugMessage(
                            "InstallerFrame.switchPanel: setting {0} as default button",
                            new String[]{buttonName}, Log.PANEL_TRACE, null);
                }
            });
File
InstallerFrame.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
                idx++;
            isBack = false;
            }
            callGUIListener(GUIListener.PANEL_SWITCHED);
            Log.getInstance().addDebugMessage("InstallerFrame.switchPanel: switched", null,
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java
                    DebugConstants.PANEL_TRACE, null);
        }
        catch (Exception err)
        {
            err.printStackTrace();
        }
    }

    /**
     * Writes the uninstalldata.
     */
    private void writeUninstallData()
    {
        // Show whether a separated logfile should be also written or not.
        String logfile = installdata.getVariable("InstallerFrame.logfilePath");
        BufferedWriter extLogWriter = null;
        if (logfile != null)
        {
            if (logfile.toLowerCase().startsWith("default"))
            {
                logfile = installdata.info.getUninstallerPath() + "/install.log";
            }
            logfile = IoHelper.translatePath(logfile, new VariableSubstitutor(installdata
                    .getVariables()));
            File outFile = new File(logfile);
            if (!outFile.getParentFile().exists())
            {
                outFile.getParentFile().mkdirs();
            }
            FileOutputStream out = null;
            try
            {
                out = new FileOutputStream(outFile);
            }
            catch (FileNotFoundException e)
            {
                Debug.trace("Cannot create logfile!");
                Debug.error(e);
            }
            if (out != null)
            {
                extLogWriter = new BufferedWriter(new OutputStreamWriter(out));
            }
        }
        try
        {
            String condition = installdata.getVariable("UNINSTALLER_CONDITION");
            if (condition != null)
            {
                if (!RulesEngine.getCondition(condition).isTrue())
                {
                    // condition for creating the uninstaller is not fulfilled.
                    return;
                }
            }
            // We get the data
            UninstallData udata = UninstallData.getInstance();
            List files = udata.getUninstalableFilesList();
            ZipOutputStream outJar = installdata.uninstallOutJar;

            if (outJar == null)
            {
                return;
            }

            // We write the files log
            outJar.putNextEntry(new ZipEntry("install.log"));
            BufferedWriter logWriter = new BufferedWriter(new OutputStreamWriter(outJar));
            logWriter.write(installdata.getInstallPath());
            logWriter.newLine();
            Iterator iter = files.iterator();
            if (extLogWriter != null)
            { // Write intern (in uninstaller.jar) and extern log file.
                while (iter.hasNext())
                {
                    String txt = (String) iter.next();
                    logWriter.write(txt);
                    extLogWriter.write(txt);
                    if (iter.hasNext())
                    {
                        logWriter.newLine();
                        extLogWriter.newLine();
                    }
                }
                logWriter.flush();
                extLogWriter.flush();
                extLogWriter.close();
            }
            else
            {
                while (iter.hasNext())
                {
                    logWriter.write((String) iter.next());
                    if (iter.hasNext())
                    {
                        logWriter.newLine();
                    }
                }
                logWriter.flush();
            }
            outJar.closeEntry();

            // We write the uninstaller jar file log
            outJar.putNextEntry(new ZipEntry("jarlocation.log"));
            logWriter = new BufferedWriter(new OutputStreamWriter(outJar));
            logWriter.write(udata.getUninstallerJarFilename());
            logWriter.newLine();
            logWriter.write(udata.getUninstallerPath());
            logWriter.flush();
            outJar.closeEntry();

            // Write out executables to execute on uninstall
            outJar.putNextEntry(new ZipEntry("executables"));
            ObjectOutputStream execStream = new ObjectOutputStream(outJar);
            iter = udata.getExecutablesList().iterator();
            execStream.writeInt(udata.getExecutablesList().size());
            while (iter.hasNext())
            {
                ExecutableFile file = (ExecutableFile) iter.next();
                execStream.writeObject(file);
            }
            execStream.flush();
            outJar.closeEntry();

            // Write out additional uninstall data
            // Do not "kill" the installation if there is a problem
            // with custom uninstall data. Therefore log it to Debug,
            // but do not throw.
            Map additionalData = udata.getAdditionalData();
            if (additionalData != null && !additionalData.isEmpty())
            {
                Iterator keys = additionalData.keySet().iterator();
                HashSet exist = new HashSet();
                while (keys != null && keys.hasNext())
                {
                    String key = keys.next();
                    Object contents = additionalData.get(key);
                    if ("__uninstallLibs__".equals(key))
                    {
                        Iterator nativeLibIter = ((List) contents).iterator();
                        while (nativeLibIter != null && nativeLibIter.hasNext())
                        {
                            String nativeLibName = (String) ((List) nativeLibIter.next()).get(0);
                            byte[] buffer = new byte[5120];
                            long bytesCopied = 0;
                            int bytesInBuffer;
                            outJar.putNextEntry(new ZipEntry("native/" + nativeLibName));
                            InputStream in = getClass().getResourceAsStream(
                                    "/native/" + nativeLibName);
                            while ((bytesInBuffer = in.read(buffer)) != -1)
                            {
                                outJar.write(buffer, 0, bytesInBuffer);
                                bytesCopied += bytesInBuffer;
                            }
                            outJar.closeEntry();
                        }
                    }
                    else if ("uninstallerListeners".equals(key) || "uninstallerJars".equals(key))
                    { // It is a ArrayList of ArrayLists which contains the
                        // full
                        // package paths of all needed class files.
                        // First we create a new ArrayList which contains only
                        // the full paths for the uninstall listener self; thats
                        // the first entry of each sub ArrayList.
                        ArrayList subContents = new ArrayList();

                        // Secound put the class into uninstaller.jar
                        Iterator listenerIter = ((List) contents).iterator();
                        while (listenerIter.hasNext())
                        {
                            byte[] buffer = new byte[5120];
                            long bytesCopied = 0;
                            int bytesInBuffer;
                            CustomData customData = (CustomData) listenerIter.next();
                            // First element of the list contains the listener
                            // class path;
                            // remind it for later.
                            if (customData.listenerName != null)
                            {
                                subContents.add(customData.listenerName);
                            }
                            Iterator liClaIter = customData.contents.iterator();
                            while (liClaIter.hasNext())
                            {
                                String contentPath = liClaIter.next();
                                if (exist.contains(contentPath))
                                {
                                    continue;
                                }
                                exist.add(contentPath);
                                try
                                {
                                    outJar.putNextEntry(new ZipEntry(contentPath));
                                }
                                catch (ZipException ze)
                                { // Ignore, or ignore not ?? May be it is a
                                    // exception because
                                    // a doubled entry was tried, then we should
                                    // ignore ...
                                    Debug.trace("ZipException in writing custom data: "
                                            + ze.getMessage());
                                    continue;
                                }
                                InputStream in = getClass().getResourceAsStream("/" + contentPath);
                                if (in != null)
                                {
                                    while ((bytesInBuffer = in.read(buffer)) != -1)
                                    {
                                        outJar.write(buffer, 0, bytesInBuffer);
                                        bytesCopied += bytesInBuffer;
                                    }
                                }
                                else
                                {
                                    Debug.trace("custom data not found: " + contentPath);
                                }
                                outJar.closeEntry();

                            }
                        }
                        // Third we write the list into the
                        // uninstaller.jar
                        outJar.putNextEntry(new ZipEntry(key));
                        ObjectOutputStream objOut = new ObjectOutputStream(outJar);
                        objOut.writeObject(subContents);
                        objOut.flush();
                        outJar.closeEntry();

                    }
                    else
                    {
                        outJar.putNextEntry(new ZipEntry(key));
                        if (contents instanceof ByteArrayOutputStream)
                        {
                            ((ByteArrayOutputStream) contents).writeTo(outJar);
                        }
                        else
                        {
                            ObjectOutputStream objOut = new ObjectOutputStream(outJar);
                            objOut.writeObject(contents);
                            objOut.flush();
                        }
                        outJar.closeEntry();
                    }
                }
            }

            // write the script files, which will
            // perform several complement and unindependend uninstall actions
            ArrayList unInstallScripts = udata.getUninstallScripts();
            Iterator unInstallIter = unInstallScripts.iterator();
            ObjectOutputStream rootStream;
            int idx = 0;
            while (unInstallIter.hasNext())
            {
                outJar.putNextEntry(new ZipEntry(UninstallData.ROOTSCRIPT + Integer.toString(idx)));
                rootStream = new ObjectOutputStream(outJar);
                String unInstallScript = (String) unInstallIter.next();
                rootStream.writeUTF(unInstallScript);
                rootStream.flush();
                outJar.closeEntry();
            // Cleanup
            outJar.flush();
            outJar.close();
=======
                    Log.PANEL_TRACE, null);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java
        }
        catch (Exception err)
        {
Solution content
            isBack = false;
            callGUIListener(GUIListener.PANEL_SWITCHED);
            Log.getInstance().addDebugMessage("InstallerFrame.switchPanel: switched", null,
                    Log.PANEL_TRACE, null);
        }
        catch (Exception err)
        {
File
InstallerFrame.java
Developer's decision
Version 2
Kind of conflict
Attribute
Catch clause
Comment
If statement
Method invocation
Method signature
Try statement
Variable
While statement
Chunk
Conflicting content
                        reboot = true;
                        break;
                    case Info.REBOOT_ACTION_ASK:
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java
                        message = vs.substitute(langpack.getString("installer.reboot.ask.message"),
                                null);
                        title = vs.substitute(langpack.getString("installer.reboot.ask.title"), null);
                        int res = JOptionPane.showConfirmDialog(this, message, title,
                                JOptionPane.YES_NO_OPTION);
=======
                        message = variableSubstitutor.substitute(langpack.getString("installer.reboot.ask.message"));
                        title = variableSubstitutor.substitute(langpack.getString("installer.reboot.ask.title"));
                        int res = JOptionPane
                                .showConfirmDialog(this, message, title, JOptionPane.YES_NO_OPTION);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java
                        if (res == JOptionPane.YES_OPTION)
                        {
                            reboot = true;
Solution content
                        reboot = true;
                        break;
                    case Info.REBOOT_ACTION_ASK:
                        message = variableSubstitutor.substitute(langpack.getString("installer.reboot.ask.message"));
                        title = variableSubstitutor.substitute(langpack.getString("installer.reboot.ask.title"));
                        int res = JOptionPane
                                .showConfirmDialog(this, message, title, JOptionPane.YES_NO_OPTION);
                        if (res == JOptionPane.YES_OPTION)
                        {
                            reboot = true;
File
InstallerFrame.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
                        }
                        break;
                    case Info.REBOOT_ACTION_NOTICE:
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java
                        message = vs.substitute(langpack.getString("installer.reboot.notice.message"),
                                null);
                        title = vs
                                .substitute(langpack.getString("installer.reboot.notice.title"), null);
=======
                        message = variableSubstitutor.substitute(langpack.getString("installer.reboot.notice.message"));
                        title = variableSubstitutor.substitute(langpack.getString("installer.reboot.notice.title"));
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java
                        JOptionPane.showConfirmDialog(this, message, title, JOptionPane.OK_OPTION);
                        break;
                }
Solution content
                        }
                        break;
                    case Info.REBOOT_ACTION_NOTICE:
                        message = variableSubstitutor.substitute(langpack.getString("installer.reboot.notice.message"));
                        title = variableSubstitutor.substitute(langpack.getString("installer.reboot.notice.title"));
                        JOptionPane.showConfirmDialog(this, message, title, JOptionPane.OK_OPTION);
                        break;
                }
File
InstallerFrame.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        {
            return;
        }
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java
        this.navigateNext(installdata.curPanelNumber, true);
=======
        this.navigateNext(installdata.getCurPanelNumber(), true);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java
    }

    /**
Solution content
        {
            return;
        }
        this.navigateNext(installdata.getCurPanelNumber(), true);
    }

    /**
File
InstallerFrame.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
        {
            return;
        }
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java
        this.navigatePrevious(installdata.curPanelNumber);
=======
        this.navigatePrevious(installdata.getCurPanelNumber());
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java
    }

    /**
Solution content
        {
            return;
        }
        this.navigatePrevious(installdata.getCurPanelNumber());
    }

    /**
File
InstallerFrame.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
             */
            new Thread(new Runnable()
            {
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java

=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java
                public void run()
                {
Solution content
             */
            new Thread(new Runnable()
            {
                public void run()
                {
File
InstallerFrame.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
                    SwingUtilities.invokeLater(new Runnable()
                    {
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java

=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java
                        public void run()
                        {
                            blockGUI();
Solution content
                    SwingUtilities.invokeLater(new Runnable()
                    {
                        public void run()
                        {
                            blockGUI();
File
InstallerFrame.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
                    SwingUtilities.invokeLater(new Runnable()
                    {
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallerFrame.java

=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/InstallerFrame.java
                        public void run()
                        {
                            releaseGUI();
Solution content
                    SwingUtilities.invokeLater(new Runnable()
                    {
                        public void run()
                        {
                            releaseGUI();
File
InstallerFrame.java
Developer's decision
Version 1
Kind of conflict
Blank
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IzPanel.java

package com.izforge.izpack.installer;

import com.izforge.izpack.Panel;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.gui.LabelFactory;
import com.izforge.izpack.gui.LayoutConstants;
import com.izforge.izpack.panels.HelpWindow;
import com.izforge.izpack.util.AbstractUIHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.MultiLineLabel;
import com.izforge.izpack.util.VariableSubstitutor;

=======
package com.izforge.izpack.installer.base;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.Panel;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.api.installer.DataValidator;
import com.izforge.izpack.api.installer.ISummarisable;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.data.PanelAction;
import com.izforge.izpack.gui.LabelFactory;
import com.izforge.izpack.gui.LayoutConstants;
import com.izforge.izpack.gui.MultiLineLabel;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.util.AbstractUIHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.substitutor.VariableSubstitutorImpl;

>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/IzPanel.java
import javax.swing.*;
import javax.swing.plaf.metal.MetalLookAndFeel;
import java.awt.*;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.installer.base;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.Panel;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.api.installer.DataValidator;
import com.izforge.izpack.api.installer.ISummarisable;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.data.PanelAction;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.gui.LabelFactory;
import com.izforge.izpack.gui.LayoutConstants;
import com.izforge.izpack.gui.MultiLineLabel;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.util.AbstractUIHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.substitutor.VariableSubstitutorImpl;

import javax.swing.*;
import javax.swing.plaf.metal.MetalLookAndFeel;
import java.awt.*;
File
IzPanel.java
Developer's decision
Combination
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
    /**
     * The constructor.
     *
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IzPanel.java
     * @param parent The parent IzPack installer frame.
     * @param idata  The installer internal data.
=======
     * @param parent          The parent IzPack installer frame.
     * @param installData     The installer internal data.
     * @param resourceManager
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/IzPanel.java
     */
    public IzPanel(InstallerFrame parent, GUIInstallData installData, ResourceManager resourceManager) {
        this(parent, installData, (LayoutManager2) null, resourceManager);
Solution content
    /**
     * The constructor.
     *
     * @param parent          The parent IzPack installer frame.
     * @param installData     The installer internal data.
     * @param resourceManager
     */
    public IzPanel(InstallerFrame parent, GUIInstallData installData, ResourceManager resourceManager) {
        this(parent, installData, (LayoutManager2) null, resourceManager);
File
IzPanel.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
     * IzPanelLayout and the GridBagLayout. New panels should be use the IzPanelLaout. If lm is
     * null, no layout manager will be created or initialized.
     *
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IzPanel.java
     * @param parent The parent IzPack installer frame.
     * @param idata  The installer internal data.
     * @param lm     layout manager to be used with this IzPanel
=======
     * @param parent          The parent IzPack installer frame.
     * @param installData     The installer internal data.
     * @param lm              layout manager to be used with this IzPanel
     * @param resourceManager
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/IzPanel.java
     */
    public IzPanel(InstallerFrame parent, GUIInstallData installData, LayoutManager2 lm, ResourceManager resourceManager) {
        super();
Solution content
     */
     * IzPanelLayout and the GridBagLayout. New panels should be use the IzPanelLaout. If lm is
     * null, no layout manager will be created or initialized.
     *
     * @param parent          The parent IzPack installer frame.
     * @param installData     The installer internal data.
     * @param lm              layout manager to be used with this IzPanel
     * @param resourceManager
    public IzPanel(InstallerFrame parent, GUIInstallData installData, LayoutManager2 lm, ResourceManager resourceManager) {
        super();
File
IzPanel.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
    /**
     * Creates a new IzPanel object.
     *
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IzPanel.java
     * @param parent   the Parent Frame
     * @param idata    Installers Runtime Data Set
     * @param iconName The Headline IconName
=======
     * @param parent      the Parent Frame
     * @param installData Installers Runtime Data Set
     * @param iconName    The Headline IconName
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/IzPanel.java
     */
    public IzPanel(InstallerFrame parent, GUIInstallData installData, String iconName, ResourceManager resourceManager) {
        this(parent, installData, iconName, -1, resourceManager);
Solution content
    /**
     * Creates a new IzPanel object.
     *
     * @param parent      the Parent Frame
     * @param installData Installers Runtime Data Set
     * @param iconName    The Headline IconName
     */
    public IzPanel(InstallerFrame parent, GUIInstallData installData, String iconName, ResourceManager resourceManager) {
        this(parent, installData, iconName, -1, resourceManager);
File
IzPanel.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
    /**
     * The constructor with Icon.
     *
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IzPanel.java
     * @param parent   The parent IzPack installer frame.
     * @param idata    The installer internal data.
     * @param iconName A iconname to show as left oriented headline-leading Icon.
     * @param instance An instance counter
     */
    public IzPanel(InstallerFrame parent, InstallData idata, String iconName, int instance)
    {
        this(parent, idata);
=======
     * @param parent      The parent IzPack installer frame.
     * @param installData The installer internal data.
     * @param iconName    A iconname to show as left oriented headline-leading Icon.
     * @param instance    An instance counter
     */
    public IzPanel(InstallerFrame parent, GUIInstallData installData, String iconName, int instance, ResourceManager resourceManager) {
        this(parent, installData, resourceManager);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/IzPanel.java
        buildHeadline(iconName, instance);
    }
Solution content
    /**
     * The constructor with Icon.
     *
     * @param parent      The parent IzPack installer frame.
     * @param installData The installer internal data.
     * @param iconName    A iconname to show as left oriented headline-leading Icon.
     * @param instance    An instance counter
     */
    public IzPanel(InstallerFrame parent, GUIInstallData installData, String iconName, int instance, ResourceManager resourceManager) {
        this(parent, installData, resourceManager);
        buildHeadline(iconName, instance);
    }
File
IzPanel.java
Developer's decision
Version 2
Kind of conflict
Comment
Method invocation
Method signature
Chunk
Conflicting content
     */
    protected boolean buildHeadline(String imageIconName, int instanceNumber) {
        boolean result = false;
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IzPanel.java
        if (parent.isHeading(this))
        {
=======
        if (parent.isHeading(this)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/IzPanel.java
            return (false);
        }
Solution content
     */
    protected boolean buildHeadline(String imageIconName, int instanceNumber) {
        boolean result = false;
        if (parent.isHeading(this))
        {
            return (false);
        }
File
IzPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
    /**
     * Internal init method
     *
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IzPanel.java
     * @param parent the parent frame
     * @param idata  installers runtime dataset
=======
     * @param parent          the parent frame
     * @param idata           installers runtime dataset
     * @param resourceManager
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/IzPanel.java
     */
    protected void init(InstallerFrame parent, GUIInstallData idata, ResourceManager resourceManager) {
        getClassName();
Solution content
    /**
     * Internal init method
     *
     * @param parent          the parent frame
     * @param idata           installers runtime dataset
     * @param resourceManager
     */
    protected void init(InstallerFrame parent, GUIInstallData idata, ResourceManager resourceManager) {
        getClassName();
File
IzPanel.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
        int user_choice = JOptionPane.showConfirmDialog(this, question, title, jo_choices,
                JOptionPane.QUESTION_MESSAGE);

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IzPanel.java
        if (user_choice == JOptionPane.CANCEL_OPTION)
        {
            return AbstractUIHandler.ANSWER_CANCEL;
        }

        if (user_choice == JOptionPane.YES_OPTION)
        {
            return AbstractUIHandler.ANSWER_YES;
        }

        if (user_choice == JOptionPane.CLOSED_OPTION)
        {
            return AbstractUIHandler.ANSWER_NO;
        }

        if (user_choice == JOptionPane.NO_OPTION)
        {
=======
        if (user_choice == JOptionPane.CANCEL_OPTION) {
            return AbstractUIHandler.ANSWER_CANCEL;
        }

        if (user_choice == JOptionPane.YES_OPTION) {
            return AbstractUIHandler.ANSWER_YES;
        }

        if (user_choice == JOptionPane.CLOSED_OPTION) {
            return AbstractUIHandler.ANSWER_NO;
        }

        if (user_choice == JOptionPane.NO_OPTION) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/IzPanel.java
            return AbstractUIHandler.ANSWER_NO;
        }
Solution content
        {
        int user_choice = JOptionPane.showConfirmDialog(this, question, title, jo_choices,
                JOptionPane.QUESTION_MESSAGE);

        if (user_choice == JOptionPane.CANCEL_OPTION)
        {
            return AbstractUIHandler.ANSWER_CANCEL;
        }

        if (user_choice == JOptionPane.YES_OPTION)
        {
            return AbstractUIHandler.ANSWER_YES;
        }

        if (user_choice == JOptionPane.CLOSED_OPTION)
            return AbstractUIHandler.ANSWER_NO;
        }

        if (user_choice == JOptionPane.NO_OPTION)
        {
            return AbstractUIHandler.ANSWER_NO;
        }
File
IzPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        if (retval == null || retval.startsWith(fullkey)) {
            retval = installData.getLangpack().getString(fullkey);
        }
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IzPanel.java
        if (retval == null || retval.startsWith(fullkey))
        {
            if (alternateClass == null)
            {
=======
        if (retval == null || retval.startsWith(fullkey)) {
            if (alternateClass == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/IzPanel.java
                return (null);
            }
            buf.delete(0, buf.length());
Solution content
        if (retval == null || retval.startsWith(fullkey)) {
            retval = installData.getLangpack().getString(fullkey);
        }
        if (retval == null || retval.startsWith(fullkey)) {
            if (alternateClass == null) {
                return (null);
            }
            if (alternateClass == null)
            {
                return (null);
            }
            buf.delete(0, buf.length());
File
IzPanel.java
Developer's decision
Manual
Kind of conflict
If statement
Chunk
Conflicting content
     * @return the newly created label
     */
    public JLabel createLabel(String subkey, String alternateClass, String iconId, int pos,
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IzPanel.java
                              boolean isFullLine)
    {
=======
                              boolean isFullLine) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/IzPanel.java
        ImageIcon ii = (iconId != null) ? parent.icons.getImageIcon(iconId) : null;
        String msg = getI18nStringForClass(subkey, alternateClass);
        JLabel label = LabelFactory.create(msg, ii, pos, isFullLine);
Solution content
     * @return the newly created label
     */
    public JLabel createLabel(String subkey, String alternateClass, String iconId, int pos,
                              boolean isFullLine)
    {
        ImageIcon ii = (iconId != null) ? parent.icons.getImageIcon(iconId) : null;
        String msg = getI18nStringForClass(subkey, alternateClass);
        JLabel label = LabelFactory.create(msg, ii, pos, isFullLine);
File
IzPanel.java
Developer's decision
Version 1
Kind of conflict
Variable
Chunk
Conflicting content
        // has been setup then apply it to the font:
        final float val;
        if ((val = LabelFactory.getLabelFontSize()) != 1.0f)
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IzPanel.java
        {
            fontObj = fontObj.deriveFont(fontObj.getSize2D() * val);
        }
=======
            fontObj = fontObj.deriveFont(fontObj.getSize2D() * val);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/IzPanel.java
        return fontObj;
    }
Solution content
        // has been setup then apply it to the font:
        final float val;
        if ((val = LabelFactory.getLabelFontSize()) != 1.0f)
        {
            fontObj = fontObj.deriveFont(fontObj.getSize2D() * val);
        }
        return fontObj;
    }
File
IzPanel.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
    protected static MetalLookAndFeel getLAF() {
        LookAndFeel laf = UIManager.getLookAndFeel();
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IzPanel.java
        if (laf instanceof MetalLookAndFeel)
        {
=======
        if (laf instanceof MetalLookAndFeel) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/IzPanel.java
            return ((MetalLookAndFeel) laf);
        }
        return (null);
Solution content
    protected static MetalLookAndFeel getLAF() {
        LookAndFeel laf = UIManager.getLookAndFeel();
        if (laf instanceof MetalLookAndFeel)
        {
            return ((MetalLookAndFeel) laf);
        }
        return (null);
File
IzPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
     * @deprecated use getLayoutHelper().getNewConstraints instead
     */
    public GridBagConstraints getNewGridBagConstraints(int gridx, int gridy, int gridwidth,
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IzPanel.java
                                                       int gridheight)
    {
=======
                                                       int gridheight) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/IzPanel.java
        return (GridBagConstraints) (layoutHelper.getNewConstraints(gridx, gridy, gridwidth,
                gridheight));
    }
Solution content
     * @deprecated use getLayoutHelper().getNewConstraints instead
     */
    public GridBagConstraints getNewGridBagConstraints(int gridx, int gridy, int gridwidth,
                                                       int gridheight)
    {
        return (GridBagConstraints) (layoutHelper.getNewConstraints(gridx, gridy, gridwidth,
                gridheight));
    }
File
IzPanel.java
Developer's decision
Version 1
Kind of conflict
Variable
Chunk
Conflicting content
    private HelpWindow helpWindow = null;

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IzPanel.java
    private HelpWindow getHelpWindow()
    {
        if (this.helpWindow != null)
        {
=======
    private HelpWindow getHelpWindow() {
        if (this.helpWindow != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/IzPanel.java
            return this.helpWindow;
        }
Solution content
    private HelpWindow helpWindow = null;

    private HelpWindow getHelpWindow()
    {
        if (this.helpWindow != null)
        {
            return this.helpWindow;
        }
File
IzPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Method signature
Chunk
Conflicting content
        this.postValidateActions.add(postValidateAction);
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IzPanel.java
    protected final void executePreActivationActions()
    {
        if (preActivateActions != null)
        {
            for (int actionIndex = 0; actionIndex < preActivateActions.size(); actionIndex++)
            {
                preActivateActions.get(actionIndex).executeAction(idata, this);
=======
    protected final void executePreActivationActions() {
        if (preActivateActions != null) {
            for (int actionIndex = 0; actionIndex < preActivateActions.size(); actionIndex++) {
                preActivateActions.get(actionIndex).executeAction(this.installData, this);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/IzPanel.java
            }
        }
    }
Solution content
        this.postValidateActions.add(postValidateAction);
    }

    protected final void executePreActivationActions() {
        if (preActivateActions != null) {
            for (int actionIndex = 0; actionIndex < preActivateActions.size(); actionIndex++) {
                preActivateActions.get(actionIndex).executeAction(this.installData, this);
            }
        }
    }
File
IzPanel.java
Developer's decision
Version 2
Kind of conflict
For statement
If statement
Method invocation
Method signature
Chunk
Conflicting content
import com.izforge.izpack.gui.IzPanelConstraints;
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/LayoutHelper.java

package com.izforge.izpack.installer;
=======
package com.izforge.izpack.installer.base;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/base/LayoutHelper.java

import com.izforge.izpack.api.data.AutomatedInstallData;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.installer.base;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.gui.IzPanelConstraints;
File
LayoutHelper.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
    public static final int INSTALLER_GUI = 0, INSTALLER_AUTO = 1, INSTALLER_CONSOLE = 2;
    public static final int CONSOLE_INSTALL = 0, CONSOLE_GEN_TEMPLATE = 1, CONSOLE_FROM_TEMPLATE = 2,
            CONSOLE_FROM_SYSTEMPROPERTIES = 3, CONSOLE_FROM_SYSTEMPROPERTIESMERGE = 4;
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/Installer.java
=======

    private ApplicationContainer applicationComponent;

>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/bootstrap/Installer.java

    /*
    * The main method (program entry point).
Solution content
    public static final int INSTALLER_GUI = 0, INSTALLER_AUTO = 1, INSTALLER_CONSOLE = 2;
    public static final int CONSOLE_INSTALL = 0, CONSOLE_GEN_TEMPLATE = 1, CONSOLE_FROM_TEMPLATE = 2,
            CONSOLE_FROM_SYSTEMPROPERTIES = 3, CONSOLE_FROM_SYSTEMPROPERTIESMERGE = 4;

    private ApplicationContainer applicationComponent;


    /*
    * The main method (program entry point).
File
Installer.java
Developer's decision
Version 2
Kind of conflict
Attribute
Chunk
Conflicting content
    *
    * @param args The arguments passed on the command-line.
    */
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/Installer.java
    public static void main(String[] args)
    {
        Debug.log(" - Logger initialized at '" + new Date(System.currentTimeMillis()) + "'.");
=======

    public static void main(String[] args) {
        Installer installer = new Installer();
        installer.initContainer();
        installer.start(args);
    }

    private void initContainer() {
        applicationComponent = new ApplicationContainer();
        applicationComponent.initBindings();
    }
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/bootstrap/Installer.java


    private void start(String[] args) {
Solution content
    private void initContainer() {
    *
    * @param args The arguments passed on the command-line.
    */

    public static void main(String[] args) {
        Installer installer = new Installer();
        installer.initContainer();
        installer.start(args);
    }

        applicationComponent = new ApplicationContainer();
        applicationComponent.initBindings();
    }


    private void start(String[] args) {
File
Installer.java
Developer's decision
Version 2
Kind of conflict
Method declaration
Method invocation
Method signature
Chunk
Conflicting content
            while (args_it.hasNext()) {
                String arg = args_it.next().trim();
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/Installer.java
                try
                {
                    if ("-console".equalsIgnoreCase(arg))
                    {
                        type = INSTALLER_CONSOLE;
                    }
                    else if ("-options-template".equalsIgnoreCase(arg))
                    {
                        type = INSTALLER_CONSOLE;
                        consoleAction = CONSOLE_GEN_TEMPLATE;
                        path = args_it.next().trim();
                    }
                    else if ("-options".equalsIgnoreCase(arg))
                    {
                        type = INSTALLER_CONSOLE;
                        consoleAction = CONSOLE_FROM_TEMPLATE;
                        path = args_it.next().trim();
                    }
                    else if ("-options-system".equalsIgnoreCase(arg))
                    {
                        type = INSTALLER_CONSOLE;
                        consoleAction = CONSOLE_FROM_SYSTEMPROPERTIES;
                    }
                    else if ("-options-auto".equalsIgnoreCase(arg))
                    {
=======
                try {
                    if ("-console".equalsIgnoreCase(arg)) {
                        type = INSTALLER_CONSOLE;
                    } else if ("-options-template".equalsIgnoreCase(arg)) {
                        type = INSTALLER_CONSOLE;
                        consoleAction = CONSOLE_GEN_TEMPLATE;
                        path = args_it.next().trim();
                    } else if ("-options".equalsIgnoreCase(arg)) {
                        type = INSTALLER_CONSOLE;
                        consoleAction = CONSOLE_FROM_TEMPLATE;
                        path = args_it.next().trim();
                    } else if ("-options-system".equalsIgnoreCase(arg)) {
                        type = INSTALLER_CONSOLE;
                        consoleAction = CONSOLE_FROM_SYSTEMPROPERTIES;
                    } else if ("-options-auto".equalsIgnoreCase(arg)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/bootstrap/Installer.java
                        type = INSTALLER_CONSOLE;
                        consoleAction = CONSOLE_FROM_SYSTEMPROPERTIESMERGE;
                        path = args_it.next().trim();
Solution content
            while (args_it.hasNext()) {
                String arg = args_it.next().trim();
                try {
                    if ("-console".equalsIgnoreCase(arg)) {
                        type = INSTALLER_CONSOLE;
                    } else if ("-options-template".equalsIgnoreCase(arg)) {
                        type = INSTALLER_CONSOLE;
                        consoleAction = CONSOLE_GEN_TEMPLATE;
                        path = args_it.next().trim();
                    } else if ("-options".equalsIgnoreCase(arg)) {
                        type = INSTALLER_CONSOLE;
                        consoleAction = CONSOLE_FROM_TEMPLATE;
                        path = args_it.next().trim();
                    } else if ("-options-system".equalsIgnoreCase(arg)) {
                        type = INSTALLER_CONSOLE;
                        consoleAction = CONSOLE_FROM_SYSTEMPROPERTIES;
                    } else if ("-options-auto".equalsIgnoreCase(arg)) {
                        type = INSTALLER_CONSOLE;
                        consoleAction = CONSOLE_FROM_SYSTEMPROPERTIESMERGE;
                        path = args_it.next().trim();
File
Installer.java
Developer's decision
Version 1
Kind of conflict
Attribute
If statement
Method invocation
Try statement
Variable
Chunk
Conflicting content
 * limitations under the License.
 */

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ConsoleInstaller.java
package com.izforge.izpack.installer;

import com.izforge.izpack.Info;
import com.izforge.izpack.LocaleDatabase;
import com.izforge.izpack.Panel;
import com.izforge.izpack.installer.DataValidator.Status;
import com.izforge.izpack.rules.RulesEngine;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.Housekeeper;
import com.izforge.izpack.util.OsConstraint;
import com.izforge.izpack.util.VariableSubstitutor;

=======
package com.izforge.izpack.installer.console;

import com.izforge.izpack.api.data.*;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.api.installer.DataValidator;
import com.izforge.izpack.api.installer.DataValidator.Status;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.base.InstallerBase;
import com.izforge.izpack.installer.bootstrap.Installer;
import com.izforge.izpack.installer.language.ConditionCheck;
import com.izforge.izpack.installer.manager.DataValidatorFactory;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.Housekeeper;
import com.izforge.izpack.util.OsConstraint;
import com.izforge.izpack.util.substitutor.VariableSubstitutorImpl;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/console/ConsoleInstaller.java
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.PrintWriter;
Solution content
 * limitations under the License.
 */

package com.izforge.izpack.installer.console;

import com.izforge.izpack.api.data.*;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.api.installer.DataValidator;
import com.izforge.izpack.api.installer.DataValidator.Status;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.base.InstallerBase;
import com.izforge.izpack.installer.bootstrap.Installer;
import com.izforge.izpack.installer.language.ConditionCheck;
import com.izforge.izpack.installer.manager.DataValidatorFactory;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.Housekeeper;
import com.izforge.izpack.util.OsConstraint;
import com.izforge.izpack.util.substitutor.VariableSubstitutorImpl;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.PrintWriter;
File
ConsoleInstaller.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Properties;
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ConsoleInstaller.java

=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/console/ConsoleInstaller.java
/**
 * Runs the console installer
 *
Solution content
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Properties;
import java.util.Properties;

/**
 * Runs the console installer
 *
File
ConsoleInstaller.java
Developer's decision
Concatenation
Kind of conflict
Blank
Chunk
Conflicting content
        if (p.hasCondition())
        {
            return rules.isConditionTrue(p.getCondition());
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ConsoleInstaller.java
        }
        else
        {
            if (!rules.canShowPanel(panelid, this.installdata.variables))
            {
=======
        } else {
            if (!rules.canShowPanel(panelid, this.installdata.getVariables())) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/console/ConsoleInstaller.java
                // skip panel, if conditions for panel aren't met
                Debug.trace("Skip panel with panelid=" + panelid);
                // panel should be skipped, so we have to decrement panelnumber for skipping
Solution content
        if (p.hasCondition())
        {
            return rules.isConditionTrue(p.getCondition());
        }
        else
        {
            if (!rules.canShowPanel(panelid, this.installdata.variables))
            {
                // skip panel, if conditions for panel aren't met
                Debug.trace("Skip panel with panelid=" + panelid);
                // panel should be skipped, so we have to decrement panelnumber for skipping
File
ConsoleInstaller.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
            {
        if (installdata.isRebootNecessary())
        {
            System.out.println("[ There are file operations pending after reboot ]");
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ConsoleInstaller.java
            switch (installdata.info.getRebootAction())
=======
            switch (installdata.getInfo().getRebootAction())
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/console/ConsoleInstaller.java
                case Info.REBOOT_ACTION_ALWAYS:
                    reboot = true;
Solution content
        if (installdata.isRebootNecessary())
        {
            System.out.println("[ There are file operations pending after reboot ]");
            switch (installdata.getInfo().getRebootAction())
            {
                case Info.REBOOT_ACTION_ALWAYS:
                    reboot = true;
File
ConsoleInstaller.java
Developer's decision
Version 2
Kind of conflict
Switch statement
Chunk
Conflicting content
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ConsolePanelAutomationHelper.java
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil, 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.installer;


public class ConsolePanelAutomationHelper extends PanelAutomationHelper
{

}
=======
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil, 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.installer.console;

import com.izforge.izpack.installer.automation.PanelAutomationHelper;


public class ConsolePanelAutomationHelper extends PanelAutomationHelper {

}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/console/ConsolePanelAutomationHelper.java
Solution content
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil, 
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.installer.console;

import com.izforge.izpack.installer.automation.PanelAutomationHelper;

public class ConsolePanelAutomationHelper extends PanelAutomationHelper {

}
File
ConsolePanelAutomationHelper.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/PanelConsoleHelper.java

package com.izforge.izpack.installer;
=======
package com.izforge.izpack.installer.console;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/console/PanelConsoleHelper.java

import java.io.BufferedReader;
import java.io.IOException;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.installer.console;

import java.io.BufferedReader;
import java.io.IOException;
File
PanelConsoleHelper.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 *
 * @author Mounir El Hajj
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/PanelConsoleHelper.java
abstract public class PanelConsoleHelper
{


    public int askEndOfConsolePanel()
    {
        try
        {
=======
abstract public class PanelConsoleHelper {


    public int askEndOfConsolePanel() {
        try {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/console/PanelConsoleHelper.java
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            while (true) {
                System.out.println("press 1 to continue, 2 to quit, 3 to redisplay");
Solution content
 *
 * @author Mounir El Hajj
 */
abstract public class PanelConsoleHelper

    public int askEndOfConsolePanel() {
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            while (true) {
                System.out.println("press 1 to continue, 2 to quit, 3 to redisplay");
File
PanelConsoleHelper.java
Developer's decision
Combination
Kind of conflict
Class signature
Method signature
Try statement
Chunk
Conflicting content
                } else if (strIn.equals("3")) {
                    return 3;
                }
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/PanelConsoleHelper.java
                else if (strIn.equals("3"))
                {
                    return 3;
                }
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/console/PanelConsoleHelper.java
            }

        }
Solution content
                } else if (strIn.equals("3")) {
                    return 3;
                }
                else if (strIn.equals("3"))
                {
                    return 3;
                }
            }

        }
File
PanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.data.GUIPrefs;

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/InstallData.java
import java.awt.Color;
=======
import javax.swing.*;
import java.awt.*;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/data/GUIInstallData.java
import java.io.Serializable;
import java.util.Properties;
Solution content
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.data.GUIPrefs;

import javax.swing.*;
import java.awt.*;
import java.io.Serializable;
import java.util.Properties;
File
GUIInstallData.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
     *
     * @param aRootUninstallScript The Script to exec as Root at uninstall.
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/UninstallData.java
    public void addUninstallScript(String aRootUninstallScript)
    {
=======
    public void addUninstallScript(String aRootUninstallScript) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/data/UninstallData.java
        unInstallScripts.add(aRootUninstallScript == null ? "" : aRootUninstallScript);
    }
Solution content
     *
     * @param aRootUninstallScript The Script to exec as Root at uninstall.
     */
    public void addUninstallScript(String aRootUninstallScript) {
        unInstallScripts.add(aRootUninstallScript == null ? "" : aRootUninstallScript);
    }
File
UninstallData.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/DataValidatorFactory.java
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2008 Patrick Zbinden.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.installer;

public final class DataValidatorFactory
{

    public static DataValidator createDataValidator(String className)
    {
        DataValidator validator = null;
        if (className != null)
        {

            try
            {
                validator = (DataValidator) Class.forName(className).newInstance();
            }
            catch (InstantiationException e)
            {
                e.printStackTrace();
            }
            catch (IllegalAccessException e)
            {
                e.printStackTrace();
            }
            catch (ClassNotFoundException e)
            {
                e.printStackTrace();
            }
        }
        return validator;

    }

}
=======
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2008 Patrick Zbinden.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
            catch (IllegalAccessException e) {
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
            }
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.installer.manager;

import com.izforge.izpack.api.installer.DataValidator;

public final class DataValidatorFactory {

    public static DataValidator createDataValidator(String className) {
        DataValidator validator = null;
        if (className != null) {

            try {
                validator = (DataValidator) Class.forName(className).newInstance();
            }
            catch (InstantiationException e) {
                e.printStackTrace();
                e.printStackTrace();
            }
            catch (ClassNotFoundException e) {
                e.printStackTrace();
            }
        }
        return validator;

    }

}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/manager/DataValidatorFactory.java
Solution content
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2008 Patrick Zbinden.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.installer.manager;

import com.izforge.izpack.api.installer.DataValidator;

public final class DataValidatorFactory {

    public static DataValidator createDataValidator(String className) {
        DataValidator validator = null;
        if (className != null) {

            try {
                validator = (DataValidator) Class.forName(className).newInstance();
            }
            catch (InstantiationException e) {
                e.printStackTrace();
            }
            catch (IllegalAccessException e) {
                e.printStackTrace();
            }
            catch (ClassNotFoundException e) {
                e.printStackTrace();
            }
        }
        return validator;

    }

}
File
DataValidatorFactory.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
 * distributed under the License is distributed on an "AS IS" BASIS,
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/PanelActionFactory.java
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2008 Florian B�hlmann.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.installer;

public class PanelActionFactory
{

    public static PanelAction createPanelAction(String className)
    {
        PanelAction action = null;
        if (className != null)
        {

            try
            {
                action = (PanelAction) Class.forName(className).newInstance();
            }
            catch (InstantiationException e)
            {
                e.printStackTrace();
            }
            catch (IllegalAccessException e)
            {
                e.printStackTrace();
            }
            catch (ClassNotFoundException e)
            {
                e.printStackTrace();
            }
        }
        return action;

    }
}
=======
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Copyright 2008 Florian Bühlmann.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.installer.manager;

import com.izforge.izpack.data.PanelAction;

public class PanelActionFactory {

    public static PanelAction createPanelAction(String className) {
        PanelAction action = null;
        if (className != null) {

            try {
                action = (PanelAction) Class.forName(className).newInstance();
            }
            catch (InstantiationException e) {
                e.printStackTrace();
            }
            catch (IllegalAccessException e) {
                e.printStackTrace();
            }
            catch (ClassNotFoundException e) {
                e.printStackTrace();
            }
        }
        return action;

    }
}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/manager/PanelActionFactory.java
Solution content
        return action;

    }
}
 * http://izpack.codehaus.org/
 *
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * Copyright 2008 Florian Bühlmann.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.installer.manager;

import com.izforge.izpack.data.PanelAction;

public class PanelActionFactory {

    public static PanelAction createPanelAction(String className) {
        PanelAction action = null;
        if (className != null) {

            try {
                action = (PanelAction) Class.forName(className).newInstance();
            }
            catch (InstantiationException e) {
                e.printStackTrace();
            }
            catch (IllegalAccessException e) {
                e.printStackTrace();
            }
            catch (ClassNotFoundException e) {
                e.printStackTrace();
            }
        }
File
PanelActionFactory.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/MultiVolumeInstaller.java

package com.izforge.izpack.installer;
=======
package com.izforge.izpack.installer.multiunpacker;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/multiunpacker/MultiVolumeInstaller.java

import com.izforge.izpack.installer.bootstrap.Installer;
import com.izforge.izpack.util.Debug;
Solution content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.installer.multiunpacker;

import com.izforge.izpack.installer.bootstrap.Installer;
import com.izforge.izpack.util.Debug;
File
MultiVolumeInstaller.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
    public static void main(String[] args) {
        ProgressDialog progressDialog = null;

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/MultiVolumeInstaller.java
        try
        {
            progressDialog = new ProgressDialog();
            progressDialog.startProgress();
        }
        catch (HeadlessException ex)
        {
=======
        try {
            progressDialog = new ProgressDialog();
            progressDialog.startProgress();
        }
        catch (HeadlessException ex) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/multiunpacker/MultiVolumeInstaller.java
            // this exception is expected if we're running in console or 
            // auto installation mode
            Debug.log("Progress will not be shown. No display found.");
Solution content
    public static void main(String[] args) {
        ProgressDialog progressDialog = null;

        try
        {
            progressDialog = new ProgressDialog();
            progressDialog.startProgress();
        }
        catch (HeadlessException ex)
        {
            // this exception is expected if we're running in console or 
            // auto installation mode
            Debug.log("Progress will not be shown. No display found.");
File
MultiVolumeInstaller.java
Developer's decision
Version 1
Kind of conflict
Catch clause
Method invocation
Try statement
Variable
Chunk
Conflicting content
                newargs = new String[0];
            }
            MultiVolumeInstaller.install(newargs);
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/MultiVolumeInstaller.java
        }
        else
        {
            try
            {
=======
        } else {
            try {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/multiunpacker/MultiVolumeInstaller.java
                long maxmem = Runtime.getRuntime().maxMemory() / (1024 * 1024);
                Debug.trace("Currently using maximum memory of " + maxmem + "m");
                // just use a static fraction of memory for perm gen size.
Solution content
                newargs = new String[0];
            }
            MultiVolumeInstaller.install(newargs);
        } else {
            try {
                long maxmem = Runtime.getRuntime().maxMemory() / (1024 * 1024);
                Debug.trace("Currently using maximum memory of " + maxmem + "m");
                // just use a static fraction of memory for perm gen size.
File
MultiVolumeInstaller.java
Developer's decision
Version 1
Kind of conflict
Try statement
Chunk
Conflicting content
                Debug.trace(e);
            }
        }
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/MultiVolumeInstaller.java
        if (progressDialog != null)
        {
=======
        if (progressDialog != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/multiunpacker/MultiVolumeInstaller.java
            progressDialog.stopProgress();
        }
    }
Solution content
                Debug.trace(e);
            }
        }
        if (progressDialog != null)
        {
            progressDialog.stopProgress();
        }
    }
File
MultiVolumeInstaller.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/MultiVolumeUnpacker.java

package com.izforge.izpack.installer;

import com.izforge.izpack.*;
import com.izforge.izpack.event.InstallerListener;
import com.izforge.izpack.io.CorruptVolumeException;
import com.izforge.izpack.io.FileSpanningInputStream;
import com.izforge.izpack.io.FileSpanningOutputStream;
import com.izforge.izpack.io.VolumeNotFoundException;
import com.izforge.izpack.util.*;
import com.izforge.izpack.util.os.FileQueue;
import com.izforge.izpack.util.os.FileQueueMove;

import java.io.*;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.Properties;

=======
package com.izforge.izpack.installer.multiunpacker;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.core.event.InstallerListener;
import com.izforge.izpack.core.io.CorruptVolumeException;
import com.izforge.izpack.core.io.FileSpanningInputStream;
import com.izforge.izpack.core.io.FileSpanningOutputStream;
import com.izforge.izpack.core.io.VolumeNotFoundException;
import com.izforge.izpack.data.*;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.installer.data.UninstallData;
import com.izforge.izpack.installer.unpacker.IMultiVolumeUnpackerHelper;
import com.izforge.izpack.installer.unpacker.ScriptParser;
import com.izforge.izpack.installer.unpacker.UnpackerBase;
import com.izforge.izpack.util.*;
import com.izforge.izpack.util.os.FileQueue;
import com.izforge.izpack.util.os.FileQueueMove;

import java.io.*;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.Properties;

>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/multiunpacker/MultiVolumeUnpacker.java

/**
 * Unpacker class for a multi volume installation.
Solution content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.installer.multiunpacker;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.core.event.InstallerListener;
import com.izforge.izpack.core.io.CorruptVolumeException;
import com.izforge.izpack.core.io.FileSpanningInputStream;
import com.izforge.izpack.core.io.FileSpanningOutputStream;
import com.izforge.izpack.core.io.VolumeNotFoundException;
import com.izforge.izpack.data.*;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.installer.data.UninstallData;
import com.izforge.izpack.installer.unpacker.IMultiVolumeUnpackerHelper;
import com.izforge.izpack.installer.unpacker.ScriptParser;
import com.izforge.izpack.installer.unpacker.UnpackerBase;
import com.izforge.izpack.util.*;
import com.izforge.izpack.util.os.FileQueue;
import com.izforge.izpack.util.os.FileQueueMove;

import java.io.*;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.Properties;

import java.util.List;
import java.util.Properties;

/**
 * Unpacker class for a multi volume installation.
File
MultiVolumeUnpacker.java
Developer's decision
Combination
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
public class MultiVolumeUnpacker extends UnpackerBase {
    protected IMultiVolumeUnpackerHelper helper;

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/MultiVolumeUnpacker.java
    public MultiVolumeUnpacker(AutomatedInstallData idata, AbstractUIProgressHandler handler)
    {
        super(idata, handler);
        if (handler instanceof PanelAutomation)
        {
            Debug.trace("running in auto installation mode.");
            helper = new MultiVolumeUnpackerAutomationHelper();
        }
        else
        {
=======
    public MultiVolumeUnpacker(AutomatedInstallData idata, AbstractUIProgressHandler handler, ResourceManager resourceManager, RulesEngine rules, VariableSubstitutor variableSubstitutor, UninstallData udata) {
        super(idata, handler, resourceManager, rules, variableSubstitutor, udata);
        if (handler instanceof PanelAutomation) {
            Debug.trace("running in auto installation mode.");
            helper = new MultiVolumeUnpackerAutomationHelper();
        } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/multiunpacker/MultiVolumeUnpacker.java
            Debug.trace("running in normal installation mode.");
            helper = new MultiVolumeUnpackerHelper();
        }
Solution content
public class MultiVolumeUnpacker extends UnpackerBase {
    protected IMultiVolumeUnpackerHelper helper;

    public MultiVolumeUnpacker(AutomatedInstallData idata, AbstractUIProgressHandler handler, ResourceManager resourceManager, RulesEngine rules, VariableSubstitutor variableSubstitutor, UninstallData udata) {
        super(idata, handler, resourceManager, rules, variableSubstitutor, udata);
        if (handler instanceof PanelAutomation)
        {
            Debug.trace("running in auto installation mode.");
            helper = new MultiVolumeUnpackerAutomationHelper();
        }
        else
        {
            Debug.trace("running in normal installation mode.");
            helper = new MultiVolumeUnpackerHelper();
        }
File
MultiVolumeUnpacker.java
Developer's decision
Version 2
Kind of conflict
Attribute
If statement
Method invocation
Method signature
Chunk
Conflicting content
    }


<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/MultiVolumeUnpacker.java
    public IMultiVolumeUnpackerHelper getHelper()
    {
=======
    public IMultiVolumeUnpackerHelper getHelper() {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/multiunpacker/MultiVolumeUnpacker.java
        return this.helper;
    }
Solution content
    }


    public IMultiVolumeUnpackerHelper getHelper()
    {
        return this.helper;
    }
File
MultiVolumeUnpacker.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
                {
=======
                        stepname = name;
                    }
                }
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/MultiVolumeUnpacker.java
                if (pack.isHidden())
                if (pack.isHidden()) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/multiunpacker/MultiVolumeUnpacker.java
                    // TODO: hide the pack completely
                    // hide the pack name if pack is hidden
                    stepname = "";
Solution content
                        stepname = name;
                    }
                }
                if (pack.isHidden())
                {
                    // TODO: hide the pack completely
                    // hide the pack name if pack is hidden
                    stepname = "";
File
MultiVolumeUnpacker.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                            // doesn't work on streams but only on physical files
                            tmpFile = File.createTempFile("__FQ__", null, pathFile.getParentFile());
                            out = new FileOutputStream(tmpFile);
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/MultiVolumeUnpacker.java
                        }
                        else
                        {
=======
                        } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/multiunpacker/MultiVolumeUnpacker.java
                            out = new FileOutputStream(pathFile);
                        }
Solution content
                            // doesn't work on streams but only on physical files
                            tmpFile = File.createTempFile("__FQ__", null, pathFile.getParentFile());
                            out = new FileOutputStream(tmpFile);
                        } else {
                            out = new FileOutputStream(pathFile);
                        }
File
MultiVolumeUnpacker.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
        this.idata = idata;
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/MultiVolumeUnpackerAutomationHelper.java
package com.izforge.izpack.installer;

import com.izforge.izpack.panels.NextMediaDialog;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;


public class MultiVolumeUnpackerAutomationHelper implements IMultiVolumeUnpackerHelper
{
    private AutomatedInstallData idata;
    private AbstractUIProgressHandler handler;

    public MultiVolumeUnpackerAutomationHelper()
    {

    }

    public File enterNextMediaMessage(String volumename, boolean lastcorrupt)
    {
        if (lastcorrupt)
        {
            System.err.println(" [ " + idata.langpack.getString("nextmedia.corruptmedia.title") + " ] ");
            System.err.println(idata.langpack.getString("nextmedia.corruptmedia"));
        }
        Debug.trace("Enter next media: " + volumename);

        File nextvolume = new File(volumename);
        NextMediaDialog nmd = null;

        while (!nextvolume.exists() || lastcorrupt)
        {
            System.out.println(" [ " + idata.langpack.getString("nextmedia.title") + " ] ");
            System.out.println(idata.langpack.getString("nextmedia.msg"));
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

            String nextmediainput = null;
            try
            {
                nextmediainput = reader.readLine();
            }
            catch (IOException e)
            {
                Debug.error("Error reading next media path: " + e.getMessage());
                e.printStackTrace();
            }

            if (nextmediainput != null)
            {
                nextvolume = new File(nextmediainput);
            }
            else
            {
                Debug.trace("Input from NextMediaDialog was null");
                nextvolume = new File(volumename);
            }
            // selection equal to last selected which was corrupt?
            if (!(volumename.equals(nextvolume.getAbsolutePath()) && lastcorrupt))
            {
                lastcorrupt = false;
            }
        }
        return nextvolume;
    }

    public File enterNextMediaMessage(String volumename)
    {
        return enterNextMediaMessage(volumename, false);
    }

    public void init(AutomatedInstallData idata, AbstractUIProgressHandler handler)
    {
        this.handler = handler;
    }
}
=======
package com.izforge.izpack.installer.multiunpacker;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.installer.unpacker.IMultiVolumeUnpackerHelper;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;


public class MultiVolumeUnpackerAutomationHelper implements IMultiVolumeUnpackerHelper {
    private AutomatedInstallData idata;
    private AbstractUIProgressHandler handler;

    public MultiVolumeUnpackerAutomationHelper() {

    }

    public File enterNextMediaMessage(String volumename, boolean lastcorrupt) {
        if (lastcorrupt) {
            System.err.println(" [ " + idata.getLangpack().getString("nextmedia.corruptmedia.title") + " ] ");
            System.err.println(idata.getLangpack().getString("nextmedia.corruptmedia"));
        }
        Debug.trace("Enter next media: " + volumename);

        File nextvolume = new File(volumename);
        NextMediaDialog nmd = null;

        while (!nextvolume.exists() || lastcorrupt) {
            System.out.println(" [ " + idata.getLangpack().getString("nextmedia.title") + " ] ");
            System.out.println(idata.getLangpack().getString("nextmedia.msg"));
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

            String nextmediainput = null;
            try {
                nextmediainput = reader.readLine();
            }
            catch (IOException e) {
                Debug.error("Error reading next media path: " + e.getMessage());
                e.printStackTrace();
            }

            if (nextmediainput != null) {
                nextvolume = new File(nextmediainput);
            } else {
                Debug.trace("Input from NextMediaDialog was null");
                nextvolume = new File(volumename);
            }
            // selection equal to last selected which was corrupt?
            if (!(volumename.equals(nextvolume.getAbsolutePath()) && lastcorrupt)) {
                lastcorrupt = false;
            }
        }
        return nextvolume;
    }

    public File enterNextMediaMessage(String volumename) {
        return enterNextMediaMessage(volumename, false);
    }

    public void init(AutomatedInstallData idata, AbstractUIProgressHandler handler) {
        this.idata = idata;
        this.handler = handler;
    }
}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/multiunpacker/MultiVolumeUnpackerAutomationHelper.java
Solution content
package com.izforge.izpack.installer.multiunpacker;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.installer.unpacker.IMultiVolumeUnpackerHelper;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;

import com.izforge.izpack.panels.NextMediaDialog;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;

import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;


public class MultiVolumeUnpackerAutomationHelper implements IMultiVolumeUnpackerHelper
{
    private AutomatedInstallData idata;
    private AbstractUIProgressHandler handler;

    public MultiVolumeUnpackerAutomationHelper()
    {

    }

    public File enterNextMediaMessage(String volumename, boolean lastcorrupt) {
        if (lastcorrupt) {
            System.err.println(" [ " + idata.getLangpack().getString("nextmedia.corruptmedia.title") + " ] ");
            System.err.println(idata.getLangpack().getString("nextmedia.corruptmedia"));
            System.err.println(idata.langpack.getString("nextmedia.corruptmedia"));
        }
        Debug.trace("Enter next media: " + volumename);

        File nextvolume = new File(volumename);
        NextMediaDialog nmd = null;

        while (!nextvolume.exists() || lastcorrupt) {
            System.out.println(" [ " + idata.getLangpack().getString("nextmedia.title") + " ] ");
            System.out.println(idata.getLangpack().getString("nextmedia.msg"));
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

            String nextmediainput = null;
            try {
                nextmediainput = reader.readLine();
            }
            catch (IOException e) {
                Debug.error("Error reading next media path: " + e.getMessage());
                e.printStackTrace();
            }

            if (nextmediainput != null) {
                nextvolume = new File(nextmediainput);
            } else {
                Debug.trace("Input from NextMediaDialog was null");
                nextvolume = new File(volumename);
            }
            // selection equal to last selected which was corrupt?
            if (!(volumename.equals(nextvolume.getAbsolutePath()) && lastcorrupt)) {
                lastcorrupt = false;
            }
        }
        return nextvolume;
    }

    public File enterNextMediaMessage(String volumename) {
        return enterNextMediaMessage(volumename, false);
    }

    public void init(AutomatedInstallData idata, AbstractUIProgressHandler handler) {
        this.idata = idata;
        this.handler = handler;
    }
}
File
MultiVolumeUnpackerAutomationHelper.java
Developer's decision
Combination
Kind of conflict
Class declaration
Import
Package declaration
Chunk
Conflicting content
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/MultiVolumeUnpackerHelper.java
package com.izforge.izpack.installer;

import com.izforge.izpack.panels.NextMediaDialog;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;

import javax.swing.JOptionPane;
import java.awt.Component;
import java.io.File;

public class MultiVolumeUnpackerHelper implements IMultiVolumeUnpackerHelper
{

    private AutomatedInstallData idata;

    private AbstractUIProgressHandler handler;

    public MultiVolumeUnpackerHelper()
    {

    }

    public File enterNextMediaMessage(String volumename, boolean lastcorrupt)
    {
        if (lastcorrupt)
        {
            Component parent = null;
            if ((this.handler != null) && (this.handler instanceof IzPanel))
            {
                parent = ((IzPanel) this.handler).getInstallerFrame();
            }
            JOptionPane.showMessageDialog(parent, idata.langpack
                    .getString("nextmedia.corruptmedia"), idata.langpack
                    .getString("nextmedia.corruptmedia.title"), JOptionPane.ERROR_MESSAGE);
        }
        Debug.trace("Enter next media: " + volumename);

        File nextvolume = new File(volumename);
        NextMediaDialog nmd = null;

        while (!nextvolume.exists() || lastcorrupt)
        {
            if ((this.handler != null) && (this.handler instanceof IzPanel))
            {
                InstallerFrame installframe = ((IzPanel) this.handler).getInstallerFrame();
                nmd = new NextMediaDialog(installframe, idata, volumename);
            }
            else
            {
                nmd = new NextMediaDialog(null, idata, volumename);
            }
            nmd.setVisible(true);
            String nextmediainput = nmd.getNextMedia();
            if (nextmediainput != null)
            {
                nextvolume = new File(nextmediainput);
            }
            else
            {
                Debug.trace("Input from NextMediaDialog was null");
                nextvolume = new File(volumename);
            }
            // selection equal to last selected which was corrupt?
            if (!(volumename.equals(nextvolume.getAbsolutePath()) && lastcorrupt))
            {
                lastcorrupt = false;
            }
        }
        return nextvolume;
    }

    public File enterNextMediaMessage(String volumename)
    {
        return enterNextMediaMessage(volumename, false);
    }

    public void init(AutomatedInstallData idata, AbstractUIProgressHandler handler)
    {
        this.idata = idata;
        this.handler = handler;
    }
}
=======
package com.izforge.izpack.installer.multiunpacker;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.base.IzPanel;
import com.izforge.izpack.installer.unpacker.IMultiVolumeUnpackerHelper;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;

import javax.swing.*;
import java.awt.*;
import java.io.File;

public class MultiVolumeUnpackerHelper implements IMultiVolumeUnpackerHelper {

    private AutomatedInstallData idata;

    private AbstractUIProgressHandler handler;

    public MultiVolumeUnpackerHelper() {

    }

    public File enterNextMediaMessage(String volumename, boolean lastcorrupt) {
        if (lastcorrupt) {
            Component parent = null;
            if ((this.handler != null) && (this.handler instanceof IzPanel)) {
                parent = ((IzPanel) this.handler).getInstallerFrame();
            }
            JOptionPane.showMessageDialog(parent, idata.getLangpack()
                    .getString("nextmedia.corruptmedia"), idata.getLangpack()
                    .getString("nextmedia.corruptmedia.title"), JOptionPane.ERROR_MESSAGE);
        }
        Debug.trace("Enter next media: " + volumename);

        File nextvolume = new File(volumename);
        NextMediaDialog nmd = null;

        while (!nextvolume.exists() || lastcorrupt) {
            if ((this.handler != null) && (this.handler instanceof IzPanel)) {
                InstallerFrame installframe = ((IzPanel) this.handler).getInstallerFrame();
                nmd = new NextMediaDialog(installframe, idata, volumename);
            } else {
                nmd = new NextMediaDialog(null, idata, volumename);
            }
            nmd.setVisible(true);
            String nextmediainput = nmd.getNextMedia();
            if (nextmediainput != null) {
                nextvolume = new File(nextmediainput);
            } else {
                Debug.trace("Input from NextMediaDialog was null");
                nextvolume = new File(volumename);
            }
            // selection equal to last selected which was corrupt?
            if (!(volumename.equals(nextvolume.getAbsolutePath()) && lastcorrupt)) {
                lastcorrupt = false;
            }
        }
        return nextvolume;
    }

    public File enterNextMediaMessage(String volumename) {
        return enterNextMediaMessage(volumename, false);
    }

    public void init(AutomatedInstallData idata, AbstractUIProgressHandler handler) {
        this.idata = idata;
        this.handler = handler;
    }
}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/multiunpacker/MultiVolumeUnpackerHelper.java
Solution content
package com.izforge.izpack.installer.multiunpacker;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.base.IzPanel;
import com.izforge.izpack.installer.unpacker.IMultiVolumeUnpackerHelper;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;

import javax.swing.*;
import java.awt.*;
import java.io.File;

public class MultiVolumeUnpackerHelper implements IMultiVolumeUnpackerHelper {

    private AutomatedInstallData idata;

    private AbstractUIProgressHandler handler;

    public MultiVolumeUnpackerHelper() {

    }

    public File enterNextMediaMessage(String volumename, boolean lastcorrupt) {
        if (lastcorrupt) {
            Component parent = null;
            if ((this.handler != null) && (this.handler instanceof IzPanel)) {
                parent = ((IzPanel) this.handler).getInstallerFrame();
            }
            JOptionPane.showMessageDialog(parent, idata.getLangpack()
                    .getString("nextmedia.corruptmedia"), idata.getLangpack()
                    .getString("nextmedia.corruptmedia.title"), JOptionPane.ERROR_MESSAGE);
        }
        Debug.trace("Enter next media: " + volumename);

        File nextvolume = new File(volumename);
        NextMediaDialog nmd = null;

        while (!nextvolume.exists() || lastcorrupt) {
            if ((this.handler != null) && (this.handler instanceof IzPanel)) {
                InstallerFrame installframe = ((IzPanel) this.handler).getInstallerFrame();
                nmd = new NextMediaDialog(installframe, idata, volumename);
            } else {
                nmd = new NextMediaDialog(null, idata, volumename);
            }
            nmd.setVisible(true);
            String nextmediainput = nmd.getNextMedia();
            if (nextmediainput != null) {
                nextvolume = new File(nextmediainput);
            } else {
                Debug.trace("Input from NextMediaDialog was null");
                nextvolume = new File(volumename);
            }
            // selection equal to last selected which was corrupt?
            if (!(volumename.equals(nextvolume.getAbsolutePath()) && lastcorrupt)) {
                lastcorrupt = false;
            }
        }
        return nextvolume;
    }
    public File enterNextMediaMessage(String volumename) {
        return enterNextMediaMessage(volumename, false);
    }

    public void init(AutomatedInstallData idata, AbstractUIProgressHandler handler) {
        this.idata = idata;
        this.handler = handler;
    }
}
File
MultiVolumeUnpackerHelper.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Import
Package declaration
Chunk
Conflicting content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/NextMediaDialog.java

package com.izforge.izpack.panels;
=======
package com.izforge.izpack.installer.multiunpacker;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/multiunpacker/NextMediaDialog.java

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.LocaleDatabase;
Solution content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.installer.multiunpacker;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.LocaleDatabase;
File
NextMediaDialog.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/NextMediaFileFilter.java

package com.izforge.izpack.panels;
=======
package com.izforge.izpack.installer.multiunpacker;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/multiunpacker/NextMediaFileFilter.java

import com.izforge.izpack.api.data.LocaleDatabase;
Solution content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.installer.multiunpacker;

import com.izforge.izpack.api.data.LocaleDatabase;
File
NextMediaFileFilter.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
}


<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ProgressDialog.java
package com.izforge.izpack.installer;

import javax.swing.*;
import java.awt.Dimension;
import java.awt.Toolkit;


public class ProgressDialog extends JWindow
{
    private static final long serialVersionUID = -6558347134501630050L;
    private JProgressBar progressBar;
    private ProgressDialogThread thread;


    public ProgressDialog()
    {
        initialize();
        this.thread = new ProgressDialogThread();
    }

    private void initialize()
    {
        JPanel main = new JPanel();
        main.setLayout(new BoxLayout(main, BoxLayout.PAGE_AXIS));

        JLabel label = new JLabel("Loading...");
        main.add(label);
        JPanel progress = new JPanel();
        progress.setLayout(new BoxLayout(progress, BoxLayout.LINE_AXIS));

        progressBar = new JProgressBar();
        progressBar.setMaximum(100);
        progressBar.setValue(0);
        progress.add(progressBar);
        progress.add(Box.createHorizontalGlue());
        main.add(Box.createVerticalStrut(5));
        main.add(progress);
        main.add(Box.createVerticalGlue());
        this.add(main);
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        int height = (int) (screenSize.height / 2);
        int width = (int) (screenSize.width / 2);
        this.thread.requestStop();
    }
        main.add(Box.createVerticalStrut(5));
        this.pack();
        Dimension dialogSize = this.getSize();
        int myheight = (int) (dialogSize.height / 2);
        int mywidth = (int) (dialogSize.width / 2);

        this.setLocation(width - mywidth, height - myheight);
    }

    public void startProgress()
    {

        this.setVisible(true);
        this.thread.init(this.progressBar);
        this.thread.start();
    }

    public void stopProgress()
    {
        this.setVisible(false);
class ProgressDialogThread extends Thread
{
    private boolean stopRequested;
    private JProgressBar progressBar;

    public ProgressDialogThread()
    {
        super("ProgressThread");
    }

    public void requestStop()
    {
        stopRequested = true;
    }

    public void init(JProgressBar progressBar)
    {
        this.progressBar = progressBar;
    }

    @Override
    public void run()
    {
        int count = 0;
        boolean up = true;

        while (!stopRequested)
        {
            if (up)
            {
                count++;
                if (count >= 100)
                {
                    up = false;
                }
            }
            else
            {
                count--;
                if (count <= 0)
                {
                    up = true;
                }
            }
            this.progressBar.setValue(count);
            try
            {
                Thread.sleep(100);
            }
            catch (InterruptedException e)
            {
                e.printStackTrace();
            }
        }
    }
=======
package com.izforge.izpack.installer.multiunpacker;


import javax.swing.*;
import java.awt.*;

/**
 * Created by IntelliJ IDEA.
 *
 * @author Anthonin Bonnefoy
 */
public class ProgressDialog extends JWindow {
    private static final long serialVersionUID = -6558347134501630050L;
    private JProgressBar progressBar;
    private ProgressDialogThread thread;


    public ProgressDialog() {
        initialize();
        this.thread = new ProgressDialogThread();
    }

    private void initialize() {
        JPanel main = new JPanel();
        main.setLayout(new BoxLayout(main, BoxLayout.PAGE_AXIS));

        JLabel label = new JLabel("Loading...");
        main.add(label);
        JPanel progress = new JPanel();
        progress.setLayout(new BoxLayout(progress, BoxLayout.LINE_AXIS));

        progressBar = new JProgressBar();
        progressBar.setMaximum(100);
        progressBar.setValue(0);
        progress.add(progressBar);
        progress.add(Box.createHorizontalGlue());
        main.add(progress);
        main.add(Box.createVerticalGlue());
        this.add(main);
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        int height = (int) (screenSize.height / 2);
        int width = (int) (screenSize.width / 2);
        this.pack();
        Dimension dialogSize = this.getSize();
        int myheight = (int) (dialogSize.height / 2);
        int mywidth = (int) (dialogSize.width / 2);

        this.setLocation(width - mywidth, height - myheight);
    }

    public void startProgress() {

        this.setVisible(true);
        this.thread.init(this.progressBar);
        this.thread.start();
    }
    public void stopProgress() {
        this.setVisible(false);
        this.thread.requestStop();
    }
}

class ProgressDialogThread extends Thread {
    private boolean stopRequested;
    private JProgressBar progressBar;

    public ProgressDialogThread() {
        super("ProgressThread");
    }

    public void requestStop() {
        stopRequested = true;
    }

    public void init(JProgressBar progressBar) {
        this.progressBar = progressBar;
    }

    @Override
    public void run() {
        int count = 0;
        boolean up = true;

        while (!stopRequested) {
            if (up) {
                count++;
                if (count >= 100) {
                    up = false;
                }
            } else {
                count--;
                if (count <= 0) {
                    up = true;
                }
            }
            this.progressBar.setValue(count);
            try {
                Thread.sleep(100);
            }
            catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/multiunpacker/ProgressDialog.java
}
Solution content
    }

        initialize();
        this.thread = new ProgressDialogThread();
package com.izforge.izpack.installer.multiunpacker;

import javax.swing.*;
import javax.swing.*;
import java.awt.*;

/**
 * Created by IntelliJ IDEA.
 *
 * @author Anthonin Bonnefoy
 */
public class ProgressDialog extends JWindow {
    private static final long serialVersionUID = -6558347134501630050L;
    private JProgressBar progressBar;
    private ProgressDialogThread thread;


    public ProgressDialog()
    {
    private void initialize()
    {
        JPanel main = new JPanel();
        main.setLayout(new BoxLayout(main, BoxLayout.PAGE_AXIS));

        JLabel label = new JLabel("Loading...");
        main.add(label);
        JPanel progress = new JPanel();
        progress.setLayout(new BoxLayout(progress, BoxLayout.LINE_AXIS));

        progressBar = new JProgressBar();
        progressBar.setMaximum(100);
        progressBar.setValue(0);
        progress.add(progressBar);
        progress.add(Box.createHorizontalGlue());
        main.add(Box.createVerticalStrut(5));
        main.add(progress);
        main.add(Box.createVerticalGlue());
        this.add(main);
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        int height = (int) (screenSize.height / 2);
        int width = (int) (screenSize.width / 2);
        this.pack();
        Dimension dialogSize = this.getSize();
        int myheight = (int) (dialogSize.height / 2);
        int mywidth = (int) (dialogSize.width / 2);

        this.setLocation(width - mywidth, height - myheight);
    }

    public void startProgress()
    {

        this.setVisible(true);
        this.thread.init(this.progressBar);
        this.thread.start();
    }

    public void stopProgress()
    {
        this.setVisible(false);
        this.thread.requestStop();
    }
}

class ProgressDialogThread extends Thread
{
    private boolean stopRequested;
    private JProgressBar progressBar;

    public ProgressDialogThread()
    {
        super("ProgressThread");
    }

    public void requestStop() {
        stopRequested = true;
    }

    public void init(JProgressBar progressBar)
    {
        this.progressBar = progressBar;
    }

    @Override
    public void run()
    {
        int count = 0;
        boolean up = true;

        while (!stopRequested)
        {
            if (up)
            {
                count++;
                if (count >= 100)
                {
                    up = false;
                }
            }
            else
            {
                count--;
                if (count <= 0)
                {
                    up = true;
                }
            }
            this.progressBar.setValue(count);
            try {
                Thread.sleep(100);
            }
            catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
File
ProgressDialog.java
Developer's decision
Combination
Kind of conflict
Annotation
Attribute
Class declaration
Comment
Import
Method declaration
Package declaration
Chunk
Conflicting content
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IMultiVolumeUnpackerHelper.java
package com.izforge.izpack.installer;

import com.izforge.izpack.util.AbstractUIProgressHandler;

import java.io.File;

public interface IMultiVolumeUnpackerHelper
{
    public void init(AutomatedInstallData idata, AbstractUIProgressHandler handler);

    public File enterNextMediaMessage(String volumename, boolean lastcorrupt);

    public File enterNextMediaMessage(String volumename);
=======
package com.izforge.izpack.installer.unpacker;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.util.AbstractUIProgressHandler;

import java.io.File;

public interface IMultiVolumeUnpackerHelper {
    public void init(AutomatedInstallData idata, AbstractUIProgressHandler handler);

    public File enterNextMediaMessage(String volumename, boolean lastcorrupt);

    public File enterNextMediaMessage(String volumename);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/IMultiVolumeUnpackerHelper.java
}
Solution content
    public File enterNextMediaMessage(String volumename, boolean lastcorrupt);
package com.izforge.izpack.installer.unpacker;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.util.AbstractUIProgressHandler;

import java.io.File;

public interface IMultiVolumeUnpackerHelper {
    public void init(AutomatedInstallData idata, AbstractUIProgressHandler handler);

    public File enterNextMediaMessage(String volumename);
}
File
IMultiVolumeUnpackerHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Method interface
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/IUnpacker.java

package com.izforge.izpack.installer;
=======
package com.izforge.izpack.installer.unpacker;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/IUnpacker.java

import com.izforge.izpack.api.rules.RulesEngine;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.installer.unpacker;

import com.izforge.izpack.api.rules.RulesEngine;
File
IUnpacker.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
                        stepname = name;
                    }
                }
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/Unpacker.java
                if (pack.isHidden())
                {
=======
                if (pack.isHidden()) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/Unpacker.java
                    // TODO: hide the pack completely
                    // hide the pack name if pack is hidden
                    stepname = "";
Solution content
                        stepname = name;
                    }
                }
                if (pack.isHidden())
                {
                    // TODO: hide the pack completely
                    // hide the pack name if pack is hidden
                    stepname = "";
File
Unpacker.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                    // We read the header
                    PackFile pf = (PackFile) objIn.readObject();
                    // TODO: reaction if condition can not be checked
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/Unpacker.java
                    if (pf.hasCondition() && (rules != null))
                    {
                        if (!rules.isConditionTrue(pf.getCondition()))
                        {
                            if (!pf.isBackReference())
                            {
=======
                    if (pf.hasCondition() && (rules != null)) {
                        if (!rules.isConditionTrue(pf.getCondition())) {
                            if (!pf.isBackReference()) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/Unpacker.java
                                // skip, condition is not fulfilled
                                objIn.skip(pf.length());
                            }
Solution content
                    // We read the header
                    PackFile pf = (PackFile) objIn.readObject();
                    // TODO: reaction if condition can not be checked
                    if (pf.hasCondition() && (rules != null)) {
                        if (!rules.isConditionTrue(pf.getCondition())) {
                            if (!pf.isBackReference())
                            {
                                // skip, condition is not fulfilled
                                objIn.skip(pf.length());
                            }
File
Unpacker.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                            }

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/Unpacker.java
                            if (!overwritefile)
                            {
                                if (!pf.isBackReference() && !((Pack) packs.get(i)).loose)
                                {
                                    if (pf.isPack200Jar())
                                    {
                                        objIn.skip(Integer.SIZE / 8);
                                    }
                                    else
                                    {
=======
                            if (!overwritefile) {
                                if (!pf.isBackReference() && !((Pack) packs.get(i)).loose) {
                                    if (pf.isPack200Jar()) {
                                        objIn.skip(Integer.SIZE / 8);
                                    } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/Unpacker.java
                                        objIn.skip(pf.length());
                                    }
                                }
Solution content
                            }

                            if (!overwritefile) {
                                if (!pf.isBackReference() && !((Pack) packs.get(i)).loose) {
                                    if (pf.isPack200Jar())
                                    {
                                        objIn.skip(Integer.SIZE / 8);
                                    }
                                    else
                                    {
                                        objIn.skip(pf.length());
                                    }
                                }
File
Unpacker.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
                            File resolvedFile = new File(getAbsolutInstallSource(), pf
                                    .getRelativeSourcePath());
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/Unpacker.java
                            if (!resolvedFile.exists())
                            {
=======
                            if (!resolvedFile.exists()) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/Unpacker.java
                                //try alternative destination - the current working directory
                                //user.dir is likely (depends on launcher type) the current directory of the executable or jar-file...
                                final File userDir = new File(System.getProperty("user.dir"));
Solution content
                            File resolvedFile = new File(getAbsolutInstallSource(), pf
                                    .getRelativeSourcePath());
                            if (!resolvedFile.exists()) {
                                //try alternative destination - the current working directory
                                //user.dir is likely (depends on launcher type) the current directory of the executable or jar-file...
                                final File userDir = new File(System.getProperty("user.dir"));
File
Unpacker.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                            // doesn't work on streams but only on physical files
                            tmpFile = File.createTempFile("__FQ__", null, pathFile.getParentFile());
                            out = new FileOutputStream(tmpFile);
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/Unpacker.java
                        }
                        else
                        {
=======
                        } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/Unpacker.java
                            out = new FileOutputStream(pathFile);
                        }
Solution content
                            // doesn't work on streams but only on physical files
                            tmpFile = File.createTempFile("__FQ__", null, pathFile.getParentFile());
                            out = new FileOutputStream(tmpFile);
                        } else {
                            out = new FileOutputStream(pathFile);
                        }
File
Unpacker.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
            String tempfile;
            try {
            // See compiler.Packager#getJarOutputStream for the counterpart
            String baseName = idata.getInfo().getInstallerBase();
            String packURL = webDirURL + "/" + baseName + ".pack" + packid + ".jar";
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/Unpacker.java
            String tf = IoHelper.translatePath(idata.info.getUninstallerPath() + Unpacker.tempSubPath, vs);
=======
            String tf = IoHelper.translatePath(idata.getInfo().getUninstallerPath() + Unpacker.tempSubPath, variableSubstitutor);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/Unpacker.java
                tempfile = WebRepositoryAccessor.getCachedUrl(packURL, tf);
Solution content
            // See compiler.Packager#getJarOutputStream for the counterpart
            String baseName = idata.getInfo().getInstallerBase();
            String packURL = webDirURL + "/" + baseName + ".pack" + packid + ".jar";
            String tf = IoHelper.translatePath(idata.getInfo().getUninstallerPath() + Unpacker.tempSubPath, variableSubstitutor);
            String tempfile;
            try {
                tempfile = WebRepositoryAccessor.getCachedUrl(packURL, tf);
File
Unpacker.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/UnpackerBase.java

package com.izforge.izpack.installer;

import com.izforge.izpack.LocaleDatabase;
import com.izforge.izpack.Pack;
import com.izforge.izpack.PackFile;
import com.izforge.izpack.UpdateCheck;
import com.izforge.izpack.event.InstallerListener;
import com.izforge.izpack.rules.RulesEngine;
import com.izforge.izpack.util.*;
=======
package com.izforge.izpack.installer.unpacker;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.api.substitutor.SubstitutionType;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.api.unpacker.IDiscardInterruptable;
import com.izforge.izpack.core.event.InstallerListener;
import com.izforge.izpack.data.Blockable;
import com.izforge.izpack.data.PackFile;
import com.izforge.izpack.data.UpdateCheck;
import com.izforge.izpack.installer.data.UninstallData;
import com.izforge.izpack.merge.Mergeable;
import com.izforge.izpack.merge.resolve.PathResolver;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.IoHelper;
import com.izforge.izpack.util.OsVersion;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/UnpackerBase.java
import org.apache.regexp.RE;
import org.apache.regexp.RECompiler;
import org.apache.regexp.RESyntaxException;
Solution content
import com.izforge.izpack.merge.resolve.PathResolver;
import com.izforge.izpack.util.AbstractUIProgressHandler;
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.installer.unpacker;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.api.substitutor.SubstitutionType;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.api.unpacker.IDiscardInterruptable;
import com.izforge.izpack.core.event.InstallerListener;
import com.izforge.izpack.data.Blockable;
import com.izforge.izpack.data.PackFile;
import com.izforge.izpack.data.UpdateCheck;
import com.izforge.izpack.installer.data.UninstallData;
import com.izforge.izpack.merge.Mergeable;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.IoHelper;
import com.izforge.izpack.util.OsVersion;
import org.apache.regexp.RE;
import org.apache.regexp.RECompiler;
import org.apache.regexp.RESyntaxException;
File
UnpackerBase.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
        String uninstallerCondition = idata.getInfo().getUninstallerCondition();
        if ((uninstallerCondition != null) &&
                (uninstallerCondition.length() > 0) &&
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/UnpackerBase.java
                !this.rules.isConditionTrue(uninstallerCondition))
        {
=======
                !this.rules.isConditionTrue(uninstallerCondition)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/UnpackerBase.java
            Debug.log("Uninstaller has a condition (" + uninstallerCondition + ") which is not fulfilled.");
            Debug.log("Skipping creation of uninstaller.");
            return;
Solution content
        String uninstallerCondition = idata.getInfo().getUninstallerCondition();
        if ((uninstallerCondition != null) &&
                (uninstallerCondition.length() > 0) &&
                !this.rules.isConditionTrue(uninstallerCondition))
        {
            Debug.log("Uninstaller has a condition (" + uninstallerCondition + ") which is not fulfilled.");
            Debug.log("Skipping creation of uninstaller.");
            return;
File
UnpackerBase.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
    protected File getAbsolutInstallSource() throws Exception {
        if (absolutInstallSource == null) {
            URI uri = getClass().getProtectionDomain().getCodeSource().getLocation().toURI();
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/UnpackerBase.java
            if (!"file".equals(uri.getScheme()))
            {
=======
            if (!"file".equals(uri.getScheme())) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/UnpackerBase.java
                throw new Exception("Unexpected scheme in JAR file URI: " + uri);
            }
            absolutInstallSource = new File(uri.getSchemeSpecificPart()).getAbsoluteFile();
Solution content
    protected File getAbsolutInstallSource() throws Exception {
        if (absolutInstallSource == null) {
            URI uri = getClass().getProtectionDomain().getCodeSource().getLocation().toURI();
            if (!"file".equals(uri.getScheme())) {
                throw new Exception("Unexpected scheme in JAR file URI: " + uri);
            }
            absolutInstallSource = new File(uri.getSchemeSpecificPart()).getAbsoluteFile();
File
UnpackerBase.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
    protected boolean blockableForCurrentOs(PackFile pf) {
        return
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/UnpackerBase.java
                (pf.blockable() != PackFile.BLOCKABLE_NONE)
=======
                (pf.blockable() != Blockable.BLOCKABLE_NONE)
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/unpacker/UnpackerBase.java
                        && (OsVersion.IS_WINDOWS);
    }
}
Solution content
    protected boolean blockableForCurrentOs(PackFile pf)
    {
        return
                (pf.blockable() != PackFile.BLOCKABLE_NONE)
                        && (OsVersion.IS_WINDOWS);
    }
}
File
UnpackerBase.java
Developer's decision
Manual
Kind of conflict
Method invocation
Chunk
Conflicting content
 * limitations under the License.
 */

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/WebRepositoryAccessor.java
package com.izforge.izpack.installer;

import com.izforge.izpack.ExecutableFile;
import com.izforge.izpack.Pack;
import com.izforge.izpack.ParsableFile;
import com.izforge.izpack.UpdateCheck;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.IXMLParser;
import com.izforge.izpack.adaptator.impl.XMLParser;
import com.izforge.izpack.compiler.CompilerException;
import com.izforge.izpack.compiler.PackInfo;
=======
package com.izforge.izpack.installer.web;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
import com.izforge.izpack.api.adaptator.impl.XMLParser;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.exception.CompilerException;
import com.izforge.izpack.api.substitutor.SubstitutionType;
import com.izforge.izpack.data.ExecutableFile;
import com.izforge.izpack.data.PackInfo;
import com.izforge.izpack.data.ParsableFile;
import com.izforge.izpack.data.UpdateCheck;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/installer/web/WebRepositoryAccessor.java
import com.izforge.izpack.util.OsConstraint;

import java.io.File;
Solution content
 * limitations under the License.
 */

package com.izforge.izpack.installer.web;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
import com.izforge.izpack.api.adaptator.impl.XMLParser;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.exception.CompilerException;
import com.izforge.izpack.api.substitutor.SubstitutionType;
import com.izforge.izpack.data.ExecutableFile;
import com.izforge.izpack.data.PackInfo;
import com.izforge.izpack.data.ParsableFile;
import com.izforge.izpack.data.UpdateCheck;
import com.izforge.izpack.util.OsConstraint;

import java.io.File;
File
WebRepositoryAccessor.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
                String urls = e.getURL().toExternalForm();
                if (com.izforge.izpack.util.OsVersion.IS_OSX) {
                    Runtime.getRuntime().exec("open " + urls);
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/HyperlinkHandler.java
                }
                else if (com.izforge.izpack.util.OsVersion.IS_UNIX)
                {
=======
                } else if (com.izforge.izpack.util.OsVersion.IS_UNIX) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/HyperlinkHandler.java
                    String[] launchers = {"htmlview QqzURL", "xdg-open QqzURL",
                            "gnome-open QqzURL", "kfmclient openURL QqzURL", "call-browser QqzURL",
                            "firefox QqzURL", "opera QqzURL", "konqueror QqzURL",
Solution content
                String urls = e.getURL().toExternalForm();
                if (com.izforge.izpack.util.OsVersion.IS_OSX) {
                    Runtime.getRuntime().exec("open " + urls);
                } else if (com.izforge.izpack.util.OsVersion.IS_UNIX) {
                    String[] launchers = {"htmlview QqzURL", "xdg-open QqzURL",
                            "gnome-open QqzURL", "kfmclient openURL QqzURL", "call-browser QqzURL",
                            "firefox QqzURL", "opera QqzURL", "konqueror QqzURL",
File
HyperlinkHandler.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        {
}
=======
        else
        {
        }
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/FileQueueCopy.java
package com.izforge.izpack.util.os;

import com.izforge.izpack.util.Debug;

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

/**
 * File queue copy operation (Windows Setup API)
 */
public class FileQueueCopy implements FileQueueOperation
{

    protected File fromFile = null; // source file
    protected File toFile = null; // destination file

    protected int copyStyle = WinSetupAPIBase.SP_COPY_NOOVERWRITE;


    public FileQueueCopy(File fromFile, File toFile)
    {
        this(fromFile, toFile, false, false);
    }

    public FileQueueCopy(File fromFile, File toFile, boolean deleteSource, boolean forceInUse)
    {
        this.fromFile = fromFile;
        this.toFile = toFile;
        setDeleteSource(deleteSource);
        setForceInUse(forceInUse);
    }

    // --- Copy Styles ---------------------------------------------------------

    public void setDeleteSource(boolean flag)
    {
        if (flag)
        {
            this.copyStyle |= WinSetupAPIBase.SP_COPY_DELETESOURCE;
        }
        else
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_DELETESOURCE);
        }
    }

    public void setForceInUse(boolean flag)
    {
        if (flag)
        {
            this.copyStyle |= WinSetupAPIBase.SP_COPY_FORCE_IN_USE;
        }
        else
        {
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_FORCE_IN_USE);
        }
    }

    public void setInUseNeedsReboot(boolean flag)
    {
        if (flag)
        {
            this.copyStyle |= WinSetupAPIBase.SP_COPY_IN_USE_NEEDS_REBOOT;
        }
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_IN_USE_NEEDS_REBOOT);
        }
    }

    public void setLanguageAware(boolean flag)
    {
        if (flag)
        {
            this.copyStyle |= WinSetupAPIBase.SP_COPY_LANGUAGEAWARE;
        }
        else
        {
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_LANGUAGEAWARE);
        }
    }

    public void setNewerOrSame(boolean flag)
    {
        if (flag)
        {
            this.copyStyle |= WinSetupAPIBase.SP_COPY_NEWER_OR_SAME;
        }
        else
        {
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_NEWER_OR_SAME);
        }
    }

    public void setNewerOnly(boolean flag)
    {
        if (flag)
        {
            this.copyStyle &= WinSetupAPIBase.SP_COPY_NEWER_ONLY;
        }
    }

    public void setReplaceOnly(boolean flag)
    {
        if (flag)
        {
            this.copyStyle |= WinSetupAPIBase.SP_COPY_REPLACEONLY;
        }
        else
        {
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_REPLACEONLY);
        }
    }

    /**
     * Overwrite any existing destination file(s).
     *
     * @param overwrite if true force overwriting of destination file(s) even if the destination
     *                  file(s) are younger than the corresponding source file. Default is false.
     */
    public void setOverwrite(boolean flag)
    {
        if (flag)
        {
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_NOOVERWRITE);
        }
        else
        {
            this.copyStyle |= WinSetupAPIBase.SP_COPY_NOOVERWRITE;
        }
    }

    public void addTo(WinSetupFileQueue filequeue) throws IOException
    {
        if (fromFile.equals(toFile))
        {
            Debug.log("Skipping self-copy of " + fromFile);
        }
        else
        {
            try
            {
                Debug.log("Enqueueing copying " + fromFile + " to " + toFile
                        + " (0x" + Integer.toHexString(copyStyle) + ")");
                filequeue.addCopy(fromFile, toFile, copyStyle);
            }
            catch (IOException ioe)
            {
                String msg = "Failed to enqueue copying " + fromFile + " to " + toFile
                        + " due to " + ioe.getMessage();
                throw new IOException(msg);
            }
package com.izforge.izpack.util.os;

import com.izforge.izpack.util.Debug;

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

/**
 * File queue copy operation (Windows Setup API)
 */
public class FileQueueCopy implements FileQueueOperation {

    protected File fromFile = null; // source file
    protected File toFile = null; // destination file

    protected int copyStyle = WinSetupAPIBase.SP_COPY_NOOVERWRITE;


    public FileQueueCopy(File fromFile, File toFile) {
        this(fromFile, toFile, false, false);
    }

    public FileQueueCopy(File fromFile, File toFile, boolean deleteSource, boolean forceInUse) {
        this.fromFile = fromFile;
        this.toFile = toFile;
        setDeleteSource(deleteSource);
        setForceInUse(forceInUse);
    }

    // --- Copy Styles ---------------------------------------------------------

    public void setDeleteSource(boolean flag) {
        if (flag)
            this.copyStyle |= WinSetupAPIBase.SP_COPY_DELETESOURCE;
        else
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_DELETESOURCE);
    }

    public void setForceInUse(boolean flag) {
        if (flag)
            this.copyStyle |= WinSetupAPIBase.SP_COPY_FORCE_IN_USE;
        else
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_FORCE_IN_USE);
    }

    public void setInUseNeedsReboot(boolean flag) {
        if (flag)
            this.copyStyle |= WinSetupAPIBase.SP_COPY_IN_USE_NEEDS_REBOOT;
        else
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_IN_USE_NEEDS_REBOOT);
    }

    public void setLanguageAware(boolean flag) {
        if (flag)
            this.copyStyle |= WinSetupAPIBase.SP_COPY_LANGUAGEAWARE;
        else
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_LANGUAGEAWARE);
    }

    public void setNewerOrSame(boolean flag) {
        if (flag)
            this.copyStyle |= WinSetupAPIBase.SP_COPY_NEWER_OR_SAME;
        else
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_NEWER_OR_SAME);
    }

    public void setNewerOnly(boolean flag) {
        if (flag) this.copyStyle &= WinSetupAPIBase.SP_COPY_NEWER_ONLY;
    }

    public void setReplaceOnly(boolean flag) {
        if (flag)
            this.copyStyle |= WinSetupAPIBase.SP_COPY_REPLACEONLY;
        else
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_REPLACEONLY);
    }

    /**
     * Overwrite any existing destination file(s).
     *
     * @param overwrite if true force overwriting of destination file(s) even if the destination
     *                  file(s) are younger than the corresponding source file. Default is false.
     */
    public void setOverwrite(boolean flag) {
        if (flag)
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_NOOVERWRITE);
        else
            this.copyStyle |= WinSetupAPIBase.SP_COPY_NOOVERWRITE;
    }

    public void addTo(WinSetupFileQueue filequeue) throws IOException {
        if (fromFile.equals(toFile)) {
            Debug.log("Skipping self-copy of " + fromFile);
        } else {
            try {
                Debug.log("Enqueueing copying " + fromFile + " to " + toFile
                        + " (0x" + Integer.toHexString(copyStyle) + ")");
                filequeue.addCopy(fromFile, toFile, copyStyle);
            }
            catch (IOException ioe) {
                String msg = "Failed to enqueue copying " + fromFile + " to " + toFile
                        + " due to " + ioe.getMessage();
                throw new IOException(msg);
            }
        }
    }

}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/FileQueueCopy.java
Solution content
     *

     * Overwrite any existing destination file(s).
        }
    }
package com.izforge.izpack.util.os;

import com.izforge.izpack.util.Debug;

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

/**
 * File queue copy operation (Windows Setup API)
 */
public class FileQueueCopy implements FileQueueOperation {

    protected File fromFile = null; // source file
    protected File toFile = null; // destination file

    protected int copyStyle = WinSetupAPIBase.SP_COPY_NOOVERWRITE;


    public FileQueueCopy(File fromFile, File toFile) {
        this(fromFile, toFile, false, false);
    }

    public FileQueueCopy(File fromFile, File toFile, boolean deleteSource, boolean forceInUse) {
        this.fromFile = fromFile;
        this.toFile = toFile;
        setDeleteSource(deleteSource);
        setForceInUse(forceInUse);
    }

    // --- Copy Styles ---------------------------------------------------------

    public void setDeleteSource(boolean flag) {
        if (flag)
        {
            this.copyStyle |= WinSetupAPIBase.SP_COPY_DELETESOURCE;
        }
        else
        {
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_DELETESOURCE);
    public void setForceInUse(boolean flag) {
        if (flag)
        {
            this.copyStyle |= WinSetupAPIBase.SP_COPY_FORCE_IN_USE;
        }
        else
        {
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_FORCE_IN_USE);
        }
    }

    public void setInUseNeedsReboot(boolean flag) {
        if (flag)
        {
            this.copyStyle |= WinSetupAPIBase.SP_COPY_IN_USE_NEEDS_REBOOT;
        }
        else
        {
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_IN_USE_NEEDS_REBOOT);
        }
    }

    public void setLanguageAware(boolean flag) {
        if (flag)
        {
            this.copyStyle |= WinSetupAPIBase.SP_COPY_LANGUAGEAWARE;
        }
        else
        {
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_LANGUAGEAWARE);
        }
    }

    public void setNewerOrSame(boolean flag) {
        if (flag)
        {
            this.copyStyle |= WinSetupAPIBase.SP_COPY_NEWER_OR_SAME;
        }
        else
        {
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_NEWER_OR_SAME);
        }
    }

    public void setNewerOnly(boolean flag) {
        if (flag)
        {
            this.copyStyle &= WinSetupAPIBase.SP_COPY_NEWER_ONLY;
        }
    }

    public void setReplaceOnly(boolean flag) {
        if (flag)
        {
            this.copyStyle |= WinSetupAPIBase.SP_COPY_REPLACEONLY;
        }
        else
        {
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_REPLACEONLY);
        }
    }

    /**
     * @param overwrite if true force overwriting of destination file(s) even if the destination
     *                  file(s) are younger than the corresponding source file. Default is false.
     */
    public void setOverwrite(boolean flag) {
        if (flag)
        {
            this.copyStyle &= (~WinSetupAPIBase.SP_COPY_NOOVERWRITE);
        }
        else
        {
            this.copyStyle |= WinSetupAPIBase.SP_COPY_NOOVERWRITE;
        }
    }

    public void addTo(WinSetupFileQueue filequeue) throws IOException {
        if (fromFile.equals(toFile)) {
            Debug.log("Skipping self-copy of " + fromFile);
        } else {
            try {
                Debug.log("Enqueueing copying " + fromFile + " to " + toFile
                        + " (0x" + Integer.toHexString(copyStyle) + ")");
                filequeue.addCopy(fromFile, toFile, copyStyle);
            }
            catch (IOException ioe) {
                String msg = "Failed to enqueue copying " + fromFile + " to " + toFile
                        + " due to " + ioe.getMessage();
                throw new IOException(msg);
            }
        }
    }

}
File
FileQueueCopy.java
Developer's decision
Version 1
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
 * File queue delete operation (Windows Setup API)
 */
public class FileQueueDelete implements FileQueueOperation
{
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/FileQueueDelete.java
package com.izforge.izpack.util.os;

import com.izforge.izpack.util.Debug;

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

/*
    protected File file;

    public FileQueueDelete(File file)
    {
        this.file = file;
    }

    public FileQueueDelete(String file)
    {
        this.file = new File(file);
    }

    public void addTo(WinSetupFileQueue fileQueue) throws IOException
    {
        if (file != null)
        {
            if (file.exists())
            {
                if (file.isDirectory())
                {
                    Debug.log("Directory " + file.getAbsolutePath()
                            + " cannot be removed in a file queue");
                }
                else
                {
                    Debug.log("Enqueueing deletion of " + file.getAbsolutePath());
                    try
                    {
                        fileQueue.addDelete(file);
                    }
                    catch (IOException ioe)
                    {
                        String msg = "Failed to enqueue deletion of " + file + " due to "
                                + ioe.getMessage();
                        throw new IOException(msg);
                    }
                }
            }
            else
            {
                Debug.log("Could not find file " + file.getAbsolutePath() + " to delete.");
            }
        }
    }
}
=======
package com.izforge.izpack.util.os;

import com.izforge.izpack.util.Debug;

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

/*
 * File queue delete operation (Windows Setup API)
 */
public class FileQueueDelete implements FileQueueOperation {

    protected File file;

    public FileQueueDelete(File file) {
        this.file = file;
    }

    public FileQueueDelete(String file) {
        this.file = new File(file);
    }

    public void addTo(WinSetupFileQueue fileQueue) throws IOException {
        if (file != null) {
            if (file.exists()) {
                if (file.isDirectory()) {
                    Debug.log("Directory " + file.getAbsolutePath()
                            + " cannot be removed in a file queue");
                } else {
                    Debug.log("Enqueueing deletion of " + file.getAbsolutePath());
                    try {
                        fileQueue.addDelete(file);
                    }
                    catch (IOException ioe) {
                        String msg = "Failed to enqueue deletion of " + file + " due to "
                                + ioe.getMessage();
                        throw new IOException(msg);
                    }
                }
            } else {
                Debug.log("Could not find file " + file.getAbsolutePath() + " to delete.");
            }
        }
    }
}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/FileQueueDelete.java
Solution content
package com.izforge.izpack.util.os;

import com.izforge.izpack.util.Debug;

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

/*
 * File queue delete operation (Windows Setup API)
 */
public class FileQueueDelete implements FileQueueOperation {

    protected File file;

    public FileQueueDelete(File file) {
        this.file = file;
    }

    public FileQueueDelete(String file) {
        this.file = new File(file);
    }

    public void addTo(WinSetupFileQueue fileQueue) throws IOException {
        if (file != null) {
            if (file.exists()) {
                if (file.isDirectory()) {
                    Debug.log("Directory " + file.getAbsolutePath()
                            + " cannot be removed in a file queue");
                } else {
                    Debug.log("Enqueueing deletion of " + file.getAbsolutePath());
                    try {
                        fileQueue.addDelete(file);
                    }
                    catch (IOException ioe) {
                        String msg = "Failed to enqueue deletion of " + file + " due to "
                                + ioe.getMessage();
                        throw new IOException(msg);
                    }
                }
            } else {
                Debug.log("Could not find file " + file.getAbsolutePath() + " to delete.");
            }
        }
    }
}
File
FileQueueDelete.java
Developer's decision
Version 1
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
{

<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/FileQueueMove.java
package com.izforge.izpack.util.os;

import com.izforge.izpack.util.Debug;

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


/**
 * File queue move operation (Windows Setup API)
 */
public class FileQueueMove extends FileQueueCopy
    public FileQueueMove(File fromFile, File toFile)
    {
        this(fromFile, toFile, false);
    }

    public FileQueueMove(File fromFile, File toFile, boolean forceInUse)
    {
        super(fromFile, toFile, true, forceInUse);
    }

    @Override
    public void addTo(WinSetupFileQueue filequeue) throws IOException
    {
        try
        {
            Debug.log("Enqueueing moving " + fromFile + " to " + toFile
                    + " (0x" + Integer.toHexString(copyStyle) + ")");
            filequeue.addMove(fromFile, toFile);
        }
        catch (IOException e)
        {
            throw new IOException(
                    "Failed to enqueue moving " + fromFile + " to " + toFile
                            + " due to " + e.getMessage());
        }
    }

}
=======
package com.izforge.izpack.util.os;

import com.izforge.izpack.util.Debug;

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


/**
 * File queue move operation (Windows Setup API)
 */
public class FileQueueMove extends FileQueueCopy {

    public FileQueueMove(File fromFile, File toFile) {
        this(fromFile, toFile, false);
    }

    public FileQueueMove(File fromFile, File toFile, boolean forceInUse) {
        super(fromFile, toFile, true, forceInUse);
    }

    @Override
    public void addTo(WinSetupFileQueue filequeue) throws IOException {
        try {
            Debug.log("Enqueueing moving " + fromFile + " to " + toFile
                    + " (0x" + Integer.toHexString(copyStyle) + ")");
            filequeue.addMove(fromFile, toFile);
        }
        catch (IOException e) {
            throw new IOException(
                    "Failed to enqueue moving " + fromFile + " to " + toFile
                            + " due to " + e.getMessage());
        }
    }

}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/FileQueueMove.java
Solution content
package com.izforge.izpack.util.os;

import com.izforge.izpack.util.Debug;

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


/**
 * File queue move operation (Windows Setup API)
 */
public class FileQueueMove extends FileQueueCopy {

    public FileQueueMove(File fromFile, File toFile) {
        this(fromFile, toFile, false);
    }

    public FileQueueMove(File fromFile, File toFile, boolean forceInUse) {
        super(fromFile, toFile, true, forceInUse);
    }

    @Override
    public void addTo(WinSetupFileQueue filequeue) throws IOException {
        try {
            Debug.log("Enqueueing moving " + fromFile + " to " + toFile
                    + " (0x" + Integer.toHexString(copyStyle) + ")");
            filequeue.addMove(fromFile, toFile);
        }
        catch (IOException e) {
            throw new IOException(
                    "Failed to enqueue moving " + fromFile + " to " + toFile
                            + " due to " + e.getMessage());
        }
    }

}
File
FileQueueMove.java
Developer's decision
Version 1
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
        if (allUsersFileObj != null) {  //all-users file object was setup above
            try {
                if (allUsersFileObj.exists() &&
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/ShellLink.java
                        allUsersFileObj.lastModified() > aufLastModVal)
                {  //link exists in all-users location and has been updated
=======
                        allUsersFileObj.lastModified() > aufLastModVal) {  //link exists in all-users location and has been updated
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/ShellLink.java
                    //setup file object for current-user location:
                    final File curUserFileObj = new File(saveTo);
                    //move link file to current-user location:
Solution content
                if (allUsersFileObj.exists() &&
                        allUsersFileObj.lastModified() > aufLastModVal)
                {  //link exists in all-users location and has been updated
                    //setup file object for current-user location:
                    final File curUserFileObj = new File(saveTo);
                    //move link file to current-user location:
File
ShellLink.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Variable
Chunk
Conflicting content
                    allUsersFileObj.getParentFile().delete();
                }
            }
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/ShellLink.java
            catch (Exception ex)
            {  //some kind of exception error; ignore and move on
=======
            catch (Exception ex) {  //some kind of exception error; ignore and move on
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/ShellLink.java
            }
        }
Solution content
                    allUsersFileObj.getParentFile().delete();
                }
            }
            catch (Exception ex)
            {  //some kind of exception error; ignore and move on
            }
        }
File
ShellLink.java
Developer's decision
Version 1
Kind of conflict
Catch clause
Comment
Chunk
Conflicting content
        {
=======
            destFileObj.renameTo(tempFileObj);  //rename dest to temp name
            srcFileObj.renameTo(destFileObj);   //move source file to dest
            tempFileObj.delete();               //remove renamed original file
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/ShellLink.java
        }
        else    //destination file does not exist
        } else    //destination file does not exist
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/ShellLink.java
            srcFileObj.renameTo(destFileObj);
        }
    }
Solution content
            destFileObj.renameTo(tempFileObj);  //rename dest to temp name
            srcFileObj.renameTo(destFileObj);   //move source file to dest
            tempFileObj.delete();               //remove renamed original file
        } else    //destination file does not exist
        {
            srcFileObj.renameTo(destFileObj);
        }
    }
File
ShellLink.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
import com.izforge.izpack.util.FileExecutor;
import com.izforge.izpack.util.OsVersion;
import com.izforge.izpack.util.StringTool;
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/Unix_Shortcut.java
import com.izforge.izpack.util.os.unix.ShellScript;
import com.izforge.izpack.util.os.unix.UnixHelper;
import com.izforge.izpack.util.os.unix.UnixUser;
import com.izforge.izpack.util.os.unix.UnixUsers;
=======
import com.izforge.izpack.util.unix.ShellScript;
import com.izforge.izpack.util.unix.UnixHelper;
import com.izforge.izpack.util.unix.UnixUser;
import com.izforge.izpack.util.unix.UnixUsers;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/Unix_Shortcut.java

import java.io.*;
import java.util.*;
Solution content
import com.izforge.izpack.util.FileExecutor;
import com.izforge.izpack.util.OsVersion;
import com.izforge.izpack.util.StringTool;
import com.izforge.izpack.util.unix.ShellScript;
import com.izforge.izpack.util.unix.UnixHelper;
import com.izforge.izpack.util.unix.UnixUser;
import com.izforge.izpack.util.unix.UnixUsers;
import java.io.*;
import java.util.*;
File
Unix_Shortcut.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
    /**
     * This initialisizes all Properties Values with "".
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/Unix_Shortcut.java
    private void initProps()
    {
=======
    private void initProps() {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/Unix_Shortcut.java
        String[] propsArray = {$Comment, $$LANG_Comment, $Encoding, $Exec, $Arguments,
                $GenericName, $$LANG_GenericName, $MimeType, $Name, $$LANG_Name, $Path,
                $ServiceTypes, $SwallowExec, $SwallowTitle, $Terminal, $Options_For_Terminal,
Solution content
    /**
     * This initialisizes all Properties Values with "".
     */
    private void initProps() {
        String[] propsArray = {$Comment, $$LANG_Comment, $Encoding, $Exec, $Arguments,
                $GenericName, $$LANG_GenericName, $MimeType, $Name, $$LANG_Name, $Path,
                $ServiceTypes, $SwallowExec, $SwallowTitle, $Terminal, $Options_For_Terminal,
File
Unix_Shortcut.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
                            && ApplicationShortcutPath.canWrite())
                    {
                        shortCutLocation = ApplicationShortcutPath;
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/Unix_Shortcut.java
                    }
                }
                else
                {
=======
                } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/Unix_Shortcut.java
                    File relativePath = new File(idata.getInstallPath() + FS
                            + ApplicationShortcutPath);
                    relativePath.mkdirs();
Solution content
                            && ApplicationShortcutPath.canWrite())
                    {
                        shortCutLocation = ApplicationShortcutPath;
                    }
                }
                    File relativePath = new File(idata.getInstallPath() + FS
                            + ApplicationShortcutPath);
                    relativePath.mkdirs();
File
Unix_Shortcut.java
Developer's decision
Combination
Kind of conflict
Other
Chunk
Conflicting content
                    relativePath.mkdirs();
                    shortCutLocation = new File(relativePath.toString());
                }
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/Unix_Shortcut.java
            }
            else
            {
=======
            } else
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/Unix_Shortcut.java
                shortCutLocation = new File(idata.getInstallPath());
            }
Solution content
                    relativePath.mkdirs();
                    shortCutLocation = new File(relativePath.toString());
                }
            } else
            {
                shortCutLocation = new File(idata.getInstallPath());
            }
File
Unix_Shortcut.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
     * @return The written File
     */
    private File writeAppShortcutWithOutSpace(String targetPath, String shortcutName,
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/Unix_Shortcut.java
                                              String shortcutDef)
    {
=======
                                              String shortcutDef) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/Unix_Shortcut.java
        return writeAppShortcutWithSimpleSpacehandling(targetPath, shortcutName, shortcutDef, true);
    }
Solution content
     * @return The written File
     */
    private File writeAppShortcutWithOutSpace(String targetPath, String shortcutName,
                                              String shortcutDef) {
        return writeAppShortcutWithSimpleSpacehandling(targetPath, shortcutName, shortcutDef, true);
    }
File
Unix_Shortcut.java
Developer's decision
Version 1
Kind of conflict
Variable
Chunk
Conflicting content
     * @return The written File
     */
    private File writeAppShortcutWithSimpleSpacehandling(String targetPath, String shortcutName,
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/Unix_Shortcut.java
                                                         String shortcutDef, boolean replaceSpacesWithMinus)
    {
        if (!(targetPath.endsWith("/") || targetPath.endsWith("\\")))
        {
=======
                                                         String shortcutDef, boolean replaceSpacesWithMinus) {
        if (!(targetPath.endsWith("/") || targetPath.endsWith("\\"))) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/Unix_Shortcut.java
            targetPath += File.separatorChar;
        }
Solution content
     * @return The written File
     */
    private File writeAppShortcutWithSimpleSpacehandling(String targetPath, String shortcutName,
                                                         String shortcutDef, boolean replaceSpacesWithMinus)
    {
        if (!(targetPath.endsWith("/") || targetPath.endsWith("\\")))
        {
            targetPath += File.separatorChar;
        }
File
Unix_Shortcut.java
Developer's decision
Version 1
Kind of conflict
If statement
Variable
Chunk
Conflicting content
        // return Shortcut.DESKTOP;
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/Unix_Shortcut.java
    private List getUsers()
    {
        if (users == null)
        {
=======
    private List getUsers() {
        if (users == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/Unix_Shortcut.java
            users = UnixUsers.getUsersWithValidShellsExistingHomesAndDesktops();
        }
        return users;
Solution content
        // return Shortcut.DESKTOP;
    }

    private List getUsers()
    {
        if (users == null)
        {
            users = UnixUsers.getUsersWithValidShellsExistingHomesAndDesktops();
        }
        return users;
File
Unix_Shortcut.java
Developer's decision
Version 1
Kind of conflict
If statement
Method signature
Chunk
Conflicting content
import java.io.IOException;

<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/WinSetupAPIBase.java
public class WinSetupAPIBase implements NativeLibraryClient
{
=======
public class WinSetupAPIBase implements NativeLibraryClient {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/WinSetupAPIBase.java

    protected static final int INVALID_HANDLE_VALUE = -1;
Solution content
import java.io.IOException;
public class WinSetupAPIBase implements NativeLibraryClient {

    protected static final int INVALID_HANDLE_VALUE = -1;
File
WinSetupAPIBase.java
Developer's decision
Version 1
Kind of conflict
Class signature
Chunk
Conflicting content
    // ----------------------------- Interface NativeLibraryClient -------------

<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/WinSetupAPIBase.java
    public void freeLibrary(String name)
    {
=======
    public void freeLibrary(String name) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/WinSetupAPIBase.java
    }

    ;
Solution content
    // ----------------------------- Interface NativeLibraryClient -------------

    public void freeLibrary(String name)
    {
    }

    ;
File
WinSetupAPIBase.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
    private List exceptions;

    public int handleNeedMedia(String tagfile, String description, String sourcePath,
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/WinSetupDefaultCallbackHandler.java
                               String sourceFile)
    {
        File f = new File(sourcePath, sourceFile);
        if (f.exists() && f.canRead())
        {
=======
                               String sourceFile) {
        File f = new File(sourcePath, sourceFile);
        if (f.exists() && f.canRead()) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/WinSetupDefaultCallbackHandler.java
            return FILEOP_RETRY;
        }
        addException("Source file " + f.getPath() + " not found, aborting.");
Solution content
    private List exceptions;

    public int handleNeedMedia(String tagfile, String description, String sourcePath,
                               String sourceFile)
    {
        File f = new File(sourcePath, sourceFile);
        if (f.exists() && f.canRead())
        {
            return FILEOP_RETRY;
        }
        addException("Source file " + f.getPath() + " not found, aborting.");
File
WinSetupDefaultCallbackHandler.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
        addException(0, errMsg);
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/WinSetupDefaultCallbackHandler.java
    private void addException(int errCode, String errMsg)
    {
        if (exceptions == null)
        {
            exceptions = new Vector();
        }
=======
    private void addException(int errCode, String errMsg) {
        if (exceptions == null) exceptions = new Vector();
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/WinSetupDefaultCallbackHandler.java
        exceptions.add(new SystemErrorException(errCode, errMsg));
    }
Solution content
        addException(0, errMsg);
    }

    private void addException(int errCode, String errMsg) {
        if (exceptions == null)
        {
            exceptions = new Vector();
        }
        exceptions.add(new SystemErrorException(errCode, errMsg));
    }
File
WinSetupDefaultCallbackHandler.java
Developer's decision
Version 1
Kind of conflict
If statement
Method signature
Chunk
Conflicting content
import java.io.File;
import java.io.IOException;

<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/WinSetupFileQueue.java
public class WinSetupFileQueue extends WinSetupAPIBase
{
=======
public class WinSetupFileQueue extends WinSetupAPIBase {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/WinSetupFileQueue.java
    private int reboot = 0;

    /**
Solution content
import java.io.File;
import java.io.IOException;

public class WinSetupFileQueue extends WinSetupAPIBase {
    private int reboot = 0;

    /**
File
WinSetupFileQueue.java
Developer's decision
Version 1
Kind of conflict
Class signature
Chunk
Conflicting content
     * @param targetfile Move target file
     * @param forceInUse Whether to force target-in-use behavior
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/WinSetupFileQueue.java
    public void addMove(File sourcefile, File targetfile, boolean forceInUse) throws IOException
    {
=======
    public void addMove(File sourcefile, File targetfile, boolean forceInUse) throws IOException {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/WinSetupFileQueue.java
        int style = SP_COPY_DELETESOURCE /* | SP_COPY_IN_USE_NEEDS_REBOOT*/;
        if (forceInUse)
        {
Solution content
     * @param targetfile Move target file
     * @param forceInUse Whether to force target-in-use behavior
     */
    public void addMove(File sourcefile, File targetfile, boolean forceInUse) throws IOException {
        int style = SP_COPY_DELETESOURCE /* | SP_COPY_IN_USE_NEEDS_REBOOT*/;
        if (forceInUse)
        {
File
WinSetupFileQueue.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
import com.coi.tools.os.izpack.Registry;
import com.coi.tools.os.win.RegDataContainer;
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/Win_RegistryHandler.java
import com.izforge.izpack.util.VariableSubstitutor;
=======
import com.izforge.izpack.api.exception.NativeLibException;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.core.os.RegistryHandler;
import com.izforge.izpack.util.substitutor.VariableSubstitutorImpl;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/Win_RegistryHandler.java

import java.util.List;
import java.util.Properties;
Solution content
import com.coi.tools.os.izpack.Registry;
import com.coi.tools.os.win.RegDataContainer;
import com.izforge.izpack.api.exception.NativeLibException;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.core.os.RegistryHandler;
import com.izforge.izpack.util.substitutor.VariableSubstitutorImpl;

import java.util.List;
import java.util.Properties;
File
Win_RegistryHandler.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
        if (!good()) {
            return;
        }
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/Win_RegistryHandler.java
        if (contents.indexOf("OLD_KEY_VALUE") > -1 && regWorker.valueExist(key, value))
        {
            Object ob = regWorker.getValueAsObject(key, value);
            if (ob instanceof String)
            {
=======
        if (contents.indexOf("OLD_KEY_VALUE") > -1 && regWorker.valueExist(key, value)) {
            Object ob = regWorker.getValueAsObject(key, value);
            if (ob instanceof String) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/main/java/com/izforge/izpack/util/os/Win_RegistryHandler.java
                Properties props = new Properties();
                props.put("OLD_KEY_VALUE", ob);
                VariableSubstitutor vs = new VariableSubstitutorImpl(props);
Solution content
        if (!good()) {
            return;
        }
        if (contents.indexOf("OLD_KEY_VALUE") > -1 && regWorker.valueExist(key, value))
        {
            Object ob = regWorker.getValueAsObject(key, value);
            if (ob instanceof String)
            {
                Properties props = new Properties();
                props.put("OLD_KEY_VALUE", ob);
                VariableSubstitutor vs = new VariableSubstitutorImpl(props);
File
Win_RegistryHandler.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
<<<<<<< HEAD:src/tests/com/izforge/izpack/installer/ConditionTest.java

package com.izforge.izpack.installer;

import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.rules.RulesEngine;
=======
package com.izforge.izpack.test;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.core.rules.RulesEngineImpl;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.util.substitutor.VariableSubstitutorImpl;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-installer/src/test/java/com/izforge/izpack/test/ConditionTest.java
import junit.framework.TestCase;
import org.w3c.dom.Document;
Solution content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.test;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.core.rules.RulesEngineImpl;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.util.substitutor.VariableSubstitutorImpl;
import junit.framework.TestCase;
import org.w3c.dom.Document;
File
ConditionTest.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
=======
import com.izforge.izpack.installer.base.IzPanel;
import com.izforge.izpack.installer.data.GUIInstallData;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/HelloPanel.java
import javax.swing.JLabel;
import java.awt.LayoutManager2;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-maven-plugin/src/it/sample/src/main/java/com/company/izpack/panels/MyHelloPanel.java
import java.util.ArrayList;

/**
Solution content
import com.izforge.izpack.installer.base.IzPanel;
import com.izforge.izpack.installer.data.GUIInstallData;

import java.util.ArrayList;

/**
File
MyHelloPanel.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/CompilePanel.java

package com.izforge.izpack.panels;

import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.gui.LabelFactory;
import com.izforge.izpack.installer.*;
=======
package com.izforge.izpack.panels.compile;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.gui.LabelFactory;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.base.IzPanel;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.util.substitutor.VariableSubstitutorImpl;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/compile/CompilePanel.java

import javax.swing.*;
import java.awt.*;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.compile;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.gui.LabelFactory;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.base.IzPanel;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.util.substitutor.VariableSubstitutorImpl;

import javax.swing.*;
import java.awt.*;
File
CompilePanel.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
package com.izforge.izpack.panels.compile;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/CompilePanelAutomationHelper.java
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.installer.*;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.installer.automation.PanelAutomationHelper;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/compile/CompilePanelAutomationHelper.java

import java.io.IOException;
import java.io.PrintStream;
Solution content
package com.izforge.izpack.panels.compile;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.installer.automation.PanelAutomationHelper;

import java.io.IOException;
import java.io.PrintStream;
File
CompilePanelAutomationHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
            this.worker.run();

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/CompilePanelAutomationHelper.java
            if (this.worker.getResult().isSuccess())
            {
=======
            if (this.worker.getResult().isSuccess()) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/compile/CompilePanelAutomationHelper.java
                throw new InstallerException("Compilation failed (xml line " + panelRoot.getLineNr() + ")");
            }
        }
Solution content
            this.worker.run();

            if (this.worker.getResult().isSuccess())
            {
                throw new InstallerException("Compilation failed (xml line " + panelRoot.getLineNr() + ")");
            }
        }
File
CompilePanelAutomationHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
     *
     * @return True
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/DataCheckPanel.java
    public boolean isValidated()
    {
=======
    public boolean isValidated() {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/datacheck/DataCheckPanel.java
        return true;
    }
}
Solution content
     *
     * @return True
     */
    public boolean isValidated()
    {
        return true;
    }
}
File
DataCheckPanel.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
 * The taget directory selection panel.

package com.izforge.izpack.panels.defaulttarget;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/DefaultTargetPanel.java
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.installer.InstallData;
import com.izforge.izpack.installer.InstallerFrame;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.panels.path.PathInputPanel;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/defaulttarget/DefaultTargetPanel.java

/**
Solution content
package com.izforge.izpack.panels.defaulttarget;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.panels.path.PathInputPanel;

/**
 * The taget directory selection panel.
File
DefaultTargetPanel.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
package com.izforge.izpack.panels.defaulttarget;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/DefaultTargetPanelAutomationHelper.java
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelAutomation;
import com.izforge.izpack.util.VariableSubstitutor;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.automation.PanelAutomation;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/defaulttarget/DefaultTargetPanelAutomationHelper.java

/**
 * Functions to support automated usage of the TargetPanel
Solution content
package com.izforge.izpack.panels.defaulttarget;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.automation.PanelAutomation;

/**
 * Functions to support automated usage of the TargetPanel
File
DefaultTargetPanelAutomationHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/FinishPanelConsoleHelper.java
=======
package com.izforge.izpack.panels.finish;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/finish/FinishPanelConsoleHelper.java

package com.izforge.izpack.panels;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.finish;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;

package com.izforge.izpack.panels;
File
FinishPanelConsoleHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
package com.izforge.izpack.panels;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/FinishPanelConsoleHelper.java
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelConsole;
import com.izforge.izpack.installer.PanelConsoleHelper;

import java.io.PrintWriter;
import java.util.Properties;

=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/finish/FinishPanelConsoleHelper.java
/**
 * Finish Panel console helper
 *
Solution content
package com.izforge.izpack.panels;


import java.io.PrintWriter;
import java.util.Properties;

/**
 * Finish Panel console helper
 *
File
FinishPanelConsoleHelper.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
 *
 * @author Mounir el hajj
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/FinishPanelConsoleHelper.java
public class FinishPanelConsoleHelper extends PanelConsoleHelper implements PanelConsole
{
    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter)
    {
        return true;
    }

    public boolean runConsoleFromProperties(AutomatedInstallData installData, Properties p)
    {
        return true;
    }

    public boolean runConsole(AutomatedInstallData idata)
    {
        if (idata.installSuccess)
        {
=======
public class FinishPanelConsoleHelper extends PanelConsoleHelper implements PanelConsole {
    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter) {
        return true;
    }

    public boolean runConsoleFromProperties(AutomatedInstallData installData, Properties p) {
        return true;
    }

    public boolean runConsole(AutomatedInstallData idata) {
        if (idata.isInstallSuccess()) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/finish/FinishPanelConsoleHelper.java
            System.out.println("Installation was successful");
            System.out.println("application installed on " + idata.getInstallPath());
Solution content
 *
 * @author Mounir el hajj
 */
public class FinishPanelConsoleHelper extends PanelConsoleHelper implements PanelConsole
{
    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter)
    {
        return true;
    }

    public boolean runConsoleFromProperties(AutomatedInstallData installData, Properties p)
    {
        return true;
    }

    public boolean runConsole(AutomatedInstallData idata)
    {
        if (idata.installSuccess)
        {
            System.out.println("Installation was successful");
            System.out.println("application installed on " + idata.getInstallPath());
File
FinishPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
Class signature
If statement
Method declaration
Method signature
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/HelloPanelConsoleHelper.java
=======
package com.izforge.izpack.panels.hello;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Info;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/hello/HelloPanelConsoleHelper.java

package com.izforge.izpack.panels;
Solution content
 */
 * See the License for the specific language governing permissions and
 * limitations under the License.
package com.izforge.izpack.panels.hello;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Info;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;

package com.izforge.izpack.panels;
File
HelloPanelConsoleHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
 *

package com.izforge.izpack.panels;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/HelloPanelConsoleHelper.java
import com.izforge.izpack.Info;
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelConsole;
import com.izforge.izpack.installer.PanelConsoleHelper;

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Properties;

=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/hello/HelloPanelConsoleHelper.java
/**
 * Hello Panel console helper
Solution content
package com.izforge.izpack.panels;

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Properties;

/**
 * Hello Panel console helper
 *
File
HelloPanelConsoleHelper.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
    }

    public boolean runGeneratePropertiesFile(AutomatedInstallData installData,
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/HelloPanelConsoleHelper.java
                                             PrintWriter printWriter)
    {
=======
                                             PrintWriter printWriter) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/hello/HelloPanelConsoleHelper.java
        return true;
    }
Solution content
    }

    public boolean runGeneratePropertiesFile(AutomatedInstallData installData,
                                             PrintWriter printWriter)
    {
        return true;
    }
File
HelloPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
Variable
Chunk
Conflicting content
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/HTMLHelloPanel.java
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 *
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.panels;

import com.izforge.izpack.installer.InstallData;
import com.izforge.izpack.installer.InstallerFrame;

/**
 * Class HTMLHelloPanel is a version of the hello panel that displays
 * HTML content.
 */
public class HTMLHelloPanel extends HTMLInfoPanel
{
    private static final long serialVersionUID = -7671648991830935148L;

    /**
     * The constructor.
     *
     * @param parent The parent.
     * @param idata  The installation data.
     */
    public HTMLHelloPanel(InstallerFrame parent, InstallData idata)
    {
        super(parent, idata, "HTMLHelloPanel", false);
    }

    /**
     * Indicates wether the panel has been validated or not.
     *
     * @return Always true.
     */
    public boolean isValidated()
    {
        return true;
    }
}
=======
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 *
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.panels.htmlhello;

import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.panels.htmlinfo.HTMLInfoPanel;

/**
 * Class HTMLHelloPanel is a version of the hello panel that displays
 * HTML content.
 */
public class HTMLHelloPanel extends HTMLInfoPanel {
    private static final long serialVersionUID = -7671648991830935148L;

    /**
     * The constructor.
     *
     * @param parent The parent.
     * @param idata  The installation installDataGUI.
     */
    public HTMLHelloPanel(InstallerFrame parent, GUIInstallData idata, ResourceManager resourceManager) {
        super(parent, idata, "HTMLHelloPanel", false, resourceManager);
    }

    /**
     * Indicates wether the panel has been validated or not.
     *
     * @return Always true.
     */
    public boolean isValidated() {
        return true;
    }
}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/htmlhello/HTMLHelloPanel.java
Solution content
 */
/*
 * IzPack - Copyright 2001-2008 Julien Ponge, All Rights Reserved.
 *
 * http://izpack.org/
 * http://izpack.codehaus.org/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.

package com.izforge.izpack.panels.htmlhello;

import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.panels.htmlinfo.HTMLInfoPanel;

/**
 * Class HTMLHelloPanel is a version of the hello panel that displays
 * HTML content.
 */
public class HTMLHelloPanel extends HTMLInfoPanel {
    private static final long serialVersionUID = -7671648991830935148L;

    /**
     * The constructor.
     *
     * @param parent The parent.
     * @param idata  The installation installDataGUI.
     */
    public HTMLHelloPanel(InstallerFrame parent, GUIInstallData idata, ResourceManager resourceManager) {
        super(parent, idata, "HTMLHelloPanel", false, resourceManager);
    }

    /**
     * Indicates wether the panel has been validated or not.
     *
     * @return Always true.
     */
    public boolean isValidated() {
        return true;
    }
}
File
HTMLHelloPanel.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/HTMLLicencePanelConsoleHelper.java

package com.izforge.izpack.panels;
=======
package com.izforge.izpack.panels.htmllicence;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/htmllicence/HTMLLicencePanelConsoleHelper.java

import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelConsole;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.htmllicence;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;

import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelConsole;
File
HTMLLicencePanelConsoleHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
 */
public class HTMLLicencePanelConsoleHelper extends PanelConsoleHelper implements PanelConsole {

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/HTMLLicencePanelConsoleHelper.java
    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter)
    {
=======
    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/htmllicence/HTMLLicencePanelConsoleHelper.java
        return true;
    }
Solution content
 */
public class HTMLLicencePanelConsoleHelper extends PanelConsoleHelper implements PanelConsole {

    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter) {
        return true;
    }
File
HTMLLicencePanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
        String strippedHTML = this.removeHTML(license);

        StringTokenizer st = new StringTokenizer(strippedHTML, "\n");
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/HTMLLicencePanelConsoleHelper.java
        while (st.hasMoreTokens())
        {
            String token = st.nextToken();
            System.out.println(token);
            l++;
            if (l >= lines)
            {
                if (!doContinue())
                {
=======
        while (st.hasMoreTokens()) {
            String token = st.nextToken();
            System.out.println(token);
            l++;
            if (l >= lines) {
                if (!doContinue()) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/htmllicence/HTMLLicencePanelConsoleHelper.java
                    return false;
                }
                l = 0;
Solution content
        String strippedHTML = this.removeHTML(license);

        StringTokenizer st = new StringTokenizer(strippedHTML, "\n");
        while (st.hasMoreTokens()) {
            String token = st.nextToken();
            System.out.println(token);
            l++;
            if (l >= lines)
            {
                if (!doContinue())
                {
                    return false;
                }
                l = 0;
File
HTMLLicencePanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Variable
While statement
Chunk
Conflicting content
                } else if (strIn.equals("3")) {
                    return 3;
                }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/HTMLLicencePanelConsoleHelper.java
                else if (strIn.equals("3"))
                {
                    return 3;
                }
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/htmllicence/HTMLLicencePanelConsoleHelper.java
            }

        }
Solution content
                } else if (strIn.equals("3")) {
                    return 3;
                }
                else if (strIn.equals("3"))
                {
                    return 3;
                }
            }

        }
File
HTMLLicencePanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
            result = result.replaceAll("(\r)(\t)+(\\r)", "\r\r");
            result = result.replaceAll("(\r)(\t)+", "\r\t");

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/HTMLLicencePanelConsoleHelper.java
        }
        catch (Exception e)
        {
=======
        } catch (Exception e) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/htmllicence/HTMLLicencePanelConsoleHelper.java
            e.printStackTrace();

        }
Solution content
            result = result.replaceAll("(\r)(\t)+(\\r)", "\r\r");
            result = result.replaceAll("(\r)(\t)+", "\r\t");

        }
        catch (Exception e)
        {
            e.printStackTrace();

        }
File
HTMLLicencePanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
Catch clause
Chunk
Conflicting content
package com.izforge.izpack.panels.install;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/InstallPanelAutomationHelper.java
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.installer.*;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.installer.automation.PanelAutomationHelper;
import com.izforge.izpack.installer.unpacker.IUnpacker;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/install/InstallPanelAutomationHelper.java
import com.izforge.izpack.util.AbstractUIProgressHandler;

/**
Solution content
package com.izforge.izpack.panels.install;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.installer.automation.PanelAutomationHelper;
import com.izforge.izpack.installer.unpacker.IUnpacker;
import com.izforge.izpack.util.AbstractUIProgressHandler;

/**
File
InstallPanelAutomationHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
                // ignore it, we're waiting for the unpacker to finish...
            }
        }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/InstallPanelAutomationHelper.java
        if (!unpacker.getResult())
        {
=======
        if (!unpacker.getResult()) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/install/InstallPanelAutomationHelper.java
            throw new InstallerException("Unpack failed (xml line " + panelRoot.getLineNr() + ")");
        }
    }
Solution content
                // ignore it, we're waiting for the unpacker to finish...
            }
        }
        if (!unpacker.getResult())
        {
            throw new InstallerException("Unpack failed (xml line " + panelRoot.getLineNr() + ")");
        }
    }
File
InstallPanelAutomationHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/InstallPanelConsoleHelper.java

package com.izforge.izpack.panels;
=======
package com.izforge.izpack.panels.install;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;
import com.izforge.izpack.installer.unpacker.IUnpacker;
import com.izforge.izpack.util.AbstractUIHandler;
import com.izforge.izpack.util.AbstractUIProgressHandler;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/install/InstallPanelConsoleHelper.java

import com.izforge.izpack.installer.*;
import com.izforge.izpack.util.AbstractUIHandler;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.install;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;
import com.izforge.izpack.installer.unpacker.IUnpacker;
import com.izforge.izpack.util.AbstractUIHandler;
import com.izforge.izpack.util.AbstractUIProgressHandler;

import com.izforge.izpack.installer.*;
import com.izforge.izpack.util.AbstractUIHandler;
File
InstallPanelConsoleHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
    private int noOfPacks = 0;


<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/InstallPanelConsoleHelper.java
    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter)
    {
=======
    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/install/InstallPanelConsoleHelper.java
        return true;
    }
Solution content
    private int noOfPacks = 0;


    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter)
    {
        return true;
    }
File
InstallPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/InstallationGroupPanel.java

package com.izforge.izpack.panels;

import com.izforge.izpack.Pack;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.installer.InstallData;
import com.izforge.izpack.installer.InstallerFrame;
import com.izforge.izpack.installer.IzPanel;
=======
package com.izforge.izpack.panels.installationgroup;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.base.IzPanel;
import com.izforge.izpack.installer.data.GUIInstallData;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/installationgroup/InstallationGroupPanel.java
import com.izforge.izpack.util.AbstractUIHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.OsConstraint;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.installationgroup;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.base.IzPanel;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.util.AbstractUIHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.OsConstraint;
File
InstallationGroupPanel.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/InstallationGroupPanelAutomationHelper.java

package com.izforge.izpack.panels;

import com.izforge.izpack.Pack;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelAutomation;
import com.izforge.izpack.panels.InstallationGroupPanel.GroupData;
=======
package com.izforge.izpack.panels.installationgroup;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.panels.installationgroup.InstallationGroupPanel.GroupData;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/installationgroup/InstallationGroupPanelAutomationHelper.java
import com.izforge.izpack.util.Debug;

import java.util.HashMap;
Solution content
import com.izforge.izpack.panels.installationgroup.InstallationGroupPanel.GroupData;
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.installationgroup;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.util.Debug;
import java.util.HashMap;
File
InstallationGroupPanelAutomationHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
        GroupData[] rows = (GroupData[]) idata.getAttribute("GroupData");
        HashMap packsByName = (HashMap) idata.getAttribute("packsByName");
        // Write out the group to pack mappings
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/InstallationGroupPanelAutomationHelper.java
        for (GroupData gd : rows)
        {
=======
        for (GroupData gd : rows) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/installationgroup/InstallationGroupPanelAutomationHelper.java
            IXMLElement xgroup = new XMLElementImpl("group", panelRoot);
            xgroup.setAttribute("name", gd.name);
            Iterator names = gd.packNames.iterator();
Solution content
        GroupData[] rows = (GroupData[]) idata.getAttribute("GroupData");
        HashMap packsByName = (HashMap) idata.getAttribute("packsByName");
        // Write out the group to pack mappings
        for (GroupData gd : rows) {
            IXMLElement xgroup = new XMLElementImpl("group", panelRoot);
            xgroup.setAttribute("name", gd.name);
            Iterator names = gd.packNames.iterator();
File
InstallationGroupPanelAutomationHelper.java
Developer's decision
Version 1
Kind of conflict
For statement
Chunk
Conflicting content
            while (names.hasNext()) {
                String name = names.next();
                Pack pack = (Pack) packsByName.get(name);
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/InstallationGroupPanelAutomationHelper.java
                int index = idata.availablePacks.indexOf(pack);
=======
                int index = idata.getAvailablePacks().indexOf(pack);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/installationgroup/InstallationGroupPanelAutomationHelper.java
                IXMLElement xpack = new XMLElementImpl("pack", xgroup);
                xpack.setAttribute("name", name);
                xpack.setAttribute("index", "" + index);
Solution content
            while (names.hasNext()) {
                String name = names.next();
                Pack pack = (Pack) packsByName.get(name);
                int index = idata.getAvailablePacks().indexOf(pack);
                IXMLElement xpack = new XMLElementImpl("pack", xgroup);
                xpack.setAttribute("name", name);
                xpack.setAttribute("index", "" + index);
File
InstallationGroupPanelAutomationHelper.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
     * xml installDataGUI to allow an install group to specify the selected packs.
     */
    public void runAutomated(AutomatedInstallData idata,
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/InstallationGroupPanelAutomationHelper.java
                             IXMLElement panelRoot)
    {
=======
                             IXMLElement panelRoot) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/installationgroup/InstallationGroupPanelAutomationHelper.java
        String installGroup = idata.getVariable("INSTALL_GROUP");
        Debug.trace("InstallationGroupPanelAutomationHelper: runAutomated, INSTALL_GROUP: " + installGroup);
        if (installGroup != null) {
Solution content
     * xml installDataGUI to allow an install group to specify the selected packs.
     */
    public void runAutomated(AutomatedInstallData idata,
                             IXMLElement panelRoot)
    {
        String installGroup = idata.getVariable("INSTALL_GROUP");
        Debug.trace("InstallationGroupPanelAutomationHelper: runAutomated, INSTALL_GROUP: " + installGroup);
        if (installGroup != null) {
File
InstallationGroupPanelAutomationHelper.java
Developer's decision
Version 1
Kind of conflict
Variable
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/InstallationTypePanel.java

package com.izforge.izpack.panels;
=======
package com.izforge.izpack.panels.installationtype;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/installationtype/InstallationTypePanel.java

import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.gui.IzPanelLayout;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.installationtype;

import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.gui.IzPanelLayout;
File
InstallationTypePanel.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
        // We cannot look to the version of this vm because we should
        // test the given JDK VM.
        String[] params;
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/JDKPathPanel.java
        if (System.getProperty("os.name").indexOf("Windows") >= 0)
        {
=======
        if (System.getProperty("os.name").indexOf("Windows") >= 0) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/jdkpath/JDKPathPanel.java
            String[] paramsp = {
                    "cmd",
                    "/c",
Solution content
        // We cannot look to the version of this vm because we should
        // test the given JDK VM.
        String[] params;
        if (System.getProperty("os.name").indexOf("Windows") >= 0)
        {
            String[] paramsp = {
                    "cmd",
                    "/c",
File
JDKPathPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                    "-version"
            };
            params = paramsp;
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/JDKPathPanel.java
        }
        else
        {
=======
        } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/jdkpath/JDKPathPanel.java
            String[] paramsp = {
                    pathSelectionPanel.getPath() + File.separator + "bin" + File.separator + "java",
                    "-version"
Solution content
                    "-version"
            };
            params = paramsp;
        }
        else
        {
            String[] paramsp = {
                    pathSelectionPanel.getPath() + File.separator + "bin" + File.separator + "java",
                    "-version"
File
JDKPathPanel.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
    }

    private boolean compareVersions(String in, String template, boolean isMin,
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/JDKPathPanel.java
                                    int assumedPlace, int halfRange, String useNotIdentifier)
    {
=======
                                    int assumedPlace, int halfRange, String useNotIdentifier) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/jdkpath/JDKPathPanel.java
        StringTokenizer st = new StringTokenizer(in, " \t\n\r\f\"");
        int i;
        int currentRange = 0;
Solution content
    }

    private boolean compareVersions(String in, String template, boolean isMin,
                                    int assumedPlace, int halfRange, String useNotIdentifier)
    {
        StringTokenizer st = new StringTokenizer(in, " \t\n\r\f\"");
        int i;
        int currentRange = 0;
File
JDKPathPanel.java
Developer's decision
Version 1
Kind of conflict
Variable
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/JDKPathPanelConsoleHelper.java

package com.izforge.izpack.panels;

import com.coi.tools.os.win.MSWinConstants;
import com.coi.tools.os.win.NativeLibException;
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelConsole;
import com.izforge.izpack.installer.PanelConsoleHelper;
import com.izforge.izpack.installer.ScriptParser;
import com.izforge.izpack.util.FileExecutor;
import com.izforge.izpack.util.OsVersion;
import com.izforge.izpack.util.VariableSubstitutor;
import com.izforge.izpack.util.os.RegistryDefaultHandler;
import com.izforge.izpack.util.os.RegistryHandler;
=======
package com.izforge.izpack.panels.jdkpath;

import com.coi.tools.os.win.MSWinConstants;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.exception.NativeLibException;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.core.os.RegistryDefaultHandler;
import com.izforge.izpack.core.os.RegistryHandler;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;
import com.izforge.izpack.util.FileExecutor;
import com.izforge.izpack.util.OsVersion;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/jdkpath/JDKPathPanelConsoleHelper.java

import java.io.*;
import java.util.*;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.jdkpath;

import com.coi.tools.os.win.MSWinConstants;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.exception.NativeLibException;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.core.os.RegistryDefaultHandler;
import com.izforge.izpack.core.os.RegistryHandler;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;
import com.izforge.izpack.util.FileExecutor;
import com.izforge.izpack.util.OsVersion;

import java.io.*;
import java.util.*;

import java.io.*;
import java.util.*;
File
JDKPathPanelConsoleHelper.java
Developer's decision
Manual
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
        this.variableSubstitutor = variableSubstitutor;
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/JDKPathPanelConsoleHelper.java
    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter)
    {
        printWriter.println(ScriptParser.INSTALL_PATH + "=");
=======
    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter) {
        printWriter.println(AutomatedInstallData.INSTALL_PATH + "=");
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/jdkpath/JDKPathPanelConsoleHelper.java
        return true;
    }
Solution content
        this.variableSubstitutor = variableSubstitutor;
    }

    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter) {
        printWriter.println(AutomatedInstallData.INSTALL_PATH + "=");
        return true;
    }
File
JDKPathPanelConsoleHelper.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Method signature
Chunk
Conflicting content
            if (OsVersion.IS_OSX)
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/JDKPathPanelConsoleHelper.java
        if (strDefaultPath == null)

        String strPath = "";
        String strDefaultPath = idata.getVariable(variableName);
        {
            {
=======
        if (strDefaultPath == null) {
            if (OsVersion.IS_OSX) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/jdkpath/JDKPathPanelConsoleHelper.java
                strDefaultPath = JDKPathPanel.OSX_JDK_HOME;
            } else {
                // Try the JAVA_HOME as child dir of the jdk path
Solution content
            else
            {

        String strPath = "";
        String strDefaultPath = idata.getVariable(variableName);
        if (strDefaultPath == null)
        {
            if (OsVersion.IS_OSX)
            {
                strDefaultPath = JDKPathPanel.OSX_JDK_HOME;
            }
                // Try the JAVA_HOME as child dir of the jdk path
File
JDKPathPanelConsoleHelper.java
Developer's decision
Manual
Kind of conflict
If statement
Chunk
Conflicting content
                e.printStackTrace();
            }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/JDKPathPanelConsoleHelper.java
            if (!pathIsValid(strPath))
            {
                System.out.println("Path " + strPath + " is not valid.");
            }
            else if (!verifyVersion(minVersion, maxVersion, strPath))
            {
=======
            if (!pathIsValid(strPath)) {
                System.out.println("Path " + strPath + " is not valid.");
            } else if (!verifyVersion(minVersion, maxVersion, strPath)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/jdkpath/JDKPathPanelConsoleHelper.java
                System.out.println("The chosen JDK has the wrong version (available: " + detectedVersion + " required: " + minVersion + " - " + maxVersion + ").");
                System.out.println("Continue anyway? [no]");
                br = new BufferedReader(new InputStreamReader(System.in));
Solution content
                e.printStackTrace();
            }
            if (!pathIsValid(strPath))
            {
                System.out.println("Path " + strPath + " is not valid.");
            }
            else if (!verifyVersion(minVersion, maxVersion, strPath))
            {
                System.out.println("The chosen JDK has the wrong version (available: " + detectedVersion + " required: " + minVersion + " - " + maxVersion + ").");
                System.out.println("Continue anyway? [no]");
                br = new BufferedReader(new InputStreamReader(System.in));
File
JDKPathPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
                br = new BufferedReader(new InputStreamReader(System.in));
                try {
                    String strIn = br.readLine();
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/JDKPathPanelConsoleHelper.java
                    if (strIn.trim().toLowerCase().equals("y") || strIn.trim().toLowerCase().equals("yes"))
                    {
=======
                    if (strIn.trim().toLowerCase().equals("y") || strIn.trim().toLowerCase().equals("yes")) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/jdkpath/JDKPathPanelConsoleHelper.java
                        bKeepAsking = false;
                    }
                }
Solution content
                br = new BufferedReader(new InputStreamReader(System.in));
                try {
                    String strIn = br.readLine();
                    if (strIn.trim().toLowerCase().equals("y") || strIn.trim().toLowerCase().equals("yes"))
                    {
                        bKeepAsking = false;
                    }
                }
File
JDKPathPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        // We cannot look to the version of this vm because we should
        // test the given JDK VM.
        String[] params;
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/JDKPathPanelConsoleHelper.java
        if (System.getProperty("os.name").indexOf("Windows") >= 0)
        {
=======
        if (System.getProperty("os.name").indexOf("Windows") >= 0) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/jdkpath/JDKPathPanelConsoleHelper.java
            String[] paramsp = {
                    "cmd",
                    "/c",
Solution content
        // We cannot look to the version of this vm because we should
        // test the given JDK VM.
        String[] params;
        if (System.getProperty("os.name").indexOf("Windows") >= 0)
        {
            String[] paramsp = {
                    "cmd",
                    "/c",
File
JDKPathPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                    "-version"
            };
            params = paramsp;
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/JDKPathPanelConsoleHelper.java
        }
        else
        {
=======
        } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/jdkpath/JDKPathPanelConsoleHelper.java
            String[] paramsp = {
                    path + File.separator + "bin" + File.separator + "java",
                    "-version"
Solution content
                    "-version"
            };
            params = paramsp;
        }
        else
        {
            String[] paramsp = {
                    path + File.separator + "bin" + File.separator + "java",
                    "-version"
File
JDKPathPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
    }

    private boolean compareVersions(String in, String template, boolean isMin,
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/JDKPathPanelConsoleHelper.java
                                    int assumedPlace, int halfRange, String useNotIdentifier)
    {
=======
                                    int assumedPlace, int halfRange, String useNotIdentifier) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/jdkpath/JDKPathPanelConsoleHelper.java
        StringTokenizer st = new StringTokenizer(in, " \t\n\r\f\"");
        int i;
        int currentRange = 0;
Solution content
    }
    private boolean compareVersions(String in, String template, boolean isMin,
                                    int assumedPlace, int halfRange, String useNotIdentifier)
    {
        StringTokenizer st = new StringTokenizer(in, " \t\n\r\f\"");
        int i;
        int currentRange = 0;
File
JDKPathPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
Variable
Chunk
Conflicting content
            Arrays.sort(keys);
            int i = keys.length - 1;
            // We search for the highest allowd version, therefore retrograde
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/JDKPathPanelConsoleHelper.java
            while (i > 0)
            {
                if (max == null || compareVersions(keys[i], max, false, 4, 4, "__NO_NOT_IDENTIFIER_"))
                { // First allowed version found, now we have to test that the min value
                    // also allows this version.
                    if (min == null || compareVersions(keys[i], min, true, 4, 4, "__NO_NOT_IDENTIFIER_"))
                    {
=======
            while (i > 0) {
                if (max == null || compareVersions(keys[i], max, false, 4, 4, "__NO_NOT_IDENTIFIER_")) { // First allowed version found, now we have to test that the min value
                    // also allows this version.
                    if (min == null || compareVersions(keys[i], min, true, 4, 4, "__NO_NOT_IDENTIFIER_")) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/jdkpath/JDKPathPanelConsoleHelper.java
                        String cv = JDKPathPanel.JDK_ROOT_KEY + "\\" + keys[i];
                        String path = rh.getValue(cv, JDKPathPanel.JDK_VALUE_NAME).getStringData();
                        // Use it only if the path is valid.
Solution content
            Arrays.sort(keys);
            int i = keys.length - 1;
            // We search for the highest allowd version, therefore retrograde
            while (i > 0)
            {
                if (max == null || compareVersions(keys[i], max, false, 4, 4, "__NO_NOT_IDENTIFIER_"))
                { // First allowed version found, now we have to test that the min value
                    // also allows this version.
                    if (min == null || compareVersions(keys[i], min, true, 4, 4, "__NO_NOT_IDENTIFIER_"))
                    {
                        String cv = JDKPathPanel.JDK_ROOT_KEY + "\\" + keys[i];
                        String path = rh.getValue(cv, JDKPathPanel.JDK_VALUE_NAME).getStringData();
                        // Use it only if the path is valid.
File
JDKPathPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
Comment
If statement
While statement
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/LicencePanelConsoleHelper.java

package com.izforge.izpack.panels;
=======
package com.izforge.izpack.panels.licence;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/licence/LicencePanelConsoleHelper.java

import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelConsole;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.licence;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;

import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelConsole;
File
LicencePanelConsoleHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
 */
public class LicencePanelConsoleHelper extends PanelConsoleHelper implements PanelConsole {

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/LicencePanelConsoleHelper.java
    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter)
    {
=======
    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/licence/LicencePanelConsoleHelper.java
        return true;
    }
Solution content
 */
public class LicencePanelConsoleHelper extends PanelConsoleHelper implements PanelConsole {

    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter) {
    {
        return true;
    }
File
LicencePanelConsoleHelper.java
Developer's decision
Combination
Kind of conflict
Method signature
Chunk
Conflicting content
        int l = 0;

        StringTokenizer st = new StringTokenizer(license, "\n");
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/LicencePanelConsoleHelper.java
        while (st.hasMoreTokens())
        {
            String token = st.nextToken();
            System.out.println(token);
            l++;
            if (l >= lines)
            {
                if (!doContinue())
                {
=======
        while (st.hasMoreTokens()) {
            String token = st.nextToken();
            System.out.println(token);
            l++;
            if (l >= lines) {
                if (!doContinue()) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/licence/LicencePanelConsoleHelper.java
                    return false;
                }
                l = 0;
Solution content
                l = 0;
        int l = 0;

        StringTokenizer st = new StringTokenizer(license, "\n");
        while (st.hasMoreTokens()) {
            String token = st.nextToken();
            System.out.println(token);
            l++;
            if (l >= lines)
            {
                if (!doContinue())
                {
                    return false;
                }
File
LicencePanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Variable
While statement
Chunk
Conflicting content
                } else if (strIn.equals("3")) {
                    return 3;
                }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/LicencePanelConsoleHelper.java
                else if (strIn.equals("3"))
                {
                    return 3;
                }
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/licence/LicencePanelConsoleHelper.java
            }

        }
Solution content
                } else if (strIn.equals("3")) {
                    return 3;
                }
                else if (strIn.equals("3"))
                {
                    return 3;
                }
            }

        }
File
LicencePanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
    // reference to the current variables, needed for condition validation
    private Properties variables;
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksModel.java

    private InstallData idata;
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksModel.java

    private GUIInstallData idata;
Solution content
    // reference to the current variables, needed for condition validation
    private Properties variables;

    private GUIInstallData idata;
File
PacksModel.java
Developer's decision
Version 2
Kind of conflict
Attribute
Chunk
Conflicting content
        this.packs = new ArrayList();
        this.hiddenPacks = new ArrayList();
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksModel.java
        for (Pack availablePack : idata.availablePacks)
        {
            // only add a pack if not hidden
            if (!availablePack.isHidden())
            {
                this.packs.add(availablePack);
            }
            else
            {
=======
        for (Pack availablePack : idata.getAvailablePacks()) {
            // only add a pack if not hidden
            if (!availablePack.isHidden()) {
                this.packs.add(availablePack);
            } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksModel.java
                this.hiddenPacks.add(availablePack);
            }
        }
Solution content
        this.packs = new ArrayList();
        this.hiddenPacks = new ArrayList();
        for (Pack availablePack : idata.getAvailablePacks()) {
            // only add a pack if not hidden
            if (!availablePack.isHidden())
            {
                this.packs.add(availablePack);
            }
            else
            {
                this.hiddenPacks.add(availablePack);
            }
        }
File
PacksModel.java
Developer's decision
Version 2
Kind of conflict
Comment
For statement
If statement
Method invocation
Chunk
Conflicting content
            }
        }

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksModel.java
        this.packsToInstall = idata.selectedPacks;
=======
        this.packsToInstall = idata.getSelectedPacks();
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksModel.java
        this.panel = panel;
        this.variables = idata.getVariables();
        this.variables.setProperty(INITAL_PACKSELECTION, Boolean.toString(true));
Solution content
            }
        }

        this.packsToInstall = idata.getSelectedPacks();
        this.panel = panel;
        this.variables = idata.getVariables();
        this.variables.setProperty(INITAL_PACKSELECTION, Boolean.toString(true));
File
PacksModel.java
Developer's decision
Version 2
Kind of conflict
Attribute
Method invocation
Chunk
Conflicting content
        this.variables.setProperty(INITAL_PACKSELECTION, Boolean.toString(false));
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksModel.java
    public Pack getPackAtRow(int row)
    {
=======
    public Pack getPackAtRow(int row) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksModel.java
        return (Pack) this.packs.get(row);
    }
Solution content
        this.variables.setProperty(INITAL_PACKSELECTION, Boolean.toString(false));
    }

    public Pack getPackAtRow(int row)
    {
        return (Pack) this.packs.get(row);
    }
File
PacksModel.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
        boolean doNotShowPackSize = Boolean.parseBoolean(idata.guiPrefs.modifier.get("doNotShowPackSizeColumn"));

        int result = 0;
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksModel.java
        if (!doNotShowPackSize)
        {
            result = 3;
        }
        else
        {
=======
        if (!doNotShowPackSize) {
            result = 3;
        } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksModel.java
            result = 2;
        }
        return result;
Solution content
        boolean doNotShowPackSize = Boolean.parseBoolean(idata.guiPrefs.modifier.get("doNotShowPackSizeColumn"));

        int result = 0;
        if (!doNotShowPackSize)
        {
            result = 3;
        }
        else
        {
            result = 2;
        }
        return result;
File
PacksModel.java
Developer's decision
Version 1
Kind of conflict
If statement
Variable
Chunk
Conflicting content
        {
            }
        }
        // add hidden packs
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksModel.java
        for (Pack hiddenpack : this.hiddenPacks)
            if (this.rules.canInstallPack(hiddenpack.id, variables))
            {
=======
        for (Pack hiddenpack : this.hiddenPacks) {
            if (this.rules.canInstallPack(hiddenpack.id, variables)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksModel.java
                packsToInstall.add(hiddenpack);
            }
        }
Solution content
            }
        }
        // add hidden packs
        for (Pack hiddenpack : this.hiddenPacks)
        {
            if (this.rules.canInstallPack(hiddenpack.id, variables))
            {
                packsToInstall.add(hiddenpack);
            }
        }
File
PacksModel.java
Developer's decision
Version 1
Kind of conflict
For statement
If statement
Chunk
Conflicting content
            }
        }
        }

        // add selected hidden bytes
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksModel.java
        for (Pack hidden : this.hiddenPacks)
        {
            if (this.rules.canInstallPack(hidden.id, variables))
            {
=======
        for (Pack hidden : this.hiddenPacks) {
            if (this.rules.canInstallPack(hidden.id, variables)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksModel.java
                bytes += hidden.nbytes;
Solution content
        }

        // add selected hidden bytes
        for (Pack hidden : this.hiddenPacks)
        {
            if (this.rules.canInstallPack(hidden.id, variables))
            {
                bytes += hidden.nbytes;
            }
        }
File
PacksModel.java
Developer's decision
Version 1
Kind of conflict
For statement
If statement
Chunk
Conflicting content
        descriptionArea = createTextArea("PacksPanel.description", null, null, null);
        spaceLabel = createPanelWithLabel("PacksPanel.space", null, null);

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksPanel.java
        if (IoHelper.supported("getFreeSpace"))
        {
=======
        if (IoHelper.supported("getFreeSpace")) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksPanel.java
            add(Box.createRigidArea(new Dimension(0, 3)));
            freeSpaceLabel = createPanelWithLabel("PacksPanel.freespace", null, null);
        }
Solution content
        descriptionArea = createTextArea("PacksPanel.description", null, null, null);
        spaceLabel = createPanelWithLabel("PacksPanel.space", null, null);

        if (IoHelper.supported("getFreeSpace")) {
            add(Box.createRigidArea(new Dimension(0, 3)));
            freeSpaceLabel = createPanelWithLabel("PacksPanel.freespace", null, null);
        }
File
PacksPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
package com.izforge.izpack.panels.packs;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksPanelAutomationHelper.java
import com.izforge.izpack.Pack;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelAutomation;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.installer.automation.PanelAutomation;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksPanelAutomationHelper.java

import java.util.ArrayList;
import java.util.List;
Solution content
package com.izforge.izpack.panels.packs;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.installer.PanelAutomation;

import java.util.ArrayList;
import java.util.List;
File
PacksPanelAutomationHelper.java
Developer's decision
Combination
Kind of conflict
Import
Chunk
Conflicting content
                            RulesEngine rules = (RulesEngine) idata.getRules();
                            if ((idata.getSelectedPacks().indexOf(pack) < 0)
                                    && (pack.id != null)
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksPanelAutomationHelper.java
                                    && (idata.getRules().canInstallPack(pack.id,
                                    idata.getVariables())))
                            {
                                idata.selectedPacks.add(pack);
=======
                                    && (rules.canInstallPack(pack.id,
                                    idata.getVariables()))) {
                                idata.getSelectedPacks().add(pack);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksPanelAutomationHelper.java
                                System.out.println("Pack [" + packInfo.toString()
                                        + "] added to selection.");
                            }
Solution content
                            RulesEngine rules = (RulesEngine) idata.getRules();
                            if ((idata.getSelectedPacks().indexOf(pack) < 0)
                                    && (pack.id != null)
                                    && (rules.canInstallPack(pack.id,
                                    idata.getVariables()))) {
                                idata.getSelectedPacks().add(pack);
                                System.out.println("Pack [" + packInfo.toString()
                                        + "] added to selection.");
                            }
File
PacksPanelAutomationHelper.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
package com.izforge.izpack.panels.packs;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksPanelBase.java
import com.izforge.izpack.LocaleDatabase;
import com.izforge.izpack.Pack;
import com.izforge.izpack.adaptator.IXMLElement;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.LocaleDatabase;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.ResourceManager;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksPanelBase.java
import com.izforge.izpack.gui.LabelFactory;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.base.IzPanel;
Solution content
package com.izforge.izpack.panels.packs;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.LocaleDatabase;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.gui.LabelFactory;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.base.IzPanel;
File
PacksPanelBase.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
import com.izforge.izpack.panels.treepacks.PackValidator;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.IoHelper;
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksPanelBase.java
import com.izforge.izpack.util.VariableSubstitutor;
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksPanelBase.java

import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
Solution content
import com.izforge.izpack.panels.treepacks.PackValidator;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.IoHelper;

import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
File
PacksPanelBase.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
            public void mouseClicked(MouseEvent event) {
                int row = packsTable.rowAtPoint(event.getPoint());
                int col = packsTable.columnAtPoint(event.getPoint());
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksPanelBase.java
                if (col == 0)
                {
                    Integer checked = (Integer) packsModel.getValueAt(row, 0);
                    checked = (checked <= 0) ? 1 : 0;
                    packsModel.setValueAt(checked, row, 0);
=======
                if (col == 0) {
                    Integer checked = (Integer) packsModel.getValueAt(row, 0); 
                    checked = (checked <= 0) ? 1 : 0; 
                    packsModel.setValueAt(checked, row, 0); 
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksPanelBase.java
                    packsTable.repaint();
                }
            }
Solution content
            public void mouseClicked(MouseEvent event) {
                int row = packsTable.rowAtPoint(event.getPoint());
                int col = packsTable.columnAtPoint(event.getPoint());
                if (col == 0) {
                    Integer checked = (Integer) packsModel.getValueAt(row, 0);
                    checked = (checked <= 0) ? 1 : 0;
                    packsModel.setValueAt(checked, row, 0);
                    packsTable.repaint();
                }
            }
File
PacksPanelBase.java
Developer's decision
Version 1
Kind of conflict
Cast expression
If statement
Method invocation
Variable
Chunk
Conflicting content
            return (false);
        }

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksPanelBase.java
        for (Pack pack : idata.availablePacks)
        {
            for (String validator : pack.getValidators())
            {
=======
        for (Pack pack : this.installData.getAvailablePacks()) {
            for (String validator : pack.getValidators()) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksPanelBase.java
                /*
                 * This will call
                 * public static boolean validate(AbstractUIHandler handler,
Solution content
            return (false);
        }

        for (Pack pack : this.installData.getAvailablePacks()) {
            for (String validator : pack.getValidators()) {
                /*
                 * This will call
                 * public static boolean validate(AbstractUIHandler handler,
File
PacksPanelBase.java
Developer's decision
Version 2
Kind of conflict
For statement
Chunk
Conflicting content
                    continue;
                }

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksPanelBase.java
                try
                {
                    if (validatorInst.validate(this, idata, pack.id, (idata.selectedPacks.indexOf(pack) > -1)))
                    {
=======
                try {
                    if (validatorInst.validate(this, this.installData, pack.id, (this.installData.getSelectedPacks().indexOf(pack) > -1)))
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksPanelBase.java
                        continue;
                    }
                    else
Solution content
                }
                    continue;

                try {
                    if (validatorInst.validate(this, this.installData, pack.id, (this.installData.getSelectedPacks().indexOf(pack) > -1)))
                    {
                        continue;
                    }
                    else
File
PacksPanelBase.java
Developer's decision
Combination
Kind of conflict
If statement
Try statement
Chunk
Conflicting content
                catch (Exception e) {
                    e.printStackTrace();
                    System.err.println("Error: Exception in " + validator + ".validate("
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksPanelBase.java
                            + (idata.selectedPacks.indexOf(pack) > -1) + ") for pack " + pack.name);
=======
                            + (this.installData.getSelectedPacks().indexOf(pack) > -1) + ") for pack " + pack.name);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksPanelBase.java
                    continue;
                }
            }
Solution content
                catch (Exception e) {
                    e.printStackTrace();
                    System.err.println("Error: Exception in " + validator + ".validate("
                            + (this.installData.getSelectedPacks().indexOf(pack) > -1) + ") for pack " + pack.name);
                    continue;
                }
            }
File
PacksPanelBase.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
            packsTable.getColumnModel().getColumn(1).setCellRenderer(new PacksPanelTableCellRenderer());
            PacksPanelTableCellRenderer packTextColumnRenderer = new PacksPanelTableCellRenderer();
            packTextColumnRenderer.setHorizontalAlignment(RIGHT);
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PacksPanelBase.java
            if (packsTable.getColumnCount() > 2)
            {
=======
            if (packsTable.getColumnCount() > 2) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/packs/PacksPanelBase.java
                packsTable.getColumnModel().getColumn(2).setCellRenderer(packTextColumnRenderer);
                packsTable.getColumnModel().getColumn(2).setMaxWidth(100);
            }
Solution content
            packsTable.getColumnModel().getColumn(1).setCellRenderer(new PacksPanelTableCellRenderer());
            PacksPanelTableCellRenderer packTextColumnRenderer = new PacksPanelTableCellRenderer();
            packTextColumnRenderer.setHorizontalAlignment(RIGHT);
            if (packsTable.getColumnCount() > 2)
            {
                packsTable.getColumnModel().getColumn(2).setCellRenderer(packTextColumnRenderer);
                packsTable.getColumnModel().getColumn(2).setMaxWidth(100);
            }
File
PacksPanelBase.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                int res = askQuestion(installData.getLangpack().getString("installer.warning"), warnMsg,
                        AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES);
                ok = res == AbstractUIHandler.ANSWER_YES;
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PathInputPanel.java
            }
            else
            {
                //if 'ShowCreateDirectoryMessage' variable set to 'false'
                // then don't show "directory will be created" dialog:
                final String vStr =
                        idata.getVariable("ShowCreateDirectoryMessage");
                if (vStr == null || Boolean.getBoolean(vStr))
                {
=======
            } else {
                //if 'ShowCreateDirectoryMessage' variable set to 'false'
                // then don't show "directory will be created" dialog:
                final String vStr =
                        this.installData.getVariable("ShowCreateDirectoryMessage");
                if (vStr == null || Boolean.getBoolean(vStr)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/path/PathInputPanel.java
                    ok = this.emitNotificationFeedback(getI18nStringForClass(
                            "createdir", "TargetPanel") + "\n" + chosenPath);
                }
Solution content
                int res = askQuestion(installData.getLangpack().getString("installer.warning"), warnMsg,
                        AbstractUIHandler.CHOICES_YES_NO, AbstractUIHandler.ANSWER_YES);
                ok = res == AbstractUIHandler.ANSWER_YES;
            } else {
                //if 'ShowCreateDirectoryMessage' variable set to 'false'
                // then don't show "directory will be created" dialog:
                final String vStr =
                        idata.getVariable("ShowCreateDirectoryMessage");
                if (vStr == null || Boolean.getBoolean(vStr))
                {
                    ok = this.emitNotificationFeedback(getI18nStringForClass(
                            "createdir", "TargetPanel") + "\n" + chosenPath);
                }
File
PathInputPanel.java
Developer's decision
Version 1
Kind of conflict
Comment
If statement
Method invocation
Variable
Chunk
Conflicting content
package com.izforge.izpack.panels.process;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/ProcessPanel.java
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.installer.InstallData;
import com.izforge.izpack.installer.InstallerFrame;
import com.izforge.izpack.installer.IzPanel;
import com.izforge.izpack.installer.ProcessPanelWorker;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.base.IzPanel;
import com.izforge.izpack.installer.data.GUIInstallData;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/process/ProcessPanel.java
import com.izforge.izpack.util.AbstractUIProcessHandler;

import javax.swing.*;
Solution content
import javax.swing.*;

package com.izforge.izpack.panels.process;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.base.IzPanel;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.util.AbstractUIProcessHandler;
File
ProcessPanel.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
package com.izforge.izpack.panels.process;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/ProcessPanelAutomationHelper.java
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.installer.*;
import com.izforge.izpack.util.AbstractUIProcessHandler;

import java.io.IOException;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.installer.automation.PanelAutomationHelper;
import com.izforge.izpack.util.AbstractUIProcessHandler;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/process/ProcessPanelAutomationHelper.java

/**
 * Functions to support automated usage of the CompilePanel
Solution content
package com.izforge.izpack.panels.process;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.installer.automation.PanelAutomationHelper;
import com.izforge.izpack.util.AbstractUIProcessHandler;

/**
 * Functions to support automated usage of the CompilePanel
File
ProcessPanelAutomationHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
    protected AutomatedInstallData idata;

    private Map> buttonConfigs = new Hashtable>();
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
=======
    private VariableSubstitutor variableSubstitutor;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/process/ProcessPanelWorker.java

    /**
     * The constructor.
Solution content
    protected AutomatedInstallData idata;

    private Map> buttonConfigs = new Hashtable>();
    private VariableSubstitutor variableSubstitutor;

    /**
     * The constructor.
File
ProcessPanelWorker.java
Developer's decision
Version 2
Kind of conflict
Attribute
Chunk
Conflicting content
        buttonConfigs.put(Boolean.FALSE, new ArrayList());
        buttonConfigs.put(Boolean.TRUE, new ArrayList());

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
        for (IXMLElement ef : spec.getChildrenNamed("onFail"))
        {
=======
        for (IXMLElement ef : spec.getChildrenNamed("onFail")) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/process/ProcessPanelWorker.java
            String conditionid = ef.hasAttribute("condition") ? ef.getAttribute("condition") : ef.hasAttribute("conditionid") ? ef.getAttribute("conditionid") : null;
            boolean unlockPrev = ef.hasAttribute("previous") ? Boolean.parseBoolean(ef.getAttribute("previous")) : false;
            boolean unlockNext = ef.hasAttribute("next") ? Boolean.parseBoolean(ef.getAttribute("next")) : false;
Solution content
        buttonConfigs.put(Boolean.FALSE, new ArrayList());
        buttonConfigs.put(Boolean.TRUE, new ArrayList());

        for (IXMLElement ef : spec.getChildrenNamed("onFail"))
        {
            String conditionid = ef.hasAttribute("condition") ? ef.getAttribute("condition") : ef.hasAttribute("conditionid") ? ef.getAttribute("conditionid") : null;
            boolean unlockPrev = ef.hasAttribute("previous") ? Boolean.parseBoolean(ef.getAttribute("previous")) : false;
            boolean unlockNext = ef.hasAttribute("next") ? Boolean.parseBoolean(ef.getAttribute("next")) : false;
File
ProcessPanelWorker.java
Developer's decision
Version 1
Kind of conflict
For statement
Chunk
Conflicting content
                Method m = procClass.getMethod("run", new Class[]{AbstractUIProcessHandler.class,
                        String[].class});

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
                if (m.getReturnType().getName().equals("boolean"))
                {
                    result = ((Boolean) m.invoke(o, new Object[]{myHandler, params}))
                            .booleanValue();
                }
                else
                {
=======
                if (m.getReturnType().getName().equals("boolean")) {
                    result = ((Boolean) m.invoke(o, new Object[]{myHandler, params}))
                            .booleanValue();
                } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/process/ProcessPanelWorker.java
                    m.invoke(o, new Object[]{myHandler, params});
                    result = true;
                }
Solution content
                Method m = procClass.getMethod("run", new Class[]{AbstractUIProcessHandler.class,
                        String[].class});

                if (m.getReturnType().getName().equals("boolean")) {
                    result = ((Boolean) m.invoke(o, new Object[]{myHandler, params}))
                            .booleanValue();
                } else {
                    m.invoke(o, new Object[]{myHandler, params});
                    result = true;
                }
File
ProcessPanelWorker.java
Developer's decision
Version 1
Kind of conflict
Attribute
If statement
Method invocation
Chunk
Conflicting content
}

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/ProcessPanelWorker.java
class ButtonConfig
{
    private final String conditionid;
    private final boolean unlockPrev;
    private final boolean unlockNext;

    /**
     * @param conditionid
     * @param unlockPrev
     * @param unlockNext
     */
    public ButtonConfig(String conditionid, boolean unlockPrev, boolean unlockNext)
    {
        this.conditionid = conditionid;
        this.unlockPrev = unlockPrev;
        this.unlockNext = unlockNext;
    }

    /**
     * @return the unlockPrev
     */
    public boolean isUnlockPrev()
    {
        return unlockPrev;
    }

    /**
     * @return the unlockNext
     */
    public boolean isUnlockNext()
    {
        return unlockNext;
    }


    /**
     * @return the conditionid
     */
    public String getConditionid()
    {
        return conditionid;
    }
}
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/process/ProcessPanelWorker.java
Solution content
}
File
ProcessPanelWorker.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Chunk
Conflicting content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/ShortcutPanel.java

package com.izforge.izpack.panels;

import com.izforge.izpack.ExecutableFile;
import com.izforge.izpack.Pack;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.IXMLParser;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.adaptator.impl.XMLParser;
=======
package com.izforge.izpack.panels.shortcut;

import com.izforge.izpack.api.GuiId;
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.adaptator.impl.XMLParser;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.api.exception.ResourceNotFoundException;
import com.izforge.izpack.api.panels.IShortcuPanel;
import com.izforge.izpack.api.substitutor.SubstitutionType;
import com.izforge.izpack.data.ExecutableFile;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/shortcut/ShortcutPanel.java
import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.gui.LabelFactory;
import com.izforge.izpack.gui.MultiLineLabel;
Solution content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.panels.shortcut;

import com.izforge.izpack.api.GuiId;
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.adaptator.impl.XMLParser;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.api.exception.ResourceNotFoundException;
import com.izforge.izpack.api.panels.IShortcuPanel;
import com.izforge.izpack.api.substitutor.SubstitutionType;
import com.izforge.izpack.data.ExecutableFile;
import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.gui.LabelFactory;
import com.izforge.izpack.gui.MultiLineLabel;
File
ShortcutPanel.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
                    rUserFlag = false;
                    Debug.log("Element '" + SPEC_KEY_DEF_CUR_USER +
                            "' was specified");
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/ShortcutPanel.java
                }
                else
                {  //'defaultCurrentUser' element not specified
=======
                } else {  //'defaultCurrentUser' element not specified
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/shortcut/ShortcutPanel.java
                    rUserFlag = isRootUser;
                }
Solution content
                    rUserFlag = false;
                    Debug.log("Element '" + SPEC_KEY_DEF_CUR_USER +
                            "' was specified");
                } else {  //'defaultCurrentUser' element not specified
                    rUserFlag = isRootUser;
                }
File
ShortcutPanel.java
Developer's decision
Version 1
Kind of conflict
Comment
Chunk
Conflicting content
    private boolean checkConditions(IXMLElement shortcutSpec) {
        boolean result = true;
        String conditionid = shortcutSpec.getAttribute(SPEC_ATTRIBUTE_CONDITION);
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/ShortcutPanel.java
        if (conditionid != null)
        {
=======
        if (conditionid != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/shortcut/ShortcutPanel.java
            result = this.parent.getRules().isConditionTrue(conditionid);
        }
//          Vector conditions = shortcutSpec.getChildrenNamed( Condition.CONDITION );
Solution content
    private boolean checkConditions(IXMLElement shortcutSpec) {
        boolean result = true;
        String conditionid = shortcutSpec.getAttribute(SPEC_ATTRIBUTE_CONDITION);
        if (conditionid != null)
        {
            result = this.parent.getRules().isConditionTrue(conditionid);
        }
//          Vector conditions = shortcutSpec.getChildrenNamed( Condition.CONDITION );
File
ShortcutPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        // ----------------------------------------------------
        // radio buttons to select current user or all users.
        // ----------------------------------------------------
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/ShortcutPanel.java
        if (shortcut.multipleUsers())
        {
=======
        if (shortcut.multipleUsers()) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/shortcut/ShortcutPanel.java
            //if 'defaultCurrentUser' specified, default to current user:
            final boolean rUserFlag = defaultCurrentUserFlag ? false :
                    isRootUser;
Solution content
        // ----------------------------------------------------
        // radio buttons to select current user or all users.
        // ----------------------------------------------------
        if (shortcut.multipleUsers()) {
            //if 'defaultCurrentUser' specified, default to current user:
            final boolean rUserFlag = defaultCurrentUserFlag ? false :
                    isRootUser;
File
ShortcutPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/ShortcutPanelAutomationHelper.java

package com.izforge.izpack.panels;

import com.izforge.izpack.ExecutableFile;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelAutomation;
import com.izforge.izpack.installer.UninstallData;
=======
package com.izforge.izpack.panels.shortcut;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.data.ExecutableFile;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.installer.data.UninstallData;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/shortcut/ShortcutPanelAutomationHelper.java
import com.izforge.izpack.util.*;
import com.izforge.izpack.util.os.Shortcut;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.shortcut;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.data.ExecutableFile;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.installer.data.UninstallData;
import com.izforge.izpack.util.*;
import com.izforge.izpack.util.os.Shortcut;
File
ShortcutPanelAutomationHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
 * The taget directory selection panel.

package com.izforge.izpack.panels.target;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/TargetPanel.java
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.installer.InstallData;
import com.izforge.izpack.installer.InstallerFrame;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.panels.path.PathInputPanel;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/target/TargetPanel.java

/**
Solution content
package com.izforge.izpack.panels.target;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.panels.path.PathInputPanel;

/**
 * The taget directory selection panel.
File
TargetPanel.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
package com.izforge.izpack.panels.target;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/TargetPanelAutomationHelper.java
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelAutomation;
import com.izforge.izpack.util.VariableSubstitutor;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.automation.PanelAutomation;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/target/TargetPanelAutomationHelper.java

/**
 * Functions to support automated usage of the TargetPanel
Solution content
package com.izforge.izpack.panels.target;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.automation.PanelAutomation;

/**
 * Functions to support automated usage of the TargetPanel
File
TargetPanelAutomationHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/TargetPanelConsoleHelper.java

package com.izforge.izpack.panels;
=======
package com.izforge.izpack.panels.target;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/target/TargetPanelConsoleHelper.java

import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelConsole;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.target;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;

import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelConsole;
File
TargetPanelConsoleHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
        this.variableSubstitutor = variableSubstitutor;
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/TargetPanelConsoleHelper.java
    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter)
    {
        printWriter.println(ScriptParser.INSTALL_PATH + "=");
=======
    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter) {
        printWriter.println(AutomatedInstallData.INSTALL_PATH + "=");
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/target/TargetPanelConsoleHelper.java
        return true;
    }
Solution content
        this.variableSubstitutor = variableSubstitutor;
    }

    public boolean runGeneratePropertiesFile(AutomatedInstallData installData, PrintWriter printWriter) {
        printWriter.println(AutomatedInstallData.INSTALL_PATH + "=");
        return true;
    }
File
TargetPanelConsoleHelper.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Method signature
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/PackValidator.java

package com.izforge.izpack.installer;
=======
package com.izforge.izpack.panels.treepacks;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/treepacks/PackValidator.java

import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.util.AbstractUIHandler;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.treepacks;

import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.util.AbstractUIHandler;
File
PackValidator.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 */
public interface PackValidator {
    public boolean validate(AbstractUIHandler handler,
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/PackValidator.java
                            InstallData idata, String packsId, boolean isSelected);
=======
                            GUIInstallData idata, String packsId, boolean isSelected);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/treepacks/PackValidator.java
}
Solution content
 */
public interface PackValidator {
    public boolean validate(AbstractUIHandler handler,
                            GUIInstallData idata, String packsId, boolean isSelected);
}
File
PackValidator.java
Developer's decision
Version 2
Kind of conflict
Variable
Chunk
Conflicting content
package com.izforge.izpack.panels.treepacks;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/TreePacksPanel.java
import com.izforge.izpack.LocaleDatabase;
import com.izforge.izpack.Pack;
import com.izforge.izpack.adaptator.IXMLElement;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.LocaleDatabase;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.ResourceManager;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/treepacks/TreePacksPanel.java
import com.izforge.izpack.gui.LabelFactory;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.base.IzPanel;
Solution content
package com.izforge.izpack.panels.treepacks;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.LocaleDatabase;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.gui.LabelFactory;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.base.IzPanel;
File
TreePacksPanel.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
import com.izforge.izpack.panels.packs.PacksPanelInterface;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.IoHelper;
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/TreePacksPanel.java
import com.izforge.izpack.util.VariableSubstitutor;
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/treepacks/TreePacksPanel.java

import javax.swing.*;
import javax.swing.tree.TreeModel;
Solution content
import com.izforge.izpack.panels.packs.PacksPanelInterface;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.IoHelper;

import javax.swing.*;
import javax.swing.tree.TreeModel;
File
TreePacksPanel.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
                }
            }

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/TreePacksPanel.java
            if (langPackStream == null)
            {
                langPackStream = ResourceManager.getInstance().getInputStream(LANG_FILE_NAME);
=======
            if (langPackStream == null) {
                langPackStream = this.resourceManager.getInputStream(LANG_FILE_NAME);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/treepacks/TreePacksPanel.java
            }
            this.langpack.add(langPackStream);
Solution content
                }
            }

            if (langPackStream == null) {
                langPackStream = this.resourceManager.getInputStream(LANG_FILE_NAME);
            }

            this.langpack.add(langPackStream);
File
TreePacksPanel.java
Developer's decision
Version 2
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/TreePacksPanelAutomationHelper.java

package com.izforge.izpack.panels;
=======
package com.izforge.izpack.panels.treepacks;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/treepacks/TreePacksPanelAutomationHelper.java

import com.izforge.izpack.panels.packs.PacksPanelAutomationHelper;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.treepacks;

import com.izforge.izpack.panels.packs.PacksPanelAutomationHelper;
File
TreePacksPanelAutomationHelper.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/DirInputField.java

package com.izforge.izpack.panels;

import com.izforge.izpack.installer.InstallData;
import com.izforge.izpack.installer.IzPanel;
=======
package com.izforge.izpack.panels.userinput;

import com.izforge.izpack.installer.base.IzPanel;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.panels.userinput.validator.ValidatorContainer;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/DirInputField.java
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.IoHelper;
import com.izforge.izpack.util.OsVersion;
Solution content
import com.izforge.izpack.installer.base.IzPanel;
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.userinput;

import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.panels.userinput.validator.ValidatorContainer;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.IoHelper;
import com.izforge.izpack.util.OsVersion;
File
DirInputField.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
import com.izforge.izpack.util.IoHelper;
import com.izforge.izpack.util.OsVersion;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/DirInputField.java
import javax.swing.JFileChooser;
=======
import javax.swing.*;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/DirInputField.java
import java.io.File;
import java.io.IOException;
import java.util.List;
Solution content
import com.izforge.izpack.util.IoHelper;
import com.izforge.izpack.util.OsVersion;

import javax.swing.*;
import java.io.File;
import java.io.IOException;
import java.util.List;
File
DirInputField.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
import java.io.IOException;
import java.util.List;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/DirInputField.java
public class DirInputField extends FileInputField
{
=======
public class DirInputField extends FileInputField {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/DirInputField.java

    private static final long serialVersionUID = 8494549823214831160L;
Solution content
import java.io.IOException;
import java.util.List;

public class DirInputField extends FileInputField {

    private static final long serialVersionUID = 8494549823214831160L;
File
DirInputField.java
Developer's decision
Version 1
Kind of conflict
Class signature
Chunk
Conflicting content
    private final boolean canCreate;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/DirInputField.java
    public DirInputField(IzPanel parent, InstallData data, boolean directory, String set, int size,
                         List validatorConfig, boolean mustExist, boolean canCreate)
    {
        super(parent, data, directory, set, size, validatorConfig, null, null);
=======
    public DirInputField(IzPanel parent, GUIInstallData installDataGUI, boolean directory, String set, int size,
                         List validatorConfig, boolean mustExist, boolean canCreate) {
        super(parent, installDataGUI, directory, set, size, validatorConfig, null, null);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/DirInputField.java
        this.mustExist = mustExist;
        this.canCreate = canCreate;
    }
Solution content
    private final boolean canCreate;

    public DirInputField(IzPanel parent, GUIInstallData installDataGUI, boolean directory, String set, int size,
                         List validatorConfig, boolean mustExist, boolean canCreate) {
        super(parent, installDataGUI, directory, set, size, validatorConfig, null, null);
        this.mustExist = mustExist;
        this.canCreate = canCreate;
    }
File
DirInputField.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Method signature
Chunk
Conflicting content
     */
    private static boolean isWriteable(File path) {
        File existParent = IoHelper.existingParent(path);
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/DirInputField.java
        if (existParent == null)
        {
=======
        if (existParent == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/DirInputField.java
            return false;
        }
Solution content
     */
    private static boolean isWriteable(File path) {
        File existParent = IoHelper.existingParent(path);
        if (existParent == null)
        {
            return false;
        }
File
DirInputField.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
    {

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/FileInputField.java
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * Copyright 2009 Dennis Reil
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.panels;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.util.List;

import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;

import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.installer.InstallData;
import com.izforge.izpack.installer.InstallerFrame;
import com.izforge.izpack.installer.IzPanel;
import com.izforge.izpack.util.Debug;

public class FileInputField extends JPanel implements ActionListener
{

    private static final long serialVersionUID = 4673684743657328492L;

    InstallerFrame parentFrame;

    IzPanel parent;

    List validators;

    JTextField filetxt;

    JButton browseBtn;

    String set;

    int size;

    InstallData data;

    String fileExtension;

    String fileExtensionDescription;

    boolean allowEmpty;

    protected static final int INVALID = 0, EMPTY = 1;

    public FileInputField(IzPanel parent, InstallData data, boolean directory, String set, int size,
            List validatorConfig)
    {
        this(parent, data, directory, set, size, validatorConfig, null, null);
    }

    public FileInputField(IzPanel parent, InstallData data, boolean directory, String set, int size,
            List validatorConfig, String fileExt, String fileExtDesc)
    {
        this.parent = parent;
        this.parentFrame = parent.getInstallerFrame();
        this.data = data;
    }

        this.validators = validatorConfig;
        this.set = set;
        this.size = size;
        this.fileExtension = fileExt;
        this.fileExtensionDescription = fileExtDesc;
        this.initialize();
    }

    private void initialize()
    {
        filetxt = new JTextField(set, size);
        filetxt.setCaretPosition(0);

        GridBagLayout layout = new GridBagLayout();
        setLayout(layout);
        GridBagConstraints fileTextConstraint = new GridBagConstraints();
        GridBagConstraints fileButtonConstraint = new GridBagConstraints();
        fileTextConstraint.gridx = 0;
        fileTextConstraint.gridy = 0;
        fileTextConstraint.anchor = GridBagConstraints.WEST;
        fileTextConstraint.insets = new Insets(0, 0, 0, 5);
        fileButtonConstraint.gridx = 1;
        fileButtonConstraint.gridy = 0;
        fileButtonConstraint.anchor = GridBagConstraints.WEST;

        // TODO: use separate key for button text
        browseBtn = ButtonFactory.createButton(data.langpack.getString("UserInputPanel.search.browse"),
                data.buttonsHColor);
        browseBtn.addActionListener(this);
        this.add(filetxt, fileTextConstraint);
        this.add(browseBtn, fileButtonConstraint);
    }

    public void setFile(String filename)
    {
        filetxt.setText(filename);
    }

    public void actionPerformed(ActionEvent arg0)
    {
        if (arg0.getSource() == browseBtn)
        {
            Debug.trace("Show dirchooser");
            String initialPath = ".";
            if (filetxt.getText() != null)
            {
                initialPath = filetxt.getText();
            }
            JFileChooser filechooser = new JFileChooser(initialPath);
            prepareFileChooser(filechooser);

            if (filechooser.showOpenDialog(parentFrame) == JFileChooser.APPROVE_OPTION)
            {
                String selectedFile = filechooser.getSelectedFile().getAbsolutePath();
                filetxt.setText(selectedFile);
                Debug.trace("Setting current file chooser directory to: " + selectedFile);
            }
        }
    }

    protected void prepareFileChooser(JFileChooser filechooser)
    {
        filechooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
        if ((fileExtension != null) && (fileExtensionDescription != null))
        {
            UserInputFileFilter fileFilter = new UserInputFileFilter();
            fileFilter.setFileExt(fileExtension);
            fileFilter.setFileExtDesc(fileExtensionDescription);
            filechooser.setFileFilter(fileFilter);
        }
    }

    public File getSelectedFile()
    {
        File result = null;
        if (filetxt.getText() != null)
        {
            result = new File(filetxt.getText());
        }
        return result;
    }

    protected void showMessage(int k)
    {
        if (k == INVALID)
        {
            showMessage("file.notfile");
        }
        else if (k == EMPTY)
        {
            showMessage("file.nofile");
        }
    }

    protected void showMessage(String messageType)
    {
        JOptionPane.showMessageDialog(parentFrame, parentFrame.langpack.getString("UserInputPanel." + messageType
                + ".message"), parentFrame.langpack.getString("UserInputPanel." + messageType + ".caption"),
                JOptionPane.WARNING_MESSAGE);
    }

    public boolean validateField()
        boolean result = false;
        String input = filetxt.getText();

        if (allowEmpty && ((input == null) || (input.length() == 0)))
        {
            result = true;
        }
        else if (input != null)
        {
            // Expand unix home reference
            if (input.startsWith("~"))
            {
                String home = System.getProperty("user.home");
                input = home + input.substring(1);
            }

            // Normalize the path
            File file = new File(input).getAbsoluteFile();
            input = file.toString();

            filetxt.setText(input);

            if (!_validate(file))
            {
                result = false;
                showMessage(INVALID);
            }
            else
            {
                StringInputProcessingClient processingClient = new StringInputProcessingClient(input, validators);
                boolean success = processingClient.validate();
                if (!success)
                {
                    JOptionPane
                            .showMessageDialog(parentFrame, processingClient.getValidationMessage(),
                                    parentFrame.langpack.getString("UserInputPanel.error.caption"),
                                    JOptionPane.WARNING_MESSAGE);
                }
                result = success;
            }
        }
        else
        {
            showMessage(EMPTY);
        }
        return result;
    }

    protected boolean _validate(File file)
    {
        return file.isFile();
    }

    public boolean isAllowEmptyInput()
    {
        return allowEmpty;
    }

    public void setAllowEmptyInput(boolean allowEmpty)
    {
        this.allowEmpty = allowEmpty;
    }
}
=======
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * Copyright 2009 Dennis Reil
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.userinput;

import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.base.IzPanel;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.panels.userinput.processorclient.StringInputProcessingClient;
import com.izforge.izpack.panels.userinput.validator.ValidatorContainer;
import com.izforge.izpack.util.Debug;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.util.List;

public class FileInputField extends JPanel implements ActionListener {

    private static final long serialVersionUID = 4673684743657328492L;
    InstallerFrame parentFrame;

    IzPanel parent;

    List validators;

    JTextField filetxt;

    JButton browseBtn;

    String set;

    int size;

    GUIInstallData installDataGUI;

    String fileExtension;

    String fileExtensionDescription;

    boolean allowEmpty;

    protected static final int INVALID = 0, EMPTY = 1;

    public FileInputField(IzPanel parent, GUIInstallData installDataGUI, boolean directory, String set,
                          int size, List validatorConfig) {
        this(parent, installDataGUI, directory, set, size, validatorConfig, null, null);
    }

    public FileInputField(IzPanel parent, GUIInstallData installDataGUI, boolean directory, String set,
                          int size, List validatorConfig, String fileExt, String fileExtDesc) {
        this.parent = parent;
        this.parentFrame = parent.getInstallerFrame();
        this.installDataGUI = installDataGUI;
        this.validators = validatorConfig;
        this.set = set;
        this.size = size;
        this.fileExtension = fileExt;
        this.fileExtensionDescription = fileExtDesc;
        this.initialize();
    }

    private void initialize() {
        filetxt = new JTextField(set, size);
        filetxt.setCaretPosition(0);

        // TODO: use separate key for button text
        browseBtn = ButtonFactory.createButton(installDataGUI.getLangpack()
                .getString("UserInputPanel.search.browse"), installDataGUI.buttonsHColor);
        browseBtn.addActionListener(this);
        this.add(filetxt);
        this.add(browseBtn);
    }

    public void setFile(String filename) {
        filetxt.setText(filename);
    }

    public void actionPerformed(ActionEvent arg0) {
        if (arg0.getSource() == browseBtn) {
            Debug.trace("Show dirchooser");
            String initialPath = ".";
            if (filetxt.getText() != null) {
                initialPath = filetxt.getText();
            }
            JFileChooser filechooser = new JFileChooser(initialPath);
            prepareFileChooser(filechooser);

            if (filechooser.showOpenDialog(parentFrame) == JFileChooser.APPROVE_OPTION) {
                String selectedFile = filechooser.getSelectedFile().getAbsolutePath();
                filetxt.setText(selectedFile);
                Debug.trace("Setting current file chooser directory to: " + selectedFile);
            }
        }
    }

    protected void prepareFileChooser(JFileChooser filechooser) {
        filechooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
        if ((fileExtension != null) && (fileExtensionDescription != null)) {
            UserInputFileFilter fileFilter = new UserInputFileFilter();
            fileFilter.setFileExt(fileExtension);
            fileFilter.setFileExtDesc(fileExtensionDescription);
            filechooser.setFileFilter(fileFilter);
        }
    }

    public File getSelectedFile() {
        File result = null;
        if (filetxt.getText() != null) {
            result = new File(filetxt.getText());
        }
        return result;
    }

    protected void showMessage(int k) {
        if (k == INVALID) {
            showMessage("file.notfile");
        } else if (k == EMPTY) {
            showMessage("file.nofile");
        }
    protected void showMessage(String messageType) {
        JOptionPane.showMessageDialog(parentFrame, parentFrame.langpack.getString("UserInputPanel."
                + messageType + ".message"), parentFrame.langpack.getString("UserInputPanel."
                + messageType + ".caption"), JOptionPane.WARNING_MESSAGE);
    }

    public boolean validateField() {
        boolean result = false;
        String input = filetxt.getText();

        if (allowEmpty && ((input == null) || (input.length() == 0))) {
            result = true;
        } else if (input != null) {
            // Expand unix home reference
            if (input.startsWith("~")) {
                String home = System.getProperty("user.home");
                input = home + input.substring(1);
            }

            // Normalize the path
            File file = new File(input).getAbsoluteFile();
            input = file.toString();

            filetxt.setText(input);

            if (!_validate(file)) {
                result = false;
                showMessage(INVALID);
            } else {
                StringInputProcessingClient processingClient = new StringInputProcessingClient(
                        input, validators);
                boolean success = processingClient.validate();
                if (!success) {
                    JOptionPane
                            .showMessageDialog(parentFrame,
                                    processingClient.getValidationMessage(), parentFrame.langpack
                                            .getString("UserInputPanel.error.caption"),
                                    JOptionPane.WARNING_MESSAGE);
                }
                result = success;
            }
        } else {
            showMessage(EMPTY);
        }
        return result;
    }

    protected boolean _validate(File file) {
        return file.isFile();
    }

    public boolean isAllowEmptyInput() {
        return allowEmpty;
    }

    public void setAllowEmptyInput(boolean allowEmpty) {
        this.allowEmpty = allowEmpty;
    }
}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/FileInputField.java
Solution content
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * Copyright 2009 Dennis Reil
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.userinput;

import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.base.IzPanel;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.panels.userinput.processorclient.StringInputProcessingClient;
import com.izforge.izpack.panels.userinput.validator.ValidatorContainer;
import com.izforge.izpack.util.Debug;

import javax.swing.*;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.util.List;

public class FileInputField extends JPanel implements ActionListener {

    private static final long serialVersionUID = 4673684743657328492L;

    InstallerFrame parentFrame;

    IzPanel parent;

    List validators;

    JTextField filetxt;

    JButton browseBtn;

    String set;

    int size;

    GUIInstallData installDataGUI;

    String fileExtension;

    String fileExtensionDescription;

    boolean allowEmpty;

    protected static final int INVALID = 0, EMPTY = 1;

        return result;
    public FileInputField(IzPanel parent, GUIInstallData installDataGUI, boolean directory, String set,
                          int size, List validatorConfig) {
        this(parent, installDataGUI, directory, set, size, validatorConfig, null, null);
    }

    public FileInputField(IzPanel parent, GUIInstallData installDataGUI, boolean directory, String set,
                          int size, List validatorConfig, String fileExt, String fileExtDesc) {
        this.parent = parent;
        this.parentFrame = parent.getInstallerFrame();
        this.installDataGUI = installDataGUI;
        this.validators = validatorConfig;
        this.set = set;
        this.size = size;
        this.fileExtension = fileExt;
        this.fileExtensionDescription = fileExtDesc;
        this.initialize();
    }

    private void initialize() {
        filetxt = new JTextField(set, size);
        filetxt.setCaretPosition(0);

        GridBagLayout layout = new GridBagLayout();
        setLayout(layout);
        GridBagConstraints fileTextConstraint = new GridBagConstraints();
        GridBagConstraints fileButtonConstraint = new GridBagConstraints();
        fileTextConstraint.gridx = 0;
        fileTextConstraint.gridy = 0;
        fileTextConstraint.anchor = GridBagConstraints.WEST;
        fileTextConstraint.insets = new Insets(0, 0, 0, 5);
        fileButtonConstraint.gridx = 1;
        fileButtonConstraint.gridy = 0;
        fileButtonConstraint.anchor = GridBagConstraints.WEST;

        // TODO: use separate key for button text
        browseBtn = ButtonFactory.createButton(installDataGUI.getLangpack()
                .getString("UserInputPanel.search.browse"), installDataGUI.buttonsHColor);
        browseBtn.addActionListener(this);
    }
        this.add(filetxt, fileTextConstraint);
        this.add(browseBtn, fileButtonConstraint);
    }

    public void setFile(String filename) {
        filetxt.setText(filename);
    }

    public void actionPerformed(ActionEvent arg0) {
        if (arg0.getSource() == browseBtn) {
            Debug.trace("Show dirchooser");
            String initialPath = ".";
            if (filetxt.getText() != null) {
                initialPath = filetxt.getText();
            }
            JFileChooser filechooser = new JFileChooser(initialPath);
            prepareFileChooser(filechooser);

            if (filechooser.showOpenDialog(parentFrame) == JFileChooser.APPROVE_OPTION) {
                String selectedFile = filechooser.getSelectedFile().getAbsolutePath();
                filetxt.setText(selectedFile);
                Debug.trace("Setting current file chooser directory to: " + selectedFile);
            }
        }
    }

    protected void prepareFileChooser(JFileChooser filechooser)
    {
        filechooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
        if ((fileExtension != null) && (fileExtensionDescription != null)) {
            UserInputFileFilter fileFilter = new UserInputFileFilter();
            fileFilter.setFileExt(fileExtension);
            fileFilter.setFileExtDesc(fileExtensionDescription);
            filechooser.setFileFilter(fileFilter);
        }
    }

    public File getSelectedFile() {
        File result = null;
        if (filetxt.getText() != null) {
            result = new File(filetxt.getText());
        }
        return result;
    }

    protected void showMessage(int k) {
        if (k == INVALID) {
            showMessage("file.notfile");
        } else if (k == EMPTY) {
            showMessage("file.nofile");
        }
    }

    protected void showMessage(String messageType) {
        JOptionPane.showMessageDialog(parentFrame, parentFrame.langpack.getString("UserInputPanel." + messageType
                + ".message"), parentFrame.langpack.getString("UserInputPanel." + messageType + ".caption"),
                JOptionPane.WARNING_MESSAGE);
    }

    public boolean validateField() {
        boolean result = false;
        String input = filetxt.getText();

        if (allowEmpty && ((input == null) || (input.length() == 0))) {
            result = true;
        } else if (input != null) {
            // Expand unix home reference
            if (input.startsWith("~")) {
                String home = System.getProperty("user.home");
                input = home + input.substring(1);
            }

            // Normalize the path
            File file = new File(input).getAbsoluteFile();
            input = file.toString();

            filetxt.setText(input);

            if (!_validate(file)) {
                result = false;
                showMessage(INVALID);
            } else {
                StringInputProcessingClient processingClient = new StringInputProcessingClient(input, validators);
                boolean success = processingClient.validate();
                if (!success) {
                    JOptionPane
                            .showMessageDialog(parentFrame, processingClient.getValidationMessage(),
                                    parentFrame.langpack.getString("UserInputPanel.error.caption"),
                                    JOptionPane.WARNING_MESSAGE);
                }
                result = success;
            }
        } else {
            showMessage(EMPTY);
        }

    protected boolean _validate(File file) {
        return file.isFile();
    }

    public boolean isAllowEmptyInput() {
        return allowEmpty;
    }

    public void setAllowEmptyInput(boolean allowEmpty) {
        this.allowEmpty = allowEmpty;
    }
}
File
FileInputField.java
Developer's decision
Combination
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/MultipleFileInputField.java
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * Copyright 2009 Dennis Reil
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.panels;

import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.installer.InstallData;
import com.izforge.izpack.installer.InstallerFrame;
import com.izforge.izpack.util.Debug;

import javax.swing.*;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.io.File;
import java.util.ArrayList;
                {
import javax.swing.*;
import java.util.Enumeration;
import java.util.List;


public class MultipleFileInputField extends JPanel implements ActionListener, FocusListener
{
    private static final long serialVersionUID = 4673684743657328492L;

    boolean isDirectory;
    InstallerFrame parentFrame;
    List validators;


    DefaultListModel model;
    JList fileList;
    JButton browseBtn;
    JButton deleteBtn;

    String set;
    int size;
    InstallData data;
    String fileExtension;
    String fileExtensionDescription;

    boolean allowEmpty;
    boolean createMultipleVariables;

    int visibleRows = 10;
    int preferredX = 200;
    int preferredY = 200;

    String labeltext;

    public MultipleFileInputField(InstallerFrame parent, InstallData data, boolean directory, String set, int size, List validatorConfig, String fileExt, String fileExtDesc, boolean createMultipleVariables, int visibleRows, int preferredXSize, int preferredYSize, String labelText)
    {
        this.parentFrame = parent;
        this.data = data;
        this.validators = validatorConfig;
        this.set = set;
        this.size = size;
        this.fileExtension = fileExt;
        this.fileExtensionDescription = fileExtDesc;
        this.isDirectory = directory;
        this.createMultipleVariables = createMultipleVariables;
        this.visibleRows = visibleRows;
        this.preferredX = preferredXSize;
        this.preferredY = preferredYSize;
        this.labeltext = labelText;
        this.initialize();
    }

    public void clearFiles()
    {
        this.model.clear();
    }

    public void addFile(String file)
    {
        this.model.addElement(file);
    }

    public void initialize()
    {
        JPanel main = new JPanel();


        main.setLayout(new BoxLayout(main, BoxLayout.Y_AXIS));

        JPanel labelPanel = new JPanel();
        labelPanel.setLayout(new BoxLayout(labelPanel, BoxLayout.X_AXIS));
        JLabel label = new JLabel(this.labeltext);
        labelPanel.add(label);
        labelPanel.add(Box.createHorizontalGlue());
        main.add(labelPanel);

        model = new DefaultListModel();
        fileList = new JList(model);
        fileList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        fileList.setVisibleRowCount(visibleRows);

        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));

        JPanel buttonPanel = new JPanel();
        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.Y_AXIS));

        browseBtn = ButtonFactory.createButton(data.langpack.getString("UserInputPanel.button.browse"), data.buttonsHColor);
        browseBtn.addActionListener(this);

        deleteBtn = ButtonFactory.createButton(data.langpack.getString("UserInputPanel.button.delete"), data.buttonsHColor);
        deleteBtn.addActionListener(this);

        JScrollPane scroller = new JScrollPane(fileList);
        scroller.setPreferredSize(new Dimension(preferredX, preferredY));
        panel.add(scroller);

        buttonPanel.add(browseBtn);
        buttonPanel.add(deleteBtn);
        buttonPanel.add(Box.createVerticalGlue());
        panel.add(buttonPanel);
        main.add(panel);
import java.awt.*;
        main.add(Box.createVerticalGlue());
        add(main);
    }

    public void actionPerformed(ActionEvent arg0)
    {
        if (arg0.getSource() == browseBtn)
        {
            Debug.trace("Show dirchooser");
            String initialPath = ".";
            if (fileList.getSelectedValue() != null)
            {
                initialPath = (String) fileList.getSelectedValue();
            }
            JFileChooser filechooser = new JFileChooser(initialPath);
            if (isDirectory)
            {
                filechooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            }
            else
            {
                filechooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
                if ((fileExtension != null) && (fileExtensionDescription != null))
                    UserInputFileFilter fileFilter = new UserInputFileFilter();
                    fileFilter.setFileExt(fileExtension);
                    fileFilter.setFileExtDesc(fileExtensionDescription);
                    filechooser.setFileFilter(fileFilter);
                }
            }

            if (filechooser.showOpenDialog(parentFrame) == JFileChooser.APPROVE_OPTION)
            {
                String selectedFile = filechooser.getSelectedFile().getAbsolutePath();
                model.addElement(selectedFile);
                Debug.trace("Setting current file chooser directory to: " + selectedFile);
            }
        }
        if (arg0.getSource() == deleteBtn)
        {
            Debug.trace("Delete selected file from list");
            if (fileList.getSelectedValue() != null)
            {
                model.removeElement(fileList.getSelectedValue());
            }
        }
    }

    public List getSelectedFiles()
    {
        List result = null;
        if (model.size() > 0)
        {
            result = new ArrayList();

            Enumeration elements = model.elements();
            for (; elements.hasMoreElements();)
            {
                String element = (String) elements.nextElement();
                result.add(element);
            }
        }
        return result;
    }

    private void showMessage(String messageType)
    {
        JOptionPane.showMessageDialog(parentFrame, parentFrame.langpack.getString("UserInputPanel." + messageType + ".message"),
                parentFrame.langpack.getString("UserInputPanel." + messageType + ".caption"),
                JOptionPane.WARNING_MESSAGE);
    }

    private boolean validateFile(String input)
    {
        boolean result = false;
        if (allowEmpty && ((input == null) || (input.length() == 0)))
        {
            result = true;
        }
        else if (input != null)
        {
            File file = new File(input);

            if (isDirectory && !file.isDirectory())
            {
                result = false;
                showMessage("dir.notdirectory");
            }
            else if (!isDirectory && !file.isFile())
            {
                result = false;
                showMessage("file.notfile");
            }
            else
            {
                StringInputProcessingClient processingClient = new StringInputProcessingClient(input, validators);
                boolean success = processingClient.validate();
                if (!success)
                {

                    JOptionPane.showMessageDialog(parentFrame, processingClient.getValidationMessage(),
                            parentFrame.langpack.getString("UserInputPanel.error.caption"),
                            JOptionPane.WARNING_MESSAGE);
                }
                result = success;
            }
        }
        else
        {
            if (isDirectory)
            {
                showMessage("dir.nodirectory");
            }
            else
            {
                showMessage("file.nofile");
            }
        }
        return result;
    }

    public boolean validateField()
    {
        boolean result = false;
        int fileCount = model.getSize();
        if (fileCount == 0 && allowEmpty)
        {
            return true;
        }
        else
        {
            for (int i = 0; i < fileCount; i++)
            {
                result = validateFile((String) model.getElementAt(i));
                if (!result)
                {
                    break;
                }
            }
        }

        return result;

    }


    public boolean isAllowEmptyInput()
    {
        return allowEmpty;
    }


    public void setAllowEmptyInput(boolean allowEmpty)
    {
        this.allowEmpty = allowEmpty;
    }

    public void focusGained(FocusEvent e)
    {
        // TODO Auto-generated method stub

    }

    public void focusLost(FocusEvent e)
    {

    }


    public boolean isCreateMultipleVariables()
    {
        return createMultipleVariables;
    }


    public void setCreateMultipleVariables(boolean createMultipleVariables)
    {
        this.createMultipleVariables = createMultipleVariables;
    }
}
=======
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * Copyright 2009 Dennis Reil
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.userinput;

import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.panels.userinput.processorclient.StringInputProcessingClient;
import com.izforge.izpack.panels.userinput.validator.ValidatorContainer;
import com.izforge.izpack.util.Debug;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.io.File;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;


public class MultipleFileInputField extends JPanel implements ActionListener, FocusListener {
    private static final long serialVersionUID = 4673684743657328492L;

    boolean isDirectory;
    InstallerFrame parentFrame;
    List validators;


    DefaultListModel model;
    JList fileList;
    JButton browseBtn;
    JButton deleteBtn;

    String set;
    int size;
    GUIInstallData installDataGUI;
    String fileExtension;
    String fileExtensionDescription;

    boolean allowEmpty;
    boolean createMultipleVariables;

    int visibleRows = 10;
    int preferredX = 200;
    int preferredY = 200;

    String labeltext;

    public MultipleFileInputField(InstallerFrame parent, GUIInstallData installDataGUI, boolean directory, String set, int size, List validatorConfig, String fileExt, String fileExtDesc, boolean createMultipleVariables, int visibleRows, int preferredXSize, int preferredYSize, String labelText) {
        this.parentFrame = parent;
        this.installDataGUI = installDataGUI;
        this.validators = validatorConfig;
        this.set = set;
        this.size = size;
        this.fileExtension = fileExt;
        this.fileExtensionDescription = fileExtDesc;
        this.isDirectory = directory;
        this.createMultipleVariables = createMultipleVariables;
        this.visibleRows = visibleRows;
        this.preferredX = preferredXSize;
        this.preferredY = preferredYSize;
        this.labeltext = labelText;
        this.initialize();
    }

    public void clearFiles() {
        this.model.clear();
    }

    public void addFile(String file) {
        this.model.addElement(file);
    }

    public void initialize() {
        JPanel main = new JPanel();


        main.setLayout(new BoxLayout(main, BoxLayout.Y_AXIS));

        JPanel labelPanel = new JPanel();
        labelPanel.setLayout(new BoxLayout(labelPanel, BoxLayout.X_AXIS));
        JLabel label = new JLabel(this.labeltext);
        labelPanel.add(label);
        labelPanel.add(Box.createHorizontalGlue());
        main.add(labelPanel);

        model = new DefaultListModel();
        fileList = new JList(model);
        fileList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        fileList.setVisibleRowCount(visibleRows);

        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));

        JPanel buttonPanel = new JPanel();
        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.Y_AXIS));

        browseBtn = ButtonFactory.createButton(installDataGUI.getLangpack().getString("UserInputPanel.button.browse"), installDataGUI.buttonsHColor);
        browseBtn.addActionListener(this);

        deleteBtn = ButtonFactory.createButton(installDataGUI.getLangpack().getString("UserInputPanel.button.delete"), installDataGUI.buttonsHColor);
        deleteBtn.addActionListener(this);

        JScrollPane scroller = new JScrollPane(fileList);
        scroller.setPreferredSize(new Dimension(preferredX, preferredY));
        panel.add(scroller);

        buttonPanel.add(browseBtn);
        }
        buttonPanel.add(deleteBtn);
        buttonPanel.add(Box.createVerticalGlue());
        panel.add(buttonPanel);
        main.add(panel);
        main.add(Box.createVerticalGlue());
        add(main);
    }

    public void actionPerformed(ActionEvent arg0) {
        if (arg0.getSource() == browseBtn) {
            Debug.trace("Show dirchooser");
            String initialPath = ".";
            if (fileList.getSelectedValue() != null) {
                initialPath = (String) fileList.getSelectedValue();
            }
            JFileChooser filechooser = new JFileChooser(initialPath);
            if (isDirectory) {
                filechooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            } else {
                filechooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
                if ((fileExtension != null) && (fileExtensionDescription != null)) {
                    UserInputFileFilter fileFilter = new UserInputFileFilter();
                    fileFilter.setFileExt(fileExtension);
                    fileFilter.setFileExtDesc(fileExtensionDescription);
                    filechooser.setFileFilter(fileFilter);
                }
            }

            if (filechooser.showOpenDialog(parentFrame) == JFileChooser.APPROVE_OPTION) {
                String selectedFile = filechooser.getSelectedFile().getAbsolutePath();
                model.addElement(selectedFile);
                Debug.trace("Setting current file chooser directory to: " + selectedFile);
            }
        }
        if (arg0.getSource() == deleteBtn) {
            Debug.trace("Delete selected file from list");
            if (fileList.getSelectedValue() != null) {
                model.removeElement(fileList.getSelectedValue());
            }
        }
    }

    public List getSelectedFiles() {
        List result = null;
        if (model.size() > 0) {
            result = new ArrayList();

            Enumeration elements = model.elements();
            for (; elements.hasMoreElements();) {
                String element = (String) elements.nextElement();
                result.add(element);
            }
        }
        return result;
    }

    private void showMessage(String messageType) {
        JOptionPane.showMessageDialog(parentFrame, parentFrame.langpack.getString("UserInputPanel." + messageType + ".message"),
                parentFrame.langpack.getString("UserInputPanel." + messageType + ".caption"),
                JOptionPane.WARNING_MESSAGE);
    }

    private boolean validateFile(String input) {
        boolean result = false;
        if (allowEmpty && ((input == null) || (input.length() == 0))) {
            result = true;
        } else if (input != null) {
            File file = new File(input);

            if (isDirectory && !file.isDirectory()) {
                result = false;
                showMessage("dir.notdirectory");
            } else if (!isDirectory && !file.isFile()) {
                result = false;
                showMessage("file.notfile");
            } else {
                StringInputProcessingClient processingClient = new StringInputProcessingClient(input, validators);
                boolean success = processingClient.validate();
                if (!success) {
                    JOptionPane.showMessageDialog(parentFrame, processingClient.getValidationMessage(),
                            parentFrame.langpack.getString("UserInputPanel.error.caption"),
                            JOptionPane.WARNING_MESSAGE);
                }
                result = success;
            }
        } else {
            if (isDirectory) {
                showMessage("dir.nodirectory");
            } else {
                showMessage("file.nofile");
            }
        return result;
    }

    public boolean validateField() {
        boolean result = false;
        int fileCount = model.getSize();

        if (fileCount == 0 && allowEmpty) {
            return true;
        } else {
            for (int i = 0; i < fileCount; i++) {
                result = validateFile((String) model.getElementAt(i));
                if (!result) {
                    break;
                }
            }
        }

        return result;

    }


    public boolean isAllowEmptyInput() {
        return allowEmpty;
    }


    public void setAllowEmptyInput(boolean allowEmpty) {
        this.allowEmpty = allowEmpty;
    }

    public void focusGained(FocusEvent e) {
        // TODO Auto-generated method stub

    }

    public void focusLost(FocusEvent e) {

    }


    public boolean isCreateMultipleVariables() {
        return createMultipleVariables;
    }


    public void setCreateMultipleVariables(boolean createMultipleVariables) {
        this.createMultipleVariables = createMultipleVariables;
    }
}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/MultipleFileInputField.java
Solution content
    boolean isDirectory;
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * Copyright 2009 Dennis Reil
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.userinput;

import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.installer.InstallData;
import com.izforge.izpack.installer.InstallerFrame;
import com.izforge.izpack.util.Debug;

import javax.swing.*;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.io.File;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;


public class MultipleFileInputField extends JPanel implements ActionListener, FocusListener
{
    private static final long serialVersionUID = 4673684743657328492L;


    public void addFile(String file)
    InstallerFrame parentFrame;
    List validators;


    DefaultListModel model;
    JList fileList;
    JButton browseBtn;
    JButton deleteBtn;

    String set;
    int size;
    InstallData data;
    String fileExtension;
    String fileExtensionDescription;

    boolean allowEmpty;
    boolean createMultipleVariables;

    int visibleRows = 10;
    int preferredX = 200;
    int preferredY = 200;

    String labeltext;

    public MultipleFileInputField(InstallerFrame parent, InstallData data, boolean directory, String set, int size, List validatorConfig, String fileExt, String fileExtDesc, boolean createMultipleVariables, int visibleRows, int preferredXSize, int preferredYSize, String labelText)
    {
        this.parentFrame = parent;
        this.data = data;
        this.validators = validatorConfig;
        this.set = set;
        this.size = size;
        this.fileExtension = fileExt;
        this.fileExtensionDescription = fileExtDesc;
        this.isDirectory = directory;
        this.createMultipleVariables = createMultipleVariables;
        this.visibleRows = visibleRows;
        this.preferredX = preferredXSize;
        this.preferredY = preferredYSize;
        this.labeltext = labelText;
        this.initialize();
    }

    public void clearFiles()
    {
        this.model.clear();
    }
    {
        this.model.addElement(file);
    }

    public void initialize()
    {
        JPanel main = new JPanel();


        main.setLayout(new BoxLayout(main, BoxLayout.Y_AXIS));

        JPanel labelPanel = new JPanel();
        labelPanel.setLayout(new BoxLayout(labelPanel, BoxLayout.X_AXIS));
        JLabel label = new JLabel(this.labeltext);
        labelPanel.add(label);
        labelPanel.add(Box.createHorizontalGlue());
        main.add(labelPanel);

        model = new DefaultListModel();
        fileList = new JList(model);
        fileList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        fileList.setVisibleRowCount(visibleRows);

        JPanel panel = new JPanel();
        panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));

        JPanel buttonPanel = new JPanel();
        buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.Y_AXIS));

        browseBtn = ButtonFactory.createButton(data.langpack.getString("UserInputPanel.button.browse"), data.buttonsHColor);
        browseBtn.addActionListener(this);

        deleteBtn = ButtonFactory.createButton(data.langpack.getString("UserInputPanel.button.delete"), data.buttonsHColor);
        deleteBtn.addActionListener(this);

        JScrollPane scroller = new JScrollPane(fileList);
        scroller.setPreferredSize(new Dimension(preferredX, preferredY));
        panel.add(scroller);

        buttonPanel.add(browseBtn);
        buttonPanel.add(deleteBtn);
        buttonPanel.add(Box.createVerticalGlue());
        panel.add(buttonPanel);
        main.add(panel);
        main.add(Box.createVerticalGlue());
        add(main);
    }

    public void actionPerformed(ActionEvent arg0)
    {
        if (arg0.getSource() == browseBtn)
        {
            Debug.trace("Show dirchooser");
            String initialPath = ".";
        {
            if (fileList.getSelectedValue() != null)
            {
                initialPath = (String) fileList.getSelectedValue();
            }
            JFileChooser filechooser = new JFileChooser(initialPath);
            if (isDirectory)
            {
                filechooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
            }
            else
            {
                filechooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
                if ((fileExtension != null) && (fileExtensionDescription != null))
                {
                    UserInputFileFilter fileFilter = new UserInputFileFilter();
                    fileFilter.setFileExt(fileExtension);
                    fileFilter.setFileExtDesc(fileExtensionDescription);
                    filechooser.setFileFilter(fileFilter);
                }
            }

            if (filechooser.showOpenDialog(parentFrame) == JFileChooser.APPROVE_OPTION)
            {
                String selectedFile = filechooser.getSelectedFile().getAbsolutePath();
                model.addElement(selectedFile);
                Debug.trace("Setting current file chooser directory to: " + selectedFile);
            }
        }
        if (arg0.getSource() == deleteBtn)
        {
            Debug.trace("Delete selected file from list");
            if (fileList.getSelectedValue() != null)
            {
                model.removeElement(fileList.getSelectedValue());
            }
        }
    }

    public List getSelectedFiles()
    {
        List result = null;
        if (model.size() > 0)
            result = new ArrayList();

            Enumeration elements = model.elements();
            for (; elements.hasMoreElements();)
            {
                String element = (String) elements.nextElement();
                result.add(element);
            }
        }
        return result;
    }

    private void showMessage(String messageType)
    {
        JOptionPane.showMessageDialog(parentFrame, parentFrame.langpack.getString("UserInputPanel." + messageType + ".message"),
                parentFrame.langpack.getString("UserInputPanel." + messageType + ".caption"),
                JOptionPane.WARNING_MESSAGE);
    }

    private boolean validateFile(String input)
    {
        boolean result = false;
        if (allowEmpty && ((input == null) || (input.length() == 0)))
        {
            result = true;
        }
        else if (input != null)
        {
            File file = new File(input);

            if (isDirectory && !file.isDirectory())
            {
                result = false;
                showMessage("dir.notdirectory");
            }
            else if (!isDirectory && !file.isFile())
            {
                result = false;
                showMessage("file.notfile");
            }
            else
            {
                StringInputProcessingClient processingClient = new StringInputProcessingClient(input, validators);
                boolean success = processingClient.validate();
                if (!success)
                {
                    JOptionPane.showMessageDialog(parentFrame, processingClient.getValidationMessage(),
                            parentFrame.langpack.getString("UserInputPanel.error.caption"),
                            JOptionPane.WARNING_MESSAGE);
                }
                result = success;
            }
        }
        else
        {
            if (isDirectory)
            {
                showMessage("dir.nodirectory");
            }
            else
            {
                showMessage("file.nofile");
            }
        }
        return result;
    }

    public boolean validateField()
    {
        boolean result = false;
        int fileCount = model.getSize();

        if (fileCount == 0 && allowEmpty)
        {
            return true;
        }
        else
        {
            for (int i = 0; i < fileCount; i++)
            {
                result = validateFile((String) model.getElementAt(i));
                if (!result)
                {
                    break;
                }
            }
        }

        return result;

    }


    public boolean isAllowEmptyInput()
    {
        return allowEmpty;
    }


    public void setAllowEmptyInput(boolean allowEmpty)
    {
        this.allowEmpty = allowEmpty;
    }

    public void focusGained(FocusEvent e)
    {
        // TODO Auto-generated method stub

    }

    public void focusLost(FocusEvent e)
    {

    }


    public boolean isCreateMultipleVariables()
    {
        return createMultipleVariables;
    }


    public void setCreateMultipleVariables(boolean createMultipleVariables)
    {
        this.createMultipleVariables = createMultipleVariables;
    }
}
File
MultipleFileInputField.java
Developer's decision
Combination
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PasswordGroup.java

package com.izforge.izpack.panels;
=======
package com.izforge.izpack.panels.userinput;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/PasswordGroup.java

import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.panels.userinput.processor.Processor;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.userinput;

import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.panels.userinput.processor.Processor;
File
PasswordGroup.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
/**
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/PasswordUIElement.java
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */

package com.izforge.izpack.panels;

/**
 * Additional metadata for password elements.
 *
 * @author Dennis Reil
 */
public class PasswordUIElement extends UIElement
{

    public PasswordUIElement()
    {
        super();
    }

    PasswordGroup passwordGroup;

    public PasswordGroup getPasswordGroup()
    {
        return passwordGroup;
    }

    public void setPasswordGroup(PasswordGroup passwordGroup)
    {
        this.passwordGroup = passwordGroup;
    }
=======
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.panels.userinput;

 * Additional metadata for password elements.
 *
 * @author Dennis Reil
 */
public class PasswordUIElement extends UIElement {

    public PasswordUIElement() {
        super();
    }

    PasswordGroup passwordGroup;

    public PasswordGroup getPasswordGroup() {
        return passwordGroup;
    }

    public void setPasswordGroup(PasswordGroup passwordGroup) {
        this.passwordGroup = passwordGroup;
    }
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/PasswordUIElement.java
}
Solution content
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.panels.userinput;

/**
 * Additional metadata for password elements.
 *
 * @author Dennis Reil
 */
public class PasswordUIElement extends UIElement {

    public PasswordUIElement() {
        super();
    }

    PasswordGroup passwordGroup;

    public PasswordGroup getPasswordGroup() {
        return passwordGroup;
    }

    public void setPasswordGroup(PasswordGroup passwordGroup) {
        this.passwordGroup = passwordGroup;
    }
}
File
PasswordUIElement.java
Developer's decision
Version 2
Kind of conflict
Attribute
Comment
Method declaration
Package declaration
Chunk
Conflicting content
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/RadioButtonUIElement.java
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */

package com.izforge.izpack.panels;

import javax.swing.ButtonGroup;

/**
 * Additional metadata for radio buttons.
 *
 * @author Dennis Reil
 */
public class RadioButtonUIElement extends UIElement
{

    public RadioButtonUIElement()
    {
        super();
    }

    ButtonGroup buttonGroup;

    public ButtonGroup getButtonGroup()
    {
        return buttonGroup;
    }

    public void setButtonGroup(ButtonGroup buttonGroup)
    {
        this.buttonGroup = buttonGroup;
    }
=======
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.panels.userinput;

import javax.swing.*;

/**
 * Additional metadata for radio buttons.
 *
 * @author Dennis Reil
 */
public class RadioButtonUIElement extends UIElement {

    public RadioButtonUIElement() {
        super();
    }

    ButtonGroup buttonGroup;

    public ButtonGroup getButtonGroup() {
        return buttonGroup;
    }

    public void setButtonGroup(ButtonGroup buttonGroup) {
        this.buttonGroup = buttonGroup;
    }
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/RadioButtonUIElement.java
}
Solution content
    }
}
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.panels.userinput;

import javax.swing.*;

/**
 * Additional metadata for radio buttons.
 *
 * @author Dennis Reil
 */
public class RadioButtonUIElement extends UIElement {

    public RadioButtonUIElement() {
        super();
    }

    ButtonGroup buttonGroup;

    public ButtonGroup getButtonGroup() {
        return buttonGroup;
    }

    public void setButtonGroup(ButtonGroup buttonGroup) {
        this.buttonGroup = buttonGroup;
File
RadioButtonUIElement.java
Developer's decision
Version 2
Kind of conflict
Attribute
Comment
Import
Method declaration
Package declaration
Chunk
Conflicting content
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UIElement.java
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */

package com.izforge.izpack.panels;

import com.izforge.izpack.adaptator.IXMLElement;

import javax.swing.JComponent;
import java.util.Vector;

/**
 * Metadata for elements shown in the dialog.
 *
 * @author Dennis Reil
 */
public class UIElement
{

    boolean displayed;

    UIElementType type;

    String associatedVariable;

    JComponent component;

    Object constraints;

    Vector forPacks;

    Vector forOs;

    String trueValue;

    String falseValue;

    String message;

    public UIElement()
    {

    }

    public boolean hasVariableAssignment()
    {
        return this.associatedVariable != null;
    }

    public String getMessage()
    {
        return message;
    }

    public void setMessage(String message)
    {
        this.message = message;
    }

    public UIElementType getType()
    {
        return type;
    }

    public void setType(UIElementType type)
    {
        this.type = type;
    }

    public String getAssociatedVariable()
    {
        return associatedVariable;
    }

    public void setAssociatedVariable(String associatedVariable)
    {
        this.associatedVariable = associatedVariable;
    }

    public JComponent getComponent()
    {
        return component;
    }

    public void setComponent(JComponent component)
    {
        this.component = component;
    }

    public Object getConstraints()
    {
        return constraints;
    }

    public void setConstraints(Object constraints)
    {
        this.constraints = constraints;
    }

    public Vector getForPacks()
    {
        return forPacks;
    }

    public void setForPacks(Vector forPacks)
    {
        this.forPacks = forPacks;
    }

    public Vector getForOs()
    {
        return forOs;
    }

    public void setForOs(Vector forOs)
    {
        this.forOs = forOs;
    }

    public String getTrueValue()
    {
        return trueValue;
    }

    public void setTrueValue(String trueValue)
    {
        this.trueValue = trueValue;
    }

    public String getFalseValue()
    {
        return falseValue;
    }

    public void setFalseValue(String falseValue)
    {
        this.falseValue = falseValue;
    }

    public boolean isDisplayed()
    {
        return displayed;
    }

    public void setDisplayed(boolean displayed)
    {
        this.displayed = displayed;
    }

=======
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.panels.userinput;

import com.izforge.izpack.api.adaptator.IXMLElement;

import javax.swing.*;
import java.util.Vector;

/**
 * Metadata for elements shown in the dialog.
 *
 * @author Dennis Reil
 */
public class UIElement {

    boolean displayed;

    UIElementType type;

    String associatedVariable;

    JComponent component;

    Object constraints;

    Vector forPacks;

    Vector forOs;

    String trueValue;

    String falseValue;

    String message;

    public UIElement() {

    }

    public boolean hasVariableAssignment() {
        return this.associatedVariable != null;
    }

    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }

    public UIElementType getType() {
        return type;
    }

    public void setType(UIElementType type) {
        this.type = type;
    }

    public String getAssociatedVariable() {
        return associatedVariable;
    }

    public void setAssociatedVariable(String associatedVariable) {
        this.associatedVariable = associatedVariable;
    }

    public JComponent getComponent() {
        return component;
    }

    public void setComponent(JComponent component) {
        this.component = component;
    }

    public Object getConstraints() {
        return constraints;
    }

    public void setConstraints(Object constraints) {
        this.constraints = constraints;
    }

    public Vector getForPacks() {
        return forPacks;
    }

    public void setForPacks(Vector forPacks) {
        this.forPacks = forPacks;
    }

    public Vector getForOs() {
        return forOs;
    }

    public void setForOs(Vector forOs) {
        this.forOs = forOs;
    }

    public String getTrueValue() {
        return trueValue;
    }

    public void setTrueValue(String trueValue) {
        this.trueValue = trueValue;
    }

    public String getFalseValue() {
        return falseValue;
    }

    public void setFalseValue(String falseValue) {
        this.falseValue = falseValue;
    }

    public boolean isDisplayed() {
        return displayed;
    }

    public void setDisplayed(boolean displayed) {
        this.displayed = displayed;
    }

>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UIElement.java
}
Solution content
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.panels.userinput;

import com.izforge.izpack.api.adaptator.IXMLElement;
import java.util.Vector;
import javax.swing.*;
import java.util.Vector;

/**
 * Metadata for elements shown in the dialog.
 *
 * @author Dennis Reil
 */
public class UIElement {

    boolean displayed;

    UIElementType type;

    String associatedVariable;

    JComponent component;

    Object constraints;

    Vector forPacks;

    Vector forOs;

    String trueValue;

    String falseValue;

    String message;

    public UIElement() {

    }

    public boolean hasVariableAssignment() {
        return this.associatedVariable != null;
    }

    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }

    public UIElementType getType() {
        return type;
    }

    public void setType(UIElementType type) {
        this.type = type;
    }

    public String getAssociatedVariable() {
        return associatedVariable;
    }

    public void setAssociatedVariable(String associatedVariable) {
        this.associatedVariable = associatedVariable;
    }

    public JComponent getComponent() {
        return component;
    }

    public void setComponent(JComponent component) {
        this.component = component;
    }

    public Object getConstraints() {
        return constraints;
    }

    public void setConstraints(Object constraints) {
        this.constraints = constraints;
    }

    public Vector getForPacks() {
        return forPacks;
    }

    public void setForPacks(Vector forPacks) {
        this.forPacks = forPacks;
    }

    public Vector getForOs() {
        return forOs;
    }

    public void setForOs(Vector forOs) {
        this.forOs = forOs;
    }

    public String getTrueValue() {
        return trueValue;
    }

    public void setTrueValue(String trueValue) {
        this.trueValue = trueValue;
    }

    public String getFalseValue() {
        return falseValue;
    }

    public void setFalseValue(String falseValue) {
        this.falseValue = falseValue;
    }

    public boolean isDisplayed() {
        return displayed;
    }

    public void setDisplayed(boolean displayed) {
        this.displayed = displayed;
    }

}
File
UIElement.java
Developer's decision
Combination
Kind of conflict
Attribute
Comment
Import
Method declaration
Package declaration
Chunk
Conflicting content
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UIElementType.java
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */

package com.izforge.izpack.panels;

public enum UIElementType
{
    LABEL, TEXT, CHECKBOX, MULTIPLE_FILE, FILE, DIRECTORY, RULE, COMBOBOX, RADIOBUTTON, PASSWORD, SEARCH, SEARCHBUTTON, SPACE, DIVIDER, DESCRIPTION
=======
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.panels.userinput;

public enum UIElementType {
    LABEL, TEXT, CHECKBOX, MULTIPLE_FILE, FILE, DIRECTORY, RULE, COMBOBOX, RADIOBUTTON, PASSWORD, SEARCH, SEARCHBUTTON, SPACE, DIVIDER, DESCRIPTION
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UIElementType.java
}
Solution content
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.panels.userinput;

public enum UIElementType
{
    LABEL, TEXT, CHECKBOX, MULTIPLE_FILE, FILE, DIRECTORY, RULE, COMBOBOX, RADIOBUTTON, PASSWORD, SEARCH, SEARCHBUTTON, SPACE, DIVIDER, DESCRIPTION
}
File
UIElementType.java
Developer's decision
Version 2
Kind of conflict
Comment
Enum value
Package declaration
Chunk
Conflicting content
import java.text.MessageFormat;
import java.util.*;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
import com.izforge.izpack.LocaleDatabase;
import com.izforge.izpack.Pack;
import com.izforge.izpack.Panel;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.IXMLParser;
import com.izforge.izpack.adaptator.impl.XMLParser;
import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.gui.LabelFactory;
import com.izforge.izpack.gui.TwoColumnConstraints;
import com.izforge.izpack.gui.TwoColumnConstraintsFactory;
import com.izforge.izpack.gui.TwoColumnLayout;
import com.izforge.izpack.installer.InstallData;
import com.izforge.izpack.installer.InstallerFrame;
import com.izforge.izpack.installer.IzPanel;
import com.izforge.izpack.installer.ResourceManager;
import com.izforge.izpack.installer.ResourceNotFoundException;
import com.izforge.izpack.rules.RulesEngine;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.HyperlinkHandler;
import com.izforge.izpack.util.OsConstraint;
import com.izforge.izpack.util.OsVersion;
import com.izforge.izpack.util.VariableSubstitutor;

public class UserInputPanel extends IzPanel implements ActionListener, ItemListener, FocusListener
{
=======
/**
 * Created by IntelliJ IDEA.
 *
 * @author Anthonin Bonnefoy
 */
public class UserInputPanel extends IzPanel implements ActionListener, ItemListener, FocusListener {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java

    /**
     *
Solution content
import java.text.MessageFormat;
import java.util.*;

/**
 * Created by IntelliJ IDEA.
 *
 * @author Anthonin Bonnefoy
 */
public class UserInputPanel extends IzPanel implements ActionListener, ItemListener, FocusListener {
import com.izforge.izpack.gui.TwoColumnConstraintsFactory;
import com.izforge.izpack.installer.InstallerFrame;
import com.izforge.izpack.installer.IzPanel;
import com.izforge.izpack.installer.ResourceManager;
import com.izforge.izpack.installer.ResourceNotFoundException;
import com.izforge.izpack.util.HyperlinkHandler;

    /**
     *
File
UserInputPanel.java
Developer's decision
Combination
Kind of conflict
Class signature
Comment
Import
Chunk
Conflicting content
    /**
     * Constructs a UserInputPanel.
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
     * 
     * @param parent      reference to the application frame
     * @param installData shared information about the installation
=======
     *
     * @param parent         reference to the application frame
     * @param installDataGUI shared information about the installation
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
     */
    /*--------------------------------------------------------------------------*/
    public UserInputPanel(InstallerFrame parent, GUIInstallData installDataGUI, ResourceManager resourceManager) {
Solution content
    /**
     * Constructs a UserInputPanel.
     * 
     * @param parent      reference to the application frame
     * @param installDataGUI shared information about the installation
     */
    /*--------------------------------------------------------------------------*/
    public UserInputPanel(InstallerFrame parent, GUIInstallData installDataGUI, ResourceManager resourceManager) {
File
UserInputPanel.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
        this.parentFrame = parent;
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
    protected void init()
    {
=======
    private void createBuiltInVariableConditions(String variable) {
        if (variable != null) {
            VariableExistenceCondition variableCondition = new VariableExistenceCondition();
            variableCondition.setId("izpack.input." + variable);
            variableCondition.setInstalldata(this.installData);
            variableCondition.setVariable(variable);
            parent.getRules().addCondition(variableCondition);
        }
    }

    protected void init() {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
        eventsActivated = false;
        TwoColumnLayout layout;
        super.removeAll();
Solution content
        this.parentFrame = parent;
    }

    protected void init()
    {
        eventsActivated = false;
        TwoColumnLayout layout;
        super.removeAll();
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
Method declaration
Method signature
Chunk
Conflicting content
        // same panel)
        // ----------------------------------------------------
        int topbuff = 25;
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        int colWidth = 0;
        try
        {
            topbuff = Integer.parseInt(spec.getAttribute(TOPBUFFER));
        }
        catch (Exception ex)
        {
=======
        try {
            topbuff = Integer.parseInt(spec.getAttribute(TOPBUFFER));
        }
        catch (Exception ex) {
        }
        finally {
            layout = new TwoColumnLayout(10, 5, 30, topbuff, TwoColumnLayout.LEFT);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
        }
        try
        {
Solution content
        // same panel)
        // ----------------------------------------------------
        int topbuff = 25;
        int colWidth = 0;
        try
        {
            topbuff = Integer.parseInt(spec.getAttribute(TOPBUFFER));
        }
        catch (Exception ex)
        {
            layout = new TwoColumnLayout(10, 5, 30, topbuff, TwoColumnLayout.LEFT);
        }
        try
        {
File
UserInputPanel.java
Developer's decision
Combination
Kind of conflict
Catch clause
Method invocation
Try statement
Variable
Chunk
Conflicting content
        for (int i = 0; i < fields.size(); i++) {
            IXMLElement field = fields.elementAt(i);
            String attribute = field.getAttribute(TYPE);
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
=======
            String associatedVariable = field.getAttribute(VARIABLE);
            if (associatedVariable != null) {
                // create automatic existence condition
                createBuiltInVariableConditions(associatedVariable);
            }
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java

            String conditionid = field.getAttribute(ATTRIBUTE_CONDITIONID_NAME);
            if (conditionid != null) {
Solution content
        for (int i = 0; i < fields.size(); i++) {
            IXMLElement field = fields.elementAt(i);
            String attribute = field.getAttribute(TYPE);

            String conditionid = field.getAttribute(ATTRIBUTE_CONDITIONID_NAME);
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
        int size;

        String variable = field.getAttribute(VARIABLE);
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        if ((variable == null) || (variable.length() == 0))
        {
=======
        if ((variable == null) || (variable.length() == 0)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            return;
        }
Solution content
        int size;

        String variable = field.getAttribute(VARIABLE);
        if ((variable == null) || (variable.length() == 0))
        {
            return;
        }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        FileInputField fileInput = new DirInputField(this, idata, true, set, size, validatorConfig, mustExist, create);

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
=======
        FileInputField fileInput = new DirInputField(this, this.installData, true, set, size,
                validatorConfig, mustExist, create);

>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
        fileInput.setAllowEmptyInput(allowEmptyValue);

        UIElement dirUiElement = new UIElement();
Solution content
        FileInputField fileInput = new DirInputField(this, this.installData, true, set, size,
                validatorConfig, mustExist, create);

        fileInput.setAllowEmptyInput(allowEmptyValue);

        UIElement dirUiElement = new UIElement();
File
UserInputPanel.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        String filterdesc = null;

        String variable = field.getAttribute(VARIABLE);
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        if ((variable == null) || (variable.length() == 0))
        {
=======
        if ((variable == null) || (variable.length() == 0)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            return;
        }
Solution content
        String filterdesc = null;

        String variable = field.getAttribute(VARIABLE);
        if ((variable == null) || (variable.length() == 0))
        {
            return;
        }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        TwoColumnConstraints constraints2 = TwoColumnConstraintsFactory.createControlConstraint(field);

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        MultipleFileInputField fileInputField = new MultipleFileInputField(parentFrame, idata, false, set, size,
                validatorConfig, filter, filterdesc, createMultipleVariables, visibleRows, preferredX, preferredY,
                labelText);
=======
        MultipleFileInputField fileInputField = new MultipleFileInputField(parentFrame, this.installData,
                false, set, size, validatorConfig, filter, filterdesc, createMultipleVariables,
                visibleRows, preferredX, preferredY, labelText);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
        fileInputField.setAllowEmptyInput(allowEmptyValue);

        UIElement fileUiElement = new UIElement();
Solution content
        TwoColumnConstraints constraints2 = TwoColumnConstraintsFactory.createControlConstraint(field);

        MultipleFileInputField fileInputField = new MultipleFileInputField(parentFrame, idata, false, set, size,
                validatorConfig, filter, filterdesc, createMultipleVariables, visibleRows, preferredX, preferredY,
                labelText);
        fileInputField.setAllowEmptyInput(allowEmptyValue);

        UIElement fileUiElement = new UIElement();
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        String filterdesc = null;

        String variable = field.getAttribute(VARIABLE);
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        if ((variable == null) || (variable.length() == 0))
        {
=======
        if ((variable == null) || (variable.length() == 0)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            return;
        }
Solution content
        String filterdesc = null;

        String variable = field.getAttribute(VARIABLE);
        if ((variable == null) || (variable.length() == 0))
        {
            return;
        }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
            elements.add(labelUiElement);
        }

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        TwoColumnConstraints constraints2 = TwoColumnConstraintsFactory.createControlConstraint(field);
        FileInputField fileInputField = new FileInputField(this, idata, false, set, size, validatorConfig, filter,
                filterdesc);
=======
        FileInputField fileInputField = new FileInputField(this, this.installData, false, set, size,
                validatorConfig, filter, filterdesc);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java

        fileInputField.setAllowEmptyInput(allowEmptyValue);
Solution content
            elements.add(labelUiElement);
        }

        TwoColumnConstraints constraints2 = TwoColumnConstraintsFactory.createControlConstraint(field);
        FileInputField fileInputField = new FileInputField(this, idata, false, set, size, validatorConfig, filter,
                filterdesc);

        fileInputField.setAllowEmptyInput(allowEmptyValue);
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
                    if (value == null) {
                        value = rulef.getText();
                    }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
                }
                else if (element.getType() == UIElementType.MULTIPLE_FILE)
                {
                    MultipleFileInputField multifile = (MultipleFileInputField) element.getComponent();
                    if (value != null)
                    {
=======
                } else if (element.getType() == UIElementType.MULTIPLE_FILE) {
                    MultipleFileInputField multifile = (MultipleFileInputField) element
                            .getComponent();
                    if (value != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                        multifile.clearFiles();
                        if (multifile.isCreateMultipleVariables()) {
                            multifile.addFile(value);
Solution content
                    if (value == null) {
                        value = rulef.getText();
                    }
                } else if (element.getType() == UIElementType.MULTIPLE_FILE) {
                    MultipleFileInputField multifile = (MultipleFileInputField) element.getComponent();
                    if (value != null) {
                        multifile.clearFiles();
                        if (multifile.isCreateMultipleVariables()) {
                            multifile.addFile(value);
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
Cast expression
If statement
Variable
Chunk
Conflicting content
        Vector forUnselectedPacks = spec.getChildrenNamed(UNSELECTEDPACKS);
        Vector forOs = spec.getChildrenNamed(OS);

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        if (!itemRequiredFor(forPacks) || !itemRequiredForUnselected(forUnselectedPacks) || !itemRequiredForOs(forOs))
        {
=======
        if (!itemRequiredFor(forPacks) || !itemRequiredForUnselected(forUnselectedPacks)
                || !itemRequiredForOs(forOs)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            parentFrame.skipPanel();
            return;
        }
Solution content
        Vector forUnselectedPacks = spec.getChildrenNamed(UNSELECTEDPACKS);
        Vector forOs = spec.getChildrenNamed(OS);

        if (!itemRequiredFor(forPacks) || !itemRequiredForUnselected(forUnselectedPacks) || !itemRequiredForOs(forOs))
        {
            parentFrame.skipPanel();
            return;
        }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                } else if (element.getType() == UIElementType.DIRECTORY) {
                    success = readDirectoryField(element);
                }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
                if (!success)
                {
=======
                if (!success) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                    return (false);
                }
            }
Solution content
                } else if (element.getType() == UIElementType.DIRECTORY) {
                    success = readDirectoryField(element);
                }
                if (!success)
                {
                    return (false);
                }
            }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        try {
            FileInputField panel = (FileInputField) field.getComponent();
            result = panel.validateField();
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
            if (result)
            {
                idata.setVariable(field.getAssociatedVariable(), panel.getSelectedFile().getAbsolutePath());
                entries
                        .add(new TextValuePair(field.getAssociatedVariable(), panel.getSelectedFile().getAbsolutePath()));
=======
            if (result) {
                this.installData.setVariable(field.getAssociatedVariable(), panel.getSelectedFile()
                        .getAbsolutePath());
                entries.add(new UserInputPanel.TextValuePair(field.getAssociatedVariable(), panel
                        .getSelectedFile().getAbsolutePath()));
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            }
        }
        catch (Exception e) {
Solution content
        try {
            FileInputField panel = (FileInputField) field.getComponent();
            result = panel.validateField();
            if (result) {
                this.installData.setVariable(field.getAssociatedVariable(), panel.getSelectedFile()
                        .getAbsolutePath());
                entries.add(new UserInputPanel.TextValuePair(field.getAssociatedVariable(), panel
                        .getSelectedFile().getAbsolutePath()));
            }
        }
        catch (Exception e) {
File
UserInputPanel.java
Developer's decision
Version 2
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
        try {
            FileInputField input = (FileInputField) field.getComponent();
            result = input.validateField();
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
            if (result)
            {
                idata.setVariable(field.getAssociatedVariable(), input.getSelectedFile().getAbsolutePath());
                entries
                        .add(new TextValuePair(field.getAssociatedVariable(), input.getSelectedFile().getAbsolutePath()));
=======
            if (result) {
                this.installData.setVariable(field.getAssociatedVariable(), input.getSelectedFile()
                        .getAbsolutePath());
                entries.add(new UserInputPanel.TextValuePair(field.getAssociatedVariable(), input
                        .getSelectedFile().getAbsolutePath()));
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            }
        }
        catch (Exception e) {
Solution content
        try {
            FileInputField input = (FileInputField) field.getComponent();
            result = input.validateField();
            if (result) {
                this.installData.setVariable(field.getAssociatedVariable(), input.getSelectedFile()
                        .getAbsolutePath());
                entries.add(new UserInputPanel.TextValuePair(field.getAssociatedVariable(), input
                        .getSelectedFile().getAbsolutePath()));
            }
        }
        catch (Exception e) {
File
UserInputPanel.java
Developer's decision
Version 2
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
                }

                if (((attribute != null) && instance.equals(attribute))
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
                        || ((panelattribute != null) && (panelid != null) && (panelid.equals(panelattribute))))
                {
=======
                        || ((panelattribute != null) && (panelid != null) && (panelid
                        .equals(panelattribute)))) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                    // use the current element as spec
                    spec = data;
                    // close the stream
Solution content
                }

                if (((attribute != null) && instance.equals(attribute))
                        || ((panelattribute != null) && (panelid != null) && (panelid
                        .equals(panelattribute)))) {
                    // use the current element as spec
                    spec = data;
                    // close the stream
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
        }
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
    protected String getIconName(IXMLElement element)
    {
        if (element == null)
        {
=======
    protected String getIconName(IXMLElement element) {
        if (element == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            return (null);
        }
Solution content
        }
    }

    protected String getIconName(IXMLElement element) {
        if (element == null) {
            return (null);
        }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Method signature
Chunk
Conflicting content
        // extracted specifications, then add it to the list
        // of UI elements.
        // ----------------------------------------------------
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        if (hasParams)
        {
            field = new RuleInputField(layout, set, separator, validator, validateParamMap, processor, resultFormat,
                    getToolkit(), idata);
        }
        else
        {
            field = new RuleInputField(layout, set, separator, validator, processor, resultFormat, getToolkit(), idata);
=======
        if (hasParams) {
            field = new RuleInputField(layout, set, separator, validator, validateParamMap,
                    processor, resultFormat, getToolkit(), this.installData);
        } else {
            field = new RuleInputField(layout, set, separator, validator, processor, resultFormat,
                    getToolkit(), this.installData);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java

        }
Solution content
        // extracted specifications, then add it to the list
        // of UI elements.
        // ----------------------------------------------------
        if (hasParams) {
            field = new RuleInputField(layout, set, separator, validator, validateParamMap,
                    processor, resultFormat, getToolkit(), this.installData);
        } else {
            field = new RuleInputField(layout, set, separator, validator, processor, resultFormat,
                    getToolkit(), this.installData);

        }
File
UserInputPanel.java
Developer's decision
Version 2
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
     * Reads the installDataGUI from the rule input field and sets the associated variable.
     *
     * @param field the object array that holds the details of the field.
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
     * @return true if there was no problem reading the data or if there was an
=======
     * @return true if there was no problem reading the installDataGUI or if there was an
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
     *         irrecovarable problem. If there was a problem that can be corrected by the operator, an error
     *         dialog is popped up and false is returned.
     */
Solution content
     * Reads the installDataGUI from the rule input field and sets the associated variable.
     *
     * @param field the object array that holds the details of the field.
     * @return true if there was no problem reading the installDataGUI or if there was an
     *         irrecovarable problem. If there was a problem that can be corrected by the operator, an error
     *         dialog is popped up and false is returned.
     */
File
UserInputPanel.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
        if ((variable == null) || (ruleField == null)) {
            return (true);
        }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        if ((variable == null) || (ruleField == null))
        {
            return (true);
        }
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java

        boolean success = !validating || ruleField.validateContents();
        if (!success) {
Solution content
        if ((variable == null) || (ruleField == null)) {
            return (true);
        }
        if ((variable == null) || (ruleField == null))
        {
            return (true);
        }

        boolean success = !validating || ruleField.validateContents();
        if (!success) {
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        TextInputField inputField;

        String variable = spec.getAttribute(VARIABLE);
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        if ((variable == null) || (variable.length() == 0))
        {
=======
        if ((variable == null) || (variable.length() == 0)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            return;
        }
Solution content
        TextInputField inputField;

        String variable = spec.getAttribute(VARIABLE);
        if ((variable == null) || (variable.length() == 0))
        {
            return;
        }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
     * Reads installDataGUI from the text field and sets the associated variable.
     *
     * @param field the object array that holds the details of the field.
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
     * @return true if there was no problem reading the data or if there was an
=======
     * @return true if there was no problem reading the installDataGUI or if there was an
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
     *         irrecovarable problem. If there was a problem that can be corrected by the operator, an error
     *         dialog is popped up and false is returned.
     */
Solution content
     * Reads installDataGUI from the text field and sets the associated variable.
     *
     * @param field the object array that holds the details of the field.
     * @return true if there was no problem reading the installDataGUI or if there was an
     *         irrecovarable problem. If there was a problem that can be corrected by the operator, an error
     *         dialog is popped up and false is returned.
     */
File
UserInputPanel.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
        if ((variable == null) || (value == null)) {
            return (true);
        }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        if ((variable == null) || (value == null))
        {
            return (true);
        }
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java

        // validate the input
        Debug.trace("Validating text field");
Solution content
        if ((variable == null) || (value == null)) {
            return (true);
        }
        if ((variable == null) || (value == null))
        {
            return (true);
        }

        // validate the input
        Debug.trace("Validating text field");
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                return;

            Vector choices = element.getChildrenNamed(COMBO_CHOICE);

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
            if (choices == null)
            {
=======
            if (choices == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            }
            // get current value of associated variable
Solution content
            Vector choices = element.getChildrenNamed(COMBO_CHOICE);

            if (choices == null)
            {
                return;
            }
            // get current value of associated variable
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                if (processorClass != null && !"".equals(processorClass)) {
                    String choiceValues = "";
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
                    try
                    {
                        choiceValues = ((Processor) Class.forName(processorClass).newInstance()).process(null);
=======
                    try {
                        choiceValues = ((Processor) Class.forName(processorClass).newInstance())
                                .process(null);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                    }
                    catch (Throwable t) {
                        t.printStackTrace();
Solution content
                if (processorClass != null && !"".equals(processorClass)) {
                    String choiceValues = "";
                    try {
                        choiceValues = ((Processor) Class.forName(processorClass).newInstance()).process(null);
                    }
                    catch (Throwable t) {
                        t.printStackTrace();
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Try statement
Variable
Chunk
Conflicting content
                    field.addItem(listItem);
                    if (userinput) {
                        // is the current value identical to the value associated with this element
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
                        if ((value != null) && (value.length() > 0) && (currentvariablevalue.equals(value)))
                        {
=======
                        if ((value != null) && (value.length() > 0)
                                && (currentvariablevalue.equals(value))) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                            // select it
                            field.setSelectedIndex(i);
                        }
Solution content
                    field.addItem(listItem);
                    if (userinput) {
                        // is the current value identical to the value associated with this element
                        if ((value != null) && (value.length() > 0) && (currentvariablevalue.equals(value)))
                            // select it
                            field.setSelectedIndex(i);
                        }
File
UserInputPanel.java
Developer's decision
Combination
Kind of conflict
If statement
Chunk
Conflicting content
                    } else {
                        // there is no user input
                        String set = (choices.elementAt(i)).getAttribute(SET);
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
                        if (set != null)
                        {
                            if (set != null && !"".equals(set))
                            {
                                VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables());
                                set = vs.substitute(set, null);
=======
                        if (set != null) {
                            if (set != null && !"".equals(set)) {
                                set = variableSubstitutor.substitute(set);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                            }
                            if (set.equals(TRUE)) {
                                field.setSelectedIndex(i);
Solution content
                    } else {
                        // there is no user input
                        String set = (choices.elementAt(i)).getAttribute(SET);
                        if (set != null) {
                            if (set != null && !"".equals(set)) {
                                set = variableSubstitutor.substitute(set);
                            }
                            if (set.equals(TRUE)) {
                                field.setSelectedIndex(i);
File
UserInputPanel.java
Developer's decision
Version 2
Kind of conflict
If statement
Method invocation
Variable
Chunk
Conflicting content
     * Reads the content of the combobox field and substitutes the associated variable.
     *
     * @param field the object array that holds the details of the field.
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
     * @return true if there was no problem reading the data or if there was an
=======
     * @return true if there was no problem reading the installDataGUI or if there was an
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
     *         irrecovarable problem. If there was a problem that can be corrected by the operator, an error
     *         dialog is popped up and false is returned.
     */
Solution content
     * Reads the content of the combobox field and substitutes the associated variable.
     *
     * @param field the object array that holds the details of the field.
     * @return true if there was no problem reading the installDataGUI or if there was an
     *         irrecovarable problem. If there was a problem that can be corrected by the operator, an error
     *         dialog is popped up and false is returned.
     */
File
UserInputPanel.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
        if ((variable == null) || (value == null)) {
            return true;
        }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        if ((variable == null) || (value == null))
        {
            return true;
        }
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java

        this.installData.setVariable(variable, value);
        entries.add(new UserInputPanel.TextValuePair(variable, value));
Solution content
        if ((variable == null) || (value == null)) {
            return true;
        }
        if ((variable == null) || (value == null))
        {
            return true;
        }

        this.installData.setVariable(variable, value);
        entries.add(new UserInputPanel.TextValuePair(variable, value));
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        if (element != null) {
            Vector choices = element.getChildrenNamed(RADIO_CHOICE);

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
            if (choices == null)
            {
=======
            if (choices == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                return;
            }
Solution content
        if (element != null) {
            Vector choices = element.getChildrenNamed(RADIO_CHOICE);

            if (choices == null)
            {
                return;
            }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
     * Reads the content of the radio button field and substitutes the associated variable.
     *
     * @param field the object array that holds the details of the field.
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
     * @return true if there was no problem reading the data or if there was an
=======
     * @return true if there was no problem reading the installDataGUI or if there was an
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
     *         irrecovarable problem. If there was a problem that can be corrected by the operator, an error
     *         dialog is popped up and false is returned.
     */
Solution content
     * Reads the content of the radio button field and substitutes the associated variable.
     *
     * @param field the object array that holds the details of the field.
     * @return true if there was no problem reading the installDataGUI or if there was an
     *         irrecovarable problem. If there was a problem that can be corrected by the operator, an error
     *         dialog is popped up and false is returned.
     */
File
UserInputPanel.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
            {
        try {
            button = (JRadioButton) field.getComponent();

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
            if (!button.isSelected())
=======
            if (!button.isSelected()) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                return (true);
            }
Solution content
        try {
            button = (JRadioButton) field.getComponent();

            if (!button.isSelected())
            {
                return (true);
            }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        if (element != null) {
            Vector inputs = element.getChildrenNamed(PWD_INPUT);

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
            if (inputs == null)
            {
=======
            if (inputs == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                return;
            }
Solution content
        if (element != null) {
            Vector inputs = element.getChildrenNamed(PWD_INPUT);

            if (inputs == null)
            {
                return;
            }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
     * Reads the content of the password field and substitutes the associated variable.
     *
     * @param field a password group that manages one or more passord fields.
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
     * @return true if there was no problem reading the data or if there was an
=======
     * @return true if there was no problem reading the installDataGUI or if there was an
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
     *         irrecovarable problem. If there was a problem that can be corrected by the operator, an error
     *         dialog is popped up and false is returned.
     */
Solution content
     * Reads the content of the password field and substitutes the associated variable.
     *
     * @param field a password group that manages one or more passord fields.
     * @return true if there was no problem reading the installDataGUI or if there was an
     *         irrecovarable problem. If there was a problem that can be corrected by the operator, an error
     *         dialog is popped up and false is returned.
     */
File
UserInputPanel.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
        if ((variable == null) || (passwordGroupsRead.contains(group))) {
            return (true);
        }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        if ((variable == null) || (passwordGroupsRead.contains(group)))
        {
            return (true);
        }
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
        passwordGroups.add(group);

        int size = group.validatorSize();
Solution content
        if ((variable == null) || (passwordGroupsRead.contains(group))) {
            return (true);
        }
        if ((variable == null) || (passwordGroupsRead.contains(group)))
        {
            return (true);
        }
        passwordGroups.add(group);

        int size = group.validatorSize();
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
            // System.out.println("Found "+(size)+" validators");
            for (int i = 0; i < size; i++) {
                success = group.validateContents(i);
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
                if (!success)
                {
                    JOptionPane.showMessageDialog(parentFrame, group.getValidatorMessage(i), parentFrame.langpack
                            .getString("UserInputPanel.error.caption"), JOptionPane.WARNING_MESSAGE);
=======
                if (!success) {
                    JOptionPane.showMessageDialog(parentFrame, group.getValidatorMessage(i),
                            parentFrame.langpack.getString("UserInputPanel.error.caption"),
                            JOptionPane.WARNING_MESSAGE);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                    break;
                }
            }
Solution content
            // System.out.println("Found "+(size)+" validators");
            for (int i = 0; i < size; i++) {
                success = group.validateContents(i);
                if (!success) {
                    JOptionPane.showMessageDialog(parentFrame, group.getValidatorMessage(i), parentFrame.langpack
                            .getString("UserInputPanel.error.caption"), JOptionPane.WARNING_MESSAGE);
                    break;
                }
            }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
        String causesValidataion = null;
        IXMLElement detail = spec.getFirstChildNamed(SPEC);

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        if (variable == null)
        {
=======
        if (variable == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            return;
        }
Solution content
        if (variable == null)
        String causesValidataion = null;
        IXMLElement detail = spec.getFirstChildNamed(SPEC);

        {
            return;
        }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
     * Reads the content of the checkbox field and substitutes the associated variable.
     *
     * @param field the object array that holds the details of the field.
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
     * @return true if there was no problem reading the data or if there was an
=======
     * @return true if there was no problem reading the installDataGUI or if there was an
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
     *         irrecovarable problem. If there was a problem that can be corrected by the operator, an error
     *         dialog is popped up and false is returned.
     */
Solution content
     * Reads the content of the checkbox field and substitutes the associated variable.
     *
     * @param field the object array that holds the details of the field.
     * @return true if there was no problem reading the installDataGUI or if there was an
     *         irrecovarable problem. If there was a problem that can be corrected by the operator, an error
     *         dialog is popped up and false is returned.
     */
File
UserInputPanel.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
            Vector choices = element.getChildrenNamed(SEARCH_CHOICE);

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
            if (choices == null)
            {
=======
            if (choices == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                return;
            }
Solution content
            Vector choices = element.getChildrenNamed(SEARCH_CHOICE);

            if (choices == null)
            {
                return;
            }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        StringBuffer tooltiptext = new StringBuffer();

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        if ((filename != null) && (filename.length() > 0))
        {
            tooltiptext.append(MessageFormat.format(parentFrame.langpack.getString("UserInputPanel.search.location"),
                    new Object[] { new String[] { filename } }));
=======
        if ((filename != null) && (filename.length() > 0)) {
            tooltiptext.append(MessageFormat.format(parentFrame.langpack
                    .getString("UserInputPanel.search.location"),
                    new Object[]{new String[]{filename}}));
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
        }

        boolean showAutodetect = (check_filename != null) && (check_filename.length() > 0);
Solution content
        StringBuffer tooltiptext = new StringBuffer();

        if ((filename != null) && (filename.length() > 0)) {
            tooltiptext.append(MessageFormat.format(parentFrame.langpack.getString("UserInputPanel.search.location"),
                    new Object[] { new String[] { filename } }));
        }

        boolean showAutodetect = (check_filename != null) && (check_filename.length() > 0);
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
        if (showAutodetect) {
            tooltiptext.append(MessageFormat.format(parentFrame.langpack
                    .getString("UserInputPanel.search.location.checkedfile"),
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
                    new Object[] { new String[] { check_filename } }));
=======
                    new Object[]{new String[]{check_filename}}));
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
        }

        if (tooltiptext.length() > 0) {
Solution content
        if (showAutodetect) {
            tooltiptext.append(MessageFormat.format(parentFrame.langpack
                    .getString("UserInputPanel.search.location.checkedfile"),
                    new Object[] { new String[] { check_filename } }));
        }

        if (tooltiptext.length() > 0) {
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
        // uiElements.add(new Object[] { null, SEARCH_BUTTON_FIELD, null, eastonlyconstraint,
        // buttonPanel, forPacks, forOs});

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        searchFields.add(new SearchField(filename, check_filename, parentFrame, combobox, autodetectButton,
                browseButton, search_type, result_type));
=======
        searchFields.add(new UserInputPanel.SearchField(filename, check_filename, parentFrame, combobox,
                autodetectButton, browseButton, search_type, result_type));
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
    }

    /*--------------------------------------------------------------------------*/
Solution content
        // uiElements.add(new Object[] { null, SEARCH_BUTTON_FIELD, null, eastonlyconstraint,
        // buttonPanel, forPacks, forOs});

        searchFields.add(new UserInputPanel.SearchField(filename, check_filename, parentFrame, combobox,
                autodetectButton, browseButton, search_type, result_type));
    }

    /*--------------------------------------------------------------------------*/
File
UserInputPanel.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Chunk
Conflicting content
     * Reads the content of the search field and substitutes the associated variable.
     *
     * @param field the object array that holds the details of the field.
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
     * @return true if there was no problem reading the data or if there was an
=======
     * @return true if there was no problem reading the installDataGUI or if there was an
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
     *         irrecovarable problem. If there was a problem that can be corrected by the operator, an error
     *         dialog is popped up and false is returned.
     */
Solution content
     * Reads the content of the search field and substitutes the associated variable.
     *
     * @param field the object array that holds the details of the field.
     * @return true if there was no problem reading the installDataGUI or if there was an
     *         irrecovarable problem. If there was a problem that can be corrected by the operator, an error
     *         dialog is popped up and false is returned.
     */
File
UserInputPanel.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
        if ((variable == null) || (value == null)) {
            return (true);
        }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        if ((variable == null) || (value == null))
        {
            return (true);
        }
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java

        this.installData.setVariable(variable, value);
        entries.add(new UserInputPanel.TextValuePair(variable, value));
Solution content
        if ((variable == null) || (value == null)) {
            return (true);
        }
        {
            return (true);
        }

        this.installData.setVariable(variable, value);
        entries.add(new UserInputPanel.TextValuePair(variable, value));
File
UserInputPanel.java
Developer's decision
Combination
Kind of conflict
If statement
Chunk
Conflicting content
     * @param spec a IXMLElement containing the specification for the description.
     */
    /*--------------------------------------------------------------------------*/
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
    private void addDescription(IXMLElement spec, Vector forPacks, Vector forOs)
    {
=======
    private void addDescription(IXMLElement spec, Vector forPacks,
                                Vector forOs) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
        String description;
        TwoColumnConstraints constraints = TwoColumnConstraintsFactory.createTextConstraint(spec);
Solution content
     * @param spec a IXMLElement containing the specification for the description.
     */
    /*--------------------------------------------------------------------------*/
    private void addDescription(IXMLElement spec, Vector forPacks, Vector forOs)
    {
        String description;
        TwoColumnConstraints constraints = TwoColumnConstraintsFactory.createTextConstraint(spec);
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
            try {
                result = Float.parseFloat(element.getAttribute(attribute));
            }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
            catch (Throwable exception)
            {
=======
            catch (Throwable exception) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            }
        }
Solution content
            try {
                result = Float.parseFloat(element.getAttribute(attribute));
            }
            catch (Throwable exception)
            {
            }
        }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
Catch clause
Chunk
Conflicting content
     *         null is returned.
     */
    /*--------------------------------------------------------------------------*/
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
    private String getText(IXMLElement element)
    {
        if (element == null)
        {
=======
    private String getText(IXMLElement element) {
        if (element == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            return (null);
        }
Solution content
     *         null is returned.
     */
    /*--------------------------------------------------------------------------*/
    private String getText(IXMLElement element)
    {
        if (element == null)
        {
            return (null);
        }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Method signature
Chunk
Conflicting content
     * @return true if the item is required for the os, otherwise returns
     *         false.
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
    public boolean itemRequiredForOs(Vector os)
    {
        if (os.size() == 0)
        {
=======
    public boolean itemRequiredForOs(Vector os) {
        if (os.size() == 0) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            return true;
        }
Solution content
     * @return true if the item is required for the os, otherwise returns
     *         false.
     */
    public boolean itemRequiredForOs(Vector os)
    {
        if (os.size() == 0)
        {
            return true;
        }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Method signature
Chunk
Conflicting content
            } else if ("unix".equals(family)) {
                match = OsVersion.IS_UNIX;
            }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
            if (match)
            {
=======
            if (match) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                return true;
            }
        }
Solution content
            } else if ("unix".equals(family)) {
                match = OsVersion.IS_UNIX;
            }
            if (match) {
                return true;
            }
        }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        String selected;
        String required;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        if (packs.size() == 0)
        {
=======
        if (packs.size() == 0) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            return (true);
        }
Solution content
        String selected;
        String required;

        if (packs.size() == 0)
        {
            return (true);
        }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
            for (int k = 0; k < packs.size(); k++) {
                required = (packs.elementAt(k)).getAttribute(NAME, "");
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
                if (selected.equals(required))
                {
=======
                if (selected.equals(required)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                    return (true);
                }
            }
Solution content
            for (int k = 0; k < packs.size(); k++) {
                required = (packs.elementAt(k)).getAttribute(NAME, "");
                if (selected.equals(required))
                {
                    return (true);
                }
            }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
    /*--------------------------------------------------------------------------*/
    /*
     * $ @design
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
     * 
     * The information about the installed packs comes from InstallData.selectedPacks. This assumes
=======
     *
     * The information about the installed packs comes from GUIInstallData.selectedPacks. This assumes
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
     * that this panel is presented to the user AFTER the PacksPanel.
     * --------------------------------------------------------------------------
     */
Solution content
    /*--------------------------------------------------------------------------*/
    /*
     * $ @design
     * 
     * The information about the installed packs comes from GUIInstallData.selectedPacks. This assumes
     * that this panel is presented to the user AFTER the PacksPanel.
     * --------------------------------------------------------------------------
     */
File
UserInputPanel.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
        String selected;
        String required;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        if (packs.size() == 0)
        {
=======
        if (packs.size() == 0) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            return (true);
        }
Solution content
        String selected;
        String required;

        if (packs.size() == 0)
        {
            return (true);
        }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
            for (int k = 0; k < packs.size(); k++) {
                required = (packs.elementAt(k)).getAttribute(NAME, "");
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
                if (selected.equals(required))
                {
=======
                if (selected.equals(required)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                    return (false);
                }
            }
Solution content
            for (int k = 0; k < packs.size(); k++) {
                required = (packs.elementAt(k)).getAttribute(NAME, "");
                if (selected.equals(required))
                {
                    return (false);
                }
            }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
         *                      RESULT_PARENTDIR
         */
        /*---------------------------------------------------------------------------*/
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
        public SearchField(String filename, String checkFilename, InstallerFrame parent, JComboBox combobox,
                JButton autobutton, JButton browsebutton, int search_type, int result_type)
        {
=======
        public SearchField(String filename, String checkFilename, InstallerFrame parent,
                           JComboBox combobox, JButton autobutton, JButton browsebutton, int search_type,
                           int result_type) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
            this.filename = filename;
            this.checkFilename = checkFilename;
            this.parent = parent;
Solution content
         *                      RESULT_PARENTDIR
         */
        /*---------------------------------------------------------------------------*/
        public SearchField(String filename, String checkFilename, InstallerFrame parent, JComboBox combobox,
                JButton autobutton, JButton browsebutton, int search_type, int result_type)
        {
            this.filename = filename;
            this.checkFilename = checkFilename;
            this.parent = parent;
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
                            checkNextButtonState();
                        }

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
                        private void checkNextButtonState()
                        {
                            Document doc = ((JTextField) pathComboBox.getEditor().getEditorComponent()).getDocument();
                            try
                            {
                                if (pathMatches(doc.getText(0, doc.getLength())))
                                {
=======
                        private void checkNextButtonState() {
                            Document doc = ((JTextField) pathComboBox.getEditor()
                                    .getEditorComponent()).getDocument();
                            try {
                                if (pathMatches(doc.getText(0, doc.getLength()))) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                                    getInstallerFrame().unlockNextButton(false);
                                } else {
                                    getInstallerFrame().lockNextButton();
Solution content
                            checkNextButtonState();
                        }

                        private void checkNextButtonState() {
                            Document doc = ((JTextField) pathComboBox.getEditor().getEditorComponent()).getDocument();
                            try {
                                if (pathMatches(doc.getText(0, doc.getLength()))) {
                                    getInstallerFrame().unlockNextButton(false);
                                } else {
                                    getInstallerFrame().lockNextButton();
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Method signature
Try statement
Variable
Chunk
Conflicting content
                    if (((this.searchType == TYPE_DIRECTORY) && (file.isDirectory()))
                            || ((this.searchType == TYPE_FILE) && (file.isFile()))) {
                        // no file to check for
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
                        if (this.checkFilename == null)
                        {
=======
                        if (this.checkFilename == null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                            return true;
                        }
Solution content
                    if (((this.searchType == TYPE_DIRECTORY) && (file.isDirectory()))
                            || ((this.searchType == TYPE_FILE) && (file.isFile()))) {
                        // no file to check for
                        if (this.checkFilename == null)
                        {
                            return true;
                        }
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                }
            }
            // are there any OS-Constraints?
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
            if (OsConstraint.oneMatchesCurrentSystem(variable))
            {
                if (vname == null)
                {
                }
                else
                {
=======
            if (OsConstraint.oneMatchesCurrentSystem(variable)) {
                if (vname == null) {
                } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
                    // vname is given
                    if (vvalue != null) {
                        // try to substitute variables in value field
Solution content
                }
            }
            // are there any OS-Constraints?
            if (OsConstraint.oneMatchesCurrentSystem(variable))
            {
                if (vname == null)
                {
                }
                    // vname is given
                    if (vvalue != null) {
                        // try to substitute variables in value field
File
UserInputPanel.java
Developer's decision
Combination
Kind of conflict
If statement
Chunk
Conflicting content
     * @param messageType The message type (JOptionPane.*_MESSAGE)
     */
    /*--------------------------------------------------------------------------*/
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
    private void showMessageDialog(InstallerFrame parentFrame, String message, String caption, int messageType)
    {
=======
    private void showMessageDialog(InstallerFrame parentFrame, String message, String caption,
                                   int messageType) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
        String localizedMessage = parentFrame.langpack.getString(message);
        if ((localizedMessage == null) || (localizedMessage.trim().length() == 0)) {
            localizedMessage = message;
Solution content
     * @param messageType The message type (JOptionPane.*_MESSAGE)
     */
    /*--------------------------------------------------------------------------*/
    private void showMessageDialog(InstallerFrame parentFrame, String message, String caption, int messageType)
        String localizedMessage = parentFrame.langpack.getString(message);
        if ((localizedMessage == null) || (localizedMessage.trim().length() == 0))
        {
            localizedMessage = message;
File
UserInputPanel.java
Developer's decision
Manual
Kind of conflict
Method signature
Chunk
Conflicting content
     * @param message     the message to print out in dialog box.
     */
    /*--------------------------------------------------------------------------*/
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanel.java
    private void showWarningMessageDialog(InstallerFrame parentFrame, String message)
    {
        showMessageDialog(parentFrame, message, "UserInputPanel.error.caption", JOptionPane.WARNING_MESSAGE);
=======
    private void showWarningMessageDialog(InstallerFrame parentFrame, String message) {
        showMessageDialog(parentFrame, message, "UserInputPanel.error.caption",
                JOptionPane.WARNING_MESSAGE);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanel.java
    }

    public void itemStateChanged(ItemEvent arg0) {
Solution content
     * @param message     the message to print out in dialog box.
     */
    /*--------------------------------------------------------------------------*/
    private void showWarningMessageDialog(InstallerFrame parentFrame, String message) {
        showMessageDialog(parentFrame, message, "UserInputPanel.error.caption", JOptionPane.WARNING_MESSAGE);
    }

    public void itemStateChanged(ItemEvent arg0) {
File
UserInputPanel.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Method signature
Chunk
Conflicting content
 * limitations under the License.
 */

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelAutomationHelper.java
package com.izforge.izpack.panels;

import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.InstallerException;
import com.izforge.izpack.installer.PanelAutomation;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.VariableSubstitutor;
=======
package com.izforge.izpack.panels.userinput;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.util.Debug;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelAutomationHelper.java

import java.util.Iterator;
import java.util.Map;
Solution content
 * limitations under the License.
 */

package com.izforge.izpack.panels.userinput;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.automation.PanelAutomation;
import com.izforge.izpack.util.Debug;

import java.util.Iterator;
import java.util.Map;
File
UserInputPanelAutomationHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
            // Substitute variable used in the 'value' field
            value = dataElement.getAttribute(AUTO_ATTRIBUTE_VALUE);
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelAutomationHelper.java
            value = vs.substitute(value, null);
=======
            value = variableSubstitutor.substitute(value);
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelAutomationHelper.java

            Debug.trace("UserInputPanel: setting variable " + variable + " to " + value);
            idata.setVariable(variable, value);
Solution content
            // Substitute variable used in the 'value' field
            value = dataElement.getAttribute(AUTO_ATTRIBUTE_VALUE);
            value = variableSubstitutor.substitute(value);

            Debug.trace("UserInputPanel: setting variable " + variable + " to " + value);
            idata.setVariable(variable, value);
File
UserInputPanelAutomationHelper.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java

package com.izforge.izpack.panels;

import com.izforge.izpack.Pack;
import com.izforge.izpack.Panel;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelConsole;
import com.izforge.izpack.installer.PanelConsoleHelper;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.OsVersion;
import com.izforge.izpack.util.SpecHelper;
import com.izforge.izpack.util.VariableSubstitutor;
=======
package com.izforge.izpack.panels.userinput;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.Panel;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;
import com.izforge.izpack.panels.userinput.processor.Processor;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.OsVersion;
import com.izforge.izpack.util.helper.SpecHelper;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java

import java.io.BufferedReader;
import java.io.IOException;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.userinput;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.Panel;
import com.izforge.izpack.api.rules.RulesEngine;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.console.PanelConsole;
import com.izforge.izpack.installer.console.PanelConsoleHelper;
import com.izforge.izpack.panels.userinput.processor.Processor;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.OsVersion;
import com.izforge.izpack.util.helper.SpecHelper;

package com.izforge.izpack.panels;
import java.util.*;

import java.io.BufferedReader;
import java.io.IOException;
File
UserInputPanelConsoleHelper.java
Developer's decision
Combination
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
    }

    public boolean runGeneratePropertiesFile(AutomatedInstallData installData,
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
                                             PrintWriter printWriter)
    {
=======
                                             PrintWriter printWriter) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java

        collectInputs(installData);
        Iterator inputIterator = listInputs.iterator();
Solution content
    }

    public boolean runGeneratePropertiesFile(AutomatedInstallData installData,
                                             PrintWriter printWriter) {

        collectInputs(installData);
        Iterator inputIterator = listInputs.iterator();
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
Variable
Chunk
Conflicting content
            if (TEXT_FIELD.equals(input.strFieldType)
                    || FILE.equals(input.strFieldType)
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
                    || RULE_FIELD.equals(input.strFieldType))
            {
=======
                    || RULE_FIELD.equals(input.strFieldType)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
                status = status && processTextField(input, idata);
            } else if (COMBO_FIELD.equals(input.strFieldType)
                    || RADIO_FIELD.equals(input.strFieldType)) {
Solution content
            if (TEXT_FIELD.equals(input.strFieldType)
                    || FILE.equals(input.strFieldType)
                    || RULE_FIELD.equals(input.strFieldType)) {
                status = status && processTextField(input, idata);
            } else if (COMBO_FIELD.equals(input.strFieldType)
                    || RADIO_FIELD.equals(input.strFieldType)) {
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
            }
            } else if (PASSWORD.equals(input.strFieldType)) {
                status = status && processPasswordField(input, idata);
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
            else if (STATIC_TEXT.equals(input.strFieldType)
                    || TITLE_FIELD.equals(input.strFieldType)
                    || DIVIDER.equals(input.strFieldType)
                    || SPACE.equals(input.strFieldType))
            {
                status = status && processSimpleField(input, idata);
            }
            else if (PASSWORD.equals(input.strFieldType))
            {
                status = status && processPasswordField(input, idata);
            }
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java

        }
Solution content
            } else if (PASSWORD.equals(input.strFieldType)) {
            {
                status = status && processPasswordField(input, idata);
            }

        }
File
UserInputPanelConsoleHelper.java
Developer's decision
Combination
Kind of conflict
If statement
Chunk
Conflicting content
        Password pwd = (Password) input;

        boolean rtn = false;
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
        for (int i = 0; i < pwd.input.length; i++)
        {
=======
        for (int i = 0; i < pwd.input.length; i++) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
            rtn = processTextField(pwd.input[i], idata);
            if (!rtn)
            {
Solution content
        Password pwd = (Password) input;

        boolean rtn = false;
        for (int i = 0; i < pwd.input.length; i++) {
            rtn = processTextField(pwd.input[i], idata);
            if (!rtn)
            {
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
For statement
Chunk
Conflicting content
        String variable = input.strVariableName;
        String set;
        String fieldText;
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
        if ((variable == null) || (variable.length() == 0))
        {
=======
        if ((variable == null) || (variable.length() == 0)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
            return false;
        }
Solution content
        String variable = input.strVariableName;
        String set;
        String fieldText;
        if ((variable == null) || (variable.length() == 0)) {
            return false;
        }
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
    boolean processComboRadioField(Input input, AutomatedInstallData idata) {// TODO protection if selection not valid and no set value
        String variable = input.strVariableName;
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
        if ((variable == null) || (variable.length() == 0))
        {
=======
        if ((variable == null) || (variable.length() == 0)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
            return false;
        }
        String currentvariablevalue = idata.getVariable(variable);
Solution content
        {

    boolean processComboRadioField(Input input, AutomatedInstallData idata) {// TODO protection if selection not valid and no set value
        String variable = input.strVariableName;
        if ((variable == null) || (variable.length() == 0))
            return false;
        }
        String currentvariablevalue = idata.getVariable(variable);
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                try {
                    j = Integer.valueOf(strIn).intValue();
                }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
                catch (Exception ex)
                {
=======
                catch (Exception ex) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
                }
                // take user input if user input is valid
                if (j >= 0 && j < lisChoices.size()) {
Solution content
                try {
                    j = Integer.valueOf(strIn).intValue();
                }
                catch (Exception ex)
                {
                }
                // take user input if user input is valid
                if (j >= 0 && j < lisChoices.size()) {
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
Catch clause
Chunk
Conflicting content
    boolean processCheckField(Input input, AutomatedInstallData idata) {
        String variable = input.strVariableName;
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
        if ((variable == null) || (variable.length() == 0))
        {
=======
        if ((variable == null) || (variable.length() == 0)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
            return false;
        }
        String currentvariablevalue = idata.getVariable(variable);
Solution content
    boolean processCheckField(Input input, AutomatedInstallData idata) {
        String variable = input.strVariableName;
        if ((variable == null) || (variable.length() == 0))
        {
            return false;
        }
        String currentvariablevalue = idata.getVariable(variable);
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                }
                try {
                    j = Integer.valueOf(strIn).intValue();
                }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
                catch (Exception ex)
                {
=======
                catch (Exception ex) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
                // take user input if user input is valid
                if ((j == 0) || j == 1) {
Solution content
                try {
                    j = Integer.valueOf(strIn).intValue();
                }
                catch (Exception ex)
                {
                }
                // take user input if user input is valid
                if ((j == 0) || j == 1) {
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
Catch clause
Chunk
Conflicting content
            return new Input(strVariableName, null, null, STATIC_TEXT, strText, 0);
        }

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
        if (TEXT_FIELD.equals(strFieldType) || FILE.equals(strFieldType))
        {
=======
        if (TEXT_FIELD.equals(strFieldType) || FILE.equals(strFieldType)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
            List choicesList = new ArrayList();
            String strFieldText = null;
            String strSet = null;
Solution content
            return new Input(strVariableName, null, null, STATIC_TEXT, strText, 0);
        }

        if (TEXT_FIELD.equals(strFieldType) || FILE.equals(strFieldType))
        {
            List choicesList = new ArrayList();
            String strFieldText = null;
            String strSet = null;
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
                        String token = tokenizer.nextToken();
                        String choiceSet = null;
                        if (token.equals(set)
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
                                )
                        {
=======
                                ) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
                            choiceSet = "true";
                            selection = counter;
                        }
Solution content
                        String token = tokenizer.nextToken();
                        String choiceSet = null;
                        if (token.equals(set)
                                )
                        {
                            choiceSet = "true";
                            selection = counter;
                        }
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
                    String value = choice.getAttribute(VALUE);

                    String set = choice.getAttribute(SET);
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
                    if (set != null)
                    {
                        if (set != null && !"".equals(set))
                        {
                            VariableSubstitutor vs = new VariableSubstitutor(idata
                                    .getVariables());
                            set = vs.substitute(set, null);
                        }
                        if (set.equalsIgnoreCase(TRUE))
                        {
=======
                    if (set != null) {
                        if (set != null && !"".equals(set)) {
                            set = variableSubstitutor.substitute(set);
                        }
                        if (set.equalsIgnoreCase(TRUE)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
                            selection = i;

                        }
Solution content
                    String value = choice.getAttribute(VALUE);

                    String set = choice.getAttribute(SET);
                    if (set != null) {
                        if (set != null && !"".equals(set)) {
                            set = variableSubstitutor.substitute(set);
                        }
                        if (set.equalsIgnoreCase(TRUE)) {
                            selection = i;

                        }
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 2
Kind of conflict
If statement
Chunk
Conflicting content
        }


<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
        if (SPACE.equals(strFieldType))
        {
=======
        if (SPACE.equals(strFieldType)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
            return SPACE_INTPUT_FIELD;

        }
Solution content
        }


        if (SPACE.equals(strFieldType))
        {
            return SPACE_INTPUT_FIELD;

        }
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        String selected;
        String required;

<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
        if (packs.size() == 0)
        {
=======
        if (packs.size() == 0) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
            return (true);
        }
Solution content
        String selected;
        String required;

        if (packs.size() == 0)
        {
            return (true);
        }
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
            for (int k = 0; k < packs.size(); k++) {
                required = (packs.elementAt(k)).getAttribute(NAME, "");
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
                if (selected.equals(required))
                {
=======
                if (selected.equals(required)) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
                    return (true);
                }
            }
Solution content
            for (int k = 0; k < packs.size(); k++) {
                required = (packs.elementAt(k)).getAttribute(NAME, "");
                if (selected.equals(required))
                {
                    return (true);
                }
            }
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
     */
     * @return true if the item is required for the os, otherwise returns
     *         false.
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
    public boolean itemRequiredForOs(Vector os)
    {
        if (os.size() == 0)
        {
=======
    public boolean itemRequiredForOs(Vector os) {
        if (os.size() == 0) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
            return true;
        }
Solution content
     * @return true if the item is required for the os, otherwise returns
     *         false.
     */
    public boolean itemRequiredForOs(Vector os)
    {
        if (os.size() == 0)
        {
            return true;
        }
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Method signature
Chunk
Conflicting content
        }
            } else if ("unix".equals(family)) {
                match = OsVersion.IS_UNIX;
            }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
            if (match)
            {
=======
            if (match) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
                return true;
            }
Solution content
            } else if ("unix".equals(family)) {
                match = OsVersion.IS_UNIX;
            }
            if (match)
            {
                return true;
            }
        }
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
    }


<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
    public static class Input
    {

        public Input(String strFieldType)
        {
=======
    public static class Input {

        public Input(String strFieldType) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
            this.strFieldType = strFieldType;
        }
Solution content
    }


    public static class Input {
        public Input(String strFieldType) {
            this.strFieldType = strFieldType;
        }
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
Class signature
Method signature
Chunk
Conflicting content
        }

        public Input(String strVariableName, String strDefaultValue, List listChoices,
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserInputPanelConsoleHelper.java
                     String strFieldType, String strFieldText, int iSelectedChoice)
        {
=======
                     String strFieldType, String strFieldText, int iSelectedChoice) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/UserInputPanelConsoleHelper.java
            this.strVariableName = strVariableName;
            this.strDefaultValue = strDefaultValue;
            this.listChoices = listChoices;
Solution content
        }

        public Input(String strVariableName, String strDefaultValue, List listChoices,
                     String strFieldType, String strFieldText, int iSelectedChoice)
        {
            this.strVariableName = strVariableName;
            this.strDefaultValue = strDefaultValue;
            this.listChoices = listChoices;
File
UserInputPanelConsoleHelper.java
Developer's decision
Version 1
Kind of conflict
Variable
Chunk
Conflicting content
    }
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/StringInputProcessingClient.java
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * Copyright 2009 Dennis Reil
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.izforge.izpack.panels;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class StringInputProcessingClient implements ProcessingClient
{

    private String input;

    private List validators;

    private ValidatorContainer currentValidator;

    private String message;

    public StringInputProcessingClient(String input, List validators)
    {
        this.input = input;
        this.validators = validators;
    }

    public String getFieldContents(int index)
    {
        return input;

    public int getNumFields()
    {
        return 1;
    }

    public String getText()
    {
        return this.input;
    }

    public Map getValidatorParams()
    {
        return (currentValidator != null) ? currentValidator.getValidatorParams() : new HashMap();
    }

    public boolean hasParams()
    {
        return (currentValidator != null) ? currentValidator.hasParams() : false;
    }

    public boolean validate()
    {
        boolean success = true;

        if (validators != null)
        {
            for (ValidatorContainer validator : validators)
            {
                currentValidator = validator;
                Validator validatorInstance = currentValidator.getValidator();
                if (validatorInstance != null)
                {
                    success = validatorInstance.validate(this);
                    if (!success)
                    {
                        message = currentValidator.getMessage();
                        break;
                    }
                }

            }
        }

        return success;
    }

    public String getValidationMessage()
    {
        return message;
    }
}
=======
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * Copyright 2009 Dennis Reil
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.userinput.processorclient;

import com.izforge.izpack.panels.userinput.validator.Validator;
import com.izforge.izpack.panels.userinput.validator.ValidatorContainer;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class StringInputProcessingClient implements ProcessingClient {

    private String input;

    private List validators;

    private ValidatorContainer currentValidator;

    private String message;

    public StringInputProcessingClient(String input, List validators) {
        this.input = input;
        this.validators = validators;
    }

    public String getFieldContents(int index) {
        return input;
    }

    public int getNumFields() {
        return 1;
    }

    public String getText() {
        return this.input;
    }

    public Map getValidatorParams() {
        return (currentValidator != null) ? currentValidator.getValidatorParams() : new HashMap();
    }

    public boolean hasParams() {
        return (currentValidator != null) ? currentValidator.hasParams() : false;
    }

    public boolean validate() {
        boolean success = true;

        if (validators != null) {
            for (ValidatorContainer validator : validators) {
                currentValidator = validator;
                Validator validatorInstance = currentValidator.getValidator();
                if (validatorInstance != null) {
                    success = validatorInstance.validate(this);
                    if (!success) {
                        message = currentValidator.getMessage();
                        break;
                    }
                }

            }
        }

        return success;
    }

    public String getValidationMessage() {
        return message;
    }
}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/processorclient/StringInputProcessingClient.java
Solution content
/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * Copyright 2009 Dennis Reil
 * 
 * http://izpack.org/
 * http://izpack.codehaus.org/
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *     
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.userinput.processorclient;

import com.izforge.izpack.panels.userinput.validator.Validator;
import com.izforge.izpack.panels.userinput.validator.ValidatorContainer;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class StringInputProcessingClient implements ProcessingClient {

    private String input;

    private List validators;

    private ValidatorContainer currentValidator;

    private String message;

    public StringInputProcessingClient(String input, List validators) {
        this.input = input;
        this.validators = validators;
    }
    public String getFieldContents(int index) {
        return input;
    }

    public int getNumFields() {
        return 1;
    }

    public String getText() {
        return this.input;
    }

    public Map getValidatorParams() {
        return (currentValidator != null) ? currentValidator.getValidatorParams() : new HashMap();
    }

    public boolean hasParams() {
        return (currentValidator != null) ? currentValidator.hasParams() : false;
    }

    public boolean validate() {
        boolean success = true;

        if (validators != null)
        {
            for (ValidatorContainer validator : validators)
            {
                currentValidator = validator;
                Validator validatorInstance = currentValidator.getValidator();
                if (validatorInstance != null)
                {
                    success = validatorInstance.validate(this);
                    if (!success)
                    {
                        message = currentValidator.getMessage();
                        break;
                    }
                }

            }
        }

        return success;
    }

    public String getValidationMessage()
    {
        return message;
    }
}
File
StringInputProcessingClient.java
Developer's decision
Version 2
Kind of conflict
Class declaration
Comment
Import
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/PasswordEncryptionValidator.java

package com.izforge.izpack.util;
=======
package com.izforge.izpack.panels.userinput.validator;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/validator/PasswordEncryptionValidator.java

import com.izforge.izpack.panels.userinput.PasswordGroup;
import com.izforge.izpack.panels.userinput.processorclient.ProcessingClient;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.userinput.validator;

import com.izforge.izpack.panels.userinput.PasswordGroup;
import com.izforge.izpack.panels.userinput.processorclient.ProcessingClient;
File
PasswordEncryptionValidator.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/PasswordEqualityValidator.java

package com.izforge.izpack.util;
=======
package com.izforge.izpack.panels.userinput.validator;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/validator/PasswordEqualityValidator.java

import com.izforge.izpack.panels.userinput.PasswordGroup;
import com.izforge.izpack.panels.userinput.processorclient.ProcessingClient;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.userinput.validator;

import com.izforge.izpack.panels.userinput.PasswordGroup;
import com.izforge.izpack.panels.userinput.processorclient.ProcessingClient;
File
PasswordEqualityValidator.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/PasswordKeystoreValidator.java

package com.izforge.izpack.util;
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userinput/validator/PasswordKeystoreValidator.java

package com.izforge.izpack.panels.userinput.validator;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */


package com.izforge.izpack.panels.userinput.validator;
File
PasswordKeystoreValidator.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserPathInputPanel.java

package com.izforge.izpack.panels;
=======
package com.izforge.izpack.panels.userpath;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userpath/UserPathInputPanel.java

import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.api.exception.ResourceNotFoundException;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.userpath;

import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.api.exception.ResourceNotFoundException;
File
UserPathInputPanel.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserPathPanel.java

package com.izforge.izpack.panels;

import com.izforge.izpack.Pack;
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.installer.InstallData;
import com.izforge.izpack.installer.InstallerFrame;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.VariableSubstitutor;
=======
package com.izforge.izpack.panels.userpath;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.util.Debug;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userpath/UserPathPanel.java

import java.util.Iterator;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.userpath;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.data.Pack;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.installer.base.InstallerFrame;
import com.izforge.izpack.installer.data.GUIInstallData;
import com.izforge.izpack.util.Debug;

import java.util.Iterator;
File
UserPathPanel.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
        String expandedPath = vs.substitute(idata.getVariable(pathVariableName), null);
=======
        }
        super.panelActivate();
        // Set the default or old value to the path selection panel.
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserPathPanel.java
        VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables());
        String expandedPath = variableSubstitutor.substitute(installData.getVariable(pathVariableName));
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userpath/UserPathPanel.java
        _pathSelectionPanel.setPath(expandedPath);
    }
Solution content
        }
        super.panelActivate();
        // Set the default or old value to the path selection panel.
        String expandedPath = variableSubstitutor.substitute(installData.getVariable(pathVariableName));
        _pathSelectionPanel.setPath(expandedPath);
    }
File
UserPathPanel.java
Developer's decision
Version 2
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserPathPanelAutomationHelper.java

package com.izforge.izpack.panels;

import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.installer.AutomatedInstallData;
import com.izforge.izpack.installer.PanelAutomation;
import com.izforge.izpack.util.VariableSubstitutor;
=======
package com.izforge.izpack.panels.userpath;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.automation.PanelAutomation;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userpath/UserPathPanelAutomationHelper.java

/**
 * Functions to support automated usage of the UserPathPanel
Solution content
import com.izforge.izpack.api.adaptator.IXMLElement;
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.userpath;
import com.izforge.izpack.api.adaptator.impl.XMLElementImpl;
import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
import com.izforge.izpack.installer.automation.PanelAutomation;

/**
 * Functions to support automated usage of the UserPathPanel
File
UserPathPanelAutomationHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Package declaration
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/UserPathSelectionPanel.java

package com.izforge.izpack.panels;
=======
package com.izforge.izpack.panels.userpath;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/userpath/UserPathSelectionPanel.java

import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.gui.IzPanelConstraints;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.panels.userpath;

import com.izforge.izpack.gui.ButtonFactory;
import com.izforge.izpack.gui.IzPanelConstraints;
File
UserPathSelectionPanel.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
        textArea.setEditable(false);

        String textAreaFont = idata.getVariable("XInfoPanel.font");
<<<<<<< HEAD:src/lib/com/izforge/izpack/panels/XInfoPanel.java
        if (textAreaFont != null && textAreaFont.length() > 0)
        {
=======
        if (textAreaFont != null && textAreaFont.length() > 0) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-panel/src/main/java/com/izforge/izpack/panels/xinfo/XInfoPanel.java
            Font font = Font.decode(textAreaFont);
            textArea.setFont(font);
        }
Solution content
        textArea.setEditable(false);

        String textAreaFont = idata.getVariable("XInfoPanel.font");
        if (textAreaFont != null && textAreaFont.length() > 0) {
            Font font = Font.decode(textAreaFont);
            textArea.setFont(font);
        }
File
XInfoPanel.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
package com.izforge.izpack.sample;

<<<<<<< HEAD:sample/simple/src/com/izforge/izpack/sample/Scrambler.java
import com.izforge.izpack.panels.ProcessingClient;
import com.izforge.izpack.panels.Processor;
=======
import com.izforge.izpack.panels.userinput.processor.Processor;
import com.izforge.izpack.panels.userinput.processorclient.ProcessingClient;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-test/src/test/resources/samples/basicInstall/src/com/izforge/izpack/sample/Scrambler.java

/*---------------------------------------------------------------------------*/
Solution content
package com.izforge.izpack.sample;

import com.izforge.izpack.panels.userinput.processor.Processor;
import com.izforge.izpack.panels.userinput.processorclient.ProcessingClient;

/*---------------------------------------------------------------------------*/
File
Scrambler.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
 * @version 0.0.1 / 02/19/03
 */
/*---------------------------------------------------------------------------*/
<<<<<<< HEAD:sample/simple/src/com/izforge/izpack/sample/Scrambler.java
public class Scrambler implements Processor
{
    /*--------------------------------------------------------------------------*/
=======
public class Scrambler implements Processor {
    /*--------------------------------------------------------------------------*/

>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-test/src/test/resources/samples/basicInstall/src/com/izforge/izpack/sample/Scrambler.java
    /**
     * Rearranges the input fields and concatenates the result, separating
     * individual fields with a '*'.
Solution content
 * @version 0.0.1 / 02/19/03
 */
/*---------------------------------------------------------------------------*/
public class Scrambler implements Processor {
    /*--------------------------------------------------------------------------*/

    /**
     * Rearranges the input fields and concatenates the result, separating
     * individual fields with a '*'.
File
Scrambler.java
Developer's decision
Version 1
Kind of conflict
Class signature
Comment
Chunk
Conflicting content
     * @return the encryption result.
     */
    /*--------------------------------------------------------------------------*/
<<<<<<< HEAD:sample/simple/src/com/izforge/izpack/sample/Scrambler.java
    public String process(ProcessingClient client)
    {
        StringBuffer buffer = new StringBuffer();

        for (int i = client.getNumFields() - 1; i > -1; i--)
        {
            buffer.append(client.getFieldContents(i));
            if (i > 0)
            {
=======
    public String process(ProcessingClient client) {
        StringBuffer buffer = new StringBuffer();

        for (int i = client.getNumFields() - 1; i > -1; i--) {
            buffer.append(client.getFieldContents(i));
            if (i > 0) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-test/src/test/resources/samples/basicInstall/src/com/izforge/izpack/sample/Scrambler.java
                buffer.append('*');
            }
        }
Solution content
     * @return the encryption result.
     */
    /*--------------------------------------------------------------------------*/
    public String process(ProcessingClient client) {
        StringBuffer buffer = new StringBuffer();

        for (int i = client.getNumFields() - 1; i > -1; i--) {
            buffer.append(client.getFieldContents(i));
            if (i > 0) {
                buffer.append('*');
            }
        }
File
Scrambler.java
Developer's decision
Version 1
Kind of conflict
For statement
If statement
Method invocation
Method signature
Variable
Chunk
Conflicting content
package com.izforge.izpack.uninstaller;

<<<<<<< HEAD:src/lib/com/izforge/izpack/uninstaller/Destroyer.java
import com.izforge.izpack.ExecutableFile;
import com.izforge.izpack.event.UninstallerListener;
import com.izforge.izpack.installer.UninstallData;
=======
import com.izforge.izpack.core.event.UninstallerListener;
import com.izforge.izpack.data.ExecutableFile;
import com.izforge.izpack.installer.data.UninstallData;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-uninstaller/src/main/java/com/izforge/izpack/uninstaller/Destroyer.java
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.FileExecutor;
Solution content
package com.izforge.izpack.uninstaller;

import com.izforge.izpack.core.event.UninstallerListener;
import com.izforge.izpack.data.ExecutableFile;
import com.izforge.izpack.installer.data.UninstallData;
import com.izforge.izpack.util.AbstractUIProgressHandler;
import com.izforge.izpack.util.Debug;
import com.izforge.izpack.util.FileExecutor;
File
Destroyer.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
            // Custem action listener stuff --- afterDeletion ----
            informListeners(listeners[0], UninstallerListener.AFTER_DELETION, files, handler);

<<<<<<< HEAD:src/lib/com/izforge/izpack/uninstaller/Destroyer.java
            if (OsVersion.IS_UNIX)
            {
                ArrayList rootScripts = getRootScripts();
                Iterator rsi = rootScripts.iterator();
                while (rsi.hasNext())
                {
=======
            if (OsVersion.IS_UNIX) {
                ArrayList rootScripts = getRootScripts();
                Iterator rsi = rootScripts.iterator();
                while (rsi.hasNext()) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-uninstaller/src/main/java/com/izforge/izpack/uninstaller/Destroyer.java
                    execRootScript((String) rsi.next());
                }
Solution content
            // Custem action listener stuff --- afterDeletion ----
            informListeners(listeners[0], UninstallerListener.AFTER_DELETION, files, handler);

            if (OsVersion.IS_UNIX) {
                ArrayList rootScripts = getRootScripts();
                Iterator rsi = rootScripts.iterator();
                while (rsi.hasNext()) {
                    execRootScript((String) rsi.next());
                }
File
Destroyer.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Variable
While statement
Chunk
Conflicting content
        ArrayList result = new ArrayList();

        int idx = 0;
<<<<<<< HEAD:src/lib/com/izforge/izpack/uninstaller/Destroyer.java
        while (true)
        {
            try
            {
=======
        while (true) {
            try {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-uninstaller/src/main/java/com/izforge/izpack/uninstaller/Destroyer.java
                ObjectInputStream in = new ObjectInputStream(Destroyer.class.getResourceAsStream("/"
                        + UninstallData.ROOTSCRIPT + Integer.toString(idx)));
Solution content
        ArrayList result = new ArrayList();

        int idx = 0;
        while (true)
        {
            try
            {
                ObjectInputStream in = new ObjectInputStream(Destroyer.class.getResourceAsStream("/"
                        + UninstallData.ROOTSCRIPT + Integer.toString(idx)));
File
Destroyer.java
Developer's decision
Version 1
Kind of conflict
Try statement
While statement
Chunk
Conflicting content
            {
=======

                result.add(in.readUTF());
            }
<<<<<<< HEAD:src/lib/com/izforge/izpack/uninstaller/Destroyer.java
            catch (Exception e)
            catch (Exception e) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-uninstaller/src/main/java/com/izforge/izpack/uninstaller/Destroyer.java
                Debug.log("Last RootScript Index=" + idx);
                break;
            }
Solution content
                result.add(in.readUTF());
            }
            catch (Exception e)
            {
                Debug.log("Last RootScript Index=" + idx);
                break;
            }
File
Destroyer.java
Developer's decision
Version 1
Kind of conflict
Catch clause
Chunk
Conflicting content
package com.izforge.izpack.uninstaller;

<<<<<<< HEAD:src/lib/com/izforge/izpack/uninstaller/Uninstaller.java
import com.izforge.izpack.installer.PrivilegedRunner;
=======
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-uninstaller/src/main/java/com/izforge/izpack/uninstaller/Uninstaller.java
import com.izforge.izpack.util.Housekeeper;
import com.izforge.izpack.util.OsVersion;
import com.izforge.izpack.util.PrivilegedRunner;
Solution content
package com.izforge.izpack.uninstaller;

import com.izforge.izpack.util.Housekeeper;
import com.izforge.izpack.util.OsVersion;
import com.izforge.izpack.util.PrivilegedRunner;
File
Uninstaller.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
     * @param file    the file inside basDir
     * @return null if file is not a inside baseDir
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/PackFile.java
    public static String computeRelativePathFrom(File baseDir, File file)
    {
        if (baseDir == null || file == null)
        {
            return null;
        }
        try
        { // extract relative path...
            if (file.getAbsolutePath().startsWith(baseDir.getAbsolutePath()))
            {
=======
    public static String computeRelativePathFrom(File baseDir, File file) {
        if (baseDir == null || file == null) {
            return null;
        }
        try { // extract relative path...
            if (file.getAbsolutePath().startsWith(baseDir.getAbsolutePath())) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/data/PackFile.java
                return file.getAbsolutePath().substring(baseDir.getAbsolutePath().length() + 1);
            }
        }
Solution content
     * @param file    the file inside basDir
     * @return null if file is not a inside baseDir
     */
    public static String computeRelativePathFrom(File baseDir, File file) {
        if (baseDir == null || file == null)
        {
            return null;
        }
        try { // extract relative path...
            if (file.getAbsolutePath().startsWith(baseDir.getAbsolutePath())) {
                return file.getAbsolutePath().substring(baseDir.getAbsolutePath().length() + 1);
            }
        }
File
PackFile.java
Developer's decision
Version 1
Kind of conflict
Comment
If statement
Method signature
Try statement
Chunk
Conflicting content
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/PanelAction.java
/**
 * File Name: PanelAction.java
 *
 * Copyright (c) 2009 BISON Schweiz AG, All Rights Reserved.
 *
 * Version: $Id: PanelAction.java,v 1.1.2.1 2009/02/12 12:21:01 blf Exp $
 */

package com.izforge.izpack.installer;

import com.izforge.izpack.util.AbstractUIHandler;

/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/ http://izpack.codehaus.org/
 * 
 * Copyright 2008 Florian B�hlmann
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
public interface PanelAction
{

    /**
     * tag-name of the panel action
     */
    public static final String PANEL_ACTIONS_TAG = "actions";

    /**
     * tag-name of the panel action
     */
    public static final String PANEL_ACTION_TAG = "action";

    /**
     * attribute for the stage of the action
     */
    public static final String PANEL_ACTION_STAGE_TAG = "stage";

    /**
     * tag-name for the configuration of an action.
     */
    public static final String PANEL_ACTION_CONFIGURATION_TAG = "configuration";

    /**
     * pre panel activation stage
     */
    public static enum ActionStage
    {
        preconstruct, preactivate, prevalidate, postvalidate
    }

    /**
     * attribute for class to use
     */
    public static final String PANEL_ACTION_CLASSNAME_TAG = "classname";

    /**
     * @param adata   - AutomatedInstallData instance
     * @param handler - actual UIHandler (
     *                NOTE:
     *                On a preconstruct action the handler is null because it is not available until it is constructed.
     *                During an automated installation the handler is null on each action because we have no GUI to handle.
     */
    public void executeAction(final AutomatedInstallData adata, AbstractUIHandler handler);


    /**
     * Initializes the PanelAction with the given configuration.
     *
     * @param configuration an PanelActionConfiguration containing the configuration of the action or
     *                      null if no configuration was found.
     */
    public void initialize(PanelActionConfiguration configuration);
}
=======
/**
 * File Name: PanelAction.java
 *
 * Copyright (c) 2009 BISON Schweiz AG, All Rights Reserved.
 *
 * Version: $Id: PanelAction.java,v 1.1.2.1 2009/02/12 12:21:01 blf Exp $
 */
package com.izforge.izpack.data;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.PanelActionConfiguration;
import com.izforge.izpack.util.AbstractUIHandler;

/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/ http://izpack.codehaus.org/
 * 
 * Copyright 2008 Florian Bühlmann
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */

public interface PanelAction {

    /**
     * tag-name of the panel action
     */
    public static final String PANEL_ACTIONS_TAG = "actions";

    /**
     * tag-name of the panel action
     */
    public static final String PANEL_ACTION_TAG = "action";

    /**
     * attribute for the stage of the action
     */
    public static final String PANEL_ACTION_STAGE_TAG = "stage";

    /**
     * tag-name for the configuration of an action.
     */
    public static final String PANEL_ACTION_CONFIGURATION_TAG = "configuration";

    /**
     * pre panel activation stage
     */
    public static enum ActionStage {
        preconstruct, preactivate, prevalidate, postvalidate
    }

    /**
     * attribute for class to use
     */
    public static final String PANEL_ACTION_CLASSNAME_TAG = "classname";

    /**
     * @param adata   - AutomatedInstallData instance
     * @param handler - actual UIHandler (
     *                NOTE:
     *                On a preconstruct action the handler is null because it is not available until it is constructed.
     *                During an automated installation the handler is null on each action because we have no GUI to handle.
     */
    public void executeAction(final AutomatedInstallData adata, AbstractUIHandler handler);


    /**
     * Initializes the PanelAction with the given configuration.
     *
     * @param configuration an PanelActionConfiguration containing the configuration of the action or
     *                      null if no configuration was found.
     */
    public void initialize(PanelActionConfiguration configuration);
}
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/data/PanelAction.java
Solution content
/**
 * File Name: PanelAction.java
 *
 * Copyright (c) 2009 BISON Schweiz AG, All Rights Reserved.
 *
 * Version: $Id: PanelAction.java,v 1.1.2.1 2009/02/12 12:21:01 blf Exp $
 */
package com.izforge.izpack.data;

import com.izforge.izpack.api.data.AutomatedInstallData;
import com.izforge.izpack.api.data.PanelActionConfiguration;
import com.izforge.izpack.util.AbstractUIHandler;

/*
 * IzPack - Copyright 2001-2009 Julien Ponge, All Rights Reserved.
 * 
 * http://izpack.org/ http://izpack.codehaus.org/
 * 
 * Copyright 2008 Florian Bühlmann
 * Copyright 2009 Dennis Reil
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */

public interface PanelAction {

    /**
     * tag-name of the panel action
     */
    public static final String PANEL_ACTIONS_TAG = "actions";

    /**
     * tag-name of the panel action
     */
    public static final String PANEL_ACTION_TAG = "action";

    /**
     * attribute for the stage of the action
     */
    public static final String PANEL_ACTION_STAGE_TAG = "stage";

    /**
     * tag-name for the configuration of an action.
     */
    public static final String PANEL_ACTION_CONFIGURATION_TAG = "configuration";

    /**
     * pre panel activation stage
     */
    public static enum ActionStage
    {
        preconstruct, preactivate, prevalidate, postvalidate
    }

    /**
     * attribute for class to use
     */
    public static final String PANEL_ACTION_CLASSNAME_TAG = "classname";

    /**
     * @param adata   - AutomatedInstallData instance
     * @param handler - actual UIHandler (
     *                NOTE:
     *                On a preconstruct action the handler is null because it is not available until it is constructed.
     *                During an automated installation the handler is null on each action because we have no GUI to handle.
     */
    public void executeAction(final AutomatedInstallData adata, AbstractUIHandler handler);


    /**
     * Initializes the PanelAction with the given configuration.
     *
     * @param configuration an PanelActionConfiguration containing the configuration of the action or
     *                      null if no configuration was found.
     */
    public void initialize(PanelActionConfiguration configuration);
}
File
PanelAction.java
Developer's decision
Version 2
Kind of conflict
Comment
Import
Interface declaration
Package declaration
Chunk
Conflicting content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/XPackFile.java

package com.izforge.izpack;
=======
package com.izforge.izpack.data;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/data/XPackFile.java
import com.izforge.izpack.util.OsConstraint;
Solution content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.data;

import com.izforge.izpack.util.OsConstraint;
File
XPackFile.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
            }
        }

<<<<<<< HEAD:src/lib/com/izforge/izpack/util/Housekeeper.java
        if (reboot)
        {
            try
            {
                systemReboot();
            }
            catch (IOException e)
            {
=======
        if (reboot) {
            try {
                systemReboot();
            } catch (IOException e) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/Housekeeper.java
                // Do nothing at the moment
            }
        }
Solution content
            }
        }

        if (reboot) {
            try
            {
                systemReboot();
            }
            catch (IOException e)
                // Do nothing at the moment
            }
        }
File
Housekeeper.java
Developer's decision
Combination
Kind of conflict
Catch clause
If statement
Method invocation
Try statement
Chunk
Conflicting content
    private void systemReboot() throws IOException {
        final int waitseconds = 2;

<<<<<<< HEAD:src/lib/com/izforge/izpack/util/Housekeeper.java
        if (OsVersion.IS_UNIX)
        {
            Runtime.getRuntime().exec("sudo /sbin/shutdown -r -t " + waitseconds + " now");
        }
        else if (OsVersion.IS_WINDOWS)
        {
            Runtime.getRuntime().exec("shutdown /r /f /t " + waitseconds);
        }
        else
        {
=======
        if (OsVersion.IS_UNIX) {
            Runtime.getRuntime().exec("sudo /sbin/shutdown -r -t " + waitseconds + " now");
        } else if (OsVersion.IS_WINDOWS) {
            Runtime.getRuntime().exec("shutdown /r /f /t " + waitseconds);
        } else {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/Housekeeper.java
            throw new IOException("Reboot not implemented for your OS");
        }
    }
Solution content
    private void systemReboot() throws IOException {
        final int waitseconds = 2;

        if (OsVersion.IS_UNIX)
        {
            Runtime.getRuntime().exec("sudo /sbin/shutdown -r -t " + waitseconds + " now");
        }
        else if (OsVersion.IS_WINDOWS)
        {
            Runtime.getRuntime().exec("shutdown /r /f /t " + waitseconds);
        }
        else
        {
            throw new IOException("Reboot not implemented for your OS");
        }
    }
File
Housekeeper.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Chunk
Conflicting content
    private String getInstallerJar() {
        try {
            URI uri = getClass().getProtectionDomain().getCodeSource().getLocation().toURI();
<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/PrivilegedRunner.java
            if (!"file".equals(uri.getScheme()))
            {
=======
            if (!"file".equals(uri.getScheme())) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/PrivilegedRunner.java
                throw new Exception("Unexpected scheme in JAR file URI: " + uri);
            }
            return new File(uri.getSchemeSpecificPart()).getCanonicalPath();
Solution content
    private String getInstallerJar() {
        try {
            URI uri = getClass().getProtectionDomain().getCodeSource().getLocation().toURI();
            if (!"file".equals(uri.getScheme())) {
                throw new Exception("Unexpected scheme in JAR file URI: " + uri);
            }
            return new File(uri.getSchemeSpecificPart()).getCanonicalPath();
File
PrivilegedRunner.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
        }
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/installer/PrivilegedRunner.java
    public static boolean isPrivilegedMode()
    {
=======
    public static boolean isPrivilegedMode() {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/PrivilegedRunner.java
        return "privileged".equals(System.getenv("izpack.mode")) || "privileged".equals(System.getProperty("izpack.mode"));
    }
}
Solution content
        }
    }

    public static boolean isPrivilegedMode() {
        return "privileged".equals(System.getenv("izpack.mode")) || "privileged".equals(System.getProperty("izpack.mode"));
    }
}
File
PrivilegedRunner.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
        initMethod(method);
    }

<<<<<<< HEAD:src/lib/com/izforge/izpack/uninstaller/SelfModifier.java
    public SelfModifier(Method method, long maxmemory, long maxpermgensize) throws IOException
    {
=======
    public SelfModifier(Method method, long maxmemory, long maxpermgensize) throws IOException {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/SelfModifier.java
        this(method);
        this.maxmemory = maxmemory;
        this.maxpermgensize = maxpermgensize;
Solution content
        initMethod(method);
    }

    public SelfModifier(Method method, long maxmemory, long maxpermgensize) throws IOException
    {
        this(method);
        this.maxmemory = maxmemory;
        this.maxpermgensize = maxpermgensize;
File
SelfModifier.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
        command.add("-D" + MEMORY_KEY + "=" + this.maxmemory);
        command.add(getClass().getName());

<<<<<<< HEAD:src/lib/com/izforge/izpack/uninstaller/SelfModifier.java
        for (String arg : args)
        {
=======
        for (String arg : args) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/SelfModifier.java
            command.add(arg);
        }
Solution content
        command.add("-D" + MEMORY_KEY + "=" + this.maxmemory);
        command.add(getClass().getName());

        for (String arg : args)
        {
            command.add(arg);
        }
File
SelfModifier.java
Developer's decision
Version 1
Kind of conflict
For statement
Chunk
Conflicting content
     * @return
     * @param apathString
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/StringTool.java
    public static String escapeSpaces(String aPathString)
    {
=======
    public static String escapeSpaces(String aPathString) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/StringTool.java
        return replaceOrEscapeAll(aPathString, null, null, true);
    }
Solution content
     * @param apathString
     * @return
     */
    public static String escapeSpaces(String aPathString) {
        return replaceOrEscapeAll(aPathString, null, null, true);
    }
File
StringTool.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
     * @param apathString
     * @return
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/StringTool.java
    public static String replaceSpacesWithMinus(String aPathString)
    {
=======
    public static String replaceSpacesWithMinus(String aPathString) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/StringTool.java
        return replaceSpaces(aPathString, "-");
    }
Solution content
     * @param apathString
     * @return
     */
    public static String replaceSpacesWithMinus(String aPathString) {
        return replaceSpaces(aPathString, "-");
    }
File
StringTool.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
     * @param apathString
     * @return
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/StringTool.java
    public static String replaceSpaces(String aPathString, String replaceWith)
    {
=======
    public static String replaceSpaces(String aPathString, String replaceWith) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/StringTool.java
        return replaceOrEscapeAll(aPathString, replaceWith, null, false);
    }
Solution content
     * @param apathString
     * @return
     */
    public static String replaceSpaces(String aPathString, String replaceWith) {
        return replaceOrEscapeAll(aPathString, replaceWith, null, false);
    }
File
StringTool.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
     * @param replaceWhat         The atring array with the Characters, which should be replaced
     * @param escape              The flag, wihch indeicates, how to handle the given replaceOrEscapeWith String.
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/StringTool.java
    public static String replaceOrEscapeAll(String aPathString, String replaceOrEscapeWith, String[] replaceWhat, boolean escape)
    {
        if (replaceWhat == null)

        {
            replaceWhat = new String[]{" ", "\t", "\n"};
        }

        if (replaceOrEscapeWith == null)
        {
            replaceOrEscapeWith = "\\";
        }

        for (int i = 0; i < replaceWhat.length; i++)
        {
=======
    public static String replaceOrEscapeAll(String aPathString, String replaceOrEscapeWith, String[] replaceWhat, boolean escape) {
        if (replaceWhat == null)

            replaceWhat = new String[]{" ", "\t", "\n"};

        if (replaceOrEscapeWith == null)
            replaceOrEscapeWith = "\\";

        for (int i = 0; i < replaceWhat.length; i++) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/StringTool.java

            aPathString = replace(aPathString, replaceWhat[i], escape == true ? replaceOrEscapeWith + replaceWhat[i] : replaceOrEscapeWith);
        }
Solution content
     * @param replaceWhat         The atring array with the Characters, which should be replaced
     * @param escape              The flag, wihch indeicates, how to handle the given replaceOrEscapeWith String.
     */
    public static String replaceOrEscapeAll(String aPathString, String replaceOrEscapeWith, String[] replaceWhat, boolean escape) {
        if (replaceWhat == null)

        {
            replaceWhat = new String[]{" ", "\t", "\n"};
        }

        if (replaceOrEscapeWith == null)
        {
            replaceOrEscapeWith = "\\";
        }

        for (int i = 0; i < replaceWhat.length; i++) {

            aPathString = replace(aPathString, replaceWhat[i], escape == true ? replaceOrEscapeWith + replaceWhat[i] : replaceOrEscapeWith);
        }
File
StringTool.java
Developer's decision
Version 1
Kind of conflict
For statement
If statement
Method signature
Chunk
Conflicting content
package com.izforge.izpack.util.helper;

<<<<<<< HEAD:src/lib/com/izforge/izpack/util/SpecHelper.java
import com.izforge.izpack.adaptator.IXMLElement;
import com.izforge.izpack.adaptator.IXMLParser;
import com.izforge.izpack.adaptator.impl.XMLParser;
import com.izforge.izpack.installer.InstallerException;
import com.izforge.izpack.installer.ResourceManager;
=======
import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
import com.izforge.izpack.api.adaptator.impl.XMLParser;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/helper/SpecHelper.java

import java.io.File;
import java.io.FileInputStream;
Solution content
package com.izforge.izpack.util.helper;

import com.izforge.izpack.api.adaptator.IXMLElement;
import com.izforge.izpack.api.adaptator.IXMLParser;
import com.izforge.izpack.api.adaptator.impl.XMLParser;
import com.izforge.izpack.api.data.ResourceManager;
import com.izforge.izpack.api.exception.InstallerException;
import com.izforge.izpack.api.substitutor.VariableSubstitutor;

import java.io.File;
import java.io.FileInputStream;
File
SpecHelper.java
Developer's decision
Version 2
Kind of conflict
Import
Chunk
Conflicting content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/ShellScript.java

package com.izforge.izpack.util.os.unix;
=======
package com.izforge.izpack.util.unix;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/ShellScript.java

import com.izforge.izpack.util.FileExecutor;
Solution content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.util.unix;

import com.izforge.izpack.util.FileExecutor;
File
ShellScript.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
     */
    public ShellScript(String aShell) {
        // Null was given the Header has to be self created 
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/ShellScript.java
        if (null != aShell)
        {
=======
        if (null != aShell) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/ShellScript.java
            setShell(aShell);
            content.append("#!/usr/bin/env ").append(getShell());
            content.append(header);
Solution content
     */
    public ShellScript(String aShell) {
        // Null was given the Header has to be self created 
        if (null != aShell) {
            setShell(aShell);
            content.append("#!/usr/bin/env ").append(getShell());
            content.append(header);
File
ShellScript.java
Developer's decision
Version 1
Kind of conflict
If statement
Chunk
Conflicting content
     *
     * @param aShell The Shell which should set and used.
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/ShellScript.java
    public void setShell(String aShell)
    {
=======
    public void setShell(String aShell) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/ShellScript.java
        itsShell = aShell;
    }
Solution content
     *
     * @param aShell The Shell which should set and used.
     */
    public void setShell(String aShell) {
        itsShell = aShell;
    }
File
ShellScript.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
     *
     * @return the Shell
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/ShellScript.java
    public String getShell()
    {
=======
    public String getShell() {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/ShellScript.java
        return itsShell;
    }
Solution content
     *
     * @return the Shell
     */
    public String getShell() {
        return itsShell;
    }
File
ShellScript.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
     *
     * @param anArray
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/ShellScript.java
    public void append(String[] anArray)
    {
        for (int i = 0; i < anArray.length; i++)
        {
=======
    public void append(String[] anArray) {
        for (int i = 0; i < anArray.length; i++) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/ShellScript.java
            String string = anArray[i];

            append(string);
Solution content
     *
     * @param anArray
     */
    public void append(String[] anArray) {
        for (int i = 0; i < anArray.length; i++) {
            String string = anArray[i];

            append(string);
File
ShellScript.java
Developer's decision
Version 1
Kind of conflict
For statement
Method signature
Chunk
Conflicting content
            append(string);
            if (anArray.length > i)
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/ShellScript.java
            {
                append(' ');
            }
=======
                append(' ');
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/ShellScript.java
        }
    }
Solution content
            append(string);
            if (anArray.length > i)
            {
                append(' ');
            }
        }
    }
File
ShellScript.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
     *
     * @param anArray
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/ShellScript.java
    public void appendln(String[] anArray)
    {
        for (int i = 0; i < anArray.length; i++)
        {
=======
    public void appendln(String[] anArray) {
        for (int i = 0; i < anArray.length; i++) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/ShellScript.java
            String string = anArray[i];

            append(string);
Solution content
     *
     * @param anArray
     */
    public void appendln(String[] anArray) {
        for (int i = 0; i < anArray.length; i++) {
            String string = anArray[i];

            append(string);
File
ShellScript.java
Developer's decision
Version 1
Kind of conflict
For statement
Method signature
Chunk
Conflicting content
            append(string);
            if (anArray.length > i)
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/ShellScript.java
            {
                append(' ');
            }
=======
                append(' ');
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/ShellScript.java
        }
        appendln();
    }
Solution content
            append(string);
            if (anArray.length > i)
            {
                append(' ');
            }
        }
        appendln();
    }
File
ShellScript.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
    /**
     * Deletes only  if Location is not null.
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/ShellScript.java
    public void delete()
    {
        if (itsLocation != null)
        {
            File location = new File(itsLocation);

            try
            {
                location.delete();
            }
            catch (Exception e)
            {
=======
    public void delete() {
        if (itsLocation != null) {
            File location = new File(itsLocation);

            try {
                location.delete();
            }
            catch (Exception e) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/ShellScript.java
                location.deleteOnExit();
            }
        }
Solution content
    /**
     * Deletes only  if Location is not null.
     */
    public void delete() {
        if (itsLocation != null) {
            File location = new File(itsLocation);

            try {
                location.delete();
            }
            catch (Exception e) {
                location.deleteOnExit();
            }
        }
File
ShellScript.java
Developer's decision
Version 1
Kind of conflict
Catch clause
If statement
Method invocation
Method signature
Try statement
Variable
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/UnixConstants.java

package com.izforge.izpack.util.os.unix;
=======
package com.izforge.izpack.util.unix;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/UnixConstants.java


/**
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.util.unix;


/**
File
UnixConstants.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/UnixHelper.java

package com.izforge.izpack.util.os.unix;
=======
package com.izforge.izpack.util.unix;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/UnixHelper.java

import com.izforge.izpack.util.FileExecutor;
Solution content
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
package com.izforge.izpack.util.unix;

import com.izforge.izpack.util.FileExecutor;
File
UnixHelper.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
     *
     * @return The absolute File/Pathname of the Desktop foldername.
     */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/UnixUser.java
    public String getXdgDesktopfolder()
    {
        File configFile = new File(getHome() + File.separator + ".config" + File.separator + "user-dirs.dirs");
        if (configFile.exists())
        {
            if (XDGDesktopFolderNameScript == null)
            /** TODO: can be optimized with a shared script **/
            {
                XDGDesktopFolderNameScriptFilename = getCreatedXDGDesktopFolderNameScriptFilename();
            }
=======
    public String getXdgDesktopfolder() {
        File configFile = new File(getHome() + File.separator + ".config" + File.separator + "user-dirs.dirs");
        if (configFile.exists()) {
            if (XDGDesktopFolderNameScript == null)
            /** TODO: can be optimized with a shared script **/
                XDGDesktopFolderNameScriptFilename = getCreatedXDGDesktopFolderNameScriptFilename();
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/UnixUser.java

            FileExecutor.getExecOutput(new String[]{UnixHelper.getCustomCommand("chmod"), "+x", XDGDesktopFolderNameScriptFilename}, true);
            //
Solution content
        {
        if (configFile.exists())
     *
     * @return The absolute File/Pathname of the Desktop foldername.
     */
    public String getXdgDesktopfolder() {
        File configFile = new File(getHome() + File.separator + ".config" + File.separator + "user-dirs.dirs");
            if (XDGDesktopFolderNameScript == null)
            /** TODO: can be optimized with a shared script **/
            {
                XDGDesktopFolderNameScriptFilename = getCreatedXDGDesktopFolderNameScriptFilename();
            }

            FileExecutor.getExecOutput(new String[]{UnixHelper.getCustomCommand("chmod"), "+x", XDGDesktopFolderNameScriptFilename}, true);
            //
File
UnixUser.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Method signature
Variable
Chunk
Conflicting content
            //
            return xdgDesktopfolder;

<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/UnixUser.java
        }
        else
        {
            return getHome() + File.separator + "Desktop";
        }
=======
        } else
            return getHome() + File.separator + "Desktop";
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/UnixUser.java
    }

    /**
Solution content
            //
            return xdgDesktopfolder;

        } else
        {
            return getHome() + File.separator + "Desktop";
        }
    }

    /**
File
UnixUser.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Return statement
Chunk
Conflicting content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/UnixUsers.java

package com.izforge.izpack.util.os.unix;
=======
package com.izforge.izpack.util.unix;
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/UnixUsers.java

import com.izforge.izpack.util.StringTool;
Solution content
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.izforge.izpack.util.unix;

import com.izforge.izpack.util.StringTool;
File
UnixUsers.java
Developer's decision
Version 2
Kind of conflict
Package declaration
Chunk
Conflicting content
            UnixUser user = usersWithValidShellsAndExistingHomes.get(idx);

            if ((user.getHome() != null)
<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/UnixUsers.java
                    && new File(user.getXdgDesktopfolder()).exists())
            {
=======
                    && new File(user.getXdgDesktopfolder()).exists()) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/UnixUsers.java
                result.add(user);
            }
        }
Solution content
            UnixUser user = usersWithValidShellsAndExistingHomes.get(idx);

            if ((user.getHome() != null)
                    && new File(user.getXdgDesktopfolder()).exists())
            {
                result.add(user);
            }
        }
File
UnixUsers.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Chunk
Conflicting content
        for (int idx = 0; idx < validUserDesktops.size(); idx++) {
            UnixUser user = (UnixUser) validUserDesktops.get(idx);

<<<<<<< HEAD:src/lib/com/izforge/izpack/util/os/unix/UnixUsers.java
            if (user.getHome() != null)
            {
=======
            if (user.getHome() != null) {
>>>>>>> a1097215f77fa5effcf776a702fb8a95fceb924e:izpack-util/src/main/java/com/izforge/izpack/util/unix/UnixUsers.java
                File DesktopFolder = new File(user.getXdgDesktopfolder());

                if (DesktopFolder.exists() && DesktopFolder.isDirectory()) {
Solution content
        for (int idx = 0; idx < validUserDesktops.size(); idx++) {
            UnixUser user = (UnixUser) validUserDesktops.get(idx);

            if (user.getHome() != null) {
                File DesktopFolder = new File(user.getXdgDesktopfolder());

                if (DesktopFolder.exists() && DesktopFolder.isDirectory()) {
File
UnixUsers.java
Developer's decision
Version 1
Kind of conflict
If statement