latos / wave-protocol

Automatically exported from code.google.com/p/wave-protocol
0 stars 0 forks source link

getLastModifiedTime() returning -1 #187

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.get latest code from repository
2.modify the code to print blips with last modified time
3.run the client

What is the expected output? What do you see instead?
expected output was to print the last modified time when the blip was modified 
but it is always returning -1.

What changeset or version are you using? On what operating system?

Please provide any additional information below.

here is the code which i used 

public ArrayList<BlipDTO> getWaveBlips(int waveNo) {

        ClientWaveView wave = getBackend().getWave(getWaveId(waveNo));
        if (wave == null) {
            throw new IllegalArgumentException("NOT FOUND");
        }

        final WaveletData convRoot =
ClientUtils.getConversationRoot(wave);

        BlipData manifest =
convRoot.getDocument(DocumentConstants.MANIFEST_DOCUMENT_ID);

        if (manifest == null) {
            throw new IllegalArgumentException("MANIFEST MISSING");
        }

manifest.getContent().asOperation().apply(InitializationCursorAdapter.adapt((new
DocInitializationCursor() {

            @Override
            public void elementStart(String type, Attributes attrs) {

                if (type.equals(DocumentConstants.BLIP)) {
                    if (attrs.containsKey(DocumentConstants.BLIP_ID))
{
                        BlipData document =

convRoot.getDocument(attrs.get(DocumentConstants.BLIP_ID));
                        if (document != null) {
                            // A nonexistent document is
indistinguishable from
                            // the empty document, so document == null
is not necessarily an error.

                          long time =document.getLastModifiedTime(); 

it was returning -1 for every blip.

Original issue reported on code.google.com by faisalbh...@gmail.com on 21 Dec 2010 at 1:19

GoogleCodeExporter commented 8 years ago
This is probably a duplicate of 
http://code.google.com/p/wave-protocol/issues/detail?id=135, although that 
issue is marked as fixed.

Original comment by hearn...@google.com on 4 Jan 2011 at 2:59

GoogleCodeExporter commented 8 years ago
Is this still an issue?

Original comment by hearn...@google.com on 8 Feb 2011 at 1:48

GoogleCodeExporter commented 8 years ago
Seems like blips have correct LMT now. 

Original comment by vega113 on 20 Feb 2011 at 7:29