src/share/jaxws_classes/com/sun/tools/internal/ws/wscompile/FilerCodeWriter.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, 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
@@ -49,11 +49,15 @@
this.filer = options.filer;
}
public Writer openSource(JPackage pkg, String fileName) throws IOException {
String tmp = fileName.substring(0, fileName.length()-5);
+ if (pkg.name() != null && ! "".equals(pkg.name())) {
w = filer.createSourceFile(pkg.name() + "." + tmp).openWriter();
+ } else {
+ w = filer.createSourceFile(tmp).openWriter();
+ }
return w;
}
public void close() throws IOException {