Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #72 from gcheng/nullableproperty

set properties as non-nullable.
  • Loading branch information...
commit b392324414caa7f7047450db0eb1f00e452a812c 2 parents 9177463 + 95b5c1b
Albert Cheng authored
View
6 ...ure-api/src/main/java/com/microsoft/windowsazure/services/media/models/AssetFileInfo.java
@@ -57,7 +57,7 @@ public String getName() {
*
* @return the content file size
*/
- public Long getContentFileSize() {
+ public long getContentFileSize() {
return this.getContent().getContentFileSize();
}
@@ -93,7 +93,7 @@ public String getEncryptionScheme() {
*
* @return the checks if is encrypted
*/
- public Boolean getIsEncrypted() {
+ public boolean getIsEncrypted() {
return this.getContent().getIsEncrypted();
}
@@ -120,7 +120,7 @@ public String getInitializationVector() {
*
* @return the checks if is primary
*/
- public Boolean getIsPrimary() {
+ public boolean getIsPrimary() {
return this.getContent().getIsPrimary();
}
View
4 ...oft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/JobInfo.java
@@ -89,7 +89,7 @@ public Date getEndTime() {
*
* @return the priority
*/
- public Integer getPriority() {
+ public int getPriority() {
return getContent().getPriority();
}
@@ -98,7 +98,7 @@ public Integer getPriority() {
*
* @return the running duration
*/
- public Double getRunningDuration() {
+ public double getRunningDuration() {
return getContent().getRunningDuration();
}
View
4 ...ft-azure-api/src/main/java/com/microsoft/windowsazure/services/media/models/TaskInfo.java
@@ -118,7 +118,7 @@ public String getPerfMessage() {
*
* @return the priority
*/
- public Integer getPriority() {
+ public int getPriority() {
return getContent().getPriority();
}
@@ -127,7 +127,7 @@ public Integer getPriority() {
*
* @return the progress
*/
- public Double getProgress() {
+ public double getProgress() {
return getContent().getProgress();
}
View
3  ...azure-api/src/test/java/com/microsoft/windowsazure/services/media/JobIntegrationTest.java
@@ -46,7 +46,8 @@ private void verifyJobInfoEqual(String message, JobInfo expected, JobInfo actual
expected.getStartTime(), expected.getEndTime(), actual);
}
- private void verifyJobProperties(String message, String testName, Integer priority, Double runningDuration,
+ @SuppressWarnings("deprecation")
+ private void verifyJobProperties(String message, String testName, Integer priority, double runningDuration,
JobState state, String templateId, Date created, Date lastModified, Date startTime, Date endTime,
JobInfo actualJob) {
assertNotNull(message, actualJob);
View
20 ...api/src/test/java/com/microsoft/windowsazure/services/media/models/AssetFileInfoTest.java
@@ -50,10 +50,11 @@ public void testGetSetName() {
public void testGetSetContentFileSize() {
// Arrange
Long expectedContentFileSize = 1234l;
- AssetFileInfo fileInfo = new AssetFileInfo(null, new AssetFileType().setContentFileSize(expectedContentFileSize));
+ AssetFileInfo fileInfo = new AssetFileInfo(null,
+ new AssetFileType().setContentFileSize(expectedContentFileSize));
// Act
- long actualContentFileSize = fileInfo.getContentFileSize().longValue();
+ long actualContentFileSize = fileInfo.getContentFileSize();
// Assert
assertEquals(expectedContentFileSize.longValue(), actualContentFileSize);
@@ -73,7 +74,8 @@ public void testGetSetParentAssetId() {
@Test
public void testGetSetEncryptionVersion() {
String expectedEncryptionVersion = "testEncryptionVersion";
- AssetFileInfo fileInfo = new AssetFileInfo(null, new AssetFileType().setEncryptionVersion(expectedEncryptionVersion));
+ AssetFileInfo fileInfo = new AssetFileInfo(null,
+ new AssetFileType().setEncryptionVersion(expectedEncryptionVersion));
String actualEncryptionVersion = fileInfo.getEncryptionVersion();
@@ -84,7 +86,8 @@ public void testGetSetEncryptionVersion() {
public void testGetSetEncryptionScheme() {
// Arrange
String expectedEncryptionScheme = "testEncryptionScheme";
- AssetFileInfo fileInfo = new AssetFileInfo(null, new AssetFileType().setEncryptionScheme(expectedEncryptionScheme));
+ AssetFileInfo fileInfo = new AssetFileInfo(null,
+ new AssetFileType().setEncryptionScheme(expectedEncryptionScheme));
// Act
String actualEncryptionScheme = fileInfo.getEncryptionScheme();
@@ -109,7 +112,8 @@ public void testGetSetIsEncrypted() {
@Test
public void testGetSetEncryptionKeyId() {
String expectedEncryptionKeyId = "testEncryptionKeyId";
- AssetFileInfo fileInfo = new AssetFileInfo(null, new AssetFileType().setEncryptionKeyId(expectedEncryptionKeyId));
+ AssetFileInfo fileInfo = new AssetFileInfo(null,
+ new AssetFileType().setEncryptionKeyId(expectedEncryptionKeyId));
String actualEncryptionKeyId = fileInfo.getEncryptionKeyId();
@@ -119,7 +123,8 @@ public void testGetSetEncryptionKeyId() {
@Test
public void testGetSetInitializationVector() {
String expectedInitializationVector = "testInitializationVector";
- AssetFileInfo fileInfo = new AssetFileInfo(null, new AssetFileType().setInitializationVector(expectedInitializationVector));
+ AssetFileInfo fileInfo = new AssetFileInfo(null,
+ new AssetFileType().setInitializationVector(expectedInitializationVector));
String actualInitializationVector = fileInfo.getInitializationVector();
@@ -173,7 +178,8 @@ public void testGetSetMimeType() {
@Test
public void testGetSetContentChecksum() {
String expectedContentChecksum = "testContentChecksum";
- AssetFileInfo fileInfo = new AssetFileInfo(null, new AssetFileType().setContentChecksum(expectedContentChecksum));
+ AssetFileInfo fileInfo = new AssetFileInfo(null,
+ new AssetFileType().setContentChecksum(expectedContentChecksum));
String actualContentChecksum = fileInfo.getContentChecksum();
Please sign in to comment.
Something went wrong with that request. Please try again.