Skip to content

Commit

Permalink
Merge pull request #5 from kwhopper/master
Browse files Browse the repository at this point in the history
fix various issues to allow XMPCoreCoverage (Issue #1) to complete as-is
  • Loading branch information
drewnoakes committed Dec 2, 2015
2 parents 2b33f07 + 91a5f92 commit a367ba9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion XmpCore.Tests/XMPCoreCoverage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ private static void CoverDateTime()
writeMajorLabel ("Test date/time utilities and special values");

var date1 = XmpDateTimeFactory.Create(2000, 1, 31, 12, 34, 56, -1);
date1.TimeZone = TimeZoneInfo.FindSystemTimeZoneById("PST");
date1.TimeZone = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");

var date2 = XmpDateTimeFactory.Create(0, 0, 0, 0, 0, 0, 0);

Expand Down
3 changes: 3 additions & 0 deletions XmpCore/Impl/ParseRdf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ private static void Rdf_PropertyElementList(XmpMeta xmp, XmpNode xmpParent, XmlN
{
continue;
}
if (currChild.NodeType == XmlNodeType.Comment)
continue;

if (currChild.NodeType != XmlNodeType.Element)
{
throw new XmpException("Expected property element node not found", XmpErrorCode.BadRdf);
Expand Down
4 changes: 3 additions & 1 deletion XmpCore/Impl/xpath/XmpPathParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ private static void VerifyQualName(string qualName)
if (Utils.IsXmlNameNs(prefix))
{
var regUri = XmpMetaFactory.SchemaRegistry.GetNamespaceUri(prefix);
if (regUri == null)
if (regUri != null)
return;
else
throw new XmpException("Unknown namespace prefix for qualified name", XmpErrorCode.BadXPath);
}

Expand Down
5 changes: 3 additions & 2 deletions XmpCore/options/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace XmpCore.Options
public abstract class Options
{
/// <summary>the internal int containing all options</summary>
private int _options;
private int _options = 0;

/// <summary>a map containing the bit names</summary>
private IDictionary<int, string> _optionNames;
Expand Down Expand Up @@ -195,7 +195,8 @@ private string GetOptionName(int option)
{
var optionsNames = ProcureOptionNames();
var key = option;
var result = optionsNames[key];
string result = null;
optionsNames.TryGetValue(key, out result);

if (result == null)
{
Expand Down
1 change: 1 addition & 0 deletions XmpCore/options/PropertyOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ namespace XmpCore.Options
/// <since>03.07.2006</since>
public sealed class PropertyOptions : Options
{
internal const int NoOptionsFlag = 0x00000000;
internal const int IsUriFlag = 0x00000002;
internal const int HasQualifiersFlag = 0x00000010;
internal const int QualifierFlag = 0x00000020;
Expand Down

0 comments on commit a367ba9

Please sign in to comment.