Skip to content

Commit 0167776

Browse files
committed
Address feedback
1 parent 04b4ab8 commit 0167776

8 files changed

+0
-48
lines changed

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

-6
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,6 @@ static partial void AddManualMapping ()
5757

5858
public static ApplicationAttribute FromCustomAttributeProvider (ICustomAttributeProvider provider, TypeDefinitionCache cache)
5959
{
60-
// `provider` might be null in situations when application configuration is broken, and it surfaces in a number of
61-
// tests which check these situations.
62-
if (provider == null) {
63-
return null;
64-
}
65-
6660
CustomAttribute attr = provider.GetCustomAttributes ("Android.App.ApplicationAttribute")
6761
.SingleOrDefault ();
6862
if (attr == null)

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

-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ partial class InstrumentationAttribute {
1616

1717
public static IEnumerable<InstrumentationAttribute> 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
foreach (CustomAttribute attr in provider.GetCustomAttributes ("Android.App.InstrumentationAttribute")) {
2620
InstrumentationAttribute self = new InstrumentationAttribute ();
2721
self.specified = mapping.Load (self, attr, cache);

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

-6
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

-6
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

-6
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

-6
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ internal XElement ToElement (string packageName, TypeDefinitionCache cache)
2929

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

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

-6
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ internal XElement ToElement (string packageName, TypeDefinitionCache cache)
3535

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

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

-6
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)