Versions are now longs.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: Application.java,v 1.31 2004/08/10 22:28:17 mdb Exp $
|
// $Id$
|
||||||
|
|
||||||
package com.threerings.getdown.data;
|
package com.threerings.getdown.data;
|
||||||
|
|
||||||
@@ -202,7 +202,7 @@ public class Application
|
|||||||
String vstr = (String)cdata.get("version");
|
String vstr = (String)cdata.get("version");
|
||||||
if (vstr != null) {
|
if (vstr != null) {
|
||||||
try {
|
try {
|
||||||
_version = Integer.parseInt(vstr);
|
_version = Long.parseLong(vstr);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
String err = MessageUtil.tcompose("m.invalid_version", vstr);
|
String err = MessageUtil.tcompose("m.invalid_version", vstr);
|
||||||
throw new NestableIOException(err, e);
|
throw new NestableIOException(err, e);
|
||||||
@@ -554,7 +554,7 @@ public class Application
|
|||||||
new InputStreamReader(fin));
|
new InputStreamReader(fin));
|
||||||
String vstr = bin.readLine();
|
String vstr = bin.readLine();
|
||||||
if (!StringUtil.blank(vstr)) {
|
if (!StringUtil.blank(vstr)) {
|
||||||
_targetVersion = Integer.parseInt(vstr);
|
_targetVersion = Long.parseLong(vstr);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.info("Unable to read version file: " + e.getMessage());
|
Log.info("Unable to read version file: " + e.getMessage());
|
||||||
@@ -629,7 +629,7 @@ public class Application
|
|||||||
/**
|
/**
|
||||||
* Creates a versioned application base URL for the specified version.
|
* Creates a versioned application base URL for the specified version.
|
||||||
*/
|
*/
|
||||||
protected URL createVAppBase (int version)
|
protected URL createVAppBase (long version)
|
||||||
throws MalformedURLException
|
throws MalformedURLException
|
||||||
{
|
{
|
||||||
return new URL(
|
return new URL(
|
||||||
@@ -747,8 +747,8 @@ public class Application
|
|||||||
protected File _config;
|
protected File _config;
|
||||||
protected Digest _digest;
|
protected Digest _digest;
|
||||||
|
|
||||||
protected int _version = -1;
|
protected long _version = -1;
|
||||||
protected int _targetVersion = -1;
|
protected long _targetVersion = -1;
|
||||||
protected String _appbase;
|
protected String _appbase;
|
||||||
protected URL _vappbase;
|
protected URL _vappbase;
|
||||||
protected String _class;
|
protected String _class;
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class Differ
|
|||||||
String nvers = nvdir.getName();
|
String nvers = nvdir.getName();
|
||||||
String overs = ovdir.getName();
|
String overs = ovdir.getName();
|
||||||
try {
|
try {
|
||||||
if (Integer.parseInt(nvers) <= Integer.parseInt(overs)) {
|
if (Long.parseLong(nvers) <= Long.parseLong(overs)) {
|
||||||
String err = "New version (" + nvers + ") must be greater " +
|
String err = "New version (" + nvers + ") must be greater " +
|
||||||
"than old version (" + overs + ").";
|
"than old version (" + overs + ").";
|
||||||
throw new IOException(err);
|
throw new IOException(err);
|
||||||
|
|||||||
Reference in New Issue
Block a user