Skip to content

Commit 931164d

Browse files
authored
Remove Netware code (#197)
1 parent 9040d0d commit 931164d

File tree

1 file changed

+16
-69
lines changed

1 file changed

+16
-69
lines changed

src/main/java/org/apache/maven/plugins/javadoc/JavadocUtil.java

Lines changed: 16 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999
import org.codehaus.plexus.util.DirectoryScanner;
100100
import org.codehaus.plexus.util.FileUtils;
101101
import org.codehaus.plexus.util.IOUtil;
102-
import org.codehaus.plexus.util.Os;
103102
import org.codehaus.plexus.util.StringUtils;
104103
import org.codehaus.plexus.util.cli.CommandLineException;
105104
import org.codehaus.plexus.util.cli.CommandLineUtils;
@@ -1095,12 +1094,6 @@ private static class PathTokenizer {
10951094
*/
10961095
private String lookahead = null;
10971096

1098-
/**
1099-
* A boolean that determines if we are running on Novell NetWare, which exhibits slightly different path name
1100-
* characteristics (multi-character volume / drive names)
1101-
*/
1102-
private boolean onNetWare = Os.isFamily("netware");
1103-
11041097
/**
11051098
* Flag to indicate whether or not we are running on a platform with a DOS style filesystem
11061099
*/
@@ -1112,15 +1105,7 @@ private static class PathTokenizer {
11121105
* @param path The path to tokenize. Must not be <code>null</code>.
11131106
*/
11141107
PathTokenizer(String path) {
1115-
if (onNetWare) {
1116-
// For NetWare, use the boolean=true mode, so we can use delimiter
1117-
// information to make a better decision later.
1118-
tokenizer = new StringTokenizer(path, ":;", true);
1119-
} else {
1120-
// on Windows and Unix, we can ignore delimiters and still have
1121-
// enough information to tokenize correctly.
1122-
tokenizer = new StringTokenizer(path, ":;", false);
1123-
}
1108+
tokenizer = new StringTokenizer(path, ":;", false);
11241109
dosStyleFilesystem = File.pathSeparatorChar == ';';
11251110
}
11261111

@@ -1150,59 +1135,21 @@ public String nextToken() throws NoSuchElementException {
11501135
token = tokenizer.nextToken().trim();
11511136
}
11521137

1153-
if (!onNetWare) {
1154-
if (token.length() == 1
1155-
&& Character.isLetter(token.charAt(0))
1156-
&& dosStyleFilesystem
1157-
&& tokenizer.hasMoreTokens()) {
1158-
// we are on a dos style system so this path could be a drive
1159-
// spec. We look at the next token
1160-
String nextToken = tokenizer.nextToken().trim();
1161-
if (nextToken.startsWith("\\") || nextToken.startsWith("/")) {
1162-
// we know we are on a DOS style platform and the next path
1163-
// starts with a slash or backslash, so we know this is a
1164-
// drive spec
1165-
token += ":" + nextToken;
1166-
} else {
1167-
// store the token just read for next time
1168-
lookahead = nextToken;
1169-
}
1170-
}
1171-
} else {
1172-
// we are on NetWare, tokenizing is handled a little differently,
1173-
// due to the fact that NetWare has multiple-character volume names.
1174-
if (token.equals(File.pathSeparator) || token.equals(":")) {
1175-
// ignore ";" and get the next token
1176-
token = tokenizer.nextToken().trim();
1177-
}
1178-
1179-
if (tokenizer.hasMoreTokens()) {
1180-
// this path could be a drive spec, so look at the next token
1181-
String nextToken = tokenizer.nextToken().trim();
1182-
1183-
// make sure we aren't going to get the path separator next
1184-
if (!nextToken.equals(File.pathSeparator)) {
1185-
if (nextToken.equals(":")) {
1186-
if (!token.startsWith("/")
1187-
&& !token.startsWith("\\")
1188-
&& !token.startsWith(".")
1189-
&& !token.startsWith("..")) {
1190-
// it indeed is a drive spec, get the next bit
1191-
String oneMore = tokenizer.nextToken().trim();
1192-
if (!oneMore.equals(File.pathSeparator)) {
1193-
token += ":" + oneMore;
1194-
} else {
1195-
token += ":";
1196-
lookahead = oneMore;
1197-
}
1198-
}
1199-
// implicit else: ignore the ':' since we have either a
1200-
// UNIX or a relative path
1201-
} else {
1202-
// store the token just read for next time
1203-
lookahead = nextToken;
1204-
}
1205-
}
1138+
if (token.length() == 1
1139+
&& Character.isLetter(token.charAt(0))
1140+
&& dosStyleFilesystem
1141+
&& tokenizer.hasMoreTokens()) {
1142+
// we are on a dos style system so this path could be a drive
1143+
// spec. We look at the next token
1144+
String nextToken = tokenizer.nextToken().trim();
1145+
if (nextToken.startsWith("\\") || nextToken.startsWith("/")) {
1146+
// we know we are on a DOS style platform and the next path
1147+
// starts with a slash or backslash, so we know this is a
1148+
// drive spec
1149+
token += ":" + nextToken;
1150+
} else {
1151+
// store the token just read for next time
1152+
lookahead = nextToken;
12061153
}
12071154
}
12081155
return token;

0 commit comments

Comments
 (0)