Solution12 is binary backward incompatible as it removed method with two Currency parameters and replaced it with ... one. This is source compatible, but binary incompatible.
authorJaroslav Tulach <jtulach@netbeans.org>
Sat, 11 Oct 2008 13:56:39 +0200
changeset 773d851a9f2016
parent 76 22885b020f15
child 78 9a019498f602
Solution12 is binary backward incompatible as it removed method with two Currency parameters and replaced it with ... one. This is source compatible, but binary incompatible.
taskx/jtulach/against-solution12/build.xml
taskx/jtulach/against-solution12/nbproject/project.xml
taskx/jtulach/against-solution12/project.properties
taskx/jtulach/against-solution12/test/apifest/CurrencyTest.java
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/taskx/jtulach/against-solution12/build.xml	Sat Oct 11 13:56:39 2008 +0200
     1.3 @@ -0,0 +1,5 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     1.5 +<!-- this is a template file to test  -->
     1.6 +<project name="testing-template" default="run" basedir=".">
     1.7 +    <import file="../../common.xml"/>
     1.8 +</project>    
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/taskx/jtulach/against-solution12/nbproject/project.xml	Sat Oct 11 13:56:39 2008 +0200
     2.3 @@ -0,0 +1,82 @@
     2.4 +<?xml version="1.0" encoding="UTF-8"?>
     2.5 +<project xmlns="http://www.netbeans.org/ns/project/1">
     2.6 +    <type>org.netbeans.modules.ant.freeform</type>
     2.7 +    <configuration>
     2.8 +        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
     2.9 +            <!-- Do not use Project Properties customizer when editing this file manually. -->
    2.10 +            <name>jtulach against solution 12</name>
    2.11 +            <properties>
    2.12 +                <property name="ant.script">build.xml</property>
    2.13 +                <property name="apifest">../../../</property>
    2.14 +                <property-file>project.properties</property-file>
    2.15 +                <property-file>${apifest}/taskx/common.properties</property-file>
    2.16 +            </properties>
    2.17 +            <folders>
    2.18 +                <source-folder>
    2.19 +                    <label>test</label>
    2.20 +                    <type>java</type>
    2.21 +                    <location>test</location>
    2.22 +                </source-folder>
    2.23 +            </folders>
    2.24 +            <ide-actions>
    2.25 +                <action name="build">
    2.26 +                    <script>${ant.script}</script>
    2.27 +                    <target>compile</target>
    2.28 +                </action>
    2.29 +                <action name="clean">
    2.30 +                    <script>${ant.script}</script>
    2.31 +                    <target>clean</target>
    2.32 +                </action>
    2.33 +                <action name="run">
    2.34 +                    <script>${ant.script}</script>
    2.35 +                    <target>test</target>
    2.36 +                </action>
    2.37 +                <action name="test">
    2.38 +                    <script>${ant.script}</script>
    2.39 +                    <target>test</target>
    2.40 +                </action>
    2.41 +                <action name="rebuild">
    2.42 +                    <script>${ant.script}</script>
    2.43 +                    <target>clean</target>
    2.44 +                    <target>compile</target>
    2.45 +                </action>
    2.46 +            </ide-actions>
    2.47 +            <export>
    2.48 +                <type>folder</type>
    2.49 +                <location>build/tests</location>
    2.50 +                <script>${ant.script}</script>
    2.51 +                <build-target>compile</build-target>
    2.52 +            </export>
    2.53 +            <view>
    2.54 +                <items>
    2.55 +                    <source-folder style="packages">
    2.56 +                        <label>test</label>
    2.57 +                        <location>test</location>
    2.58 +                    </source-folder>
    2.59 +                    <source-file>
    2.60 +                        <location>${ant.script}</location>
    2.61 +                    </source-file>
    2.62 +                    <source-file>
    2.63 +                        <location>project.properties</location>
    2.64 +                    </source-file>
    2.65 +                </items>
    2.66 +                <context-menu>
    2.67 +                    <ide-action name="build"/>
    2.68 +                    <ide-action name="clean"/>
    2.69 +                    <ide-action name="run"/>
    2.70 +                    <ide-action name="test"/>
    2.71 +                    <ide-action name="rebuild"/>
    2.72 +                </context-menu>
    2.73 +            </view>
    2.74 +            <subprojects/>
    2.75 +        </general-data>
    2.76 +        <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/1">
    2.77 +            <compilation-unit>
    2.78 +                <package-root>test</package-root>
    2.79 +                <classpath mode="compile">${apiA}:${junit.jar}</classpath>
    2.80 +                <built-to>build/tests</built-to>
    2.81 +                <source-level>1.5</source-level>
    2.82 +            </compilation-unit>
    2.83 +        </java-data>
    2.84 +    </configuration>
    2.85 +</project>
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/taskx/jtulach/against-solution12/project.properties	Sat Oct 11 13:56:39 2008 +0200
     3.3 @@ -0,0 +1,14 @@
     3.4 +
     3.5 +# name of a project to test
     3.6 +apitotest=solution12
     3.7 +
     3.8 +# the test shall expose a problem between two versions
     3.9 +# of one API. select the first version - taskA and a second
    3.10 +# version of the of the API taskB
    3.11 +taskA=${apifest}/task1
    3.12 +taskB=${apifest}/task2
    3.13 +
    3.14 +# usual locations of API classes for each version
    3.15 +apiA=${taskA}/${apitotest}/build/classes/
    3.16 +apiB=${taskB}/${apitotest}/build/classes/
    3.17 +
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/taskx/jtulach/against-solution12/test/apifest/CurrencyTest.java	Sat Oct 11 13:56:39 2008 +0200
     4.3 @@ -0,0 +1,20 @@
     4.4 +package apifest;
     4.5 +
     4.6 +import java.util.Currency;
     4.7 +import junit.framework.TestCase;
     4.8 +import org.apidesign.apifest08.currency.Convertor;
     4.9 +
    4.10 +
    4.11 +/** Write a test that works with version from task A and fails with version B.
    4.12 + */
    4.13 +public class CurrencyTest extends TestCase {
    4.14 +    public CurrencyTest(String n) {
    4.15 +        super(n);
    4.16 +    }
    4.17 +    
    4.18 +    public void testCompatibility() throws Exception {
    4.19 +        Currency cur = Currency.getInstance("CZK");
    4.20 +        Convertor.setConvertorRates(cur, cur, 1, 1);
    4.21 +        Convertor c = Convertor.getConvertorInstance(cur, cur);
    4.22 +    }
    4.23 +}