[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] NPE in LogEntry.getLogEntryChangePaths()

From: Bernd Rinn <bernd_at_sdf.lonestar.org>
Date: 2005-07-31 18:36:17 CEST

When displaying the history in a newly created project we have been
experiencing a NullPointerException in LogEntry.getLogEntryChangePaths().

Here is the log message we got:

!ENTRY org.eclipse.core.runtime 4 2 2005-07-28 13:56:39.491

!MESSAGE An internal error occurred during: "Fetching affected paths".

!STACK 0

java.lang.NullPointerException

            at
org.tigris.subversion.subclipse.core.history.LogEntry.getLogEntryChangePaths
(LogEntry.java:134)

            at
org.tigris.subversion.subclipse.ui.history.HistoryView$FetchChangePathJob.run(HistoryView.java:1174)

            at org.eclipse.core.internal.jobs.Worker.run(Worker.java:76)

The preference "Fetch affected paths on demand" was enabled when the
exception occured. The configuration was:
- Eclipse 3.1
- Subclipse 0.9.32
- OS: Windows XP

Unfortunately the developer who reported the problem is no longer able
to reproduce it.

When assuming that it is OK to silence SVNException and
SVNClientException at this point (as is done in
getLogEntryChangePaths()), the fix is straightforward: check whether
changePaths is null and return an empty array when it is. Please find
the patch attached.

-- 
Bernd Rinn

Received on Mon Aug 1 02:36:17 2005

This is an archived mail posted to the Subclipse Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.