Skip to content

Commit

Permalink
Merge pull request #85 from tryggingamidstodin/update-java
Browse files Browse the repository at this point in the history
update java
  • Loading branch information
jakobrun authored Dec 8, 2023
2 parents ed11d33 + 50f731b commit 9ca49fd
Show file tree
Hide file tree
Showing 6 changed files with 2,367 additions and 723 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion integration-test/ifs-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { jt400 } from './db'
import { expect } from 'chai'
import * as streamEqual from 'stream-equal'
import { jt400 } from './db'
const { ifs } = jt400

describe('ifs', () => {
Expand Down
2 changes: 1 addition & 1 deletion integration-test/msgq-spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { jt400 } from './db'
import { expect } from 'chai'
import { jt400 } from './db'
describe('MessageQ', async function () {
let msgq
beforeEach(async () => {
Expand Down
4 changes: 2 additions & 2 deletions lib/ifs/write_stream.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import util = require('util')
import { newArray } from 'java'
import java = require('java')
import FlushWritable = require('flushwritable')

export function IfsWriteStream(opt) {
Expand All @@ -15,7 +15,7 @@ util.inherits(IfsWriteStream, FlushWritable)
IfsWriteStream.prototype._write = function (chunk, _, next) {
this._ifsWriteStream
.then((stream) => {
const byteArray = newArray('byte', Array.prototype.slice.call(chunk, 0))
const byteArray = java.newArray('byte', [...chunk])
stream.write(byteArray)
next()
})
Expand Down
Loading

0 comments on commit 9ca49fd

Please sign in to comment.