-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work around Brotli4j EncoderJNI.Operation permission issue.
- Loading branch information
Showing
2 changed files
with
47 additions
and
6 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
...tty-compression-brotli/src/main/java/com/aayushatharva/brotli4j/encoder/EncoderJNIOp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// ======================================================================== | ||
// Copyright (c) 1995 Mort Bay Consulting Pty Ltd and others. | ||
// | ||
// This program and the accompanying materials are made available under the | ||
// terms of the Eclipse Public License v. 2.0 which is available at | ||
// https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 | ||
// which is available at https://www.apache.org/licenses/LICENSE-2.0. | ||
// | ||
// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 | ||
// ======================================================================== | ||
// | ||
|
||
package com.aayushatharva.brotli4j.encoder; | ||
|
||
/** | ||
* A hack to allow the EncoderJNI.Operation to be seen by Jetty's code. | ||
* | ||
* Remove this and use the EncoderJNI.Operation once the fix at brotli4j is released. | ||
* | ||
* See <a href="https://github.com/hyperxpro/Brotli4j/issues/169">Request release of brotli4j</a> | ||
*/ | ||
public enum EncoderJNIOp | ||
{ | ||
PROCESS(EncoderJNI.Operation.PROCESS), | ||
FLUSH(EncoderJNI.Operation.FLUSH), | ||
FINISH(EncoderJNI.Operation.FINISH); | ||
|
||
private final EncoderJNI.Operation op; | ||
|
||
private EncoderJNIOp(EncoderJNI.Operation op) | ||
{ | ||
this.op = op; | ||
} | ||
|
||
public EncoderJNI.Operation getOp() | ||
{ | ||
return op; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters