提交 c9014472 编写于 作者: L lana

Merge

......@@ -2,3 +2,4 @@
^dist/
/nbproject/private/
^.hgtip
.DS_Store
......@@ -862,7 +862,8 @@
source="${boot.javac.source}"
target="${boot.javac.target}"
executable="${boot.java.home}/bin/javac"
srcdir="${make.tools.dir}/CompileProperties"
srcdir="${make.tools.dir}"
includes="compileproperties/* anttasks/CompileProperties*"
destdir="${build.toolclasses.dir}/"
classpath="${ant.core.lib}"
bootclasspath="${boot.java.home}/jre/lib/rt.jar"
......@@ -870,7 +871,7 @@
<compilerarg line="${javac.lint.opts}"/>
</javac>
<taskdef name="pcompile"
classname="CompilePropertiesTask"
classname="anttasks.CompilePropertiesTask"
classpath="${build.toolclasses.dir}/"/>
</target>
......@@ -880,7 +881,8 @@
source="${boot.javac.source}"
target="${boot.javac.target}"
executable="${boot.java.home}/bin/javac"
srcdir="${make.tools.dir}/GenStubs"
srcdir="${make.tools.dir}"
includes="genstubs/* anttasks/GenStubs*"
destdir="${build.toolclasses.dir}/"
classpath="${ant.core.lib}"
includeantruntime="false">
......@@ -888,7 +890,7 @@
<compilerarg line="${javac.lint.opts}"/>
</javac>
<taskdef name="genstubs"
classname="GenStubs$$Ant"
classname="anttasks.GenStubsTask"
classpath="${build.toolclasses.dir}/"/>
</target>
......
......@@ -39,6 +39,7 @@ jprt.build.targets= \
solaris_x64_5.10-{product|fastdebug}, \
linux_i586_2.6-{product|fastdebug}, \
linux_x64_2.6-{product|fastdebug}, \
macosx_x64_10.7-{product|fastdebug}, \
windows_i586_5.1-{product|fastdebug}, \
windows_x64_5.2-{product|fastdebug}
......@@ -50,6 +51,7 @@ jprt.my.test.target.set= \
solaris_x64_5.10-product-c2-TESTNAME, \
linux_i586_2.6-product-{c1|c2}-TESTNAME, \
linux_x64_2.6-product-c2-TESTNAME, \
macosx_x64_10.7-product-c2-TESTNAME, \
windows_i586_5.1-product-c1-TESTNAME, \
windows_x64_5.2-product-c2-TESTNAME
......@@ -60,3 +62,18 @@ jprt.make.rule.test.targets= \
# Directories to be excluded from the source bundles
jprt.bundle.exclude.src.dirs=build dist webrev
# Test target list (no fastdebug & limited c2 testing)
jprt.my.test.target.set= \
solaris_sparc_5.10-product-c1-TESTNAME, \
solaris_sparcv9_5.10-product-c2-TESTNAME, \
solaris_i586_5.10-product-c1-TESTNAME, \
solaris_x64_5.10-product-c2-TESTNAME, \
linux_i586_2.6-product-{c1|c2}-TESTNAME, \
linux_x64_2.6-product-c2-TESTNAME, \
macosx_x64_10.7-product-c2-TESTNAME, \
windows_i586_5.1-product-c1-TESTNAME, \
windows_x64_5.2-product-c2-TESTNAME
# Default test targets
jprt.make.rule.test.targets= \
${jprt.my.test.target.set:TESTNAME=jtreg}
......@@ -261,7 +261,8 @@
<target name="-def-select-tool">
<mkdir dir="${build.toolclasses.dir}"/>
<javac srcdir="${make.tools.dir}/SelectTool"
<javac srcdir="${make.tools.dir}"
includes="anttasks/SelectTool*"
destdir="${build.toolclasses.dir}/"
classpath="${ant.core.lib}"
includeantruntime="false"
......@@ -270,7 +271,7 @@
<compilerarg line="-Xlint"/>
</javac>
<taskdef name="select-tool"
classname="SelectToolTask"
classname="anttasks.SelectToolTask"
classpath="${build.toolclasses.dir}/"/>
</target>
......
......@@ -23,6 +23,10 @@
* questions.
*/
package anttasks;
import compileproperties.CompileProperties;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
......
/*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package anttasks;
import genstubs.GenStubs;
import java.io.*;
import java.util.*;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.taskdefs.MatchingTask;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.Reference;
/**
* Files are specified with an implicit fileset, using srcdir as a base directory.
* The set of files to be included is specified with an includes attribute or
* nested <includes> set. However, unlike a normal fileset, an empty includes attribute
* means "no files" instead of "all files". The Ant task also accepts "fork=true" and
* classpath attribute or nested <classpath> element to run GenStubs in a separate VM
* with the specified path. This is likely necessary if a JDK 7 parser is required to read the
* JDK 7 input files.
*/
public class GenStubsTask extends MatchingTask {
private File srcDir;
private File destDir;
private boolean fork;
private Path classpath;
private String includes;
public void setSrcDir(File dir) {
this.srcDir = dir;
}
public void setDestDir(File dir) {
this.destDir = dir;
}
public void setFork(boolean v) {
this.fork = v;
}
public void setClasspath(Path cp) {
if (classpath == null)
classpath = cp;
else
classpath.append(cp);
}
public Path createClasspath() {
if (classpath == null) {
classpath = new Path(getProject());
}
return classpath.createPath();
}
public void setClasspathRef(Reference r) {
createClasspath().setRefid(r);
}
public void setIncludes(String includes) {
super.setIncludes(includes);
this.includes = includes;
}
@Override
public void execute() {
if (includes != null && includes.trim().isEmpty())
return;
DirectoryScanner s = getDirectoryScanner(srcDir);
String[] files = s.getIncludedFiles();
// System.err.println("Ant.execute: srcDir " + srcDir);
// System.err.println("Ant.execute: destDir " + destDir);
// System.err.println("Ant.execute: files " + Arrays.asList(files));
files = filter(srcDir, destDir, files);
if (files.length == 0)
return;
System.out.println("Generating " + files.length + " stub files to " + destDir);
List<String> classNames = new ArrayList<String>();
for (String file: files) {
classNames.add(file.replaceAll(".java$", "").replace('/', '.'));
}
if (!fork) {
GenStubs m = new GenStubs();
boolean ok = m.run(srcDir.getPath(), destDir, classNames);
if (!ok)
throw new BuildException("genstubs failed");
} else {
List<String> cmd = new ArrayList<String>();
String java_home = System.getProperty("java.home");
cmd.add(new File(new File(java_home, "bin"), "java").getPath());
if (classpath != null)
cmd.add("-Xbootclasspath/p:" + classpath);
cmd.add(GenStubs.class.getName());
cmd.add("-sourcepath");
cmd.add(srcDir.getPath());
cmd.add("-s");
cmd.add(destDir.getPath());
cmd.addAll(classNames);
//System.err.println("GenStubs exec " + cmd);
ProcessBuilder pb = new ProcessBuilder(cmd);
pb.redirectErrorStream(true);
try {
Process p = pb.start();
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
try {
String line;
while ((line = in.readLine()) != null)
System.out.println(line);
} finally {
in.close();
}
int rc = p.waitFor();
if (rc != 0)
throw new BuildException("genstubs failed");
} catch (IOException e) {
throw new BuildException("genstubs failed", e);
} catch (InterruptedException e) {
throw new BuildException("genstubs failed", e);
}
}
}
String[] filter(File srcDir, File destDir, String[] files) {
List<String> results = new ArrayList<String>();
for (String f: files) {
long srcTime = new File(srcDir, f).lastModified();
long destTime = new File(destDir, f).lastModified();
if (srcTime > destTime)
results.add(f);
}
return results.toArray(new String[results.size()]);
}
}
......@@ -23,6 +23,8 @@
* questions.
*/
package anttasks;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.event.ActionEvent;
......
......@@ -23,6 +23,8 @@
* questions.
*/
package compileproperties;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
......@@ -61,7 +63,7 @@ public class CompileProperties {
}
}
static interface Log {
public static interface Log {
void info(String msg);
void verbose(String msg);
void error(String msg, Exception e);
......@@ -72,7 +74,7 @@ public class CompileProperties {
private String supers[] ;
private int compileCount = 0;
private boolean quiet = false;
private Log log;
public Log log;
public void setLog(Log log) {
this.log = log;
......
......@@ -23,19 +23,14 @@
* questions.
*/
package genstubs;
import java.io.*;
import java.util.*;
import javax.tools.JavaFileObject;
import javax.tools.StandardJavaFileManager;
import javax.tools.StandardLocation;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.taskdefs.MatchingTask;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.Reference;
import com.sun.source.tree.CompilationUnitTree;
import com.sun.source.util.JavacTask;
import com.sun.tools.javac.api.JavacTool;
......@@ -81,15 +76,6 @@ import javax.tools.JavaFileManager;
* Documentation comments and annotations are removed. Method bodies are removed
* and methods are marked native. Private and package-private field definitions
* have their initializers replace with 0, 0.0, false, null as appropriate.
*
* An Ant task, Main$Ant is also provided. Files are specified with an implicit
* fileset, using srcdir as a base directory. The set of files to be included
* is specified with an includes attribute or nested <includes> set. However,
* unlike a normal fileset, an empty includes attribute means "no files" instead
* of "all files". The Ant task also accepts "fork=true" and classpath attribute
* or nested <classpath> element to run GenStubs in a separate VM with the specified
* path. This is likely necessary if a JDK 7 parser is required to read the
* JDK 7 input files.
*/
public class GenStubs {
......@@ -110,7 +96,7 @@ public class GenStubs {
System.exit(1);
}
boolean run(String... args) {
public boolean run(String... args) {
File outdir = null;
String sourcepath = null;
List<String> classes = new ArrayList<String>();
......@@ -132,7 +118,7 @@ public class GenStubs {
return run(sourcepath, outdir, classes);
}
boolean run(String sourcepath, File outdir, List<String> classes) {
public boolean run(String sourcepath, File outdir, List<String> classes) {
//System.err.println("run: sourcepath:" + sourcepath + " outdir:" + outdir + " classes:" + classes);
if (sourcepath == null)
throw new IllegalArgumentException("sourcepath not set");
......@@ -298,9 +284,9 @@ public class GenStubs {
tree.accept(this);
ListBuffer<JCTree> defs = new ListBuffer<JCTree>();
for (JCTree def: tree.defs) {
if (def.getTag() == JCTree.IMPORT) {
if (def.getTag() == JCTree.Tag.IMPORT) {
JCImport imp = (JCImport) def;
if (imp.qualid.getTag() == JCTree.SELECT) {
if (imp.qualid.getTag() == JCTree.Tag.SELECT) {
JCFieldAccess qualid = (JCFieldAccess) imp.qualid;
if (!qualid.name.toString().equals("*")
&& !names.contains(qualid.name)) {
......@@ -327,122 +313,4 @@ public class GenStubs {
names.add(tree.name);
}
}
//---------- Ant Invocation ------------------------------------------------
public static class Ant extends MatchingTask {
private File srcDir;
private File destDir;
private boolean fork;
private Path classpath;
private String includes;
public void setSrcDir(File dir) {
this.srcDir = dir;
}
public void setDestDir(File dir) {
this.destDir = dir;
}
public void setFork(boolean v) {
this.fork = v;
}
public void setClasspath(Path cp) {
if (classpath == null)
classpath = cp;
else
classpath.append(cp);
}
public Path createClasspath() {
if (classpath == null) {
classpath = new Path(getProject());
}
return classpath.createPath();
}
public void setClasspathRef(Reference r) {
createClasspath().setRefid(r);
}
public void setIncludes(String includes) {
super.setIncludes(includes);
this.includes = includes;
}
@Override
public void execute() {
if (includes != null && includes.trim().isEmpty())
return;
DirectoryScanner s = getDirectoryScanner(srcDir);
String[] files = s.getIncludedFiles();
// System.err.println("Ant.execute: srcDir " + srcDir);
// System.err.println("Ant.execute: destDir " + destDir);
// System.err.println("Ant.execute: files " + Arrays.asList(files));
files = filter(srcDir, destDir, files);
if (files.length == 0)
return;
System.out.println("Generating " + files.length + " stub files to " + destDir);
List<String> classNames = new ArrayList<String>();
for (String file: files) {
classNames.add(file.replaceAll(".java$", "").replace('/', '.'));
}
if (!fork) {
GenStubs m = new GenStubs();
boolean ok = m.run(srcDir.getPath(), destDir, classNames);
if (!ok)
throw new BuildException("genstubs failed");
} else {
List<String> cmd = new ArrayList<String>();
String java_home = System.getProperty("java.home");
cmd.add(new File(new File(java_home, "bin"), "java").getPath());
if (classpath != null)
cmd.add("-Xbootclasspath/p:" + classpath);
cmd.add(GenStubs.class.getName());
cmd.add("-sourcepath");
cmd.add(srcDir.getPath());
cmd.add("-s");
cmd.add(destDir.getPath());
cmd.addAll(classNames);
//System.err.println("GenStubs exec " + cmd);
ProcessBuilder pb = new ProcessBuilder(cmd);
pb.redirectErrorStream(true);
try {
Process p = pb.start();
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
try {
String line;
while ((line = in.readLine()) != null)
System.out.println(line);
} finally {
in.close();
}
int rc = p.waitFor();
if (rc != 0)
throw new BuildException("genstubs failed");
} catch (IOException e) {
throw new BuildException("genstubs failed", e);
} catch (InterruptedException e) {
throw new BuildException("genstubs failed", e);
}
}
}
String[] filter(File srcDir, File destDir, String[] files) {
List<String> results = new ArrayList<String>();
for (String f: files) {
long srcTime = new File(srcDir, f).lastModified();
long destTime = new File(destDir, f).lastModified();
if (srcTime > destTime)
results.add(f);
}
return results.toArray(new String[results.size()]);
}
}
}
......@@ -1235,7 +1235,7 @@ public abstract class Symbol implements Element {
// if origin is derived from a raw type, we might have missed
// an implementation because we do not know enough about instantiations.
// in this case continue with the supertype as origin.
if (types.isDerivedRaw(origin.type))
if (types.isDerivedRaw(origin.type) && !origin.isInterface())
return implementation(types.supertype(origin.type).tsym, types, checkResult);
else
return null;
......
......@@ -63,6 +63,7 @@ public class Check {
private final Names names;
private final Log log;
private final Resolve rs;
private final Symtab syms;
private final Enter enter;
private final Infer infer;
......@@ -95,6 +96,7 @@ public class Check {
names = Names.instance(context);
log = Log.instance(context);
rs = Resolve.instance(context);
syms = Symtab.instance(context);
enter = Enter.instance(context);
infer = Infer.instance(context);
......@@ -106,6 +108,7 @@ public class Check {
Source source = Source.instance(context);
allowGenerics = source.allowGenerics();
allowVarargs = source.allowVarargs();
allowAnnotations = source.allowAnnotations();
allowCovariantReturns = source.allowCovariantReturns();
allowSimplifiedVarargs = source.allowSimplifiedVarargs();
......@@ -137,6 +140,10 @@ public class Check {
*/
boolean allowGenerics;
/** Switch: varargs enabled?
*/
boolean allowVarargs;
/** Switch: annotations enabled?
*/
boolean allowAnnotations;
......@@ -525,16 +532,16 @@ public class Check {
* @param a The type that should be bounded by bs.
* @param bs The bound.
*/
private boolean checkExtends(Type a, TypeVar bs) {
private boolean checkExtends(Type a, Type bound) {
if (a.isUnbound()) {
return true;
} else if (a.tag != WILDCARD) {
a = types.upperBound(a);
return types.isSubtype(a, bs.bound);
return types.isSubtype(a, bound);
} else if (a.isExtendsBound()) {
return types.isCastable(bs.getUpperBound(), types.upperBound(a), Warner.noWarnings);
return types.isCastable(bound, types.upperBound(a), Warner.noWarnings);
} else if (a.isSuperBound()) {
return !types.notSoftSubtype(types.lowerBound(a), bs.getUpperBound());
return !types.notSoftSubtype(types.lowerBound(a), bound);
}
return true;
}
......@@ -743,22 +750,103 @@ public class Check {
(s.flags() & (STATIC | FINAL)) != 0);
}
/**
* Check that vararg method call is sound
* @param pos Position to be used for error reporting.
* @param argtypes Actual arguments supplied to vararg method.
*/
void checkVararg(DiagnosticPosition pos, List<Type> argtypes, Symbol msym) {
Type argtype = argtypes.last();
if (!types.isReifiable(argtype) &&
(!allowSimplifiedVarargs ||
msym.attribute(syms.trustMeType.tsym) == null ||
!isTrustMeAllowedOnMethod(msym))) {
warnUnchecked(pos,
"unchecked.generic.array.creation",
argtype);
}
Type checkMethod(Type owntype,
Symbol sym,
Env<AttrContext> env,
final List<JCExpression> argtrees,
List<Type> argtypes,
boolean useVarargs,
boolean unchecked) {
// System.out.println("call : " + env.tree);
// System.out.println("method : " + owntype);
// System.out.println("actuals: " + argtypes);
List<Type> formals = owntype.getParameterTypes();
Type last = useVarargs ? formals.last() : null;
if (sym.name==names.init &&
sym.owner == syms.enumSym)
formals = formals.tail.tail;
List<JCExpression> args = argtrees;
while (formals.head != last) {
JCTree arg = args.head;
Warner warn = convertWarner(arg.pos(), arg.type, formals.head);
assertConvertible(arg, arg.type, formals.head, warn);
args = args.tail;
formals = formals.tail;
}
if (useVarargs) {
Type varArg = types.elemtype(last);
while (args.tail != null) {
JCTree arg = args.head;
Warner warn = convertWarner(arg.pos(), arg.type, varArg);
assertConvertible(arg, arg.type, varArg, warn);
args = args.tail;
}
} else if ((sym.flags() & VARARGS) != 0 && allowVarargs) {
// non-varargs call to varargs method
Type varParam = owntype.getParameterTypes().last();
Type lastArg = argtypes.last();
if (types.isSubtypeUnchecked(lastArg, types.elemtype(varParam)) &&
!types.isSameType(types.erasure(varParam), types.erasure(lastArg)))
log.warning(argtrees.last().pos(), "inexact.non-varargs.call",
types.elemtype(varParam), varParam);
}
if (unchecked) {
warnUnchecked(env.tree.pos(),
"unchecked.meth.invocation.applied",
kindName(sym),
sym.name,
rs.methodArguments(sym.type.getParameterTypes()),
rs.methodArguments(argtypes),
kindName(sym.location()),
sym.location());
owntype = new MethodType(owntype.getParameterTypes(),
types.erasure(owntype.getReturnType()),
types.erasure(owntype.getThrownTypes()),
syms.methodClass);
}
if (useVarargs) {
JCTree tree = env.tree;
Type argtype = owntype.getParameterTypes().last();
if (!types.isReifiable(argtype) &&
(!allowSimplifiedVarargs ||
sym.attribute(syms.trustMeType.tsym) == null ||
!isTrustMeAllowedOnMethod(sym))) {
warnUnchecked(env.tree.pos(),
"unchecked.generic.array.creation",
argtype);
}
Type elemtype = types.elemtype(argtype);
switch (tree.getTag()) {
case APPLY:
((JCMethodInvocation) tree).varargsElement = elemtype;
break;
case NEWCLASS:
((JCNewClass) tree).varargsElement = elemtype;
break;
default:
throw new AssertionError(""+tree);
}
}
return owntype;
}
//where
private void assertConvertible(JCTree tree, Type actual, Type formal, Warner warn) {
if (types.isConvertible(actual, formal, warn))
return;
if (formal.isCompound()
&& types.isSubtype(actual, types.supertype(formal))
&& types.isSubtypeUnchecked(actual, types.interfaces(formal), warn))
return;
if (false) {
// TODO: make assertConvertible work
typeError(tree.pos(), diags.fragment("incompatible.types"), actual, formal);
throw new AssertionError("Tree: " + tree
+ " actual:" + actual
+ " formal: " + formal);
}
}
/**
* Check that type 't' is a valid instantiation of a generic class
......@@ -776,18 +864,16 @@ public class Check {
List<Type> actuals = type.allparams();
List<Type> args = type.getTypeArguments();
List<Type> forms = type.tsym.type.getTypeArguments();
ListBuffer<Type> tvars_buf = new ListBuffer<Type>();
ListBuffer<Type> bounds_buf = new ListBuffer<Type>();
// For matching pairs of actual argument types `a' and
// formal type parameters with declared bound `b' ...
while (args.nonEmpty() && forms.nonEmpty()) {
// exact type arguments needs to know their
// bounds (for upper and lower bound
// calculations). So we create new TypeVars with
// bounds substed with actuals.
tvars_buf.append(types.substBound(((TypeVar)forms.head),
formals,
actuals));
// calculations). So we create new bounds where
// type-parameters are replaced with actuals argument types.
bounds_buf.append(types.subst(forms.head.getUpperBound(), formals, actuals));
args = args.tail;
forms = forms.tail;
}
......@@ -804,32 +890,30 @@ public class Check {
}
args = type.getTypeArguments();
List<Type> tvars = tvars_buf.toList();
List<Type> bounds = bounds_buf.toList();
while (args.nonEmpty() && tvars.nonEmpty()) {
Type actual = types.subst(args.head,
type.tsym.type.getTypeArguments(),
tvars_buf.toList());
while (args.nonEmpty() && bounds.nonEmpty()) {
Type actual = args.head;
if (!isTypeArgErroneous(actual) &&
!tvars.head.getUpperBound().isErroneous() &&
!checkExtends(actual, (TypeVar)tvars.head)) {
!bounds.head.isErroneous() &&
!checkExtends(actual, bounds.head)) {
return args.head;
}
args = args.tail;
tvars = tvars.tail;
bounds = bounds.tail;
}
args = type.getTypeArguments();
tvars = tvars_buf.toList();
bounds = bounds_buf.toList();
for (Type arg : types.capture(type).getTypeArguments()) {
if (arg.tag == TYPEVAR &&
arg.getUpperBound().isErroneous() &&
!tvars.head.getUpperBound().isErroneous() &&
!bounds.head.isErroneous() &&
!isTypeArgErroneous(args.head)) {
return args.head;
}
tvars = tvars.tail;
bounds = bounds.tail;
args = args.tail;
}
......@@ -2492,7 +2576,7 @@ public class Check {
if (enableSunApiLintControl)
warnSunApi(pos, "sun.proprietary", s);
else
log.strictWarning(pos, "sun.proprietary", s);
log.mandatoryWarning(pos, "sun.proprietary", s);
}
});
}
......
......@@ -385,7 +385,6 @@ public class Infer {
final Warner warn) throws InferenceException {
//-System.err.println("instantiateMethod(" + tvars + ", " + mt + ", " + argtypes + ")"); //DEBUG
List<Type> undetvars = Type.map(tvars, fromTypeVarFun);
//final List<Type> capturedArgs = types.capture(argtypes);
final List<Type> capturedArgs =
rs.checkRawArgumentsAcceptable(env, undetvars, argtypes, mt.getParameterTypes(),
......@@ -445,16 +444,20 @@ public class Infer {
return List.nil();
}
@Override
void check(List<Type> inferred, Types types) throws NoInstanceException {
void instantiateReturnType(Type restype, List<Type> inferred, Types types) throws NoInstanceException {
Type owntype = new MethodType(types.subst(getParameterTypes(), tvars, inferred),
restype,
types.subst(getThrownTypes(), tvars, inferred),
qtype.tsym);
// check that actuals conform to inferred formals
checkArgumentsAcceptable(env, capturedArgs, getParameterTypes(), allowBoxing, useVarargs, warn);
warn.clear();
checkArgumentsAcceptable(env, capturedArgs, owntype.getParameterTypes(), allowBoxing, useVarargs, warn);
// check that inferred bounds conform to their bounds
checkWithinBounds(all_tvars,
types.subst(inferredTypes, tvars, inferred), warn);
if (useVarargs) {
chk.checkVararg(env.tree.pos(), getParameterTypes(), msym);
}
}};
qtype = chk.checkMethod(owntype, msym, env, TreeInfo.args(env.tree), capturedArgs, useVarargs, warn.hasNonSilentLint(Lint.LintCategory.UNCHECKED));
}
};
}
else {
// check that actuals conform to inferred formals
......@@ -520,16 +523,7 @@ public class Infer {
return qtype.map(f);
}
void instantiateReturnType(Type restype, List<Type> inferred, Types types) throws NoInstanceException {
//update method type with newly inferred type-arguments
qtype = new MethodType(types.subst(getParameterTypes(), tvars, inferred),
restype,
types.subst(UninferredMethodType.this.getThrownTypes(), tvars, inferred),
UninferredMethodType.this.qtype.tsym);
check(inferred, types);
}
abstract void check(List<Type> inferred, Types types) throws NoInstanceException;
abstract void instantiateReturnType(Type restype, List<Type> inferred, Types types);
abstract List<Type> getConstraints(TypeVar tv, ConstraintKind ck);
......@@ -544,7 +538,7 @@ public class Infer {
if (rs.verboseResolutionMode.contains(VerboseResolutionMode.DEFERRED_INST)) {
log.note(pos, "deferred.method.inst", msym, UninferredMethodType.this.qtype, newRestype);
}
return newRestype;
return UninferredMethodType.this.qtype.getReturnType();
}
@Override
public List<Type> getConstraints(TypeVar tv, ConstraintKind ck) {
......
......@@ -529,24 +529,17 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
// process the non-static imports and the static imports of types.
public void visitImport(JCImport tree) {
JCTree imp = tree.qualid;
JCFieldAccess imp = (JCFieldAccess)tree.qualid;
Name name = TreeInfo.name(imp);
TypeSymbol p;
// Create a local environment pointing to this tree to disable
// effects of other imports in Resolve.findGlobalType
Env<AttrContext> localEnv = env.dup(tree);
// Attribute qualifying package or class.
JCFieldAccess s = (JCFieldAccess) imp;
p = attr.
attribTree(s.selected,
localEnv,
tree.staticImport ? TYP : (TYP | PCK),
Type.noType).tsym;
TypeSymbol p = attr.attribImportQualifier(tree, localEnv).tsym;
if (name == names.asterisk) {
// Import on demand.
chk.checkCanonical(s.selected);
chk.checkCanonical(imp.selected);
if (tree.staticImport)
importStaticAll(tree.pos, p, env);
else
......@@ -555,7 +548,7 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
// Named type import.
if (tree.staticImport) {
importNamedStatic(tree.pos(), p, name, localEnv);
chk.checkCanonical(s.selected);
chk.checkCanonical(imp.selected);
} else {
TypeSymbol c = attribImportType(imp, localEnv).tsym;
chk.checkCanonical(imp);
......
......@@ -107,7 +107,7 @@ public class TransTypes extends TreeTranslator {
make.at(tree.pos);
if (!types.isSameType(tree.type, target)) {
if (!resolve.isAccessible(env, target.tsym))
resolve.logAccessError(env, tree, target);
resolve.logAccessErrorInternal(env, tree, target);
tree = make.TypeCast(make.Type(target), tree).setType(target);
}
make.pos = oldpos;
......
/*
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -102,6 +102,16 @@ public class TreeInfo {
setOpname(MOD, "%", names);
}
public static List<JCExpression> args(JCTree t) {
switch (t.getTag()) {
case APPLY:
return ((JCMethodInvocation)t).args;
case NEWCLASS:
return ((JCNewClass)t).args;
default:
return null;
}
}
/** Return name of operator with given tree tag.
*/
......
......@@ -36,6 +36,14 @@ ifeq ($(OSNAME), Linux)
ARCH=i586
endif
endif
ifeq ($(OSNAME), Darwin)
PLATFORM = bsd
JT_PLATFORM = linux
ARCH = $(shell uname -m)
ifeq ($(ARCH), i386)
ARCH=i586
endif
endif
ifeq ($(OSNAME), Windows_NT)
# MKS
PLATFORM=windows
......@@ -251,6 +259,7 @@ javap: JTREG_TESTDIRS = tools/javap
# JTREG_REFERENCE
# (Optional) reference results (e.g. work, report or summary.txt)
#
jtreg_tests: jtreg-tests
jtreg-tests: check-jtreg FRC
@rm -f -r $(JTREG_OUTPUT_DIR)/JTwork $(JTREG_OUTPUT_DIR)/JTreport \
$(JTREG_OUTPUT_DIR)/diff.html $(JTREG_OUTPUT_DIR)/status.txt
......
#!echo "This is not a shell script"
#############################################################################
# Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#############################################################################
#
# JPRT shell configuration for testing.
#
# Input environment variables:
# Windows Only:
# PATH
# ROOTDIR
#
# Output variable settings:
# make Full path to GNU make
#
# Output environment variables:
# PATH
#
#############################################################################
#############################################################################
# Error
error() # message
{
echo "ERROR: $1"
exit 6
}
# Directory must exist
dirMustExist() # dir name
{
if [ ! -d "$1" ] ; then
error "Directory for $2 does not exist: $1"
fi
}
# File must exist
fileMustExist() # dir name
{
if [ ! -f "$1" ] ; then
error "File for $2 does not exist: $1"
fi
}
#############################################################################
# Should be set by JPRT as the 3 basic inputs
slashjava="${ALT_SLASH_JAVA}"
if [ "${slashjava}" = "" ] ; then
slashjava=/java
fi
# Check input
dirMustExist "${slashjava}" ALT_SLASH_JAVA
# Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
osname=`uname -s`
if [ "${osname}" = SunOS ] ; then
# SOLARIS: Sparc or X86
osarch=`uname -p`
if [ "${osarch}" = sparc ] ; then
solaris_arch=sparc
else
solaris_arch=i386
fi
# Add basic solaris system paths
path4sdk=/usr/ccs/bin:/usr/ccs/lib:/usr/bin:/bin:/usr/sfw/bin
# Find GNU make
make=/usr/sfw/bin/gmake
if [ ! -f ${make} ] ; then
make=/opt/sfw/bin/gmake
if [ ! -f ${make} ] ; then
make=${slashjava}/devtools/${solaris_arch}/bin/gnumake
fi
fi
fileMustExist "${make}" make
# File creation mask
umask 002
elif [ "${osname}" = Linux ] ; then
# Add basic paths
path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
# Find GNU make
make=/usr/bin/make
fileMustExist "${make}" make
umask 002
else
# Windows: Differs on CYGWIN vs. MKS.
# We need to determine if we are running a CYGWIN shell or an MKS shell
# (if uname isn't available, then it will be unix_toolset=unknown)
unix_toolset=unknown
if [ "`uname -a | fgrep Cygwin`" = "" -a -d "${ROOTDIR}" ] ; then
# We kind of assume ROOTDIR is where MKS is and it's ok
unix_toolset=MKS
mkshome=`dosname -s "${ROOTDIR}"`
# Most unix utilities are in the mksnt directory of ROOTDIR
unixcommand_path="${mkshome}/mksnt"
path4sdk="${unixcommand_path}"
devtools_path="${slashjava}/devtools/win32/bin"
path4sdk="${devtools_path};${path4sdk}"
# Find GNU make
make="${devtools_path}/gnumake.exe"
fileMustExist "${make}" make
elif [ "`uname -a | fgrep Cygwin`" != "" -a -f /bin/cygpath ] ; then
# For CYGWIN, uname will have "Cygwin" in it, and /bin/cygpath should exist
unix_toolset=CYGWIN
# Most unix utilities are in the /usr/bin
unixcommand_path="/usr/bin"
path4sdk="${unixcommand_path}"
# Find GNU make
make="${unixcommand_path}/make.exe"
fileMustExist "${make}" make
else
echo "WARNING: Cannot figure out if this is MKS or CYGWIN"
fi
# For windows, it's hard to know where the system is, so we just add this
# to PATH.
slash_path="`echo ${path4sdk} | sed -e 's@\\\\@/@g' -e 's@//@/@g' -e 's@/$@@' -e 's@/;@;@g'`"
path4sdk="${slash_path};${PATH}"
# Convert path4sdk to cygwin style
if [ "${unix_toolset}" = CYGWIN ] ; then
path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
fi
fi
# Export PATH setting
PATH="${path4sdk}"
export PATH
......@@ -44,7 +44,7 @@ fi
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
FS="/"
;;
CYGWIN* )
......
......@@ -41,7 +41,7 @@ fi
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
FS="/"
;;
CYGWIN* )
......
/*
* @test /nodynamiccopyright/
* @bug 7132880
* @summary Resolve should support nested resolution contexts
* @compile/fail/ref=T7132880.out -XDrawDiagnostics T7132880.java
*/
class Outer {
void m1(String s) { }
void m2(int i1, int i2) { }
class Inner {
void test() {
//ok - no method named 'm' in Inner - hence, class to search is Outer
m1("");
}
}
class Inner1 {
void m1(Integer i) { }
void test() {
//error - Inner1 defines an incompatible method - hence, class to search is Inner1
m1("");
}
}
class Inner2 {
private void m1(Integer i) { }
private void m1(Double d) { }
void test() {
//error - Inner2 defines multiple incompatible methods - hence, class to search is Inner2
m1("");
}
}
class Inner3 {
private void m2(Object o, int i) { }
private void m2(int i, Object o) { }
void test() {
//error - Inner3 defines multiple ambiguous methods - hence, class to search is Inner3
m2(1, 1);
}
}
class Inner4 extends Inner2 {
void test() {
//ok - Inner2 defines multiple incompatible inaccessible methods - hence, class to search is Outer
m1("");
}
}
class Inner5 extends Inner3 {
void test() {
//ok - Inner3 defines multiple inaccessible ambiguous methods - hence, class to search is Outer
m2(1, 1);
}
}
}
T7132880.java:23:12: compiler.err.cant.apply.symbol.1: kindname.method, m1, java.lang.Integer, java.lang.String, kindname.class, Outer.Inner1, (compiler.misc.no.conforming.assignment.exists: java.lang.String, java.lang.Integer)
T7132880.java:33:12: compiler.err.cant.apply.symbols: kindname.method, m1, java.lang.String,{(compiler.misc.inapplicable.method: kindname.method, Outer.Inner2, m1(java.lang.Double), (compiler.misc.no.conforming.assignment.exists: java.lang.String, java.lang.Double)),(compiler.misc.inapplicable.method: kindname.method, Outer.Inner2, m1(java.lang.Integer), (compiler.misc.no.conforming.assignment.exists: java.lang.String, java.lang.Integer))}
T7132880.java:43:12: compiler.err.ref.ambiguous: m2, kindname.method, m2(java.lang.Object,int), Outer.Inner3, kindname.method, m2(int,java.lang.Object), Outer.Inner3
3 errors
......@@ -56,7 +56,7 @@ echo "CLASSPATH=${CLASSPATH}"
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux | CYGWIN* )
SunOS | Linux | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
......
......@@ -54,7 +54,7 @@ echo "CLASSPATH=${CLASSPATH}"
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
PS=":"
FS="/"
;;
......
......@@ -47,7 +47,7 @@ echo "CLASSPATH=${CLASSPATH}"
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux | CYGWIN* )
SunOS | Linux | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
......
......@@ -52,7 +52,7 @@ echo "CLASSPATH=${CLASSPATH}"
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
PS=":"
FS="/"
;;
......
......@@ -47,7 +47,7 @@ echo "CLASSPATH=${CLASSPATH}"
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux | CYGWIN* )
SunOS | Linux | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
......
......@@ -47,7 +47,7 @@ echo "CLASSPATH=${CLASSPATH}"
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
PS=":"
FS="/"
;;
......
......@@ -48,7 +48,7 @@ echo
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
FS="/"
;;
CYGWIN* )
......
T6723444.java:42:9: compiler.err.unreported.exception.need.to.catch.or.throw: X2
T6723444.java:43:9: compiler.err.unreported.exception.need.to.catch.or.throw: X2
T6723444.java:42:9: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Throwable
T6723444.java:43:9: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Throwable
T6723444.java:45:32: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Throwable
T6723444.java:46:17: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Throwable
T6723444.java:48:9: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Throwable
......
/*
* @test /nodynamiccopyright/
* @bug 7151070
* @summary NullPointerException in Resolve.isAccessible
* @compile/fail/ref=T7151070.out -XDrawDiagnostics T7151070.java
*/
class T7151070a {
private static class PrivateCls { }
public static class PublicCls extends PrivateCls { }
public void m(PrivateCls p) { }
}
class T7151070b {
public void test(Test<T7151070a.PublicCls> obj, T7151070a outer) {
outer.m(obj.get());
}
public static class Test<T> {
public T get() {
return null;
}
}
}
T7151070.java:17:24: compiler.err.report.access: T7151070a.PrivateCls, private, T7151070a
1 error
/*
* @test /nodynamiccopyright/
* @bug 7151802
* @summary compiler update caused sqe test failed
* @compile/fail/ref=T7151802.out -Werror -Xlint:unchecked -XDrawDiagnostics T7151802.java
*/
class T7151802 {
static class Foo<X> { }
static class SubFoo<X> extends Foo<X> { }
//generic - bound - arg - non-slilent
<Z extends Foo<String>> void get1(Z fz) { }
void test1(Foo foo) { get1(foo); }
//generic - bound - arg - silent
<Z extends Foo<?>> void get2(Z fz) { }
void test2(Foo foo) { get2(foo); }
//generic - nobound - arg - non-slilent
<Z> void get3(Foo<Z> fz) { }
void test(Foo foo) { get3(foo); }
//generic - nobound - arg - slilent
<Z> void get4(Foo<?> fz) { }
void test4(Foo foo) { get4(foo); }
//generic - bound - ret - non-slilent
<Z extends Foo<String>> Z get5() { return null; }
void test5() { SubFoo sf = get5(); }
//generic - bound - ret - slilent
static <Z extends Foo<?>> Z get6() { return null; }
void test6() { SubFoo sf = get6(); }
//nogeneric - nobound - arg - non-slilent
void get7(Foo<String> fz) { }
void test7(Foo foo) { get7(foo); }
//nogeneric - nobound - arg - slilent
static void get8(Foo<?> fz) { }
void test8(Foo foo) { get8(foo); }
}
T7151802.java:14:31: compiler.warn.unchecked.meth.invocation.applied: kindname.method, get1, Z, T7151802.Foo, kindname.class, T7151802
T7151802.java:22:31: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), T7151802.Foo, T7151802.Foo<Z>
T7151802.java:22:30: compiler.warn.unchecked.meth.invocation.applied: kindname.method, get3, T7151802.Foo<Z>, T7151802.Foo, kindname.class, T7151802
T7151802.java:30:36: compiler.warn.unchecked.meth.invocation.applied: kindname.method, get5, compiler.misc.no.args, compiler.misc.no.args, kindname.class, T7151802
T7151802.java:38:32: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), T7151802.Foo, T7151802.Foo<java.lang.String>
T7151802.java:38:31: compiler.warn.unchecked.meth.invocation.applied: kindname.method, get7, T7151802.Foo<java.lang.String>, T7151802.Foo, kindname.class, T7151802
- compiler.err.warnings.and.werror
1 error
6 warnings
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 7148556
* @summary Implementing a generic interface causes a public clone() to become inaccessible
* @compile T7148556.java
*/
class T7148556 {
interface A extends Cloneable {
public Object clone();
}
interface B extends A, java.util.List { }
void test(B b) {
b.clone();
}
}
/*
* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 7148242
* @summary Regression: valid code rejected during generic type well-formedness check
* @compile T7148242.java
*/
class T7148242 {
static abstract class A<K, V, I extends Pair<K, V>, I2 extends Pair<V, K>> {
abstract A<V, K, I2, I> test();
}
static class Pair<K, V> { }
}
......@@ -53,7 +53,7 @@ echo "CLASSPATH=${CLASSPATH}"
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux | CYGWIN* )
SunOS | Linux | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
......
......@@ -41,7 +41,7 @@ fi
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
FS="/"
SCR=`pwd`
;;
......
......@@ -53,7 +53,7 @@ echo "CLASSPATH=${CLASSPATH}"
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
NULL=/dev/null
PS=":"
FS="/"
......
......@@ -50,7 +50,7 @@ echo "CLASSPATH=${CLASSPATH}"
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux | CYGWIN* )
SunOS | Linux | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
......
......@@ -41,7 +41,7 @@ echo "CLASSPATH=${CLASSPATH}"
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux | CYGWIN* )
SunOS | Linux | Darwin | CYGWIN* )
FS="/"
;;
Windows_95 | Windows_98 | Windows_NT )
......
......@@ -55,7 +55,7 @@ echo "CLASSPATH=${CLASSPATH}"
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
if [ -d /usr/lib/locale/en_US.UTF-8 -o -d /usr/lib/locale/en_US.utf8 ]
then
ENV="env LANG=en_US.UTF-8"
......
......@@ -41,7 +41,7 @@ fi
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
PS=":"
FS="/"
;;
......
......@@ -56,7 +56,7 @@ EXPECTED_JAVAH_OUT_FILE=SubClassConsts.out
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux )
SunOS | Linux | Darwin )
PS=":"
FS="/"
;;
......
......@@ -58,7 +58,7 @@ echo "CLASSPATH=${CLASSPATH}"
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux | CYGWIN* )
SunOS | Linux | Darwin | CYGWIN* )
PS=":"
FS="/"
;;
......
......@@ -43,7 +43,7 @@ fi
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux | CYGWIN* )
SunOS | Linux | Darwin | CYGWIN* )
PS=":"
FS="/"
;;
......
......@@ -40,7 +40,7 @@ echo "TESTJAVA=${TESTJAVA}"
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
SunOS | Linux | CYGWIN* )
SunOS | Linux | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册