Skip to content

Commit

Permalink
Merge b8d4753 into 7597ded
Browse files Browse the repository at this point in the history
  • Loading branch information
markushi authored Nov 8, 2022
2 parents 7597ded + b8d4753 commit a71440b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions sentry/api/sentry.api
Original file line number Diff line number Diff line change
Expand Up @@ -2511,7 +2511,7 @@ public final class io/sentry/protocol/Gpu : io/sentry/JsonSerializable, io/sentr
public fun getName ()Ljava/lang/String;
public fun getNpotSupport ()Ljava/lang/String;
public fun getUnknown ()Ljava/util/Map;
public fun getVendorId ()Ljava/lang/Integer;
public fun getVendorId ()Ljava/lang/String;
public fun getVendorName ()Ljava/lang/String;
public fun getVersion ()Ljava/lang/String;
public fun isMultiThreadedRendering ()Ljava/lang/Boolean;
Expand All @@ -2523,7 +2523,7 @@ public final class io/sentry/protocol/Gpu : io/sentry/JsonSerializable, io/sentr
public fun setName (Ljava/lang/String;)V
public fun setNpotSupport (Ljava/lang/String;)V
public fun setUnknown (Ljava/util/Map;)V
public fun setVendorId (Ljava/lang/Integer;)V
public fun setVendorId (Ljava/lang/String;)V
public fun setVendorName (Ljava/lang/String;)V
public fun setVersion (Ljava/lang/String;)V
}
Expand Down
8 changes: 4 additions & 4 deletions sentry/src/main/java/io/sentry/protocol/Gpu.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public final class Gpu implements JsonUnknown, JsonSerializable {
/** The PCI identifier of the graphics device. */
private @Nullable Integer id;
/** The PCI vendor identifier of the graphics device. */
private @Nullable Integer vendorId;
private @Nullable String vendorId;
/** The vendor name as reported by the graphics device. */
private @Nullable String vendorName;
/** The total GPU memory available in Megabytes. */
Expand Down Expand Up @@ -74,11 +74,11 @@ public void setId(Integer id) {
this.id = id;
}

public @Nullable Integer getVendorId() {
public @Nullable String getVendorId() {
return vendorId;
}

public void setVendorId(Integer vendorId) {
public void setVendorId(String vendorId) {
this.vendorId = vendorId;
}

Expand Down Expand Up @@ -213,7 +213,7 @@ public static final class Deserializer implements JsonDeserializer<Gpu> {
gpu.id = reader.nextIntegerOrNull();
break;
case JsonKeys.VENDOR_ID:
gpu.vendorId = reader.nextIntegerOrNull();
gpu.vendorId = reader.nextStringOrNull();
break;
case JsonKeys.VENDOR_NAME:
gpu.vendorName = reader.nextStringOrNull();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class GpuSerializationTest {
fun getSut() = Gpu().apply {
name = "d623a6b5-e1ab-4402-931b-c06f5a43a5ae"
id = -596576280
vendorId = 1874778041
vendorId = "1874778041"
vendorName = "d732cf76-07dc-48e2-8920-96d6bfc2439d"
memorySize = -1484004451
apiType = "95dfc8bc-88ae-4d66-b85f-6c88ad45b80f"
Expand Down
4 changes: 2 additions & 2 deletions sentry/src/test/java/io/sentry/protocol/GpuTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class GpuTest {
val gpu = Gpu()
gpu.name = "name"
gpu.id = 10
gpu.vendorId = 20
gpu.vendorId = "20"
gpu.vendorName = "vendor name"
gpu.memorySize = 1024
gpu.apiType = "api type"
Expand All @@ -40,7 +40,7 @@ class GpuTest {

assertEquals("name", clone.name)
assertEquals(10, clone.id)
assertEquals(20, clone.vendorId)
assertEquals("20", clone.vendorId)
assertEquals("vendor name", clone.vendorName)
assertEquals(1024, clone.memorySize)
assertEquals("api type", clone.apiType)
Expand Down

0 comments on commit a71440b

Please sign in to comment.