mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Possible 'null' assignment to entity marked with 'NotNull' attribute.
This commit is contained in:
@@ -274,7 +274,7 @@ namespace DiscImageChef.DiscImages
|
||||
{
|
||||
line = tocStream.ReadLine();
|
||||
|
||||
dm = dr.Match(line);
|
||||
dm = dr.Match(line ?? throw new InvalidOperationException());
|
||||
cm = cr.Match(line);
|
||||
|
||||
// Skip comments at start of file
|
||||
@@ -390,7 +390,7 @@ namespace DiscImageChef.DiscImages
|
||||
line++;
|
||||
_line = tocStream.ReadLine();
|
||||
|
||||
matchDiskType = regexDiskType.Match(_line);
|
||||
matchDiskType = regexDiskType.Match(_line ?? throw new InvalidOperationException());
|
||||
matchComment = regexComment.Match(_line);
|
||||
|
||||
// Skip comments at start of file
|
||||
@@ -416,7 +416,7 @@ namespace DiscImageChef.DiscImages
|
||||
line++;
|
||||
_line = tocStream.ReadLine();
|
||||
|
||||
matchComment = regexComment.Match(_line);
|
||||
matchComment = regexComment.Match(_line ?? throw new ());
|
||||
matchDiskType = regexDiskType.Match(_line);
|
||||
matchMcn = regexMcn.Match(_line);
|
||||
matchTrack = regexTrack.Match(_line);
|
||||
|
||||
@@ -351,7 +351,7 @@ namespace DiscImageChef.DiscImages
|
||||
Match tm;
|
||||
|
||||
// First line must be SESSION, REM, CATALOG, FILE or CDTEXTFILE.
|
||||
sm = sr.Match(_line);
|
||||
sm = sr.Match(_line ?? throw new InvalidOperationException());
|
||||
rm = rr.Match(_line);
|
||||
cm = cr.Match(_line);
|
||||
fm = fr.Match(_line);
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace DiscImageChef.DiscImages
|
||||
|
||||
Match hdm;
|
||||
|
||||
hdm = hdr.Match(_line);
|
||||
hdm = hdr.Match(_line ?? throw new InvalidOperationException());
|
||||
|
||||
return hdm.Success;
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ namespace DiscImageChef.DiscImages
|
||||
{
|
||||
Regex regexTrack = new Regex(TRACK_REGEX);
|
||||
|
||||
Match trackMatch = regexTrack.Match(_line);
|
||||
Match trackMatch = regexTrack.Match(_line ?? throw new InvalidOperationException());
|
||||
|
||||
if(!trackMatch.Success) return false;
|
||||
|
||||
@@ -231,7 +231,7 @@ namespace DiscImageChef.DiscImages
|
||||
}
|
||||
else
|
||||
{
|
||||
trackMatch = regexTrack.Match(_line);
|
||||
trackMatch = regexTrack.Match(_line ?? throw new InvalidOperationException());
|
||||
|
||||
if(!trackMatch.Success)
|
||||
throw new ImageNotSupportedException(string.Format("Unknown line \"{0}\" at line {1}",
|
||||
|
||||
Reference in New Issue
Block a user