bug fix de erro na compilacao

This commit is contained in:
Gustavo committed 2026-10-01 10:42:49 -03:00
1 parent 4cc07a3754
commit 67813e4881
16 files changed
+24 -13

No files matched your search

+4 -3
View File
@@ -1,15 +1,16 @@
JAR = ../pitiupi/dist/pitiupi.jar
OUT_DIR = /out
OUT_DIR = out
META-INF_DIR = src/META-INF
DIST = dist/mpChat.jar
SOURCES = $(shell find -name "*.java")
all:
mkdir -p $(OUT_DIR)
mkdir -p "$(OUT_DIR)"
mkdir -p "$(dir $(DIST))"
javac -cp "$(JAR)" -d "$(OUT_DIR)" $(SOURCES)
cp -r "$(META-INF_DIR)" "$(OUT_DIR)"
jar cf "$(DIST)" -C "$(OUT_DIR)" .
clean:
rm -rf "$(OUT_DIR)"/*
rm -rf "$(OUT_DIR)"/*
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2 -2
View File
@@ -13,12 +13,12 @@ public class ChatMenu extends JMenu {
this.setText("MP-Chat");
JMenuItem startPrivateChat = new JMenuItem("start Private Chat");
startPrivateChat.addActionListener(_ -> showPrivateChatDialog());
startPrivateChat.addActionListener(e -> showPrivateChatDialog());
this.add(startPrivateChat);
}
public void newMenuItem(JMenuItem newMenuItem, ChatWindow chatWindow) {
newMenuItem.addActionListener(_ -> chatWindow.setVisible(true));
newMenuItem.addActionListener(e -> chatWindow.setVisible(true));
this.add(newMenuItem);
}
@@ -14,9 +14,8 @@ public class PrivateChatWindow extends ChatWindow {
private final TcpConnection connection;
public PrivateChatWindow(ConnectionManager ConnectionManager, TcpConnection connection) {
this.connection = connection;
super(ConnectionManager);
this.connection = connection;
}
@Override
@@ -41,4 +40,4 @@ public class PrivateChatWindow extends ChatWindow {
Logger.getLogger(PrivateChatWindow.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
}
Binary file not shown.
+11
View File
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
+2 -2
View File
@@ -46,8 +46,8 @@ javac.modulepath=
javac.processormodulepath=
javac.processorpath=\
${javac.classpath}
javac.source=25
javac.target=25
javac.source=17
javac.target=17
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
+1 -1
View File
@@ -116,7 +116,7 @@ public class MainWindow extends javax.swing.JFrame {
}
private void updateStatus() {
this.status.setText("Connected on port " + connectionManager.getUserPort() + " name " + connectionManager.getUserName());
this.status.setText("Connected on port " + connectionManager.getPort() + " name " + connectionManager.getUserName());
}
}
@@ -56,7 +56,7 @@ public class ConnectionManager {
try {
socketUDP.sendMulticast(message);
return true;
} catch (Exception _) {
} catch (Exception e) {
System.err.println("Error sending UDP Multicast");
}
return false;
@@ -65,7 +65,7 @@ class TcpConnectionManager implements PeerListener {
*/
public void addPrivateConnection(TcpConnection connection) {
List<TcpConnection> connections =
privateConnections.computeIfAbsent(connection.getAddress(), _ -> new ArrayList<>());
privateConnections.computeIfAbsent(connection.getAddress(), e -> new ArrayList<>());
synchronized (connections) {
connections.add(connection);