Make sure we compile and run on JDK6 preprocess
authorJaroslav Tulach <jaroslav.tulach@netbeans.org>
Tue, 14 Jan 2014 16:14:08 +0100
branchpreprocess
changeset 468fba23d542271
parent 467 6d3613b454ab
child 469 dcbb18f3eb53
Make sure we compile and run on JDK6
ko-osgi-test/pom.xml
ko-osgi-test/src/test/java/org/netbeans/html/ko/osgi/test/KOFx.java
ko-osgi-test/src/test/java/org/netbeans/html/ko/osgi/test/KnockoutEquinoxIT.java
ko-ws-tyrus/pom.xml
ko-ws-tyrus/src/main/java/org/netbeans/html/wstyrus/TyrusContext.java
ko4j/pom.xml
ko4j/src/test/java/org/netbeans/html/ko4j/KOFx.java
     1.1 --- a/ko-osgi-test/pom.xml	Tue Jan 14 14:18:50 2014 +0100
     1.2 +++ b/ko-osgi-test/pom.xml	Tue Jan 14 16:14:08 2014 +0100
     1.3 @@ -20,15 +20,6 @@
     1.4                  <artifactId>maven-bundle-plugin</artifactId>
     1.5              </plugin>
     1.6              <plugin>
     1.7 -                <groupId>org.apache.maven.plugins</groupId>
     1.8 -                <artifactId>maven-compiler-plugin</artifactId>
     1.9 -                <version>2.3.2</version>
    1.10 -                <configuration>
    1.11 -                    <source>1.7</source>
    1.12 -                    <target>1.7</target>
    1.13 -                </configuration>
    1.14 -            </plugin>
    1.15 -            <plugin>
    1.16                  <artifactId>maven-failsafe-plugin</artifactId>
    1.17                  <version>2.16</version>
    1.18                  <configuration>
     2.1 --- a/ko-osgi-test/src/test/java/org/netbeans/html/ko/osgi/test/KOFx.java	Tue Jan 14 14:18:50 2014 +0100
     2.2 +++ b/ko-osgi-test/src/test/java/org/netbeans/html/ko/osgi/test/KOFx.java	Tue Jan 14 16:14:08 2014 +0100
     2.3 @@ -88,7 +88,9 @@
     2.4      @Override
     2.5      public synchronized void run() {
     2.6          boolean notify = true;
     2.7 -        try (Closeable a = KnockoutEquinoxIT.activateInOSGi(p)) {
     2.8 +        Closeable a = null;
     2.9 +        try {
    2.10 +            a = KnockoutEquinoxIT.activateInOSGi(p);
    2.11              if (inst == null) {
    2.12                  inst = m.getDeclaringClass().newInstance();
    2.13              }
    2.14 @@ -112,6 +114,11 @@
    2.15              if (notify) {
    2.16                  notifyAll();
    2.17              }
    2.18 +            if (a != null) try {
    2.19 +                a.close();
    2.20 +            } catch (java.io.IOException ex) {
    2.21 +                throw new IllegalStateException(ex);
    2.22 +            }
    2.23          }
    2.24      }
    2.25      
     3.1 --- a/ko-osgi-test/src/test/java/org/netbeans/html/ko/osgi/test/KnockoutEquinoxIT.java	Tue Jan 14 14:18:50 2014 +0100
     3.2 +++ b/ko-osgi-test/src/test/java/org/netbeans/html/ko/osgi/test/KnockoutEquinoxIT.java	Tue Jan 14 16:14:08 2014 +0100
     3.3 @@ -90,7 +90,7 @@
     3.4              dir = new File(target, "osgi");
     3.5              dir.mkdirs();
     3.6              
     3.7 -            Map<String,String> config = new HashMap<>();
     3.8 +            Map<String,String> config = new HashMap<String,String>();
     3.9              config.put(Constants.FRAMEWORK_STORAGE, dir.getPath());
    3.10              config.put(Constants.FRAMEWORK_STORAGE_CLEAN, "true");
    3.11              config.put(Constants.FRAMEWORK_SYSTEMPACKAGES_EXTRA, "sun.misc,"
     4.1 --- a/ko-ws-tyrus/pom.xml	Tue Jan 14 14:18:50 2014 +0100
     4.2 +++ b/ko-ws-tyrus/pom.xml	Tue Jan 14 16:14:08 2014 +0100
     4.3 @@ -15,15 +15,6 @@
     4.4      <build>
     4.5          <plugins>
     4.6              <plugin>
     4.7 -                <groupId>org.apache.maven.plugins</groupId>
     4.8 -                <artifactId>maven-compiler-plugin</artifactId>
     4.9 -                <version>2.3.2</version>
    4.10 -                <configuration>
    4.11 -                    <source>1.7</source>
    4.12 -                    <target>1.7</target>
    4.13 -                </configuration>
    4.14 -            </plugin>
    4.15 -            <plugin>
    4.16                  <groupId>org.apache.felix</groupId>
    4.17                  <artifactId>maven-bundle-plugin</artifactId>
    4.18              </plugin>
     5.1 --- a/ko-ws-tyrus/src/main/java/org/netbeans/html/wstyrus/TyrusContext.java	Tue Jan 14 14:18:50 2014 +0100
     5.2 +++ b/ko-ws-tyrus/src/main/java/org/netbeans/html/wstyrus/TyrusContext.java	Tue Jan 14 16:14:08 2014 +0100
     5.3 @@ -149,7 +149,7 @@
     5.4              try {
     5.5                  final WebSocketContainer c = ContainerProvider.getWebSocketContainer();
     5.6                  c.connectToServer(Comm.this, url);
     5.7 -            } catch (DeploymentException | IOException ex) {
     5.8 +            } catch (Exception ex) {
     5.9                  wasAnError(ex);
    5.10              }
    5.11          }
     6.1 --- a/ko4j/pom.xml	Tue Jan 14 14:18:50 2014 +0100
     6.2 +++ b/ko4j/pom.xml	Tue Jan 14 16:14:08 2014 +0100
     6.3 @@ -29,15 +29,6 @@
     6.4                    <skip>false</skip>
     6.5                </configuration>
     6.6            </plugin>
     6.7 -         <plugin>
     6.8 -            <groupId>org.apache.maven.plugins</groupId>
     6.9 -            <artifactId>maven-compiler-plugin</artifactId>
    6.10 -            <version>2.3.2</version>
    6.11 -            <configuration>
    6.12 -               <source>1.7</source>
    6.13 -               <target>1.7</target>
    6.14 -            </configuration>
    6.15 -         </plugin>
    6.16        </plugins>
    6.17    </build>
    6.18    <dependencies>
     7.1 --- a/ko4j/src/test/java/org/netbeans/html/ko4j/KOFx.java	Tue Jan 14 14:18:50 2014 +0100
     7.2 +++ b/ko4j/src/test/java/org/netbeans/html/ko4j/KOFx.java	Tue Jan 14 16:14:08 2014 +0100
     7.3 @@ -88,7 +88,8 @@
     7.4      @Override
     7.5      public synchronized void run() {
     7.6          boolean notify = true;
     7.7 -        try (Closeable a = Fn.activate(p)) {
     7.8 +        Closeable a = Fn.activate(p);
     7.9 +        try {
    7.10              if (inst == null) {
    7.11                  inst = m.getDeclaringClass().newInstance();
    7.12              }
    7.13 @@ -112,6 +113,11 @@
    7.14              if (notify) {
    7.15                  notifyAll();
    7.16              }
    7.17 +            try {
    7.18 +                a.close();
    7.19 +            } catch (java.io.IOException ex) {
    7.20 +                throw new IllegalStateException(ex);
    7.21 +            }
    7.22          }
    7.23      }
    7.24