1
1
/*
2
- * Copyright (c) 2015, 2022 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2015, 2023 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
35
35
import java .nio .charset .CharsetEncoder ;
36
36
import java .nio .charset .CoderResult ;
37
37
import java .nio .charset .CodingErrorAction ;
38
- import java .nio .charset .StandardCharsets ;
39
38
import java .util .Objects ;
40
39
41
40
/**
45
44
*/
46
45
public class PropertyResourceBundleCharset extends Charset {
47
46
48
- private boolean strictUTF8 = false ;
47
+ private final boolean strictUTF8 ;
49
48
50
49
public PropertyResourceBundleCharset (boolean strictUTF8 ) {
51
- this (PropertyResourceBundleCharset .class .getCanonicalName (), null );
50
+ super (PropertyResourceBundleCharset .class .getCanonicalName (), null );
52
51
this .strictUTF8 = strictUTF8 ;
53
52
}
54
53
55
- public PropertyResourceBundleCharset (String canonicalName , String [] aliases ) {
56
- super (canonicalName , aliases );
57
- }
58
-
59
54
@ Override
60
55
public boolean contains (Charset cs ) {
61
56
return false ;
@@ -73,7 +68,7 @@ public CharsetEncoder newEncoder() {
73
68
74
69
private final class PropertiesFileDecoder extends CharsetDecoder {
75
70
76
- private CharsetDecoder cdUTF_8 = UTF_8 .INSTANCE .newDecoder ()
71
+ private final CharsetDecoder cdUTF_8 = UTF_8 .INSTANCE .newDecoder ()
77
72
.onMalformedInput (CodingErrorAction .REPORT )
78
73
.onUnmappableCharacter (CodingErrorAction .REPORT );
79
74
private CharsetDecoder cdISO_8859_1 = null ;
0 commit comments