Skip to content

Commit dc1d22e

Browse files
committed
COH-30785 Cleanup build warnings in .NET client
[git-p4: depot-paths = "//dev/main.net/": change = 111154]
1 parent 378d10c commit dc1d22e

File tree

8 files changed

+24
-11
lines changed

8 files changed

+24
-11
lines changed

src/Coherence/IO/Pof/PortableException.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ public override string StackTrace
242242
/// The <b>StreamingContext</b> that contains contextual information
243243
/// about the source or destination.
244244
/// </param>
245-
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
246245
public override void GetObjectData(SerializationInfo info, StreamingContext context)
247246
{
248247
base.GetObjectData(info, context);

src/Coherence/IO/Resources/AbstractResource.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ public virtual string Uri
4444
/// resource implementation.
4545
/// <p/>
4646
/// For example, file system-based resources that support
47-
/// relative path resolution, such as <see cref="FileResource"/>
48-
/// and <see cref="WebResource"/>, should return an absolute
47+
/// relative path resolution, such as <see cref="FileResource"/>,
48+
/// should return an absolute
4949
/// path of the resource on the file system. Other resource
5050
/// types should return fully qualified URI for the resource,
5151
/// which is basically the value of the <see cref="Uri"/>

src/Coherence/IO/Resources/IResource.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ public interface IResource
6161
/// resource implementation.
6262
/// <p/>
6363
/// For example, file system-based resources that support
64-
/// relative path resolution, such as <see cref="FileResource"/>
65-
/// and <see cref="WebResource"/>, should return an absolute
64+
/// relative path resolution, such as <see cref="FileResource"/>,
65+
/// should return an absolute
6666
/// path of the resource on the file system. Other resource
6767
/// types should return fully qualified URI for the resource,
6868
/// which is basically the value of the <see cref="Uri"/>

src/Coherence/IO/Resources/ResourceRegistry.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ namespace Tangosol.IO.Resources
2222
/// <item>file - <see cref="FileResource"/></item>
2323
/// <item>http/https/ftp - <see cref="UrlResource"/></item>
2424
/// <item>assembly/asm - <see cref="EmbeddedResource"/></item>
25-
/// <item>web - <see cref="WebResource"/></item>
2625
/// </list>
2726
/// </remarks>
2827
/// <author>Aleksandar Seovic 2006.10.7</author>

src/Coherence/IO/Resources/UrlResource.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System;
88
using System.IO;
99
using System.Net;
10+
using System.Net.Http;
1011

1112
namespace Tangosol.IO.Resources
1213
{
@@ -57,7 +58,10 @@ public UrlResource(string resourceName) : base(resourceName)
5758
/// <seealso cref="IResource"/>
5859
public override Stream GetStream()
5960
{
60-
return WebRequest.Create(m_url).GetResponse().GetResponseStream();
61+
using (var client = new HttpClient())
62+
{
63+
return client.GetAsync(m_url).Result.Content.ReadAsStream();
64+
}
6165
}
6266

6367
#endregion

src/Coherence/Net/Cache/AbstractBundler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,11 +719,11 @@ public bool WaitForResults(bool isFirst)
719719
Thread.CurrentThread.Interrupt();
720720
SetStatus(STATUS_EXCEPTION);
721721
}
722-
catch (Exception e)
722+
catch (Exception)
723723
{
724724
// should never happen
725725
--m_cThreads;
726-
throw e;
726+
throw;
727727
}
728728
return true;
729729
}

src/Coherence/Net/DefaultOperationalContext.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,31 @@ public DefaultOperationalContext() : this((IXmlElement) null)
110110
/// Construct a new DefaultOperationalContext.
111111
/// </summary>
112112
/// <param name="config">
113-
/// An XML element corresponding to coherence.xsd.
113+
/// Path to an XML resource corresponding to coherence.xsd.
114114
/// </param>
115115
public DefaultOperationalContext(string config)
116116
: this(ResourceLoader.GetResource(config))
117117
{
118118
}
119119

120+
/// <summary>
121+
/// Construct a new DefaultOperationalContext.
122+
/// </summary>
123+
/// <param name="config">
124+
/// An XML resource corresponding to coherence.xsd.
125+
/// </param>
120126
public DefaultOperationalContext(IResource config)
121127
: this(XmlHelper.LoadResource(config,
122128
"operational configuration"))
123129
{
124130
}
125131

132+
/// <summary>
133+
/// Construct a new DefaultOperationalContext.
134+
/// </summary>
135+
/// <param name="config">
136+
/// An XML element corresponding to coherence.xsd.
137+
/// </param>
126138
public DefaultOperationalContext(IXmlElement config)
127139
{
128140
if (config == null)

src/Coherence/Net/RequestIncompleteException.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ public RequestIncompleteException(SerializationInfo info, StreamingContext conte
119119
/// The <b>StreamingContext</b> that contains contextual information
120120
/// about the source or destination.
121121
/// </param>
122-
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
123122
public override void GetObjectData(SerializationInfo info, StreamingContext context)
124123
{
125124
base.GetObjectData(info, context);

0 commit comments

Comments
 (0)