Skip to content

Commit

Permalink
Fix proposed in Issue NuGet#1627
Browse files Browse the repository at this point in the history
Fixed the Trace.Activity for the line 101. Before is was accessing a null variable.
  • Loading branch information
fabiostawinski committed Oct 30, 2013
1 parent b291c4e commit eb33ec4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ public void UpdatePackage(Package package)
}

// Just update the provided package
using (Trace.Activity(String.Format(CultureInfo.CurrentCulture, "Updating Lucene Index for: {0} {1} [PackageKey:{2}]", id, version, key)))
using (Trace.Activity(String.Format(CultureInfo.CurrentCulture, "Updating Document: {0}", updateTerm.ToString())))
{
EnsureIndexWriter(creatingIndex: false);
if (package != null)
{
var indexEntity = new PackageIndexEntity(package);
Trace.Information(String.Format(CultureInfo.CurrentCulture, "Updating Document: {0}", updateTerm.ToString()));
Trace.Information(String.Format(CultureInfo.CurrentCulture, "Updating Lucene Index for: {0} {1} [PackageKey:{2}]", package.PackageRegistration.Id, package.Version, package.Key));
_indexWriter.UpdateDocument(updateTerm, indexEntity.ToDocument());
}
else
Expand Down

0 comments on commit eb33ec4

Please sign in to comment.