-
Notifications
You must be signed in to change notification settings - Fork 30
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
Weird temporal bounds check issue when using default/recent Joda time librarry. #72
Comments
Sounds like it could be a project configuration issue. edal-common should pull in joda-time v2.2, as required (and it looks like it works when you use that version) - where is version 2.8.1 coming from? I guess you are using another library which uses 2.8.1? |
In my project pom I only included edal-cdm, and not edal-common. Maven didn't complain and unzipping the shaded jar shows it wasn't pulled in indirectly/transitively. I'm only using the dataset class and extracting variable metadata, grid bounds - no graphics etc. Everything works as expected (ignoring the joda issue). If edal-common is required, then I can certainly add it. Otherwise just expressing the joda-time version explicitly is also fine for me. |
That's very strange. edal-cdm depends on edal-common - if you depend on edal-cdm it should absolutely pull in edal-common as a dependency. Can you post a copy of your pom.xml on here? |
There is a edal-common pom in the resultant jar, but no edal-common class files.
|
I think the issue is that So this is an issue with your project configuration, which can be solved in multiple ways. However, it's probably worth me updating |
Yes. This is easily worked around. For the most part, I just thought it was odd, that verifyValueBounds(DateTimeField field, int value, int lowerBound, int upperBound) which going by the signature is a very simple range check started to throw. So my concern was - that it was flagging some other logic issue somewhere (possibly in joda time). |
Yeah, I tend to agree that it could be a warning flag. Hopefully the update to joda time 2.9.4 (just released) will fix any problems before they arise... |
I've created a simple project following the NcDiag.java example and using DiscreteLayeredDataset to examine netcdf files.
If I don't specify joda-time dependency in the pom - then it defaults to 2.8.1. And running my example generates the following joda bounds check error,
Making a single change to the pom to specify version 2.2 joda dependency - to match https://github.com/Reading-eScience-Centre/edal-java/blob/master/common/pom.xml,
And no exception is thrown,
I'm not sure if it's a joda library or edal-java issue, but I thought it was worth noting here. Cheers.
The text was updated successfully, but these errors were encountered: