Skip to content

Commit fc4076f

Browse files
committed
add missing license in empty file
1 parent 4b8a2be commit fc4076f

File tree

5 files changed

+27
-6
lines changed

5 files changed

+27
-6
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) YEARS Apple Inc. and the Swift.org project authors
6+
// Licensed under Apache License v2.0
7+
//
8+
// See LICENSE.txt for license information
9+
// See CONTRIBUTORS.txt for the list of Swift.org project authors
10+
//
11+
// SPDX-License-Identifier: Apache-2.0
12+
//
13+
//===----------------------------------------------------------------------===//

Samples/JavaKitSampleApp/Sources/JavaKitExample/JavaKitExample.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ extension HelloSwift: HelloSwiftNativeMethods {
8585
return i * j
8686
}
8787

88+
@JavaMethod
89+
func addIntegers(_ i: Int, _ j: Int) -> Int {
90+
fatalError()
91+
}
92+
8893
func checkOptionals(helper: ThreadSafeHelperClass) {
8994
let text: JavaString? = helper.textOptional
9095
let value: String? = helper.getValueOptional(Optional<JavaString>.none)

Samples/JavaKitSampleApp/Sources/JavaKitExample/com/example/swift/HelloSwift.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ public HelloSwift() {
3030
}
3131

3232
native int sayHello(int x, int y);
33+
native Integer addIntegers(Integer x, Integer y);
34+
3335
native String throwMessageFromSwift(String message) throws Exception;
3436

3537
// To be called back by the native code

Sources/Java2Swift/JavaToSwift+FetchDependencies.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ extension JavaToSwift {
4040
print("[info][swift-java] Resolved classpath for \(deps.count) dependencies of '\(moduleName)', classpath entries: \(classpathEntries.count), ", terminator: "")
4141
print("done.".green)
4242

43+
for entry in classpathEntries {
44+
print("[info][swift-java] Classpath entry: \(entry)")
45+
}
46+
4347
return ResolvedDependencyClasspath(for: dependencies, classpath: dependenciesClasspath)
4448
}
4549

@@ -133,6 +137,8 @@ extension JavaToSwift {
133137
// The file contents are just plain
134138
let contents = resolvedClasspath.classpath
135139

140+
print("[debug][swift-java] Resolved dependency: \(classpath)")
141+
136142
// Write the file
137143
try writeContents(
138144
contents,

Sources/JavaKit/generated/JavaInteger.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,8 @@ import JavaRuntime
44
@JavaClass("java.lang.Integer")
55
open class JavaInteger: JavaNumber {
66

7-
// FIXME: this is a workaround
8-
public required init(fromJNI value: JNIType, in environment: JNIEnvironment) {
9-
fatalError()
10-
}
11-
127
@JavaMethod
13-
@ _nonoverride public convenience init(_ arg0: Int32, environment: JNIEnvironment? = nil)
8+
@_nonoverride public convenience init(_ arg0: Int32, environment: JNIEnvironment? = nil)
149

1510
@JavaMethod
1611
@_nonoverride public convenience init(_ arg0: String, environment: JNIEnvironment? = nil) throws

0 commit comments

Comments
 (0)