World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 02-05-2010, 01:45 PM   #1
gtvilela
Junior Member
 
Join Date: Feb 2010
Posts: 2
Default method isFileOutOfDate in WWIO.java seems to have a bug

When trying to understand the Expiry_time property in WWJ, I found myself analyzing the isFileOutOfDate method.

When comparing the file date and the expiry time, I was expecting that the file is considered expired when its time is greater than the expiry time.

But the function is using file.lastModified() < expiryTime, so the answer to isFileOutOfDate is false when the file time is greater then expiry time.

If I don't misunderstand what is a "expired file" then the test should be file.lastModified() > expiryTime to correctly answer the method's question isFileOutOfDate.

Thanks

Gabriel Vilela
gtvilela is offline   Reply With Quote
Old 02-05-2010, 04:10 PM   #2
gtvilela
Junior Member
 
Join Date: Feb 2010
Posts: 2
Default

Hello,

I think I understood what's happening.

I assumed that the "expiry time" term was used to define if a file is still valid in these terms:

- If my file time is before expiry time, that's ok, the file is valid. In the other hand, if my file time is after the expiry time, the file is expired and so the file is not valid anymore.

It happens that the "expiry time" is used in WWJ as a last update time. So the interpretation is different in this case.

- A file is valid if it's time is after the last update time. If it's before, it means there is a new update and my current file is no longer valid.

That was the confusion. My interpretation of "expiry time" wasn't related with the "last update time". With that new interpretation the code works fine, although the nomenclature could induce to a misunderstanding.

Thanks

Gabriel Vilela
gtvilela is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WWJ SDK Alpha 4.1 - 0.4.1 available tag WWJ Release Announcements 56 11-14-2009 01:51 PM
Bug on greatCircleArcExtremeLocations method in LatLon class vash Development Help 2 06-12-2009 05:36 PM
Suggest to add getIndex() method to LayerList class mao Development Help 0 04-01-2009 01:10 AM
Yet another OpenGL question: Method "glClientActiveTexture" not available web.rian Feature Discussion 7 10-07-2008 01:10 PM
bug report anshuman Development Help 3 03-07-2008 08:33 AM


All times are GMT +1. The time now is 11:37 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.