diff options
Diffstat (limited to 'ajdoc/src/org')
-rw-r--r-- | ajdoc/src/org/aspectj/tools/ajdoc/HtmlDecorator.java | 19 | ||||
-rw-r--r-- | ajdoc/src/org/aspectj/tools/ajdoc/Util.java | 16 |
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"); + } + +} |