Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://github.com/mP1/walkingkooka/pull/2854 Formatting: continuatio… #667

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
Original file line number Diff line number Diff line change
Expand Up @@ -22,59 +22,59 @@
@J2clTestInput(TimerJ2clTest.class)
public class TimerJ2clTest {

@Test(timeout = 500)
public Promise<Void> testTimerSchedule() {
return new Promise<>(
(resolve, reject) -> {
Timer timer =
new Timer() {
@Override
public void run() {
resolve.onInvoke((Void) null);
}
};
timer.schedule(100);
});
}
@Test(timeout = 500)
public Promise<Void> testTimerSchedule() {
return new Promise<>(
(resolve, reject) -> {
Timer timer =
new Timer() {
@Override
public void run() {
resolve.onInvoke((Void) null);
}
};
timer.schedule(100);
});
}

@Test(timeout = 700)
public Promise<Void> testTimerScheduleRepeating() {
return new Promise<>(
(resolve, reject) -> {
final int[] counter = {5};
Timer timer =
new Timer() {
@Override
public void run() {
counter[0]--;
if (counter[0] == 0) resolve.onInvoke((Void) null);
}
};
timer.scheduleRepeating(100);
});
}
@Test(timeout = 700)
public Promise<Void> testTimerScheduleRepeating() {
return new Promise<>(
(resolve, reject) -> {
final int[] counter = {5};
Timer timer =
new Timer() {
@Override
public void run() {
counter[0]--;
if (counter[0] == 0) resolve.onInvoke((Void) null);
}
};
timer.scheduleRepeating(100);
});
}

@Test(timeout = 900)
public Promise<Void> testTimerCancel() {
return new Promise<>(
(resolve, reject) -> {
Timer timer =
new Timer() {
@Override
public void run() {
reject.onInvoke("should not be called after cancellation");
}
};
timer.scheduleRepeating(300);
@Test(timeout = 900)
public Promise<Void> testTimerCancel() {
return new Promise<>(
(resolve, reject) -> {
Timer timer =
new Timer() {
@Override
public void run() {
reject.onInvoke("should not be called after cancellation");
}
};
timer.scheduleRepeating(300);

timer.cancel();
timer.cancel();

new Timer() {
@Override
public void run() {
resolve.onInvoke((Void) null);
}
}.schedule(600);
});
}
new Timer() {
@Override
public void run() {
resolve.onInvoke((Void) null);
}
}.schedule(600);
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@
@J2clTestInput(TimerJ2clTest2.class)
public class TimerJ2clTest2 {

@Test(timeout = 500)
public Promise<Void> testTimerSchedule() {
return new Promise<>(
(resolve, reject) -> {
Timer timer =
new Timer() {
@Override
public void run() {
resolve.onInvoke((Void) null);
}
};
timer.schedule(100);
});
}
@Test(timeout = 500)
public Promise<Void> testTimerSchedule() {
return new Promise<>(
(resolve, reject) -> {
Timer timer =
new Timer() {
@Override
public void run() {
resolve.onInvoke((Void) null);
}
};
timer.schedule(100);
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,59 +22,59 @@
@J2clTestInput(TimerJ2clTest.class)
public class TimerJ2clTest {

@Test(timeout = 500)
public Promise<Void> testTimerSchedule() {
return new Promise<>(
(resolve, reject) -> {
Timer timer =
new Timer() {
@Override
public void run() {
resolve.onInvoke((Void) null);
}
};
timer.schedule(100);
});
}
@Test(timeout = 500)
public Promise<Void> testTimerSchedule() {
return new Promise<>(
(resolve, reject) -> {
Timer timer =
new Timer() {
@Override
public void run() {
resolve.onInvoke((Void) null);
}
};
timer.schedule(100);
});
}

@Test(timeout = 700)
public Promise<Void> testTimerScheduleRepeating() {
return new Promise<>(
(resolve, reject) -> {
final int[] counter = {5};
Timer timer =
new Timer() {
@Override
public void run() {
counter[0]--;
if (counter[0] == 0) resolve.onInvoke((Void) null);
}
};
timer.scheduleRepeating(100);
});
}
@Test(timeout = 700)
public Promise<Void> testTimerScheduleRepeating() {
return new Promise<>(
(resolve, reject) -> {
final int[] counter = {5};
Timer timer =
new Timer() {
@Override
public void run() {
counter[0]--;
if (counter[0] == 0) resolve.onInvoke((Void) null);
}
};
timer.scheduleRepeating(100);
});
}

@Test(timeout = 900)
public Promise<Void> testTimerCancel() {
return new Promise<>(
(resolve, reject) -> {
Timer timer =
new Timer() {
@Override
public void run() {
reject.onInvoke("should not be called after cancellation");
}
};
timer.scheduleRepeating(300);
@Test(timeout = 900)
public Promise<Void> testTimerCancel() {
return new Promise<>(
(resolve, reject) -> {
Timer timer =
new Timer() {
@Override
public void run() {
reject.onInvoke("should not be called after cancellation");
}
};
timer.scheduleRepeating(300);

timer.cancel();
timer.cancel();

new Timer() {
@Override
public void run() {
resolve.onInvoke((Void) null);
}
}.schedule(600);
});
}
new Timer() {
@Override
public void run() {
resolve.onInvoke((Void) null);
}
}.schedule(600);
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dependency6;
package dependency6;

import jsinterop.annotations.JsType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dependency7;
package dependency7;

import jsinterop.annotations.JsType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package dependency8;
package dependency8;

import jsinterop.annotations.JsType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

package test.javautilprefs;

public class BackingStoreException extends Exception{
public class BackingStoreException extends Exception {

public BackingStoreException(final String message) {
super();
}

@Override
public String toString() {
return "Shaded2";
Expand Down
3 changes: 2 additions & 1 deletion src/it/shade/src/main/java/app/java/io/File.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package app.java.io;

import jsinterop.annotations.JsType;

/**
* This file eventually gets translated into java.io.File
*
Expand All @@ -28,7 +29,7 @@ public class File {
public File(final String path) {
this.path = path;
}

@Override
public String toString() {
return "!!!" + this.getClass().getName() + " path=" + path;
Expand Down
3 changes: 2 additions & 1 deletion src/it/shade/src/main/java/app/javaio/FileInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package app.javaio;

import jsinterop.annotations.JsType;

import java.io.File;

/**
Expand All @@ -30,7 +31,7 @@ public class FileInputStream {
public FileInputStream(final File file) {
this.file = file;
}

@Override
public String toString() {
return "!!!" + this.getClass().getName() + " " + file.getClass().getName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -37,10 +37,13 @@
*/
public class FlowChartEntryPoint implements EntryPoint {
private static int nextId = 0;

private static String nextId() {
return "" + (++nextId);
}

private static final DateTimeFormat format = DateTimeFormat.getFormat(PredefinedFormat.DATE_SHORT);

public void onModuleLoad() {

// Create the component, and tell it how to interact with our data (via lambdas)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down
Loading
Loading