English Documentation

Release Notes

Version 23.6.12

With patch release 23.6.12 one bug was fixed:

  • ConcurrentModificationException from AbstractRuntimeRepository.getAllReferencedRepositories() (FIPS-11737)

Version 23.6.11

With patch release 23.6.11 one bug was fixed:

  • ModelObjectAttributes::resetAttributes expects a setter for cached attributes and constant attributes (FIPS-11713)

Version 23.6.10

  • Edit attributes dialogue requires scrollbars (FIPS-11531)

A scroll bar has been added to the ‘Validation rule’ tab of the dialogue for editing attributes. This was necessary as parts of the user interface were no longer fully displayed at low screen resolutions.

Version 23.6.9

Version 23.6.9 fixes a bug with Java Concurrency:

  • The 'Copy Product' function crashes eclipse (FIPS-11369)

Version 23.6.8

  • "Deleted" to-1 relationships in product variants are not filtered. (FIPS-11309)

When using product variants, associations with cardinality 0..0 are overwritten to exclude them in the variant. For multi-valued associations, links with upperBound=0 have already been filtered since FIPS-7905, however, single-valued associations have not yet been filtered. This has been fixed now.

The adjustment in the code generator leads to changes in the generation of getters in such cases.

Version 23.6.7

With patch release 23.6.7 one bug was fixed:

  • faktorips-validation-maven-plugin fails with exception if the product variant feature is configured in the project (FIPS-11253). During the validation using the faktorips-validation-maven-plugin, unknown features such as product variants are now being ignored, but other elements of the project are still being validated as usual.

Version 23.6.6

Version 23.6.6 fixes the following two bugs:

  • Comparison of an extensible enum with == can fail (FIPS-11138). We generally recommend comparing extensible enums with equals like all Java objects. Nonetheless, caching in runtime repositories was improved to avoid recreating enum values.

  • Compile error with capitalized enum attributes (FIPS-11189).

Version 23.6.5

When a product component is excluded in a product variant, due to technical reasons it is still retained with a cardinality of [0…​0, 0]. A call to for example getCoverages() should not return such a component since (Faktor-IPS 22.6) - only a call to getLinksForCoverages() would still reveal such a link with cardinality [0…​0, 0]. This is now actually working as intended (FIPS-10618).

The patch release also fixes the following errors:

  • Changes in the product component editor are not saved (FIPS-10517)

  • EnumContent and TableContent-XML Files: Attribute 'xml:space' is not allowed (FIPS-10532)

  • Not all Enum-Datatypes have a getAllValues-method (FIPS-10840)

Version 23.6.4

In patch release 23.6.4 three bugs were fixed:

  • Exceptions in the ErrorLog when adding the IpsNature to a Java project (FIPS-10515)

  • Exceptions after deleting product components/IpsObjects (FIPS-10516)

  • Changes in the product component editor are not being saved (FIPS-10517)

Version 23.6.3

In version 23.6.3 two bugs were fixed:

  • MAX formula unable to handle Decimal.NULL (FIPS-10403)

  • Exception after changes in products (FIPS-9915)

Version 23.6.2

In version 23.6.2 two bugs were fixed:

  • The new Product Switch did migrate derived unions twice, when an AdvancedProductFinderSwitch was used (FIPS-10325)

  • The generated code in builder classes used the generator locale of association targets' projects (FIPS-10332)

Version 23.6.1

Patch release 23.6.1 updates the Groovy dependency for dynamic formula evaluation to be able to run with the current Java version 20 and fixes bug FIPS-10229, which prevented value sets configured for product variants from being correctly read when a String attribute’s length was restricted in the model.

As the change to the code generator to use empty Strings instead of null as the default value for String attributes originally included in Faktor-IPS 23.6.0 led to problems in enumerations and multi-value attributes, we have reverted it and will reintroduce it in a later release of Faktor-IPS with more preparation and some wider changes to the representation of Strings and enumerations. As preparation for that coming change, we recommend checking your project’s handling of String attributes. There should be no difference in meaning between an empty String and null, with a preference toward using empty Strings. A comparison myStringAttribute != null is error-prone. Instead, it is preferable to use IpsStringUtils.isNotEmpty(getMyStringAttribute()), for example. Consequently, two Strings should be compared using the helper method IpsStringUtils.equalsNullAsEmpty(a, b).

When writing the XML of a product component type with a method declared deprecated, the XML was generated in an invalid form FIPS-10300 - not any more.

Version 23.6.0

Faktor-IPS was developed further to allow future independence from Eclipse. Besides that, we included the following improvements:

New Minimum Requirements

The Faktor-IPS Eclipse plugin requires, from version 23.6 going forward, at least Java 17 and Eclipse 2022-12. This change was necessary because in Eclipse 2022-09 the Maven support - on which Faktor-IPS' m2e plugin relies - was incompatibly changed, but still had some bugs in 2022-09.

Faktor-IPS Validation Plugin

The plugin validates a Faktor-IPS project in a maven build without starting eclipse. It runs the same validations that are run by the Faktor-IPS plugin in an eclipse workspace.

The plugin can be included into the pom as follows:

<pluginManagement>
    <plugins>
        <plugin>
            <groupId>org.faktorips</groupId>
            <artifactId>faktorips-validation-maven-plugin</artifactId>
            <version>${faktorips-version}</version>
        </plugin>
        ...
    </plugins>
</pluginManagement>
<plugins>
    <plugin>
        <groupId>org.faktorips</groupId>
        <artifactId>faktorips-validation-maven-plugin</artifactId>
        <executions>
            <execution>
                <goals>
                    <goal>faktorips-validate</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
    ...
</plugins>

More information can be found in the plugin documentation.

The validation plugin runs only Faktor-IPS' own validations, custom plugins may not be integrated yet.

We appreciate your feedback for the ongoing development of the plugin.

JAXB / Jakarta XML Binding

JAXB, the "Java XML Binding Framework", was up to Java 8 a fixed part of the JDK in the package javax.xml.binding. Since Java 9, the API and a matching implementation must be provided as a project dependency. JAXB 2 was also a part of the Java EE specification up to Java EE 8, whereas the renamed Jakarta EE9 switched to the follow-up specification Jakarta XML Binding 3 (with the same abbreviation JAXB, in the package jakarta.xml.binding).

To be able to support both variants in Faktor-IPS, we had to remove dependencies to any variant from our API, which is why for example the method IRuntimeRepository#newJAXBContext() is now deprecated and returns the JAXBContext only via generics as return type. Creation of a JAXBContext is now done with a JaxbSupport class:

private JAXBContext jaxbContext == JaxbSupport.INSTANCE.newJAXBContext(repository);  

This class, as well as the XmlAdapters it uses and the base class AbstractJaxbModelObject, can now be found in the new modules faktorips-runtime-javax-xml (for classic JAXB) and faktorips-runtime-jakarta-xml (for Jakarta XML Binding), which can both be used instead of the regular faktorips-runtime when using JAXB in a project.

<dependency>
    <groupId>org.faktorips</groupId>
    <artifactId>faktorips-runtime-javax-xml</artifactId>
    <version>${faktorips.version}</version>
</dependency>

or

<dependency>
    <groupId>org.faktorips</groupId>
    <artifactId>faktorips-runtime-jakarta-xml</artifactId>
    <version>${faktorips.version}</version>
</dependency>

Since JAXB is part of Java/Jakarta EE and as such part of an application server’s code, we have decided to have the API dependencies as "provided" only in our POMs. For projects that don’t run on a Java EE server, it may be necessary to also add dependencies to the API and an implementation, for example:

<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.3.1</version>
</dependency>
<dependency>
    <groupId>org.glassfish.jaxb</groupId>
    <artifactId>jaxb-runtime</artifactId>
    <version>2.3.7</version>
</dependency>

or

<dependency>
    <groupId>jakarta.xml.bind</groupId>
    <artifactId>jakarta.xml.bind-api</artifactId>
    <version>4.0.0</version>
</dependency>
<dependency>
    <groupId>org.glassfish.jaxb</groupId>
    <artifactId>jaxb-runtime</artifactId>
    <version>4.0.2</version>
</dependency>

Product Switch

To ease the switch of products on contract object trees there is now the utility class ProductSwitch. It is called with a root policy object and a target product, changes the policy object to the given product and recursively follows all associations to change their targets to the corresponding products:

ProductSwitchResults switchResults == ProductSwitch.from(householdContract).to(householdCompact2023);

A more extensive documentation can be found in the chapter Product Switch and in the classes' Javadoc.

Null and empty String

For attributes of type String we now use an empty String as default value instead of <null> as previously used. Both values are considered equally empty.

Value Sets

The value sets where slightly improved:

  • Value sets configurable by products can now also be marked as derived. In the generated code the value set configured in the product can be accessed, changed or replaced.

  • The equals and hashCode methods of ranges now also check whether null is allowed

Migration

If JAXB is used in the project, you should switch to one of the new modules as described under JAXB / Jakarta XML Binding after the migration and, if necessary, add Maven dependencies to a fitting JAXB API and implementation. During the migration the new JAXB setting for the projects can be selected. After changing to the new JAXB/Jakarta modules, some imports remain in the generated code and lead to compiler errors.

The problematic imports (org.faktorips.runtime.jaxb.*) may be found and deleted with the following regex:

import org\.faktorips\.runtime\.(?:jaxb\.[^.]+Adapter|internal\.AbstractJaxbModelObject);

Fixed Bugs

  • AbstractRuntimeRepository#getEnumValue(Class, Object) does not work for "real" enums (FIPS-7780)

  • DefaultRange#contains does not check empty (FIPS-9142)

  • useTableDefinedInSupertype for Joined_Subclass - missing annotations (FIPS-9236)

  • UI-Freeze with large enum content (FIPS-9295)

  • Builder methods for deprecated attributes are not deprecated (FIPS-9360)

  • Wrong version in POM created by addNature Wizard (FIPS-9501)

  • wrong model on Maven Central (FIPS-9512)

  • Source plugins missing in p2repository*.zip (FIPS-9521)

  • Product components in directories with umlauts are not migriated. (FIPS-9549)

  • minimalJavadoc omits @implements/@extends annotations (FIPS-9589)

  • Recursion in AbstractRuntimeRepository#getEnumValueLookupService is called too often (FIPS-9621)

  • ProductReleaseProzessor throws NullPointerException when models are referenced as JAR (FIPS-9633)

  • faktorips-valuetypes should use jaxb-api as provided dependency (FIPS-9705)

  • Offline XSD Schema missing (FIPS-9759)

  • IpsModel.getProductCmptType(productComponent) does not work for formula subclasses (FIPS-9880)

  • Excel import fails (FIPS-9902)

  • Empty InternationalString in Enum is not initialized correctly (FIPS-9913)

  • Resistence against faulty Maven projects (FIPS-9928)

  • generatePublishedInterfaces is not read correctly from dependencies (FIPS-9982)

  • Unrestricted Java enum does not include all values (FIPS-10003)

  • DefaultGenericAttributeValidationConfiguration_en.properties is missing (FIPS-10076)

  • Adding a product component from the product structure explorer not possible (FIPS-10087)

  • An internal error occurred during: "Test Runner". (FIPS-10090)

  • Autocompletion in formulas not working (FIPS-10125)

  • Name of problem marker missing (FIPS-10130)

  • Generated Javadoc in tables contains constant name (FIPS-10141)

  • Generation aborts - XML support can’t handle YEAR in rows (FIPS-10146)

  • Java-Doc of builder classes is misleading (FIPS-6141)

  • DefaultRange#equals/hashCode ignore containsNull (FIPS-10214)

  • Sometimes derived value sets: label in product component editor too short (FIPS-10211)

Further Features and Improvements

  • Util for recursive change of product components (FIPS-9897)

  • Add YearXmlAdapter (FIPS-10134)

  • Ips-Tests with JUnit 5 (FIPS-5973)

  • Empty string as default value for String attributes (FIPS-7400)

  • Support for Jakarta XML Binding 3.0 (FIPS-8160)

  • Generated validation should allow null in empty value sets (FIPS-8414)

  • Deprecate IRuntimeRepository#newJaxbContext and offer as util (FIPS-8982)

  • Multi-value product attribute can’t be configured as mandatory (FIPS-9117)

  • Inheritance of labels and descriptions on overwritten attributes and associations (FIPS-9118)

  • Make severity of datatype validation configurable (FIPS-9121)

  • Make IGenericAttributeValidationConfiguration valueSet overridable (FIPS-9176)

  • Improve Relevance#asValueSet method for extensible enums (FIPS-9228)

  • Remove Guava Dependency (FIPS-9443)

  • Dependencies (e.g. data types) in validation-plugin (FIPS-9716)

  • Inheritance of labels and descriptions on overwritten types and enums (FIPS-9729)

  • Add XML support to FipsNature creation (FIPS-9744)

  • Value set configured by product, but only relevant sometimes (FIPS-9885)

  • Tests with Java 20 (FIPS-9972)

  • Consequent use of DefaultGenericAttributeValidationConfiguration#getMessages (FIPS-9974)

  • Use multiple MarkerEnums (FIPS-9992)

  • Jakarta EE 10 instead of 9 (FIPS-10057)

  • 23.6 JAXB Migration - default is none when JAXB support was false (FIPS-10131)

  • Update Eclipse used in Mojo (FIPS-10148)