diff options
author | John Arthorne | 2010-01-26 16:23:00 +0000 |
---|---|---|
committer | John Arthorne | 2010-01-26 16:23:00 +0000 |
commit | 53e454b406d8c4c93ce7011282e4f3f458b75812 (patch) | |
tree | 1bf9eb8ff2601f6c81b123db01c33a48bf588ea3 | |
parent | 415a27e287b8b5fd2eac3e9f2e50eb0bb306c7ef (diff) | |
download | rt.equinox.p2-53e454b406d8c4c93ce7011282e4f3f458b75812.tar.gz rt.equinox.p2-53e454b406d8c4c93ce7011282e4f3f458b75812.tar.xz rt.equinox.p2-53e454b406d8c4c93ce7011282e4f3f458b75812.zip |
Bug 300759 - VersionParser.valueOf throws exceptions frequently
-rw-r--r-- | bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java index 87ae36c44..49cb0311d 100644 --- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java +++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/internal/p2/metadata/VersionParser.java @@ -38,7 +38,7 @@ public abstract class VersionParser { } public static Integer valueOf(int i) { - if (i < cache.length) + if (i >= 0 && i < cache.length) return cache[i]; return (i == Integer.MAX_VALUE) ? MAX_INT_OBJ : new Integer(i); |