VcsFileRevision changes

Since IDEA 10, the former methode void VcsFileRevision#loadContent has been changed to reurned a byte[] which i assume is the content of the file.

However there's also a byte[] getContent method in the same interface and the difference between the two expected behaviours is not clear to me.
http://git.jetbrains.org/?p=idea/community.git;a=blob;f=platform/vcs-api/src/com/intellij/openapi/vcs/history/VcsFileContent.java;h=6eda659026e1b23fc92d8ad1e2c6a278a2e468d6;hb=HEAD

I had a look  at the svn implementation, but both methods have different behaviour, so I guess there's a difference ?
http://git.jetbrains.org/?p=idea/community.git;a=blob;f=plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnFileRevision.java;h=19065b5be2b183ac83c028b72bef363bf6525d69;hb=HEAD

Any hints are welcome

0

nobody knows ?

0

Hello Thibaut,

loadContent() is for load itself, while getContent() assumes that contents might be cached somewhere, and getContent() will try to reuse that cache.
At the moment IntelliJ IDEA have internal content revisions cache, and it is used by getContent() method. If there was no value in the cache, then getContent() method internally calls loadContent().

0

请先登录再写评论。