-
Notifications
You must be signed in to change notification settings - Fork 188
Optionals #95
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
base: master
Are you sure you want to change the base?
Optionals #95
Conversation
com.eclipsesource.json/pom.xml
Outdated
| <source>1.5</source> | ||
| <target>1.5</target> | ||
| <source>1.8</source> | ||
| <target>1.8</target> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines are needed to solve the problem found here on the discussion of issue #94
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This caused more problems than it resolved, so it was reverted.
|
There is currently a problem with
A line alike this one appears for each use of Optional, OptionalInt... |
|
I guess this is because optionals were new in Java 1.8? |
|
That's probably why, but Travis is not having it, probably because of some dependency. I'm not knowledgeable in any way in the Travis ecosystem, so I don't think I will be able to solve that one, sadly... I think someone better at it might need to intervene Otherwise, I think the work is fully done, all the getters in JsonObject were done and I didn't see any other that would need Optionals at this point (it wouldn't make sense for |
|
The problem is in the pom.xml. There is a build plugin called <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.13</version>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java18</artifactId>
<version>1.0</version>
</signature>
</configuration>
<executions>
<execution>
<id>ensure-java-1.8-class-library</id>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>Additionally the With these changes the optionals should work. If you like you can try this. Otherwise I can try to put them on top of your changes as soon as I get some time ;) |
|
Additionally some null checks, in the And I think as soon as the source level is switched to 8 more cool java 8 features can be used, that make the code even better. |
As suggested by @nbartels: ralfstx#95 (comment)
As suggested by @nbartels: ralfstx#95 (comment)
As suggested by @nbartels
Adding getters using Optionals to be more "up-to-date" with Java 8 (see issue #94 for the discussion)