Skip to content

Commit 2e3985d

Browse files
committed
Minor fixes from code review
1 parent 052d026 commit 2e3985d

5 files changed

Lines changed: 6 additions & 5 deletions

File tree

java/jakarta/websocket/server/ServerEndpointConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private Builder(Class<?> endpointClass, String path) {
113113
this.path = path;
114114
}
115115

116-
/**
116+
/**
117117
* Builds and returns a {@link ServerEndpointConfig} with the configured settings.
118118
*
119119
* @return The configured server endpoint configuration

java/org/apache/catalina/core/StandardServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ public synchronized void storeContext(Context context) throws InstanceNotFoundEx
827827
ObjectName sname = new ObjectName("Catalina:type=StoreConfig");
828828
MBeanServer server = Registry.getRegistry(null).getMBeanServer();
829829
if (server.isRegistered(sname)) {
830-
server.invoke(sname, "store", new Object[] { context }, new String[] { "java.lang.String" });
830+
server.invoke(sname, "store", new Object[] { context }, new String[] { "org.apache.catalina.Context" });
831831
} else {
832832
log.error(sm.getString("standardServer.storeConfig.notAvailable", sname));
833833
}

java/org/apache/catalina/tribes/group/AbsoluteOrder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ protected int compareBytes(byte[] d1, byte[] d2) {
171171
* @return comparison result
172172
*/
173173
protected int compareBytes(byte b1, byte b2) {
174-
return compareInts(b1, b2);
174+
return compareInts(b1 & 0xFF, b2 & 0xFF);
175175
}
176176

177177
/**

java/org/apache/el/parser/AstIdentifier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public Object getValue(EvaluationContext ctx) throws ELException {
8888
} finally {
8989
// Always reset the flag to false so the optimisation is not applied
9090
// inappropriately
91-
ctx.putContext(this.getClass(), Boolean.FALSE);
91+
ctx.putContext(ELResolver.StandaloneIdentifierMarker.class, Boolean.FALSE);
9292
}
9393

9494
if (ctx.isPropertyResolved()) {

java/org/apache/tomcat/websocket/WsFrameBase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,8 @@ private boolean processDataControl() throws IOException {
357357
new CloseReason(CloseCodes.PROTOCOL_ERROR, sm.getString("wsFrame.oneByteCloseCode")));
358358
}
359359
if (controlBufferBinary.remaining() > 1) {
360-
code = controlBufferBinary.getShort();
360+
short rawCode = controlBufferBinary.getShort();
361+
code = rawCode & 0xFFFF;
361362
if (controlBufferBinary.remaining() > 0) {
362363
CoderResult cr = utf8DecoderControl.decode(controlBufferBinary, controlBufferText, true);
363364
if (cr.isError()) {

0 commit comments

Comments
 (0)