Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified sources/net.sf.j2s.core/dist/swingjs/SwingJS-site.zip
Binary file not shown.
Binary file modified sources/net.sf.j2s.core/dist/swingjs/net.sf.j2s.core.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion sources/net.sf.j2s.core/dist/swingjs/timestamp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20190326062559
20190404154041
Binary file modified sources/net.sf.j2s.core/dist/swingjs/ver/3.2.4/SwingJS-site.zip
Binary file not shown.
Binary file modified sources/net.sf.j2s.core/dist/swingjs/ver/3.2.4/net.sf.j2s.core.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion sources/net.sf.j2s.core/dist/swingjs/ver/3.2.4/timestamp
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20190326062559
20190404154041
378 changes: 189 additions & 189 deletions sources/net.sf.j2s.core/src/net/sf/j2s/core/Java2ScriptVisitor.java

Large diffs are not rendered by default.

Binary file modified sources/net.sf.j2s.java.core/dist/SwingJS-site.zip
Binary file not shown.
6 changes: 6 additions & 0 deletions sources/net.sf.j2s.java.core/src/java/awt/JSComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,12 @@ public void removeKeyListener(KeyListener l) {
((JSComponentUI)ui).enableJSKeys(false);
}

protected void jsInputMapSet() {
if (ui != null)
((JSComponentUI)ui).enableJSKeys(true);
}



/**
* Invoker must be focusable and could cross from popupmenu to associated component
Expand Down
2 changes: 1 addition & 1 deletion sources/net.sf.j2s.java.core/src/java/io/File.java
Original file line number Diff line number Diff line change
Expand Up @@ -1749,7 +1749,7 @@ public boolean canExecute() {
private static File generateFile(String prefix, String suffix, File dir)
throws IOException
{
long n = new Random().nextLong();
long n = new Random().nextInt(); // was nextLong()
if (n == Long.MIN_VALUE) {
n = 0; // corner case
} else {
Expand Down
2 changes: 2 additions & 0 deletions sources/net.sf.j2s.java.core/src/java/io/FileInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ public FileInputStream(FileDescriptor fdObj) {
*/
private void open(File file) throws FileNotFoundException {
byte[] bytes = JSUtil.getFileAsBytes(file);
if (bytes == null)
throw new FileNotFoundException("Opening file " + file);
file._bytes = bytes;
is = new ByteArrayInputStream(bytes);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,8 @@ public int getResponseCode() throws IOException {
try {
getInputStream();
} catch (Exception e) {
exc = e;
return responseCode = HTTP_NOT_FOUND;
// exc = e;
}


Expand Down
29 changes: 29 additions & 0 deletions sources/net.sf.j2s.java.core/src/java/net/HttpsURLConnection.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright (c) 1996, 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
* 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 java.net;

public interface HttpsURLConnection {
}
Loading