Skip to content

Commit

Permalink
Minor improvements before release
Browse files Browse the repository at this point in the history
  • Loading branch information
Exslims committed Mar 28, 2017
1 parent 1a47b36 commit 9b03617
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.mercury.platform.core;

public class MercuryConstants {
public static final String APP_VERSION = "1.0.0.8";
public static final String APP_VERSION = "1.0.1.0";
public static final String SERVER_HOST = "exslims.ddns.net";
public static final int PORT = 5556;
public static final int PORT = 5555;
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ private void play(String wavPath){
try (AudioInputStream stream = AudioSystem.getAudioInputStream(classLoader.getResource(wavPath))) {
Clip clip = AudioSystem.getClip();
clip.open(stream);
double gain = .5D;
float db = (float) (Math.log(gain) / Math.log(10.0) * 20.0);
FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);
gainControl.setValue(db);
// double gain = .5D;
// float db = (float) (Math.log(gain) / Math.log(10.0) * 20.0);
// FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);
// gainControl.setValue(db);
clip.start();
} catch (Exception e) {
logger.error("Cannot start playing wav file: ",e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
public class ErrorHandler {
private Logger logger = LogManager.getLogger(ErrorHandler.class.getSimpleName());
public ErrorHandler(){
// Thread.setDefaultUncaughtExceptionHandler((thread, throwable) -> {
// logger.error(throwable.fillInStackTrace());
// });
Thread.setDefaultUncaughtExceptionHandler((thread, throwable) -> {
logger.error(throwable.fillInStackTrace());
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public Message parse(String fullMessage){
message.setCurrForSaleTitle(poeTradeCurrencyMatcher.group(5));
message.setCurCount(Double.parseDouble(poeTradeCurrencyMatcher.group(6)));
message.setCurrency(poeTradeCurrencyMatcher.group(8));
message.setLeague(poeTradeCurrencyMatcher.group(9));
message.setOffer(poeTradeCurrencyMatcher.group(10));
return message;
}
Expand All @@ -61,6 +62,7 @@ public Message parse(String fullMessage){
message.setItemName(poeTradeNoBuyoutMatcher.group(3));
message.setCurCount(0d);
message.setCurrency("???");
message.setLeague(poeTradeNoBuyoutMatcher.group(4));
if(poeTradeNoBuyoutMatcher.group(6) != null) {
message.setTabName(poeTradeNoBuyoutMatcher.group(6));
message.setLeft(Integer.parseInt(poeTradeNoBuyoutMatcher.group(7)));
Expand Down
4 changes: 2 additions & 2 deletions app-core/src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="ERROR">
<Configuration status="error">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n" />
Expand All @@ -9,7 +9,7 @@
</File>
</Appenders>
<Loggers>
<Root level="debug">
<Root level="error">
<AppenderRef ref="LogFile"/>
<AppenderRef ref="Console" />
</Root>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import javax.swing.*;
import java.awt.*;
import java.util.Map;

//todo need generalization
public abstract class ScalableComponentFrame extends ComponentFrame implements HasUI{
protected Container mainContainer;
private ScaleState scaleState = ScaleState.DEFAULT;
Expand Down

0 comments on commit 9b03617

Please sign in to comment.