Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diamond operator needs at least 1.7 #33

Closed
GoogleCodeExporter opened this issue Mar 14, 2015 · 2 comments
Closed

diamond operator needs at least 1.7 #33

GoogleCodeExporter opened this issue Mar 14, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. checkout repo
2. cd mqtt-spy-common
3. mvn clean install


What is the expected output? What do you see instead?

BUILD SUCCESS

What version of the product are you using? On what operating system?

Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 
17:22:22+0200)
Maven home: /usr/share/maven-bin-3.1
Java version: 1.8.0_40, vendor: Oracle Corporation
Java home: /opt/oracle-jdk-bin-1.8.0.40/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.18.2-gentoo", arch: "amd64", family: "unix"


Please provide any additional information below.

Using unmodified pom.xml for mqtt-spy-common results in an error on compilation:

[ERROR] 
/home/rathgeb/workspace/esh/mqtt-spy/mqtt-spy-common/src/main/java/pl/baczkowicz
/mqttspy/scripts/ScriptManager.java:[183,50] error: diamond operator is not 
supported in -source 1.5

So, we should set the source to 1.7 or 1.8.

diff --git a/mqtt-spy-common/pom.xml b/mqtt-spy-common/pom.xml
index 1dca75c..d7bdc5c 100644
--- a/mqtt-spy-common/pom.xml
+++ b/mqtt-spy-common/pom.xml
@@ -8,6 +8,8 @@
        <properties>
                <timestamp>${maven.build.timestamp}</timestamp>
                <maven.build.timestamp.format>yyyy</maven.build.timestamp.format>
+               <maven.compiler.source>1.7</maven.compiler.source>
+               <maven.compiler.target>1.7</maven.compiler.target>
        </properties>

        <repositories>

Original issue reported on code.google.com by maggu2810@gmail.com on 9 Mar 2015 at 10:07

@GoogleCodeExporter
Copy link
Author

mqtt-spy is using lambda expressions, so we need to that 1.8 for mqtt-spy.
Perhaps we should set this in every pom.

Original comment by maggu2810@gmail.com on 9 Mar 2015 at 10:09

@kamilfb
Copy link
Owner

kamilfb commented Mar 16, 2015

Many thanks for reporting it and providing a fix. Done in the development branch.

@kamilfb kamilfb closed this as completed Mar 16, 2015
@kamilfb kamilfb modified the milestone: 0.1.9 Mar 17, 2015
@kamilfb kamilfb added the bug label Mar 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants