Revision: 4898 http://sourceforge.net/p/vexi/code/4898 Author: mkpg2 Date: 2016-11-04 06:58:07 +0000 (Fri, 04 Nov 2016) Log Message: ----------- Fix regression. Possibly regression in java runtime? NPE calling date asInstant() without a timezone.
Modified Paths: -------------- branches/vexi3/org.vexi-library.value/src/main/java/org/vexi/value/Date.java Modified: branches/vexi3/org.vexi-library.value/src/main/java/org/vexi/value/Date.java =================================================================== --- branches/vexi3/org.vexi-library.value/src/main/java/org/vexi/value/Date.java 2016-11-02 02:12:53 UTC (rev 4897) +++ branches/vexi3/org.vexi-library.value/src/main/java/org/vexi/value/Date.java 2016-11-04 06:58:07 UTC (rev 4898) @@ -576,7 +576,10 @@ return cal.getTimeInMillis(); } public Instant asInstantUTC() { return new Instant(asMillisUTC()); } - public Instant asInstant(String timezone) { return asInstant(TimeZone.getTimeZone(timezone)); } + public Instant asInstant(String timezone) { + if(timezone==null) timezone="GMT"; + return asInstant(TimeZone.getTimeZone(timezone)); + } public Instant asInstant(TimeZone timezone) { return new Instant(asMillis(timezone)); } public Date as(String scheme) throws ValueException { return as(getScheme(scheme)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi _______________________________________________ Vexi-svn mailing list Vexi-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vexi-svn