mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-11-17 16:06:18 +00:00
Suppress additional code warnings for stuff I don't want to modernize right away
This commit is contained in:
parent
ef7b6de3c7
commit
cba2850759
@ -93,7 +93,7 @@ public class JaceUIController {
|
||||
private Button menuButton;
|
||||
|
||||
@FXML
|
||||
private ComboBox musicSelection;
|
||||
private ComboBox<String> musicSelection;
|
||||
|
||||
private final BooleanProperty aspectRatioCorrectionEnabled = new SimpleBooleanProperty(false);
|
||||
|
||||
@ -441,6 +441,7 @@ public class JaceUIController {
|
||||
}
|
||||
|
||||
ScheduledExecutorService notificationExecutor = Executors.newSingleThreadScheduledExecutor();
|
||||
@SuppressWarnings("all")
|
||||
ScheduledFuture ttlCleanupTask = null;
|
||||
|
||||
private void trackTTL(Label icon, long TTL) {
|
||||
|
@ -410,7 +410,7 @@ public class Apple2e extends Computer {
|
||||
int animAddr, animCycleNumber;
|
||||
byte animOldValue;
|
||||
final String animation = "+xX*+-";
|
||||
ScheduledFuture animationSchedule;
|
||||
ScheduledFuture<?> animationSchedule;
|
||||
Runnable doAnimation = () -> {
|
||||
if (animAddr == 0 || animCycleNumber >= animation.length()) {
|
||||
if (animAddr > 0) {
|
||||
|
@ -233,7 +233,6 @@ public class Speaker extends SoundGeneratorDevice {
|
||||
try {
|
||||
buffer.playSample((short) sample);
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
// TODO: Do we need to really worry about this?
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
@ -533,7 +533,9 @@ public class VideoDHGR extends Video {
|
||||
} else {
|
||||
flashTimer--;
|
||||
if (flashTimer <= 0) {
|
||||
markFlashDirtyBits();
|
||||
if (SoftSwitches.MIXED.isOn() || SoftSwitches.TEXT.isOn()) {
|
||||
markFlashDirtyBits();
|
||||
}
|
||||
flashTimer = FLASH_SPEED;
|
||||
flashInverse = !flashInverse;
|
||||
if (flashInverse) {
|
||||
@ -690,7 +692,6 @@ public class VideoDHGR extends Video {
|
||||
}
|
||||
|
||||
private void markFlashDirtyBits() {
|
||||
// TODO: Be smarter about detecting where flash is used... one day...
|
||||
for (int row = 0; row < 192; row++) {
|
||||
currentTextWriter.markDirty(row);
|
||||
}
|
||||
|
@ -109,6 +109,7 @@ public class Configuration implements Reconfigurable {
|
||||
* configuration 2) Provide a simple persistence mechanism to load/store
|
||||
* configuration
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public static class ConfigNode extends TreeItem implements Serializable {
|
||||
|
||||
public transient ConfigNode root;
|
||||
@ -281,6 +282,7 @@ public class Configuration implements Reconfigurable {
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
private static void buildTree(ConfigNode node, Set visited) {
|
||||
if (node.subject == null) {
|
||||
return;
|
||||
@ -516,6 +518,7 @@ public class Configuration implements Reconfigurable {
|
||||
return hasChanged.get();
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
private static void applyConfigTree(ConfigNode newRoot, ConfigNode oldRoot) {
|
||||
if (oldRoot == null || newRoot == null) {
|
||||
return;
|
||||
@ -537,6 +540,7 @@ public class Configuration implements Reconfigurable {
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
private static void doApply(ConfigNode node) {
|
||||
List<String> removeList = new ArrayList<>();
|
||||
registerKeyHandlers(node, false);
|
||||
|
@ -93,6 +93,7 @@ public class ConfigurationUIController {
|
||||
deviceTree.maxWidthProperty().bind(treeScroll.widthProperty());
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
private void resetDeviceTree() {
|
||||
Set<String> expanded = new HashSet<>();
|
||||
String current = getCurrentNodePath();
|
||||
@ -133,6 +134,7 @@ public class ConfigurationUIController {
|
||||
return out;
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
private void setCurrentNodePath(String value) {
|
||||
if (value == null) return;
|
||||
String[] parts = value.split(Pattern.quote(DELIMITER));
|
||||
@ -213,6 +215,7 @@ public class ConfigurationUIController {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
private Node buildEditField(ConfigNode node, String settingName, Serializable value) {
|
||||
Field field;
|
||||
try {
|
||||
@ -256,6 +259,7 @@ public class ConfigurationUIController {
|
||||
return widget;
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
private Node buildDynamicSelectComponent(ConfigNode node, String settingName, Serializable value) {
|
||||
try {
|
||||
DynamicSelection sel = (DynamicSelection) node.subject.getClass().getField(settingName).get(node.subject);
|
||||
|
@ -30,6 +30,7 @@ import java.util.List;
|
||||
* @param <C> Enum class which implements DeviceEnum
|
||||
*/
|
||||
// C is an enum class which implements DeviceEnum
|
||||
@SuppressWarnings("all")
|
||||
public class DeviceSelection<C extends Enum & DeviceEnum> extends DynamicSelection<C> {
|
||||
|
||||
Class<C> enumClass;
|
||||
|
@ -12,6 +12,7 @@ import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public abstract class InvokableActionRegistry {
|
||||
protected static final Logger logger = Logger.getLogger(InvokableActionRegistry.class.getName());
|
||||
private final Map<Class, Set<String>> staticMethodNames = new HashMap<>();
|
||||
|
@ -38,7 +38,7 @@ public class Motherboard extends TimedDevice {
|
||||
|
||||
@ConfigurableField(name = "Enable Speaker", shortName = "speaker", defaultValue = "true")
|
||||
public static boolean enableSpeaker = true;
|
||||
public Speaker speaker;
|
||||
private Speaker speaker;
|
||||
|
||||
void vblankEnd() {
|
||||
SoftSwitches.VBL.getSwitch().setState(true);
|
||||
|
@ -336,8 +336,10 @@ public class Utility {
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
static Map<Class, Map<String, Object>> enumCache = new HashMap<>();
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public static Object findClosestEnumConstant(String value, Class type) {
|
||||
Map<String, Object> enumConstants = enumCache.get(type);
|
||||
if (enumConstants == null) {
|
||||
@ -356,6 +358,7 @@ public class Utility {
|
||||
return enumConstants.get(key);
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public static Object deserializeString(String value, Class type, boolean hex) {
|
||||
int radix = hex ? 16 : 10;
|
||||
if (type.equals(Integer.TYPE) || type == Integer.class) {
|
||||
|
@ -277,7 +277,7 @@ public class CardMockingboard extends Card implements Runnable {
|
||||
double out = (MAX_AMPLITUDE * volume) / 100.0;
|
||||
// Reduce max amplitude to reflect post-mixer values so we don't have to scale volume when mixing channels
|
||||
out = out * 2.0 / 3.0 / numChips;
|
||||
double delta = 1.15;
|
||||
// double delta = 1.15;
|
||||
for (int i = 15; i > 0; i--) {
|
||||
VolTable[i] = (int) (out / Math.pow(Math.sqrt(2),(15-i)));
|
||||
// out /= 1.188502227; /* = 10 ^ (1.5/20) = 1.5dB */
|
||||
|
@ -42,7 +42,7 @@ public class LargeDisk implements IDisk {
|
||||
// Offset in input file where data can be found
|
||||
private int dataOffset = 0;
|
||||
private int physicalBlocks = 0;
|
||||
private int logicalBlocks = 0;
|
||||
// private int logicalBlocks;
|
||||
|
||||
public LargeDisk(File f) {
|
||||
try {
|
||||
@ -124,7 +124,7 @@ public class LargeDisk implements IDisk {
|
||||
// todo: read header
|
||||
dataOffset = 64;
|
||||
physicalBlocks = (int) (f.length() / BLOCK_SIZE);
|
||||
logicalBlocks = physicalBlocks;
|
||||
// logicalBlocks = physicalBlocks;
|
||||
result = true;
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
@ -145,7 +145,7 @@ public class LargeDisk implements IDisk {
|
||||
System.out.println("Disk is HDV");
|
||||
dataOffset = 0;
|
||||
physicalBlocks = (int) (f.length() / BLOCK_SIZE);
|
||||
logicalBlocks = physicalBlocks;
|
||||
// logicalBlocks = physicalBlocks;
|
||||
}
|
||||
|
||||
private void readDiskImage(File f) throws IOException {
|
||||
|
@ -18,7 +18,6 @@
|
||||
*/
|
||||
package jace.hardware.massStorage;
|
||||
|
||||
import jace.Emulator;
|
||||
import jace.EmulatorUILogic;
|
||||
import jace.apple2e.MOS65C02;
|
||||
import jace.core.Computer;
|
||||
|
@ -21,6 +21,7 @@ import java.util.Collections;
|
||||
* This is a program that is intended to be defined and executed outside of a IDE session
|
||||
* @author blurry
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public class HeadlessProgram extends Program {
|
||||
public HeadlessProgram(DocumentType type) {
|
||||
super(type, Collections.emptyMap());
|
||||
|
@ -267,6 +267,7 @@ public class IdeController {
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
private void updateStatusMessages(CompileResult lastResult) {
|
||||
String message = "Compiler was " + (lastResult.isSuccessful() ? " successful" : " NOT SUCCESSFUL");
|
||||
message += " -- ";
|
||||
|
@ -18,6 +18,7 @@ import java.util.logging.Logger;
|
||||
*
|
||||
* @author blurry
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public class Program {
|
||||
|
||||
public static String CODEMIRROR_EDITOR = "/codemirror/editor.html";
|
||||
|
@ -94,6 +94,7 @@ public class TocTreeModel implements TreeModel {
|
||||
return getChildCount(node) == 0;
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public void valueForPathChanged(TreePath path, Object newValue) {
|
||||
// Do nothing...
|
||||
}
|
||||
@ -120,6 +121,7 @@ public class TocTreeModel implements TreeModel {
|
||||
// Do nothing...
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public Set<Long> getEntries(Object selection) {
|
||||
if (selection.equals(this)) return getEntries(tree);
|
||||
if (selection instanceof Set) return (Set<Long>) selection;
|
||||
|
@ -36,6 +36,7 @@ import java.util.logging.Logger;
|
||||
* @author Brendan Robert (BLuRry) brendan.robert@gmail.com
|
||||
* @param <T>
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public class ObjectGraphNode<T> implements Serializable {
|
||||
|
||||
public ObjectGraphNode parent;
|
||||
|
@ -33,6 +33,7 @@ import javafx.scene.image.Image;
|
||||
*
|
||||
* @author Brendan Robert (BLuRry) brendan.robert@gmail.com
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public class State extends HashMap<ObjectGraphNode, StateValue> {
|
||||
|
||||
boolean deltaState;
|
||||
|
@ -45,6 +45,7 @@ import javafx.scene.image.WritableImage;
|
||||
*
|
||||
* @author Brendan Robert (BLuRry) brendan.robert@gmail.com
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public class StateManager implements Reconfigurable {
|
||||
|
||||
private static StateManager instance;
|
||||
|
@ -57,6 +57,7 @@ public class StateValue<T> implements Serializable {
|
||||
// Do nothing -- this is here in case it is necessary to implement partial changes
|
||||
}
|
||||
|
||||
@SuppressWarnings("all")
|
||||
private T copyObject(T currentValue) {
|
||||
if (currentValue == null) return null;
|
||||
if (type.isPrimitive()) {
|
||||
|
@ -316,14 +316,17 @@ public class MetacheatUI {
|
||||
searchStartAddressField.textProperty().addListener(addressRangeListener);
|
||||
searchEndAddressField.textProperty().addListener(addressRangeListener);
|
||||
|
||||
@SuppressWarnings("all")
|
||||
TableColumn<DynamicCheat, Boolean> activeColumn = (TableColumn<DynamicCheat, Boolean>) cheatsTableView.getColumns().get(0);
|
||||
activeColumn.setCellValueFactory(new PropertyValueFactory<>("active"));
|
||||
activeColumn.setCellFactory((TableColumn<DynamicCheat, Boolean> param) -> new CheckBoxTableCell<>());
|
||||
|
||||
@SuppressWarnings("all")
|
||||
TableColumn<DynamicCheat, String> nameColumn = (TableColumn<DynamicCheat, String>) cheatsTableView.getColumns().get(1);
|
||||
nameColumn.setCellValueFactory(new PropertyValueFactory<>("name"));
|
||||
nameColumn.setCellFactory((TableColumn<DynamicCheat, String> param) -> new TextFieldTableCell<>(new DefaultStringConverter()));
|
||||
|
||||
@SuppressWarnings("all")
|
||||
TableColumn<DynamicCheat, Integer> addrColumn = (TableColumn<DynamicCheat, Integer>) cheatsTableView.getColumns().get(2);
|
||||
addrColumn.setCellValueFactory(new PropertyValueFactory<>("address"));
|
||||
addrColumn.setCellFactory((TableColumn<DynamicCheat, Integer> param) -> {
|
||||
@ -340,6 +343,7 @@ public class MetacheatUI {
|
||||
});
|
||||
});
|
||||
|
||||
@SuppressWarnings("all")
|
||||
TableColumn<DynamicCheat, String> exprColumn = (TableColumn<DynamicCheat, String>) cheatsTableView.getColumns().get(3);
|
||||
exprColumn.setCellValueFactory(new PropertyValueFactory<>("expression"));
|
||||
exprColumn.setCellFactory((TableColumn<DynamicCheat, String> param) -> new TextFieldTableCell<>(new DefaultStringConverter()));
|
||||
@ -383,6 +387,7 @@ public class MetacheatUI {
|
||||
|
||||
public static Set<MemoryCell> redrawNodes = new ConcurrentSkipListSet<>();
|
||||
ScheduledExecutorService animationTimer = null;
|
||||
@SuppressWarnings("all")
|
||||
ScheduledFuture animationFuture = null;
|
||||
Tooltip memoryWatchTooltip = new Tooltip();
|
||||
|
||||
|
@ -38,6 +38,7 @@ class Watch extends VBox {
|
||||
private static final int GRAPH_WIDTH = 50;
|
||||
private static final double GRAPH_HEIGHT = 50;
|
||||
int address;
|
||||
@SuppressWarnings("all")
|
||||
ScheduledFuture redraw;
|
||||
Canvas graph;
|
||||
List<Integer> samples = Collections.synchronizedList(new ArrayList<>());
|
||||
|
@ -18,7 +18,7 @@ module lawlesslegends {
|
||||
requires nestedvm;
|
||||
requires java.base;
|
||||
requires java.logging;
|
||||
requires java.desktop;
|
||||
requires transitive java.desktop;
|
||||
requires java.datatransfer;
|
||||
requires java.scripting;
|
||||
requires static transitive java.compiler;
|
||||
@ -52,5 +52,15 @@ module lawlesslegends {
|
||||
provides javax.annotation.processing.Processor with jace.config.InvokableActionAnnotationProcessor;
|
||||
|
||||
exports jace;
|
||||
exports jace.apple2e;
|
||||
exports jace.cheat;
|
||||
exports jace.config;
|
||||
exports jace.core;
|
||||
exports jace.hardware;
|
||||
exports jace.hardware.mockingboard;
|
||||
exports jace.lawless;
|
||||
exports jace.library;
|
||||
exports jace.state;
|
||||
exports jace.ui;
|
||||
|
||||
}
|
||||
|
@ -28,7 +28,6 @@ public class SoundTest {
|
||||
System.out.println("Deactivating sound");
|
||||
mixer.detach();
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user