damnhandy / Handy-URI-Templates

A Java URI Template processor implementing RFC6570

Home Page:https://damnhandy.github.io/Handy-URI-Templates/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for Java 6

sigurdknippenberg opened this issue · comments

Currently only Java 7 and higher is supported because the main pom.xml file has the following:

                    <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-compiler-plugin</artifactId>
                            <configuration>
                                    <source>1.7</source>
                                    <target>1.7</target>
                            </configuration>
                    </plugin>

Is it possible to support Java 6 as well? I am evaluating this library for my application and can't use it right now because my app is running in Java 6.

Is it possible to change that to:

                    <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-compiler-plugin</artifactId>
                            <configuration>
                                    <source>1.7</source>
                                    <target>1.6</target>
                            </configuration>
                    </plugin>

That would allow Java 6 to be supported as well.

I've made Java 7 the default since I'd like to use named groups in order do reverse matching (see issue #2 ) and this only available in Java 7. As such, I am making use of more that just the new language features. Also considering that Java 6 was EOL'd last February, there doesn't seem much point in supporting Java 6. But since reverse matching is available yet, I might be able to make 2.0 work with Java 6. But 2.1 will be all in with Java 7 since I'm not just using the new syntax features. I'll look at this more tonight.

This is fixed in version 2.0.1 since I wasn't taking advantage of any Java 7 features just yet. However this will be changing with version 2.1 which will handle reverse matching and I plan on taking advantage of Java 7's improved regex support. But if you don't need reserve matching, you should be fine.

But as an FYI, mixing source and target versions in Javac rarely works ;)