Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Java 6 compatibility #75

Closed
pbouillet opened this issue Dec 15, 2016 · 3 comments
Closed

Java 6 compatibility #75

pbouillet opened this issue Dec 15, 2016 · 3 comments

Comments

@pbouillet
Copy link

Hi,

for the background: I'm related to inspectIT (https://github.com/inspectIT/inspectIT) and we are currently integrating a full remoting capability into our tool. Recently, we found your library and we really want to use it as our base. The problem we have currently is that you define Java 7 as a minimum requirement whereas we do need to support Java 6 applications (as many applications in production still use this version).

The only thing we found in your codebase that really needs Java 7 seems to be the usage of the AutoCloseable interface (https://github.com/opentracing/opentracing-java/blob/master/opentracing-api/src/main/java/io/opentracing/Span.java#L23) .

Is there a possibility that you can create a Java 6 compatibility version of your API? Either by removing the dependency on the AutoCloseable interface or maybe through another version somehow? As mentioned, we really want to use your library, it is exactly what we need!

Thanks,
Patrice

@codefromthecrypt
Copy link
Contributor

Hi, patrice. It is probably the case that java 6 requires only this change. can you temporarily stick in animal sniffer to confirm? (after setting target level)

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>animal-sniffer-maven-plugin</artifactId>
          <version>1.15</version>
          <configuration>
            <signature>
              <groupId>org.codehaus.mojo.signature</groupId>
              <artifactId>java16</artifactId>
              <version>1.0</version>
            </signature>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

@pbouillet
Copy link
Author

Hi @adriancole,

after checking your code, I'm actually very confused now. You have the animal sniffer already in there, and I saw that you even have the definition in the pom.xml of the API project like this:

   <properties>
        <main.basedir>${project.basedir}/..</main.basedir>
        <main.java.version>1.6</main.java.version>
        <main.signature.artifact>java16</main.signature.artifact>
    </properties>

The main.signature.artifact definition is used by the animal sniffer to check against java 1.6. My guess currently is that animal sniffer does not take the implementing of the AutoCloseable into account somehow. This is the output of the plugin:

[INFO] Building OpenTracing API 0.20.2
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- animal-sniffer-maven-plugin:1.15:check (default-cli) @ opentracing-api ---
[INFO] Checking unresolved references to org.codehaus.mojo.signature:java16:1.0
[INFO]                                                                         

Could it be that you want the API to be 1.6 compatible in the first place as defined in the pom? That would be perfect for us 😄

@pbouillet
Copy link
Author

This ticket has been solved by 28d8616 .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants