aboutsummaryrefslogtreecommitdiffstats
path: root/ajdoc/src
diff options
context:
space:
mode:
authormkersten <mkersten>2005-01-13 04:22:51 +0000
committermkersten <mkersten>2005-01-13 04:22:51 +0000
commitf70b383d6292995c1e0521e7312e827022fe8fc9 (patch)
treeebb60b36e2467aedca2556e82640d82861343260 /ajdoc/src
parente633c1f58e2a163e016c99f08a08386a6d003d36 (diff)
downloadaspectj-f70b383d6292995c1e0521e7312e827022fe8fc9.tar.gz
aspectj-f70b383d6292995c1e0521e7312e827022fe8fc9.zip
Updated to support running on JDK 1.5, and fixed related bug#82218
Diffstat (limited to 'ajdoc/src')
-rw-r--r--ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java19
-rw-r--r--ajdoc/src/org/aspectj/tools/ajdoc/Util.java16
2 files changed, 26 insertions, 9 deletions
diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java b/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java
index f189b6c61..43d7b1851 100644
--- a/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java
+++ b/ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java
@@ -401,11 +401,12 @@ class HtmlDecorator {
String MARKER_2 = "<!-- ======== CONSTRUCTOR SUMMARY ======== -->";
int index1 = fbs.indexOf(MARKER_1, index);
int index2 = fbs.indexOf(MARKER_2, index);
- if (index1 < index2) {
+ if (index1 < index2 && index1 != -1) {
return index1;
- }
- else {
+ } else if (index2 != -1){
return index2;
+ } else {
+ return index;
}
}
@@ -416,15 +417,15 @@ class HtmlDecorator {
String MARKER_3 = "<!-- ============ METHOD DETAIL ========== -->";
int index1 = fbs.indexOf(MARKER_1, index);
int index2 = fbs.indexOf(MARKER_2, index);
- int index3 = fbs.indexOf(MARKER_3, index);
- if (index1 < index2 && index1 < index3) {
+ int index3 = fbs.indexOf(MARKER_3, index);
+ if (index1 != -1 && index1 < index2 && index1 < index3) {
return index1;
- }
- else if (index2 < index1 && index2 < index3) {
+ } else if (index2 != -1 && index2 < index1 && index2 < index3) {
return index2;
- }
- else {
+ } else if (index3 != -1) {
return index3;
+ } else {
+ return index;
}
}
diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/Util.java b/ajdoc/src/org/aspectj/tools/ajdoc/Util.java
new file mode 100644
index 000000000..e3c53f301
--- /dev/null
+++ b/ajdoc/src/org/aspectj/tools/ajdoc/Util.java
@@ -0,0 +1,16 @@
+/*
+ * Created on Jan 12, 2005
+ */
+package org.aspectj.tools.ajdoc;
+
+/**
+ * @author Mik Kersten
+ */
+public class Util {
+
+ public static boolean isExecutingOnJava5() {
+ String version = System.getProperty("java.class.version","44.0");
+ return version.equals("49.0");
+ }
+
+}