You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2012/05/14 14:44:33 UTC
svn commit: r1338181 - in /pivot/trunk/core/src/org/apache/pivot/util:
CalendarDate.java ImmutableIterator.java MIMEType.java MessageBus.java
Resources.java Time.java TypeLiteral.java Version.java
Author: smartini
Date: Mon May 14 12:44:33 2012
New Revision: 1338181
URL: http://svn.apache.org/viewvc?rev=1338181&view=rev
Log:
fixed some eclipse warnings
Modified:
pivot/trunk/core/src/org/apache/pivot/util/CalendarDate.java
pivot/trunk/core/src/org/apache/pivot/util/ImmutableIterator.java
pivot/trunk/core/src/org/apache/pivot/util/MIMEType.java
pivot/trunk/core/src/org/apache/pivot/util/MessageBus.java
pivot/trunk/core/src/org/apache/pivot/util/Resources.java
pivot/trunk/core/src/org/apache/pivot/util/Time.java
pivot/trunk/core/src/org/apache/pivot/util/TypeLiteral.java
pivot/trunk/core/src/org/apache/pivot/util/Version.java
Modified: pivot/trunk/core/src/org/apache/pivot/util/CalendarDate.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/CalendarDate.java?rev=1338181&r1=1338180&r2=1338181&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/CalendarDate.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/CalendarDate.java Mon May 14 12:44:33 2012
@@ -64,8 +64,8 @@ public final class CalendarDate implemen
throw new IllegalArgumentException("range is null.");
}
- start = range.start;
- end = range.end;
+ this.start = range.start;
+ this.end = range.end;
}
public Range(Dictionary<String, ?> range) {
@@ -73,32 +73,32 @@ public final class CalendarDate implemen
throw new IllegalArgumentException("range is null.");
}
- Object start = range.get(START_KEY);
- Object end = range.get(END_KEY);
+ Object startRange = range.get(START_KEY);
+ Object endRange = range.get(END_KEY);
- if (start == null) {
+ if (startRange == null) {
throw new IllegalArgumentException(START_KEY + " is required.");
}
- if (end == null) {
+ if (endRange == null) {
throw new IllegalArgumentException(END_KEY + " is required.");
}
- if (start instanceof String) {
- this.start = CalendarDate.decode((String)start);
+ if (startRange instanceof String) {
+ this.start = CalendarDate.decode((String)startRange);
} else {
- this.start = (CalendarDate)start;
+ this.start = (CalendarDate)startRange;
}
- if (end instanceof String) {
- this.end = CalendarDate.decode((String)end);
+ if (endRange instanceof String) {
+ this.end = CalendarDate.decode((String)endRange);
} else {
- this.end = (CalendarDate)end;
+ this.end = (CalendarDate)endRange;
}
}
public int getLength() {
- return Math.abs(start.subtract(end)) + 1;
+ return Math.abs(this.start.subtract(this.end)) + 1;
}
public boolean contains(Range range) {
@@ -109,12 +109,12 @@ public final class CalendarDate implemen
Range normalizedRange = range.normalize();
boolean contains;
- if (start.compareTo(end) < 0) {
- contains = (start.compareTo(normalizedRange.start) <= 0
- && end.compareTo(normalizedRange.end) >= 0);
+ if (this.start.compareTo(this.end) < 0) {
+ contains = (this.start.compareTo(normalizedRange.start) <= 0
+ && this.end.compareTo(normalizedRange.end) >= 0);
} else {
- contains = (end.compareTo(normalizedRange.start) <= 0
- && start.compareTo(normalizedRange.end) >= 0);
+ contains = (this.end.compareTo(normalizedRange.start) <= 0
+ && this.start.compareTo(normalizedRange.end) >= 0);
}
return contains;
@@ -126,12 +126,12 @@ public final class CalendarDate implemen
}
boolean contains;
- if (start.compareTo(end) < 0) {
- contains = (start.compareTo(calendarDate) <= 0
- && end.compareTo(calendarDate) >= 0);
+ if (this.start.compareTo(this.end) < 0) {
+ contains = (this.start.compareTo(calendarDate) <= 0
+ && this.end.compareTo(calendarDate) >= 0);
} else {
- contains = (end.compareTo(calendarDate) <= 0
- && start.compareTo(calendarDate) >= 0);
+ contains = (this.end.compareTo(calendarDate) <= 0
+ && this.start.compareTo(calendarDate) >= 0);
}
return contains;
@@ -145,20 +145,20 @@ public final class CalendarDate implemen
Range normalizedRange = range.normalize();
boolean intersects;
- if (start.compareTo(end) < 0) {
- intersects = (start.compareTo(normalizedRange.end) <= 0
- && end.compareTo(normalizedRange.start) >= 0);
+ if (this.start.compareTo(this.end) < 0) {
+ intersects = (this.start.compareTo(normalizedRange.end) <= 0
+ && this.end.compareTo(normalizedRange.start) >= 0);
} else {
- intersects = (end.compareTo(normalizedRange.end) <= 0
- && start.compareTo(normalizedRange.start) >= 0);
+ intersects = (this.end.compareTo(normalizedRange.end) <= 0
+ && this.start.compareTo(normalizedRange.start) >= 0);
}
return intersects;
}
public Range normalize() {
- CalendarDate earlier = (start.compareTo(end) < 0 ? start : end);
- CalendarDate later = (earlier == start ? end : start);
+ CalendarDate earlier = (this.start.compareTo(this.end) < 0 ? this.start : this.end);
+ CalendarDate later = (earlier == this.start ? this.end : this.start);
return new Range(earlier, later);
}
@@ -344,7 +344,7 @@ public final class CalendarDate implemen
* This calendar date as a <tt>GregorianCalendar</tt>.
*/
public GregorianCalendar toCalendar(Time time) {
- GregorianCalendar calendar = new GregorianCalendar(year, month, day + 1,
+ GregorianCalendar calendar = new GregorianCalendar(this.year, this.month, this.day + 1,
time.hour, time.minute, time.second);
calendar.set(Calendar.MILLISECOND, time.millisecond);
@@ -364,13 +364,13 @@ public final class CalendarDate implemen
*/
@Override
public int compareTo(CalendarDate calendarDate) {
- int result = year - calendarDate.year;
+ int result = this.year - calendarDate.year;
if (result == 0) {
- result = month - calendarDate.month;
+ result = this.month - calendarDate.month;
if (result == 0) {
- result = day - calendarDate.day;
+ result = this.day - calendarDate.day;
}
}
@@ -388,9 +388,9 @@ public final class CalendarDate implemen
@Override
public boolean equals(Object o) {
return (o instanceof CalendarDate
- && ((CalendarDate)o).year == year
- && ((CalendarDate)o).month == month
- && ((CalendarDate)o).day == day);
+ && ((CalendarDate)o).year == this.year
+ && ((CalendarDate)o).month == this.month
+ && ((CalendarDate)o).day == this.day);
}
/**
@@ -400,9 +400,9 @@ public final class CalendarDate implemen
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + year;
- result = prime * result + month;
- result = prime * result + day;
+ result = prime * result + this.year;
+ result = prime * result + this.month;
+ result = prime * result + this.day;
return result;
}
@@ -418,14 +418,14 @@ public final class CalendarDate implemen
format.setGroupingUsed(false);
format.setMinimumIntegerDigits(4);
- buf.append(format.format(year));
+ buf.append(format.format(this.year));
buf.append("-");
format.setMinimumIntegerDigits(2);
- buf.append(format.format(month + 1));
+ buf.append(format.format(this.month + 1));
buf.append("-");
- buf.append(format.format(day + 1));
+ buf.append(format.format(this.day + 1));
return buf.toString();
}
Modified: pivot/trunk/core/src/org/apache/pivot/util/ImmutableIterator.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/ImmutableIterator.java?rev=1338181&r1=1338180&r2=1338181&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/ImmutableIterator.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/ImmutableIterator.java Mon May 14 12:44:33 2012
@@ -34,12 +34,12 @@ public class ImmutableIterator<T> implem
@Override
public boolean hasNext() {
- return iterator.hasNext();
+ return this.iterator.hasNext();
}
@Override
public T next() {
- return iterator.next();
+ return this.iterator.next();
}
@Override
Modified: pivot/trunk/core/src/org/apache/pivot/util/MIMEType.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/MIMEType.java?rev=1338181&r1=1338180&r2=1338181&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/MIMEType.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/MIMEType.java Mon May 14 12:44:33 2012
@@ -22,7 +22,7 @@ import org.apache.pivot.collections.Dict
import org.apache.pivot.collections.HashMap;
/**
- * Utility class for introspecting a MIME type string.
+ * Utility class for introspection a MIME type string.
*/
public class MIMEType implements Dictionary<String, String>, Iterable<String> {
private String baseType;
@@ -37,42 +37,42 @@ public class MIMEType implements Diction
* parameter values).
*/
public String getBaseType() {
- return baseType;
+ return this.baseType;
}
@Override
public String get(String key) {
- return parameters.get(key);
+ return this.parameters.get(key);
}
@Override
public String put(String key, String value) {
- return parameters.put(key, value);
+ return this.parameters.put(key, value);
}
@Override
public String remove(String key) {
- return parameters.remove(key);
+ return this.parameters.remove(key);
}
@Override
public boolean containsKey(String key) {
- return parameters.containsKey(key);
+ return this.parameters.containsKey(key);
}
@Override
public Iterator<String> iterator() {
- return new ImmutableIterator<String>(parameters.iterator());
+ return new ImmutableIterator<String>(this.parameters.iterator());
}
@Override
public String toString() {
StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.append(baseType);
- if (!parameters.isEmpty()) {
- for (String parameter : parameters) {
- stringBuilder.append("; " + parameter + "=" + parameters.get(parameter));
+ stringBuilder.append(this.baseType);
+ if (!this.parameters.isEmpty()) {
+ for (String parameter : this.parameters) {
+ stringBuilder.append("; " + parameter + "=" + this.parameters.get(parameter));
}
}
Modified: pivot/trunk/core/src/org/apache/pivot/util/MessageBus.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/MessageBus.java?rev=1338181&r1=1338180&r2=1338181&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/MessageBus.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/MessageBus.java Mon May 14 12:44:33 2012
@@ -35,7 +35,9 @@ public class MessageBus {
ListenerList<MessageBusListener<?>> topicListeners = messageTopics.get(topic);
if (topicListeners == null) {
- topicListeners = new ListenerList<MessageBusListener<?>>() {};
+ topicListeners = new ListenerList<MessageBusListener<?>>() {
+ // empty block
+ };
messageTopics.put(topic, topicListeners);
}
@@ -43,7 +45,7 @@ public class MessageBus {
}
/**
- * Unsubscribes a listener from a message topic.
+ * Unsubscribe a listener from a message topic.
*
* @param topic
* @param messageListener
Modified: pivot/trunk/core/src/org/apache/pivot/util/Resources.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/Resources.java?rev=1338181&r1=1338180&r2=1338181&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/Resources.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/Resources.java Mon May 14 12:44:33 2012
@@ -118,55 +118,55 @@ public class Resources implements Dictio
this.charset = charset;
String resourceName = baseName.replace('.', '/');
- resourceMap = readJSONResource(resourceName + "." + JSONSerializer.JSON_EXTENSION);
+ this.resourceMap = readJSONResource(resourceName + "." + JSONSerializer.JSON_EXTENSION);
// Try to find resource for the language (e.g. resourceName_en)
Map<String, Object> overrideMap = readJSONResource(resourceName + "_"
+ locale.getLanguage() + "." + JSONSerializer.JSON_EXTENSION);
if (overrideMap != null) {
- if (resourceMap == null) {
- resourceMap = overrideMap;
+ if (this.resourceMap == null) {
+ this.resourceMap = overrideMap;
} else {
- applyOverrides(resourceMap, overrideMap);
+ applyOverrides(this.resourceMap, overrideMap);
}
}
// Try to find resource for the entire locale (e.g. resourceName_en_GB)
overrideMap = readJSONResource(resourceName + "_" + locale.toString() + "." + JSONSerializer.JSON_EXTENSION);
if (overrideMap != null) {
- if (resourceMap == null) {
- resourceMap = overrideMap;
+ if (this.resourceMap == null) {
+ this.resourceMap = overrideMap;
} else {
- applyOverrides(resourceMap, overrideMap);
+ applyOverrides(this.resourceMap, overrideMap);
}
}
- if (resourceMap == null) {
+ if (this.resourceMap == null) {
throw new MissingResourceException("Can't find resource for base name "
+ baseName + ", locale " + locale, baseName, "");
}
}
public Resources getParent() {
- return parent;
+ return this.parent;
}
public String getBaseName() {
- return baseName;
+ return this.baseName;
}
public Locale getLocale() {
- return locale;
+ return this.locale;
}
public Charset getCharset() {
- return charset;
+ return this.charset;
}
@Override
public Object get(String key) {
- return (resourceMap.containsKey(key)) ?
- resourceMap.get(key) : (parent == null) ? null : parent.get(key);
+ return (this.resourceMap.containsKey(key)) ?
+ this.resourceMap.get(key) : (this.parent == null) ? null : this.parent.get(key);
}
@Override
@@ -181,14 +181,14 @@ public class Resources implements Dictio
@Override
public boolean containsKey(String key) {
- return resourceMap.containsKey(key)
- || (parent != null
- && parent.containsKey(key));
+ return this.resourceMap.containsKey(key)
+ || (this.parent != null
+ && this.parent.containsKey(key));
}
@Override
public Iterator<String> iterator() {
- return new ImmutableIterator<String>(resourceMap.iterator());
+ return new ImmutableIterator<String>(this.resourceMap.iterator());
}
@SuppressWarnings("unchecked")
@@ -211,21 +211,21 @@ public class Resources implements Dictio
@SuppressWarnings("unchecked")
private Map<String, Object> readJSONResource(String name)
throws IOException, SerializationException {
- Map<String, Object> resourceMap = null;
+ Map<String, Object> resourceMapFromResource = null;
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
InputStream inputStream = classLoader.getResourceAsStream(name);
if (inputStream != null) {
- JSONSerializer serializer = new JSONSerializer(charset);
+ JSONSerializer serializer = new JSONSerializer(this.charset);
try {
- resourceMap = (Map<String, Object>)serializer.readObject(inputStream);
+ resourceMapFromResource = (Map<String, Object>)serializer.readObject(inputStream);
} finally {
inputStream.close();
}
}
- return resourceMap;
+ return resourceMapFromResource;
}
}
Modified: pivot/trunk/core/src/org/apache/pivot/util/Time.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/Time.java?rev=1338181&r1=1338180&r2=1338181&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/Time.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/Time.java Mon May 14 12:44:33 2012
@@ -62,8 +62,8 @@ public final class Time implements Compa
throw new IllegalArgumentException("range is null.");
}
- start = range.start;
- end = range.end;
+ this.start = range.start;
+ this.end = range.end;
}
public Range(Dictionary<String, ?> range) {
@@ -71,32 +71,32 @@ public final class Time implements Compa
throw new IllegalArgumentException("range is null.");
}
- Object start = range.get(START_KEY);
- Object end = range.get(END_KEY);
+ Object startRange = range.get(START_KEY);
+ Object endRange = range.get(END_KEY);
- if (start == null) {
+ if (startRange == null) {
throw new IllegalArgumentException(START_KEY + " is required.");
}
- if (end == null) {
+ if (endRange == null) {
throw new IllegalArgumentException(END_KEY + " is required.");
}
- if (start instanceof String) {
- this.start = Time.decode((String)start);
+ if (startRange instanceof String) {
+ this.start = Time.decode((String)startRange);
} else {
- this.start = (Time)start;
+ this.start = (Time)startRange;
}
- if (end instanceof String) {
- this.end = Time.decode((String)end);
+ if (endRange instanceof String) {
+ this.end = Time.decode((String)endRange);
} else {
- this.end = (Time)end;
+ this.end = (Time)endRange;
}
}
public int getLength() {
- return Math.abs(start.subtract(end)) + 1;
+ return Math.abs(this.start.subtract(this.end)) + 1;
}
public boolean contains(Range range) {
@@ -107,12 +107,12 @@ public final class Time implements Compa
Range normalizedRange = range.normalize();
boolean contains;
- if (start.compareTo(end) < 0) {
- contains = (start.compareTo(normalizedRange.start) <= 0
- && end.compareTo(normalizedRange.end) >= 0);
+ if (this.start.compareTo(this.end) < 0) {
+ contains = (this.start.compareTo(normalizedRange.start) <= 0
+ && this.end.compareTo(normalizedRange.end) >= 0);
} else {
- contains = (end.compareTo(normalizedRange.start) <= 0
- && start.compareTo(normalizedRange.end) >= 0);
+ contains = (this.end.compareTo(normalizedRange.start) <= 0
+ && this.start.compareTo(normalizedRange.end) >= 0);
}
return contains;
@@ -124,12 +124,12 @@ public final class Time implements Compa
}
boolean contains;
- if (start.compareTo(end) < 0) {
- contains = (start.compareTo(time) <= 0
- && end.compareTo(time) >= 0);
+ if (this.start.compareTo(this.end) < 0) {
+ contains = (this.start.compareTo(time) <= 0
+ && this.end.compareTo(time) >= 0);
} else {
- contains = (end.compareTo(time) <= 0
- && start.compareTo(time) >= 0);
+ contains = (this.end.compareTo(time) <= 0
+ && this.start.compareTo(time) >= 0);
}
return contains;
@@ -143,20 +143,20 @@ public final class Time implements Compa
Range normalizedRange = range.normalize();
boolean intersects;
- if (start.compareTo(end) < 0) {
- intersects = (start.compareTo(normalizedRange.end) <= 0
- && end.compareTo(normalizedRange.start) >= 0);
+ if (this.start.compareTo(this.end) < 0) {
+ intersects = (this.start.compareTo(normalizedRange.end) <= 0
+ && this.end.compareTo(normalizedRange.start) >= 0);
} else {
- intersects = (end.compareTo(normalizedRange.end) <= 0
- && start.compareTo(normalizedRange.start) >= 0);
+ intersects = (this.end.compareTo(normalizedRange.end) <= 0
+ && this.start.compareTo(normalizedRange.start) >= 0);
}
return intersects;
}
public Range normalize() {
- Time earlier = (start.compareTo(end) < 0 ? start : end);
- Time later = (earlier == start ? end : start);
+ Time earlier = (this.start.compareTo(this.end) < 0 ? this.start : this.end);
+ Time later = (earlier == this.start ? this.end : this.start);
return new Range(earlier, later);
}
@@ -250,19 +250,21 @@ public final class Time implements Compa
}
public Time(int milliseconds) {
- milliseconds %= MILLISECONDS_PER_DAY;
- milliseconds = (milliseconds + MILLISECONDS_PER_DAY) % MILLISECONDS_PER_DAY;
+ int msec = milliseconds;
- hour = milliseconds / MILLISECONDS_PER_HOUR;
- milliseconds %= MILLISECONDS_PER_HOUR;
+ msec %= MILLISECONDS_PER_DAY;
+ msec = (msec + MILLISECONDS_PER_DAY) % MILLISECONDS_PER_DAY;
- minute = milliseconds / MILLISECONDS_PER_MINUTE;
- milliseconds %= MILLISECONDS_PER_MINUTE;
+ this.hour = msec / MILLISECONDS_PER_HOUR;
+ msec %= MILLISECONDS_PER_HOUR;
- second = milliseconds / MILLISECONDS_PER_SECOND;
- milliseconds %= MILLISECONDS_PER_SECOND;
+ this.minute = msec / MILLISECONDS_PER_MINUTE;
+ msec %= MILLISECONDS_PER_MINUTE;
- millisecond = milliseconds;
+ this.second = msec / MILLISECONDS_PER_SECOND;
+ msec %= MILLISECONDS_PER_SECOND;
+
+ this.millisecond = msec;
}
/**
@@ -309,24 +311,24 @@ public final class Time implements Compa
* The number of milliseconds since midnight represented by this time.
*/
public int toMilliseconds() {
- return hour * MILLISECONDS_PER_HOUR
- + minute * MILLISECONDS_PER_MINUTE
- + second * MILLISECONDS_PER_SECOND
- + millisecond;
+ return this.hour * MILLISECONDS_PER_HOUR
+ + this.minute * MILLISECONDS_PER_MINUTE
+ + this.second * MILLISECONDS_PER_SECOND
+ + this.millisecond;
}
@Override
public int compareTo(Time time) {
- int result = hour - time.hour;
+ int result = this.hour - time.hour;
if (result == 0) {
- result = minute - time.minute;
+ result = this.minute - time.minute;
if (result == 0) {
- result = second - time.second;
+ result = this.second - time.second;
if (result == 0) {
- result = millisecond - time.millisecond;
+ result = this.millisecond - time.millisecond;
}
}
}
@@ -337,20 +339,20 @@ public final class Time implements Compa
@Override
public boolean equals(Object o) {
return (o instanceof Time
- && ((Time)o).hour == hour
- && ((Time)o).minute == minute
- && ((Time)o).second == second
- && ((Time)o).millisecond == millisecond);
+ && ((Time)o).hour == this.hour
+ && ((Time)o).minute == this.minute
+ && ((Time)o).second == this.second
+ && ((Time)o).millisecond == this.millisecond);
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
- result = prime * result + hour;
- result = prime * result + minute;
- result = prime * result + second;
- result = prime * result + millisecond;
+ result = prime * result + this.hour;
+ result = prime * result + this.minute;
+ result = prime * result + this.second;
+ result = prime * result + this.millisecond;
return result;
}
@@ -362,17 +364,17 @@ public final class Time implements Compa
format.setGroupingUsed(false);
format.setMinimumIntegerDigits(2);
- buf.append(format.format(hour));
+ buf.append(format.format(this.hour));
buf.append(":");
- buf.append(format.format(minute));
+ buf.append(format.format(this.minute));
buf.append(":");
- buf.append(format.format(second));
+ buf.append(format.format(this.second));
- if (millisecond > 0) {
+ if (this.millisecond > 0) {
buf.append(".");
format.setMinimumIntegerDigits(3);
- buf.append(format.format(millisecond));
+ buf.append(format.format(this.millisecond));
}
return buf.toString();
Modified: pivot/trunk/core/src/org/apache/pivot/util/TypeLiteral.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/TypeLiteral.java?rev=1338181&r1=1338180&r2=1338181&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/TypeLiteral.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/TypeLiteral.java Mon May 14 12:44:33 2012
@@ -58,6 +58,6 @@ public class TypeLiteral<T> {
* Gets underlying {@code Type} instance.
*/
public final Type getType() {
- return type;
+ return this.type;
}
}
Modified: pivot/trunk/core/src/org/apache/pivot/util/Version.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/Version.java?rev=1338181&r1=1338180&r2=1338181&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/Version.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/Version.java Mon May 14 12:44:33 2012
@@ -69,26 +69,26 @@ public class Version implements Comparab
}
public byte getMajorRevision() {
- return majorRevision;
+ return this.majorRevision;
}
public byte getMinorRevision() {
- return minorRevision;
+ return this.minorRevision;
}
public byte getMaintenanceRevision() {
- return maintenanceRevision;
+ return this.maintenanceRevision;
}
public byte getUpdateRevision() {
- return updateRevision;
+ return this.updateRevision;
}
public int getNumber() {
- int number = ((majorRevision) & 0xff) << (8 * 3)
- | ((minorRevision) & 0xff) << (8 * 2)
- | ((maintenanceRevision) & 0xff) << (8 * 1)
- | ((updateRevision) & 0xff) << (8 * 0);
+ int number = ((this.majorRevision) & 0xff) << (8 * 3)
+ | ((this.minorRevision) & 0xff) << (8 * 2)
+ | ((this.maintenanceRevision) & 0xff) << (8 * 1)
+ | ((this.updateRevision) & 0xff) << (8 * 0);
return number;
}
@@ -111,13 +111,13 @@ public class Version implements Comparab
@Override
public String toString() {
- String string = majorRevision
- + "." + minorRevision
- + "." + maintenanceRevision
- + "_" + String.format("%02d", updateRevision);
+ String string = this.majorRevision
+ + "." + this.minorRevision
+ + "." + this.maintenanceRevision
+ + "_" + String.format("%02d", this.updateRevision);
- if (build != null) {
- string += "-" + build;
+ if (this.build != null) {
+ string += "-" + this.build;
}
return string;