Comments (4)
I believe there are uses of the 'diamond operator' used that may stop the
source from being compiled:
List<String> names = new ArrayList<>()
I have no problem with you forking the json-io repo, and modifying the
source there to be JDK 1.6 compliant. Then feel free to share the link to
your repo as the 1.6 json-io. I'd hope that you would keep it up-to-date
with changes to the Cedar Software json-io. I don't plan to move to JDK
1.8 until 1.7 is sunsetted. Even then, I will try to hold off. Lambda
functions would be the main enticement to move to JDK 1.8.
On Thu, Apr 23, 2015 at 1:53 PM, SlimerDude [email protected]
wrote:
Assuming the lib doesn't use any newer Java features, could the source be
recompiled so it's compatible with older versions of Java?Being a JDK 1.6 user I currently get:
Unsupported major.minor version 51.0
This SO question
http://stackoverflow.com/questions/10382929/how-to-fix-unsupported-major-minor-version-51-0-error
explains a bit more if you're unsure.I know I can do it myself, but it's always nice not having to build from
source.—
Reply to this email directly or view it on GitHub
#38.
from json-io.
Generics were introduced in Java 1.5, so diamond operators shouldn't be a problem.
To produce backwards compatible class files shouldn't take much more than setting the target
option in the compiler. Here's a link on how to set it in the Maven .pom file.
from json-io.
The diamond operator (on the RHS) support was not added (as I understand
it) until Java 1.7. Please try it and see if you can compile the example
line I sent.
On Sat, Apr 25, 2015 at 8:14 AM, SlimerDude [email protected]
wrote:
Generics were introduced in Java 1.5, so diamond operators shouldn't be
a problem.To produce backwards compatible class files shouldn't take much more than
setting the target option in the compiler. Here's a link on how to set it
in the Maven .pom file
http://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html
.—
Reply to this email directly or view it on GitHub
#38 (comment).
from json-io.
With regards to the line:
List<String> names = new ArrayList<>()
while the syntax is Java 1.7, the JDK can still compile it to Java 1.5 / 1.6 compatible byte code resulting in a class file usable by all (the purpose of the said target
compiler option).
But on further inspection of the source code, I see you're using java.lang.ReflectiveOperationException
in MetaUtils
which was only introduced in Java 1.7 - so obviously those references won't resolve in earlier JDKs.
Oh well - I was only after a quick one-liner for pretty printing JSON. Hope you don't mind but I've gone with the usual GSON...
from json-io.
Related Issues (20)
- Incorrect looking tag "14.4.2" for release version 4.14.2 HOT 1
- Possible issue about list of objects that have custom writers HOT 5
- Java class version 55 for 4.14.2 HOT 3
- Revisiting issue 17 HOT 6
- Enums are serialized differently with 4.15.0 HOT 3
- 4.15 --> 4.16 default mapping method fails to parse HOT 7
- Enhance the robustness of tests
- ReadOptionsBuilder HOT 1
- Compile / runtime dependency on com.novell.ldap:jldap HOT 3
- How to deserialise javafx classes with inaccessible fields? HOT 2
- Request for tutorial HOT 2
- NoSuchMethodError after upgrade HOT 24
- Custom serialising of objects with inheritance HOT 2
- Encoding Bug for JsonIo.toJson("🙊🙉🙈", null)? HOT 3
- Custom Writers not including id and ref in output? HOT 3
- Compatibility between 4.14.0 and 4.20.0 HOT 4
- User guide Untyped Usage HOT 1
- high usage of metaspace after upgrade to 4.22.0 HOT 4
- memory leak on LRUCache HOT 12
- Could not find class: java.time.ZoneRules which has associated alias value: ZoneRules config/aliases.txt HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-io.