Skip to content

Commit eb2c2d7

Browse files
committed
Address feedback
1 parent 9aec552 commit eb2c2d7

8 files changed

+0
-48
lines changed

src/Xamarin.Android.Build.Tasks/Mono.Android/ApplicationAttribute.Partial.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,6 @@ static partial void AddManualMapping ()
6060

6161
public static ApplicationAttribute FromCustomAttributeProvider (ICustomAttributeProvider provider, TypeDefinitionCache cache)
6262
{
63-
// `provider` might be null in situations when application configuration is broken, and it surfaces in a number of
64-
// tests which check these situations.
65-
if (provider == null) {
66-
return null;
67-
}
68-
6963
CustomAttribute attr = provider.GetCustomAttributes ("Android.App.ApplicationAttribute")
7064
.SingleOrDefault ();
7165
if (attr == null)

src/Xamarin.Android.Build.Tasks/Mono.Android/InstrumentationAttribute.Partial.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ partial class InstrumentationAttribute {
1818

1919
public static IEnumerable<InstrumentationAttribute> FromCustomAttributeProvider (ICustomAttributeProvider provider, TypeDefinitionCache cache)
2020
{
21-
// `provider` might be null in situations when application configuration is broken, and it surfaces in a number of
22-
// tests which check these situations.
23-
if (provider == null) {
24-
yield break;
25-
}
26-
2721
foreach (CustomAttribute attr in provider.GetCustomAttributes ("Android.App.InstrumentationAttribute")) {
2822
InstrumentationAttribute self = new InstrumentationAttribute ();
2923
self.specified = mapping.Load (self, attr, cache);

src/Xamarin.Android.Build.Tasks/Mono.Android/PermissionAttribute.Partial.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ partial class PermissionAttribute {
2121

2222
public static IEnumerable<PermissionAttribute> FromCustomAttributeProvider (ICustomAttributeProvider provider, TypeDefinitionCache cache)
2323
{
24-
// `provider` might be null in situations when application configuration is broken, and it surfaces in a number of
25-
// tests which check these situations.
26-
if (provider == null) {
27-
yield break;
28-
}
29-
3024
var attrs = provider.GetCustomAttributes ("Android.App.PermissionAttribute");
3125
foreach (var attr in attrs) {
3226
PermissionAttribute self = new PermissionAttribute ();

src/Xamarin.Android.Build.Tasks/Mono.Android/PermissionGroupAttribute.Partial.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ partial class PermissionGroupAttribute {
2121

2222
public static IEnumerable<PermissionGroupAttribute> FromCustomAttributeProvider (ICustomAttributeProvider provider, TypeDefinitionCache cache)
2323
{
24-
// `provider` might be null in situations when application configuration is broken, and it surfaces in a number of
25-
// tests which check these situations.
26-
if (provider == null) {
27-
yield break;
28-
}
29-
3024
var attrs = provider.GetCustomAttributes ("Android.App.PermissionGroupAttribute");
3125
foreach (var attr in attrs) {
3226
PermissionGroupAttribute self = new PermissionGroupAttribute ();

src/Xamarin.Android.Build.Tasks/Mono.Android/PermissionTreeAttribute.Partial.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ partial class PermissionTreeAttribute {
2121

2222
public static IEnumerable<PermissionTreeAttribute> FromCustomAttributeProvider (ICustomAttributeProvider provider, TypeDefinitionCache cache)
2323
{
24-
// `provider` might be null in situations when application configuration is broken, and it surfaces in a number of
25-
// tests which check these situations.
26-
if (provider == null) {
27-
yield break;
28-
}
29-
3024
var attrs = provider.GetCustomAttributes ("Android.App.PermissionTreeAttribute");
3125
foreach (var attr in attrs) {
3226
PermissionTreeAttribute self = new PermissionTreeAttribute ();

src/Xamarin.Android.Build.Tasks/Mono.Android/SupportsGLTextureAttribute.Partial.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ internal XElement ToElement (string packageName, TypeDefinitionCache cache)
3131

3232
public static IEnumerable<SupportsGLTextureAttribute> FromCustomAttributeProvider (ICustomAttributeProvider provider, TypeDefinitionCache cache)
3333
{
34-
// `provider` might be null in situations when application configuration is broken, and it surfaces in a number of
35-
// tests which check these situations.
36-
if (provider == null) {
37-
yield break;
38-
}
39-
4034
var attrs = provider.GetCustomAttributes ("Android.App.SupportsGLTextureAttribute");
4135
foreach (var attr in attrs) {
4236
if (attr.HasConstructorArguments && attr.ConstructorArguments.Count == 1) {

src/Xamarin.Android.Build.Tasks/Mono.Android/UsesFeatureAttribute.Partial.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ internal XElement ToElement (string packageName, TypeDefinitionCache cache)
3737

3838
public static IEnumerable<UsesFeatureAttribute> FromCustomAttributeProvider (ICustomAttributeProvider provider, TypeDefinitionCache cache)
3939
{
40-
// `provider` might be null in situations when application configuration is broken, and it surfaces in a number of
41-
// tests which check these situations.
42-
if (provider == null) {
43-
yield break;
44-
}
45-
4640
var attrs = provider.GetCustomAttributes ("Android.App.UsesFeatureAttribute");
4741
foreach (var attr in attrs) {
4842

src/Xamarin.Android.Build.Tasks/Mono.Android/UsesPermissionAttribute.Partial.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ partial class UsesPermissionAttribute {
1616

1717
public static IEnumerable<UsesPermissionAttribute> FromCustomAttributeProvider (ICustomAttributeProvider provider, TypeDefinitionCache cache)
1818
{
19-
// `provider` might be null in situations when application configuration is broken, and it surfaces in a number of
20-
// tests which check these situations.
21-
if (provider == null) {
22-
yield break;
23-
}
24-
2519
var attrs = provider.GetCustomAttributes ("Android.App.UsesPermissionAttribute");
2620
foreach (var attr in attrs) {
2721
UsesPermissionAttribute self;

0 commit comments

Comments
 (0)