Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(179)

Unified Diff: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/SourceEdit.java

Issue 538253002: Use primitive int/boolean where possible in the Java client. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/SourceEdit.java
diff --git a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/SourceEdit.java b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/SourceEdit.java
index a561d6e13c3929fc96e089823aa234bb922610a1..f82b4f98c4b7c53c02a8a2db3edd96099831c470 100644
--- a/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/SourceEdit.java
+++ b/editor/tools/plugins/com.google.dart.server/src/com/google/dart/server/generated/types/SourceEdit.java
@@ -46,12 +46,12 @@ public class SourceEdit {
/**
* The offset of the region to be modified.
*/
- private final Integer offset;
+ private final int offset;
/**
* The length of the region to be modified.
*/
- private final Integer length;
+ private final int length;
/**
* The code that is to replace the specified region in the original code.
@@ -72,7 +72,7 @@ public class SourceEdit {
/**
* Constructor for {@link SourceEdit}.
*/
- public SourceEdit(Integer offset, Integer length, String replacement, String id) {
+ public SourceEdit(int offset, int length, String replacement, String id) {
this.offset = offset;
this.length = length;
this.replacement = replacement;
@@ -93,8 +93,8 @@ public class SourceEdit {
}
public static SourceEdit fromJson(JsonObject jsonObject) {
- Integer offset = jsonObject.get("offset").getAsInt();
- Integer length = jsonObject.get("length").getAsInt();
+ int offset = jsonObject.get("offset").getAsInt();
+ int length = jsonObject.get("length").getAsInt();
String replacement = jsonObject.get("replacement").getAsString();
String id = jsonObject.get("id") == null ? null : jsonObject.get("id").getAsString();
return new SourceEdit(offset, length, replacement, id);
@@ -128,14 +128,14 @@ public class SourceEdit {
/**
* The length of the region to be modified.
*/
- public Integer getLength() {
+ public int getLength() {
return length;
}
/**
* The offset of the region to be modified.
*/
- public Integer getOffset() {
+ public int getOffset() {
return offset;
}

Powered by Google App Engine
This is Rietveld 408576698